]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
RISC-V/GAS: Support more relocs against constant addresses
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
7dc53023
LM
12016-12-23 Luis Machado <lgustavo@codesourcery.com>
2
3 * win32-i386-low.c: Fix incorrect reference to a couple source files.
4 * nto-x86-low.c: Likewise.
5
ad02e4fe
SM
62016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
7
8 * Makefile.in: Include disable-implicit-rules.mk.
9
dcb07cfa
PA
102016-11-23 Pedro Alves <palves@redhat.com>
11
12 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
13 (debug_vprintf): Use std::chrono::steady_clock instead of
14 gettimeofday. Use '.' instead of ':'.
15 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
16 (get_timestamp): Use std::chrono::steady_clock instead of
17 gettimeofday.
18
8629c02c
SM
192016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
20
21 * Makefile.in: Fix whitespace formatting.
22
b593ecca
SM
232016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
24
25 * Makefile.in (SFILES, OBS): Flatten list and order
26 alphabetically.
27
9986ba08
PA
282016-11-23 Pedro Alves <palves@redhat.com>
29
30 * event-loop.c (handle_file_event): Use warning.
31 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
32 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
33 Use warning.
34
4eefa7bc
PA
352016-11-23 Pedro Alves <palves@redhat.com>
36
37 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
38 output.
39 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
40 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
41 debug_printf and debug_flush for debug output.
42 * server.c (handle_general_set): Likewise.
43 * thread-db.c (try_thread_db_load): Use debug_printf for debug
44 output.
45
5443506e
SM
462016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
47
48 * Makefile.in (.c.o): Replace rule with ...
49 (%.o: %.c): ... this one.
50
3b165252
SM
512016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
52
53 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
54 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
55 make.
56 * configure.ac: Remove checks for the make program.
57 * configure: Re-generate.
58
0bcda685
PA
592016-10-28 Pedro Alves <palves@redhat.com>
60
61 * Makefile.in (CXX_DIALECT): Get from configure.
62 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
63 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
64 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
65 * config.in: Regenerate.
66 * configure: Regenerate.
67
c3805894
YQ
682016-10-27 Yao Qi <yao.qi@linaro.org>
69
70 * linux-low.c (linux_supports_range_stepping): Return true if
71 can_software_single_step return true.
72
89342618
YQ
732016-10-27 Yao Qi <yao.qi@linaro.org>
74
75 * inferiors.c (find_inferior_in_random): New function.
76 * inferiors.h (find_inferior_in_random): Declare.
77 * linux-low.c (linux_wait_for_event_filtered): Call
78 find_inferior_in_random instead of find_inferior.
79
e3652c84
YQ
802016-10-27 Yao Qi <yao.qi@linaro.org>
81
82 * linux-low.c (linux_wait_1): If single-step breakpoints are
83 inserted, remove them.
84
5a04c4cf
PA
852016-10-26 Pedro Alves <palves@redhat.com>
86
87 * linux-low.c (handle_extended_wait): Link parent/child fork
88 threads.
89 (linux_wait_1): Unlink them.
90 (linux_set_resume_request): Ignore resume requests for
91 already-resumed and unhandled fork child threads.
92 * linux-low.h (struct lwp_info) <fork_relative>: New field.
93 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
94 New functions.
95 (handle_v_requests) <vCont>: Don't call require_running.
96 * server.h (in_queued_stop_replies): New declaration.
97
cb93dc7f
YQ
982016-10-24 Yao Qi <yao.qi@linaro.org>
99
100 PR server/20733
101 * linux-aarch64-low.c (append_insns): Cast the return value to
102 'uint32_t *'.
103
a1078bea
YQ
1042016-10-10 Yao Qi <yao.qi@linaro.org>
105
106 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
107
1fb77080
SDJ
1082016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
109
110 * target.c (target_supports_multi_process): New function, moved
111 from...
112 * target.h (target_supports_multi_process): ... here. Remove
113 macro.
114
39b5a3b9
TT
1152016-10-05 Tom Tromey <tom@tromey.com>
116
117 PR remote/20655:
118 * tracepoint.c (handle_tracepoint_bkpts): Check
119 ipa_error_tracepoint, not ipa_stopping_tracepoint.
120
c1d0b70a
YQ
1212016-10-05 Yao Qi <yao.qi@linaro.org>
122
123 * configure.srv: Update the path of arm-*.xml files.
124
0a69eedb
YQ
1252016-10-05 Terry Guo <terry.guo@arm.com>
126 Yao Qi <yao.qi@linaro.org>
127
128 * Makefile.in: Adjust the path of rules.
129 * configure.srv: Update the path of xml files.
130 * regformats/arm-with-iwmmxt.dat: Regenerated.
131 * regformats/arm-with-neon.dat: Likewise.
132 * regformats/arm-with-vfpv2.dat: Likewise.
133 * regformats/arm-with-vfpv3.dat Likewise.
134
17e16485
YQ
1352016-09-30 Yao Qi <yao.qi@linaro.org>
136
137 PR gdbserver/20627
138 * target.c (target_stop_and_wait): Don't call
139 target_continue_no_signal, use resume_stop instead.
140
edeeb602
YQ
1412016-09-26 Yao Qi <yao.qi@linaro.org>
142
143 * linux-low.c (linux_wait_1): Call debug_exit.
144
503b1c39
PA
1452016-09-23 Pedro Alves <palves@redhat.com>
146
147 * Makefile.in (SFILES): Add common/new-op.c.
148 (OBS): Add common/new-op.o.
149 (new-op.o): New rule.
150
74172ecf
SM
1512016-09-21 Simon Marchi <simon.marchi@ericsson.com>
152
153 * .gitinore: Ignore more files.
154
fc6cda2e
YQ
1552016-09-21 Yao Qi <yao.qi@linaro.org>
156
157 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
158 23.
159
bc1e6c81
SDJ
1602016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
161
162 * server.c (start_inferior): Call target_mourn_inferior instead of
163 mourn_inferior; pass ptid_t argument to it.
164 (resume): Likewise.
165 (handle_target_event): Likewise.
166 * target.c (target_mourn_inferior): New function.
167 * target.h (mourn_inferior): Delete macro.
168
0e00e962
AA
1692016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
170
171 * linux-low.c (lwp_is_stepping): New function.
172
1d8cb77d
CL
1732016-09-06 Carl Love <cel@us.ibm.com>
174
175 * server.c (start_inferior): Fixed comment, requested comment change
176 didn't get updated correctly. Removed reference to ptrace () call as
177 it is only true on Linux systems.
178
7313bced
CL
1792016-09-06 Carl Love <cel@us.ibm.com>
180
181 * server.c (start_inferior): Do not call
182 function target_post_create_inferior () if the
183 inferior process has already exited.
184
cf6de44d
PA
1852016-09-05 Pedro Alves <palves@redhat.com>
186
187 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
188 (COMPILE.pre, CC_LD): Use CXX directly.
189 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
190 * acinclude.m4: Don't include build-with-cxx.m4.
191 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
192 * configure: Regenerate.
193
c1da6748
AT
1942016-09-02 Akash Trehan <akash.trehan123@gmail.com>
195
196 PR gdb/19495
197 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
198 call writing data to own_buf.
199
f2b9e3df
SDJ
2002016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
201
202 * target.c (mywait): Call target_wait instead of
203 the_target->wait.
204 (target_wait): New function.
205
049a8570
SDJ
2062016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
207
208 * server.c (start_inferior): New variable 'ptid'. Replace calls
209 to the_target->resume by target_continue{,_no_signal}, depending
210 on the case.
211 * target.c (target_stop_and_wait): Call target_continue_no_signal
212 instead of the_target->resume.
213 (target_continue): New function.
214
3aa5cfa0
AT
2152016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
216
217 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
218
754653a7
AZ
2192016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
220
221 PR server/20491
222 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
223 ps_prochandle.
224 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
225 * linux-arm-low.c (ps_get_thread_area): Likewise.
226 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
227 * linux-m68k-low.c (ps_get_thread_area): Likewise.
228 * linux-mips-low.c (ps_get_thread_area): Likewise.
229 * linux-nios2-low.c (ps_get_thread_area): Likewise.
230 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
231 * linux-x86-low.c (ps_get_thread_area): Likewise.
232 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
233
ed036b40
PA
2342016-08-19 Pedro Alves <palves@redhat.com>
235
236 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
237
c8ef42ee
PA
2382016-08-19 Pedro Alves <palves@redhat.com>
239
240 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
241 comment. Use memcpy instead of casting through unsigned long.
242
9c235a72
PA
2432016-08-19 Pedro Alves <palves@redhat.com>
244
245 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
246 allocating around 0x80000000.
247
201506da
PA
2482016-08-19 Pedro Alves <palves@redhat.com>
249
250 PR gdb/20415
251 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
252 (x32-avx512-linux-ipa.o): New rules.
253 * configure.ac (x86_64-*-linux*): New x32 check.
254 * configure.srv (ipa_x32_linux_regobj): New.
255 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
256 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
257 descriptions.
258 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
259 descriptions.
260 * configure: Regenerate.
261
f348d89a
PA
2622016-08-09 Pedro Alves <palves@redhat.com>
263
264 PR gdb/18653
265 * Makefile.in (OBS): Add signals-state-save-restore.o.
266 (signals-state-save-restore.o): New rule.
267 * config.in: Regenerate.
268 * configure: Regenerate.
269 * linux-low.c: Include "signals-state-save-restore.h".
270 (linux_create_inferior): Call
271 restore_original_signals_state.
272 * server.c: Include "dispositions-save-restore.h".
273 (captured_main): Call save_original_signals_state.
274
1baf5149
PA
2752016-08-05 Pedro Alves <palves@redhat.com>
276
277 * configure: Regenerate.
278
fcd4a73d
YQ
2792016-08-04 Yao Qi <yao.qi@linaro.org>
280
281 * linux-low.c (regsets_fetch_inferior_registers): Check
282 errno is ESRCH or not.
283
979659d0
YQ
2842016-08-02 Yao Qi <yao.qi@linaro.org>
285
286 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
287 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
288 (thread_db_load_search): Update.
289 (try_thread_db_load_1): Don't look for td_ta_event_addr,
290 td_ta_set_event and td_ta_event_getmsg.
291
6598661d
PA
2922016-07-26 Pedro Alves <palves@redhat.com>
293
294 PR server/20414
295 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
296 of unsigned long for 64-bit registers and use uint32_t instead of
297 unsigned int for 32-bit registers.
298
9cf12d57
PA
2992016-07-26 Pedro Alves <palves@redhat.com>
300
301 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
302 to 'ptrace'.
303
305450ed
TT
3042016-07-21 Tom Tromey <tom@tromey.com>
305
306 * configure: Rebuild.
307
2583da7c
YQ
3082016-07-21 Yao Qi <yao.qi@linaro.org>
309
310 * mem-break.c (find_gdb_breakpoint): Cast bp to
311 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
312
21536b36
YQ
3132016-07-21 Yao Qi <yao.qi@linaro.org>
314
315 * server.c (handle_v_requests): Support s and S actions
316 if target_supports_software_single_step return true.
317
8901d193
YQ
3182016-07-21 Yao Qi <yao.qi@linaro.org>
319
320 * linux-low.c (resume_stopped_resumed_lwps): If resume request
321 is resume_step, call maybe_hw_step.
322 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
323 and unstop them.
324 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
325 breakpoints or not.
326 (proceed_one_lwp): If resume request is resume_step, install
327 reinsert breakpoints and call maybe_hw_step.
328
0e9a339e
YQ
3292016-07-21 Yao Qi <yao.qi@linaro.org>
330
331 * linux-low.c (proceed_one_lwp): Declare.
332 (linux_resume_one_thread): Remove local variable 'step'.
333 Lift code enqueue signal. Call proceed_one_lwp instead of
334 linux_resume_one_lwp.
335
4281b351
YQ
3362016-07-21 Yao Qi <yao.qi@linaro.org>
337
338 * linux-low.c (linux_resume_one_thread): Call
339 enqueue_pending_signal.
340
984a2c04
YQ
3412016-07-21 Yao Qi <yao.qi@linaro.org>
342
343 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
344 * inferiors.c (do_restore_current_thread_cleanup): New function.
345 (make_cleanup_restore_current_thread): Likewise.
346 * linux-low.c (install_software_single_step_breakpoints): Call
347 make_cleanup_restore_current_thread. Switch current_thread to
348 thread.
349
bec903c9
YQ
3502016-07-21 Yao Qi <yao.qi@linaro.org>
351
352 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
353 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
354 (clone_one_breakpoint): Likewise.
355 (delete_reinsert_breakpoints): Change parameter to thread.
356 Callers updated.
357 (has_reinsert_breakpoints): Likewise.
358 (uninsert_reinsert_breakpoints): Likewise.
359 (reinsert_reinsert_breakpoints): Likewise.
360 * mem-break.h (set_reinsert_breakpoint): Update declaration.
361 (delete_reinsert_breakpoints): Likewise.
362 (reinsert_reinsert_breakpoints): Likewise.
363 (uninsert_reinsert_breakpoints): Likewise.
364 (has_reinsert_breakpoints): Likewise.
365
63c40ec7
YQ
3662016-07-21 Yao Qi <yao.qi@linaro.org>
367
368 * inferiors.c (get_thread_process): Make parameter const.
369 * inferiors.h (get_thread_process): Update declaration.
370 * mem-break.c (clone_all_breakpoints): Remove all parameters.
371 Add new parameters child_thread and parent_thread. Callers
372 updated.
373 * mem-break.h (clone_all_breakpoints): Update declaration.
374
9aa76cd0
YQ
3752016-07-21 Yao Qi <yao.qi@linaro.org>
376
377 * mem-break.c (struct breakpoint) <cond_list>: Remove.
378 <command_list, handler>: Remove.
379 (struct gdb_breakpoint): New.
380 (struct other_breakpoint): New.
381 (struct reinsert_breakpoint): New.
382 (is_gdb_breakpoint): New function.
383 (any_persistent_commands): Update command_list if
384 is_gdb_breakpoint returns true.
385 (set_breakpoint): Create breakpoints according to their types.
386 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
387 (set_gdb_breakpoint_1): Likewise.
388 (set_gdb_breakpoint): Likewise.
389 (clear_breakpoint_conditions): Change parameter type to
390 'struct gdb_breakpoint *'.
391 (clear_breakpoint_commands): Likewise.
392 (clear_breakpoint_conditions_and_commands): Likewise.
393 (add_condition_to_breakpoint): Likewise.
394 (add_breakpoint_condition): Likewise.
395 (add_commands_to_breakpoint): Likewise.
396 (check_breakpoints): Check other_breakpoint.
397 (clone_one_breakpoint): Clone breakpopint according to its type.
398 * mem-break.h (struct gdb_breakpoint): Declare.
399 (set_gdb_breakpoint): Update declaration.
400 (clear_breakpoint_conditions_and_commands): Likewise.
401 (add_breakpoint_condition): Likewise.
402 (add_breakpoint_commands): Likewise.
403 * server.c (process_point_options): Change parameter type to
404 'struct gdb_breakpoint *'.
405
811f8301
YQ
4062016-07-21 Yao Qi <yao.qi@linaro.org>
407
408 * mem-break.c (set_breakpoint_at): Rename it to ...
409 (set_breakpoint_type_at): ... it.
410 (set_breakpoint_at): Call set_breakpoint_type_at.
411 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
412 * mem-break.h (set_breakpoint_at): Update comments.
413
b1c51e36
CLT
4142016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
415
416 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
417 to buf parameter.
418 (nios2_store_gregset): Likewise.
419
ced2dffb
PA
4202016-07-01 Pedro Alves <palves@redhat.com>
421 Antoine Tremblay <antoine.tremblay@ericsson.com>
422
423 * linux-low.c: Change interface to take the target lwp_info
424 pointer directly and return void. Handle detaching from a zombie
425 thread.
426 (linux_detach_lwp_callback): New function.
427 (linux_detach): Detach from the leader thread after detaching from
428 the clone threads.
429
2ac09a5b
YQ
4302016-06-28 Yao Qi <yao.qi@linaro.org>
431
432 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
433 for variable new_offset.
434 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
435 (aarch64_ftrace_insn_reloc_cb): Likewise.
436 (aarch64_ftrace_insn_reloc_tb): Likewise.
437 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
438 PRIx64 instead of PRIx32.
439
79e7fd4f
YQ
4402016-06-28 Yao Qi <yao.qi@linaro.org>
441
442 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
443 (the_low_target): Install arm_get_syscall_trapinfo.
444
061fc021
YQ
4452016-06-28 Yao Qi <yao.qi@linaro.org>
446
447 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
448 function.
449 (the_low_target): Install aarch64_get_syscall_trapinfo.
450
4cc32bec
YQ
4512016-06-28 Yao Qi <yao.qi@linaro.org>
452
453 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
454 Callers updated.
455 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
456 Remove parameter sysno.
457 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
458 sysret.
459
782c1122
AA
4602016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
461
462 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
463 (s390_emit_ne_goto): Likewise.
464 (s390_emit_lt_goto): Likewise.
465 (s390_emit_le_goto): Likewise.
466 (s390_emit_gt_goto): Likewise.
467 (s390_emit_ge_goto): Likewise.
468 (s390x_emit_eq_goto): Likewise.
469 (s390x_emit_ne_goto): Likewise.
470 (s390x_emit_lt_goto): Likewise.
471 (s390x_emit_le_goto): Likewise.
472 (s390x_emit_gt_goto): Likewise.
473 (s390x_emit_ge_goto): Likewise.
474 (s390_emit_ops_impl): Mark variable static.
475 (s390x_emit_ops): Likewise.
476
2e7b624b
YQ
4772016-06-17 Yao Qi <yao.qi@linaro.org>
478
479 * linux-low.c (handle_extended_wait): Call
480 uninsert_reinsert_breakpoints for the parent process. Remove
481 reinsert breakpoints from the child process. Reinsert them to
482 the parent process when vfork is done.
483 * mem-break.c (uninsert_reinsert_breakpoints): New function.
484 (reinsert_reinsert_breakpoints): New function.
485 * mem-break.h (uninsert_reinsert_breakpoints): Declare
486 (reinsert_reinsert_breakpoints): Declare.
487
8a81c5d7
YQ
4882016-06-17 Yao Qi <yao.qi@linaro.org>
489
490 * linux-low.c (handle_extended_wait): If the parent is doing
491 step-over, remove the reinsert breakpoints from the forked child.
492
f50bf8e5
YQ
4932016-06-17 Yao Qi <yao.qi@linaro.org>
494
495 * linux-low.c (unsuspend_all_lwps): Declare.
496 (linux_low_filter_event): If thread exited, call finish_step_over.
497 If step-over is finished, unsuspend other threads.
498
8376a3cb
YQ
4992016-06-17 Yao Qi <yao.qi@linaro.org>
500
501 * linux-low.c (linux_resume_one_lwp_throw): Assert
502 has_reinsert_breakpoints returns false.
503 * mem-break.c (delete_disabled_breakpoints): Assert
504 bp type isn't reinsert_breakpoint.
505
f79b145d
YQ
5062016-06-17 Yao Qi <yao.qi@linaro.org>
507
508 * linux-low.c (maybe_hw_step): New function.
509 (linux_resume_one_lwp_throw): Call maybe_hw_step.
510 (finish_step_over): Switch current_thread to lwp temporarily,
511 and assert has_reinsert_breakpoints returns true.
512 (proceed_one_lwp): Call maybe_hw_step.
513 * mem-break.c (has_reinsert_breakpoints): New function.
514 * mem-break.h (has_reinsert_breakpoints): Declare.
515
0ae534d2
JT
5162016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
517
518 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
519
fcdad592
YQ
5202016-05-17 Yao Qi <yao.qi@linaro.org>
521
522 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
523 instead of find_inferior.
524
9e784964
YQ
5252016-05-05 Yao Qi <yao.qi@linaro.org>
526
527 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
528 Initialize res to zero.
529
cf2ebb6e
YQ
5302016-05-05 Yao Qi <yao.qi@linaro.org>
531
532 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
533 to uint32_t.
534
c1aebf87
UW
5352016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
536
537 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
538 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
539 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
540
35fd2deb 5412016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 542 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
543
544 * tracepoint.c (write_inferior_int8): New function.
545 (cmd_qtenable_disable): Write enable flag using
546 write_inferior_int8.
547
484b3c32
YQ
5482016-04-25 Yao Qi <yao.qi@linaro.org>
549
550 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
551 (need_step_over_p): Return zero if the LWP has pending signals
552 can be delivered on software single step target.
553
85ba7d86
YQ
5542016-04-25 Yao Qi <yao.qi@linaro.org>
555
556 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
557 return instead of error.
558
3539aa13
YQ
5592016-04-22 Yao Qi <yao.qi@linaro.org>
560
561 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
562 to 23.
563
5b061e98
YQ
5642016-04-22 Yao Qi <yao.qi@linaro.org>
565
566 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
567 signal when stepping over breakpoint with software single
568 step.
569
3451269c
PA
5702016-04-21 Pedro Alves <palves@redhat.com>
571
572 * linux-s390-low.c (s390_collect_ptrace_register)
573 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
574 add casts.
575 (s390_check_regset): Use void * instead of gdb_byte *.
576
a2358508
PA
5772016-04-20 Pedro Alves <palves@redhat.com>
578
579 * configure: Renegerate.
580
6885166d
YQ
5812016-04-20 Yao Qi <yao.qi@linaro.org>
582
583 * linux-aarch32-low.c: Include "arch/arm-linux.h".
584 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
585 number 16.
586 (arm_store_gregset): Likewise.
587
2b863f51
WT
5882016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
589
590 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
591 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
592 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
593 (amd64-avx-mpx-linux.c): New rules.
594 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
595 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
596 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
597 (srv_amd64_regobj): Add amd64-avx-mpx.o.
598 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
599 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
600 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
601 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
602 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
603 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
604 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
605 * linux-x86-low.c (x86_linux_read_description): Add case for
606 X86_XSTATE_AVX_MPX_MASK.
607 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
608 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
609 init_registers_i386_avx_mpx_linux.
610 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
611 (initialize_low_tracepoint): Call
612 init_registers_i386_avx_mpx_linux.
613 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
614 (initialize_low_tracepoint): Call
615 init_registers_amd64_avx_mpx_linux.
616 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
617 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
618 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
619 declarations.
620
9b30624b
PA
6212016-04-18 Pedro Alves <palves@redhat.com>
622
623 * configure: Regenerate.
624
45e3745e
AT
6252016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
626
627 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
628 (aarch64_emit_sub): Likewise.
629
2afc13ff
PA
6302016-04-12 Pedro Alves <palves@redhat.com>
631
632 * utils.c (prepare_to_throw_exception): Delete.
633
6e774b13
SM
6342016-04-05 Simon Marchi <simon.marchi@ericsson.com>
635
636 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
637
4dca19f8
MK
6382016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
639
640 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
641
d0a9981f
MK
6422016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
643
644 * linux-aarch64-ipa.c: Add <elf.h> include.
645 * linux-ppc-ipa.c: Add <elf.h> include.
646 * linux-s390-ipa.c: Add <elf.h> include.
647
252db07e
MK
6482016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
649
650 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
651 (get_raw_reg_ptr): Likewise.
652 (get_trace_state_variable_value_ptr): Likewise.
653 (set_trace_state_variable_value_ptr): Likewise.
654 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
655 char *.
656
14e2b6d9
MK
6572016-03-31 Wei-cheng Wang <cole945@gmail.com>
658 Marcin Kościelnicki <koriakin@0x04.net>
659
660 PR/17221
661 * linux-ppc-low.c (emit_insns): New function.
662 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
663 (ppc_emit_prologue): New function.
664 (ppc_emit_epilogue): New function.
665 (ppc_emit_add): New function.
666 (ppc_emit_sub): New function.
667 (ppc_emit_mul): New function.
668 (ppc_emit_lsh): New function.
669 (ppc_emit_rsh_signed): New function.
670 (ppc_emit_rsh_unsigned): New function.
671 (ppc_emit_ext): New function.
672 (ppc_emit_zero_ext): New function.
673 (ppc_emit_log_not): New function.
674 (ppc_emit_bit_and): New function.
675 (ppc_emit_bit_or): New function.
676 (ppc_emit_bit_xor): New function.
677 (ppc_emit_bit_not): New function.
678 (ppc_emit_equal): New function.
679 (ppc_emit_less_signed): New function.
680 (ppc_emit_less_unsigned): New function.
681 (ppc_emit_ref): New function.
682 (ppc_emit_const): New function.
683 (ppc_emit_reg): New function.
684 (ppc_emit_pop): New function.
685 (ppc_emit_stack_flush): New function.
686 (ppc_emit_swap): New function.
687 (ppc_emit_stack_adjust): New function.
688 (ppc_emit_call): New function.
689 (ppc_emit_int_call_1): New function.
690 (ppc_emit_void_call_2): New function.
691 (ppc_emit_if_goto): New function.
692 (ppc_emit_goto): New function.
693 (ppc_emit_eq_goto): New function.
694 (ppc_emit_ne_goto): New function.
695 (ppc_emit_lt_goto): New function.
696 (ppc_emit_le_goto): New function.
697 (ppc_emit_gt_goto): New function.
698 (ppc_emit_ge_goto): New function.
699 (ppc_write_goto_address): New function.
700 (ppc_emit_ops_impl): New static variable.
701 (ppc64v1_emit_prologue): New function.
702 (ppc64v2_emit_prologue): New function.
703 (ppc64_emit_epilogue): New function.
704 (ppc64_emit_add): New function.
705 (ppc64_emit_sub): New function.
706 (ppc64_emit_mul): New function.
707 (ppc64_emit_lsh): New function.
708 (ppc64_emit_rsh_signed): New function.
709 (ppc64_emit_rsh_unsigned): New function.
710 (ppc64_emit_ext): New function.
711 (ppc64_emit_zero_ext): New function.
712 (ppc64_emit_log_not): New function.
713 (ppc64_emit_bit_and): New function.
714 (ppc64_emit_bit_or): New function.
715 (ppc64_emit_bit_xor): New function.
716 (ppc64_emit_bit_not): New function.
717 (ppc64_emit_equal): New function.
718 (ppc64_emit_less_signed): New function.
719 (ppc64_emit_less_unsigned): New function.
720 (ppc64_emit_ref): New function.
721 (ppc64_emit_const): New function.
722 (ppc64v1_emit_reg): New function.
723 (ppc64v2_emit_reg): New function.
724 (ppc64_emit_pop): New function.
725 (ppc64_emit_stack_flush): New function.
726 (ppc64_emit_swap): New function.
727 (ppc64v1_emit_call): New function.
728 (ppc64v2_emit_call): New function.
729 (ppc64v1_emit_int_call_1): New function.
730 (ppc64v2_emit_int_call_1): New function.
731 (ppc64v1_emit_void_call_2): New function.
732 (ppc64v2_emit_void_call_2): New function.
733 (ppc64_emit_if_goto): New function.
734 (ppc64_emit_eq_goto): New function.
735 (ppc64_emit_ne_goto): New function.
736 (ppc64_emit_lt_goto): New function.
737 (ppc64_emit_le_goto): New function.
738 (ppc64_emit_gt_goto): New function.
739 (ppc64_emit_ge_goto): New function.
740 (ppc64v1_emit_ops_impl): New static variable.
741 (ppc64v2_emit_ops_impl): New static variable.
742 (ppc_emit_ops): New function.
743 (linux_low_target): Wire in ppc_emit_ops.
744
a2174ba4
MK
7452016-03-31 Wei-cheng Wang <cole945@gmail.com>
746 Marcin Kościelnicki <koriakin@0x04.net>
747
748 PR/17221
749 * Makefile.in: Add powerpc-*-ipa.o
750 * configure.srv: Add ipa_obj for powerpc*-linux.
751 * linux-ppc-ipa.c: New file.
752 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
753 includes.
754 (PPC_FIELD): New macro.
755 (PPC_SEXT): New macro.
756 (PPC_OP6): New macro.
757 (PPC_BO): New macro.
758 (PPC_LI): New macro.
759 (PPC_BD): New macro.
760 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
761 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
762 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
763 (ppc_get_thread_area): New function.
764 (is_elfv2_inferior): New function.
765 (gen_ds_form): New function.
766 (GEN_STD): New macro.
767 (GEN_STDU): New macro.
768 (GEN_LD): New macro.
769 (GEN_LDU): New macro.
770 (gen_d_form): New function.
771 (GEN_ADDI): New macro.
772 (GEN_ADDIS): New macro.
773 (GEN_LI): New macro.
774 (GEN_LIS): New macro.
775 (GEN_ORI): New macro.
776 (GEN_ORIS): New macro.
777 (GEN_LWZ): New macro.
778 (GEN_STW): New macro.
779 (GEN_STWU): New macro.
780 (gen_xfx_form): New function.
781 (GEN_MFSPR): New macro.
782 (GEN_MTSPR): New macro.
783 (GEN_MFCR): New macro.
784 (GEN_MTCR): New macro.
785 (GEN_SYNC): New macro.
786 (GEN_LWSYNC): New macro.
787 (gen_x_form): New function.
788 (GEN_OR): New macro.
789 (GEN_MR): New macro.
790 (GEN_LWARX): New macro.
791 (GEN_STWCX): New macro.
792 (GEN_CMPW): New macro.
793 (gen_md_form): New function.
794 (GEN_RLDICL): New macro.
795 (GEN_RLDICR): New macro.
796 (gen_i_form): New function.
797 (GEN_B): New macro.
798 (GEN_BL): New macro.
799 (gen_b_form): New function.
800 (GEN_BNE): New macro.
801 (GEN_LOAD): New macro.
802 (GEN_STORE): New macro.
803 (gen_limm): New function.
804 (gen_atomic_xchg): New function.
805 (gen_call): New function.
806 (ppc_relocate_instruction): New function.
807 (ppc_install_fast_tracepoint_jump_pad): New function.
808 (ppc_get_min_fast_tracepoint_insn_len): New function.
809 (ppc_get_ipa_tdesc_idx): New function.
810 (the_low_target): Wire in the new functions.
811 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
812 tdescs.
813 * linux-ppc-tdesc.h: New file.
814
a13c4696
MK
8152016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
816
817 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
818 (alloc_jump_pad_buffer): New function.
819 * linux-amd64-ipa.c: Add <sys/mman.h> include.
820 (alloc_jump_pad_buffer): New function.
821 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
822 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
823 (alloc_jump_pad_buffer): New function.
824 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
825 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
826 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
827 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
828
1cda1512
MK
8292016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
830
831 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
832 * linux-amd64-ipa.c: Likewise.
833 * linux-i386-ipa.c: Likewise.
834 * linux-s390-ipa.c: Likewise.
835 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
836 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
837 set_trace_state_variable_value_ptr.
838 (struct ipa_sym_addresses): Likewise.
839 (symbol_list): Likewise.
840 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
841 accessing gdb_collect directly.
842 (gdb_collect_ptr_type): New typedef.
843 (get_raw_reg_ptr_type): New typedef.
844 (get_trace_state_variable_value_ptr_type): New typedef.
845 (set_trace_state_variable_value_ptr_type): New typedef.
846 (gdb_collect_ptr): New global.
847 (get_raw_reg_ptr): New global.
848 (get_trace_state_variable_value_ptr): New global.
849 (set_trace_state_variable_value_ptr): New global.
850 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
851 accessing get_raw_reg directly.
852 (get_get_tsv_func_addr): Likewise for
853 get_trace_state_variable_value_ptr.
854 (get_set_tsv_func_addr): Likewise for
855 set_trace_state_variable_value_ptr.
856 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
857
72fb5488
SM
8582016-03-30 Simon Marchi <simon.marchi@ericsson.com>
859
860 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
861
28170b88
MK
8622016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
863
864 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
865 packets.
866 (relocate_instruction): Remove own_buf.
867 * server.c (own_buf): Make global.
868 (handle_v_requests): Make global.
869 * server.h (own_buf): New declaration.
870 (handle_v_requests): New prototype.
871
f39e8743
MK
8722016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
873
874 PR 18377
875 * linux-s390-low.c (add_insns): New function.
876 (s390_emit_prologue): New function.
877 (s390_emit_epilogue): New function.
878 (s390_emit_add): New function.
879 (s390_emit_sub): New function.
880 (s390_emit_mul): New function.
881 (s390_emit_lsh): New function.
882 (s390_emit_rsh_signed): New function.
883 (s390_emit_rsh_unsigned): New function.
884 (s390_emit_ext): New function.
885 (s390_emit_log_not): New function.
886 (s390_emit_bit_and): New function.
887 (s390_emit_bit_or): New function.
888 (s390_emit_bit_xor): New function.
889 (s390_emit_bit_not): New function.
890 (s390_emit_equal): New function.
891 (s390_emit_less_signed): New function.
892 (s390_emit_less_unsigned): New function.
893 (s390_emit_ref): New function.
894 (s390_emit_if_goto): New function.
895 (s390_emit_goto): New function.
896 (s390_write_goto_address): New function.
897 (s390_emit_litpool): New function.
898 (s390_emit_const): New function.
899 (s390_emit_call): New function.
900 (s390_emit_reg): New function.
901 (s390_emit_pop): New function.
902 (s390_emit_stack_flush): New function.
903 (s390_emit_zero_ext): New function.
904 (s390_emit_swap): New function.
905 (s390_emit_stack_adjust): New function.
906 (s390_emit_set_r2): New function.
907 (s390_emit_int_call_1): New function.
908 (s390_emit_void_call_2): New function.
909 (s390_emit_eq_goto): New function.
910 (s390_emit_ne_goto): New function.
911 (s390_emit_lt_goto): New function.
912 (s390_emit_le_goto): New function.
913 (s390_emit_gt_goto): New function.
914 (s390_emit_ge_goto): New function.
915 (s390x_emit_prologue): New function.
916 (s390x_emit_epilogue): New function.
917 (s390x_emit_add): New function.
918 (s390x_emit_sub): New function.
919 (s390x_emit_mul): New function.
920 (s390x_emit_lsh): New function.
921 (s390x_emit_rsh_signed): New function.
922 (s390x_emit_rsh_unsigned): New function.
923 (s390x_emit_ext): New function.
924 (s390x_emit_log_not): New function.
925 (s390x_emit_bit_and): New function.
926 (s390x_emit_bit_or): New function.
927 (s390x_emit_bit_xor): New function.
928 (s390x_emit_bit_not): New function.
929 (s390x_emit_equal): New function.
930 (s390x_emit_less_signed): New function.
931 (s390x_emit_less_unsigned): New function.
932 (s390x_emit_ref): New function.
933 (s390x_emit_if_goto): New function.
934 (s390x_emit_const): New function.
935 (s390x_emit_call): New function.
936 (s390x_emit_reg): New function.
937 (s390x_emit_pop): New function.
938 (s390x_emit_stack_flush): New function.
939 (s390x_emit_zero_ext): New function.
940 (s390x_emit_swap): New function.
941 (s390x_emit_stack_adjust): New function.
942 (s390x_emit_int_call_1): New function.
943 (s390x_emit_void_call_2): New function.
944 (s390x_emit_eq_goto): New function.
945 (s390x_emit_ne_goto): New function.
946 (s390x_emit_lt_goto): New function.
947 (s390x_emit_le_goto): New function.
948 (s390x_emit_gt_goto): New function.
949 (s390x_emit_ge_goto): New function.
950 (s390_emit_ops): New function.
951 (struct linux_target_ops): Fill in emit_ops hook.
952
abd9baf9
MK
9532016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
954
955 PR 18377
956 * Makefile.in: Add s390 IPA files.
957 * configure.srv: Build IPA for s390.
958 * linux-s390-ipa.c: New file.
959 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
960 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
961 (tdesc_s390_linux32): Likewise.
962 (init_registers_s390_linux32v1): Likewise.
963 (tdesc_s390_linux32v1): Likewise.
964 (init_registers_s390_linux32v2): Likewise.
965 (tdesc_s390_linux32v2): Likewise.
966 (init_registers_s390_linux64): Likewise.
967 (tdesc_s390_linux64): Likewise.
968 (init_registers_s390_linux64v1): Likewise.
969 (tdesc_s390_linux64v1): Likewise.
970 (init_registers_s390_linux64v2): Likewise.
971 (tdesc_s390_linux64v2): Likewise.
972 (init_registers_s390_te_linux64): Likewise.
973 (tdesc_s390_te_linux64): Likewise.
974 (init_registers_s390_vx_linux64): Likewise.
975 (tdesc_s390_vx_linux64): Likewise.
976 (init_registers_s390_tevx_linux64): Likewise.
977 (tdesc_s390_tevx_linux64): Likewise.
978 (init_registers_s390x_linux64): Likewise.
979 (tdesc_s390x_linux64): Likewise.
980 (init_registers_s390x_linux64v1): Likewise.
981 (tdesc_s390x_linux64v1): Likewise.
982 (init_registers_s390x_linux64v2): Likewise.
983 (tdesc_s390x_linux64v2): Likewise.
984 (init_registers_s390x_te_linux64): Likewise.
985 (tdesc_s390x_te_linux64): Likewise.
986 (init_registers_s390x_vx_linux64): Likewise.
987 (tdesc_s390x_vx_linux64): Likewise.
988 (init_registers_s390x_tevx_linux64): Likewise.
989 (tdesc_s390x_tevx_linux64): Likewise.
990 (have_hwcap_s390_vx): New static variable.
991 (s390_arch_setup): Fill have_hwcap_s390_vx.
992 (s390_get_thread_area): New function.
993 (s390_ft_entry_gpr_esa): New const.
994 (s390_ft_entry_gpr_zarch): New const.
995 (s390_ft_entry_misc): New const.
996 (s390_ft_entry_fr): New const.
997 (s390_ft_entry_vr): New const.
998 (s390_ft_main_31): New const.
999 (s390_ft_main_64): New const.
1000 (s390_ft_exit_fr): New const.
1001 (s390_ft_exit_vr): New const.
1002 (s390_ft_exit_misc): New const.
1003 (s390_ft_exit_gpr_esa): New const.
1004 (s390_ft_exit_gpr_zarch): New const.
1005 (append_insns): New function.
1006 (s390_relocate_instruction): New function.
1007 (s390_install_fast_tracepoint_jump_pad): New function.
1008 (s390_get_min_fast_tracepoint_insn_len): New function.
1009 (s390_get_ipa_tdesc_idx): New function.
1010 (struct linux_target_ops): Wire in the above functions.
1011 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1012 * linux-s390-tdesc.h: New file.
1013
a4105d04
MK
10142016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1015
1016 * linux-s390-low.c (s390_supports_tracepoints): New function.
1017 (struct linux_target_ops): Fill supports_tracepoints hook.
1018
35ac8b3e
YQ
10192016-03-18 Yao Qi <yao.qi@linaro.org>
1020
1021 * linux-low.c (lwp_signal_can_be_delivered): New function.
1022 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1023
94610ec4
YQ
10242016-03-18 Yao Qi <yao.qi@linaro.org>
1025
1026 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1027 0 if signal is enqueued. Remove 'signal' from one debugging
1028 message. Move one debugging message to some lines below.
1029 Remove code setting 'signal' to 0.
1030
80aea927
YQ
10312016-03-18 Yao Qi <yao.qi@linaro.org>
1032
1033 * linux-low.c (linux_low_filter_event): Remove redundant
1034 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1035
b04fd3be
MK
10362016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1037
1038 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1039 (struct linux_target_ops): Wire in the above.
1040
c40c8d4b
YQ
10412016-03-03 Yao Qi <yao.qi@linaro.org>
1042
1043 * linux-low.c: Update comments to start_step_over.
1044
0f8288ae
YQ
10452016-03-03 Yao Qi <yao.qi@linaro.org>
1046
1047 PR server/19736
1048 * linux-low.c (handle_extended_wait): Set child suspended
1049 if event_lwp->bp_reinsert isn't zero.
1050
fdbd04a8
YQ
10512016-03-02 Yao Qi <yao.qi@linaro.org>
1052
1053 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1054 enqueue_pending_signal.
1055
6896a8fa
MK
10562016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1057
1058 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1059 is actually loaded.
1060
ab503087
MK
10612016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1062
1063 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1064 (s390_regmap_3264) [!__s390x__]: New global.
1065 (s390_collect_ptrace_register): Skip map entries containing -1.
1066 (s390_supply_ptrace_register): Ditto.
1067 (s390_fill_gprs_high): New function.
1068 (s390_store_gprs_high): New function.
1069 (s390_regsets): Add NT_S390_HIGH_GPRS.
1070 (s390_get_hwcap): Enable on 31-bit.
1071 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1072 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1073 Detect NT_S390_HIGH_GPRS.
1074 (s390_usrregs_info_3264): Enable on 31-bit.
1075 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1076 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1077
ae91f625
MK
10782016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1079
1080 PR gdb/13808
1081 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1082 * configure.srv: Ditto.
1083 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1084 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1085 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1086 (init_registers_amd64_linux): Remove prototype.
1087 (tdesc_amd64_linux): Remove declaration.
1088 (get_ipa_tdesc): New function.
1089 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1090 initialize remaining tdescs.
1091 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1092 (init_registers_i386_linux): Remove prototype.
1093 (tdesc_i386_linux): Remove declaration.
1094 (get_ipa_tdesc): New function.
1095 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1096 initialize remaining tdescs.
1097 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1098 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1099 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1100 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1101 (x86_get_ipa_tdesc_idx): New function.
1102 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1103 * linux-x86-tdesc.h: New file.
1104 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1105 (target_get_ipa_tdesc_idx): New macro.
1106 * tracepoint.c (ipa_tdesc_idx): New macro.
1107 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1108 (symbol_list): Add ipa_tdesc_idx.
1109 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1110 (ipa_tdesc): Remove.
1111 (ipa_tdesc_idx): New variable.
1112 (get_context_regcache): Use get_ipa_tdesc.
1113 (gdb_collect): Ditto.
1114 (gdb_probe): Ditto.
1115 * tracepoint.h (get_ipa_tdesc): New prototype.
1116 (ipa_tdesc): Remove.
1117
e7ad2f14
PA
11182016-02-24 Pedro Alves <palves@redhat.com>
1119
1120 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1121 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1122 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1123 Factor out common code between the USE_SIGTRAP_SIGINFO and
1124 !USE_SIGTRAP_SIGINFO blocks.
1125 (linux_low_filter_event): Call save_stop_reason instead of
1126 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1127 Update comments.
1128 (linux_wait_1): Update comments.
1129
657f9cde
WW
11302016-02-24 Wei-cheng Wang <cole945@gmail.com>
1131
1132 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1133 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1134 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1135 ppc_insert_point, ppc_remove_point.
1136
b00b61e1
MK
11372016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1138
1139 * linux-s390-low.c (s390_supports_z_point_type): New function.
1140 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1141
553cb527
YQ
11422016-02-16 Yao Qi <yao.qi@linaro.org>
1143
1144 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1145 PC. Get pc from regcache_read_pc.
1146
a5652c21
YQ
11472016-02-12 Yao Qi <yao.qi@linaro.org>
1148
1149 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1150 or linux_get_pc_32bit.
1151 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1152
ed443b61
YQ
11532016-02-12 Yao Qi <yao.qi@linaro.org>
1154
1155 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1156 arm_linux_get_next_pcs_fixup.
1157
020ecd38
MK
11582016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1159
1160 * tracepoint.c (x_tracepoint_action_download): Change
1161 write_inferior_data_ptr to write_inferior_data_pointer.
1162 (cmd_qtstart): Likewise.
1163 (write_inferior_data_ptr): Remove.
1164 (download_agent_expr): Change write_inferior_data_ptr to
1165 write_inferior_data_pointer.
1166 (download_tracepoint_1): Likewise.
1167 (download_tracepoint): Likewise.
1168 (download_trace_state_variables): Likewise.
1169
7cae9051
WW
11702016-02-11 Wei-cheng Wang <cole945@gmail.com>
1171 Marcin Kościelnicki <koriakin@0x04.net>
1172
1173 * tracepoint.c (struct tracepoint_action_ops): Remove.
1174 (struct tracepoint_action): Remove ops.
1175 (m_tracepoint_action_download, r_tracepoint_action_download)
1176 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1177 size and offset accordingly.
1178 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1179 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1180 (tracepoint_action_send, tracepoint_action_download): New functions.
1181 Helpers for trace action handlers.
1182 (add_tracepoint_action): Remove setup actions ops.
1183 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1184
9f6a71b4
YQ
11852016-02-10 Yao Qi <yao.qi@linaro.org>
1186
1187 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1188
1e94266c
SM
11892016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1190
1191 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1192 to AC_OUTPUT.
1193 * configure: Regenerate.
1194
8adce034
SM
11952016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1196
1197 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1198 void * to gdb_byte *.
1199 * linux-low.c (siginfo_fixup): Likewise.
1200 (linux_xfer_siginfo): Likewise.
1201 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1202 Likewise.
1203 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1204
93813b37
WT
12052016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1206
1207 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1208 to srv_tgtobj.
1209 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1210 to srv_tgtobj.
1211 * linux-x86-low.c [__x86_64__]: Include
1212 "nat/amd64-linux-siginfo.h".
1213 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1214 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1215 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1216 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1217 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1218 (cpt_si_fd, si_timerid, si_overrun): Move from
1219 nat/amd64-linux-siginfo.c.
1220 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1221
8424cc97
SM
12222016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1223
1224 * server.c (skip_to_semicolon): Remove.
1225 (process_point_options): Use strchrnul instead of
1226 skip_to_semicolon.
1227
4d18591b
YQ
12282016-01-26 Yao Qi <yao.qi@linaro.org>
1229
1230 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1231 * linux-low.c (install_software_single_step_breakpoints): Don't
1232 call regcache_read_pc.
1233 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1234 argument pc.
1235
d8020970
YQ
12362016-01-26 Yao Qi <yao.qi@linaro.org>
1237
1238 * linux-low.c (install_software_single_step_breakpoints): Call
1239 regcache_read_pc instead of get_pc.
1240
8b207339
YQ
12412016-01-26 Yao Qi <yao.qi@linaro.org>
1242
1243 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1244 (unblock_async_io): Rename to ...
1245 (block_unblock_async_io): ... it. New function.
1246 (enable_async_io): Don't install SIGIO handler. Unblock it
1247 instead.
1248 (disable_async_io): Don't ignore SIGIO. Block it instead.
1249 (initialize_async_io): Install SIGIO handler. Don't call
1250 unblock_async_io.
1251
18879fef
YQ
12522016-01-26 Yao Qi <yao.qi@linaro.org>
1253
1254 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1255 first character is '\003', call *the_target->request_interrupt.
1256
a0f8e08a
YQ
12572016-01-25 Yao Qi <yao.qi@linaro.org>
1258
1259 * remote-utils.c (new_thread_notify): Remove.
1260 (dead_thread_notify): Likewise.
1261 * remote-utils.h (new_thread_notify): Remove declaration.
1262 (dead_thread_notify): Likewise.
1263
cc5fd9ab
MK
12642016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1265
1266 * gdb.trace/pending.exp: Fix expected message on continue.
1267
99e8eb11
MK
12682016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1269
1270 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1271 it works properly on big-endian machines where sizeof (CORE_ADDR)
1272 != sizeof (void *).
1273
a994041d
PA
12742016-01-21 Pedro Alves <palves@redhat.com>
1275
1276 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1277 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1278 * configure: Regenerate.
1279
f7a6a40d
YQ
12802016-01-21 Yao Qi <yao.qi@linaro.org>
1281
1282 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1283 is_thumb and set it according to CPSR saved on the stack.
1284 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1285 arm_sigreturn_next_pc.
1286
6f69e520
YQ
12872016-01-18 Yao Qi <yao.qi@linaro.org>
1288
1289 * linux-low.c (linux_set_pc_64bit): New function.
1290 (linux_get_pc_64bit): New function.
1291 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1292 Declare.
1293 * linux-sparc-low.c (debug_threads): Remove declaration.
1294 (sparc_get_pc): Remove.
1295 (the_low_target): Use linux_get_pc_64bit instead of
1296 sparc_get_pc.
1297 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1298 (the_low_target): Use linux_get_pc_64bit and
1299 linux_set_pc_64bit.
1300
276d4552
YQ
13012016-01-18 Yao Qi <yao.qi@linaro.org>
1302
1303 * linux-arm-low.c (debug_threads): Remove declaration.
1304 (arm_get_pc, arm_set_pc): Remove.
1305 (the_low_target): Use linux_get_pc_32bit and
1306 linux_set_pc_32bit.
1307 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1308 (the_low_target): Use linux_get_pc_32bit and
1309 linux_set_pc_32bit.
1310 * linux-cris-low.c (debug_threads): Remove declaration.
1311 (cris_get_pc, cris_set_pc,): Remove.
1312 (the_low_target): Use linux_get_pc_32bit and
1313 linux_set_pc_32bit.
1314 * linux-crisv32-low.c (debug_threads): Remove declaration.
1315 (cris_get_pc, cris_set_pc): Remove.
1316 (the_low_target): Use linux_get_pc_32bit and
1317 linux_set_pc_32bit.
1318 * linux-low.c: Include inttypes.h.
1319 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1320 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1321 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1322 (the_low_target): Use linux_get_pc_32bit and
1323 linux_set_pc_32bit.
1324 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1325 (the_low_target): Use linux_get_pc_32bit and
1326 linux_set_pc_32bit.
1327 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1328 (the_low_target): Use linux_get_pc_32bit and
1329 linux_set_pc_32bit.
1330 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1331 (the_low_target): Use linux_get_pc_32bit and
1332 linux_set_pc_32bit.
1333 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1334 (the_low_target): Use linux_get_pc_32bit and
1335 linux_set_pc_32bit.
1336
eb0edac8
GB
13372016-01-18 Gary Benson <gbenson@redhat.com>
1338
1339 * configure.ac (AC_FUNC_FORK): New check.
1340 * config.in: Regenerate.
1341 * configure: Likewise.
1342
1b451dda
YQ
13432016-01-14 Yao Qi <yao.qi@linaro.org>
1344
1345 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1346 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1347 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1348 arm_get_next_pcs_ctor.
1349
82075af2
JS
13502016-01-12 Josh Stone <jistone@redhat.com>
1351 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1352
1353 * inferiors.h: Include "gdb_vecs.h".
1354 (struct process_info): Add syscalls_to_catch.
1355 * inferiors.c (remove_process): Free syscalls_to_catch.
1356 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1357 syscall_return stops.
1358 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1359 * server.c (handle_general_set): Handle QCatchSyscalls.
1360 (handle_query): Report support for QCatchSyscalls.
1361 * target.h (struct target_ops): Add supports_catch_syscall.
1362 (target_supports_catch_syscall): New macro.
1363 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1364 (struct lwp_info): Add syscall_state.
1365 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1366 Maintain syscall_state and syscalls_to_catch across exec.
1367 (get_syscall_trapinfo): New function, proxy to the_low_target.
1368 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1369 (linux_low_filter_event): Toggle syscall_state entry/return for
1370 syscall traps, and set it ignored for all others.
1371 (gdb_catching_syscalls_p): New function.
1372 (gdb_catch_this_syscall_p): New function.
1373 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1374 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1375 (linux_supports_catch_syscall): New function.
1376 (linux_target_ops): Install it.
1377 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1378 (the_low_target): Install it.
1379
8f13a3ce
MF
13802016-01-12 Mike Frysinger <vapier@gentoo.org>
1381
1382 * acinclude.m4: Include new ../warning.m4 file.
1383 * configure: Regenerated.
1384 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1385
5b3da067
MF
13862016-01-12 Mike Frysinger <vapier@gentoo.org>
1387
1388 * ax.c (is_goto_target): Mark static.
1389 * linux-low.c (register_addr): Likewise.
1390 (linux_fetch_registers, linux_store_registers): Likewise.
1391 * mem-break.c (any_persistent_commands): Fix old prototype.
1392 (add_commands_to_breakpoint): Mark static.
1393 * regcache.c (find_register_by_name): Delete unused func.
1394 * remote-utils.c (hex_or_minus_one): Mark static.
1395 * server.c (monitor_show_help): Mark static.
1396 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1397 handle_v_requests): Likewise.
1398
bc504a31
PA
13992016-01-12 Pedro Alves <palves@redhat.com>
1400
1401 Remove use of the registered trademark symbol throughout.
1402
5a0dd67a
YQ
14032016-01-08 Yao Qi <yao.qi@linaro.org>
1404
1405 * remote-utils.c (getpkt): If c is '\003', call target hook
1406 request_interrupt.
1407
b2ca446f
YQ
14082016-01-06 Yao Qi <yao.qi@linaro.org>
1409
1410 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1411 linux-aarch32-low.c.
1412 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1413 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1414 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1415 (thumb2_breakpoint): Declare.
1416 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1417 linux-aarch32-low.h.
1418 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1419 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1420 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1421
edd88788
JB
14222016-01-01 Joel Brobecker <brobecker@adacore.com>
1423
1424 * gdbreplay.c (gdbreplay_version): Change copyright year in
1425 version message.
1426 * server.c (gdbserver_version): Likewise.
1427
65da7f14
PP
14282015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1429
1430 * server.c (crc32_table): Delete.
1431 (crc32): Use libiberty's xcrc32 function.
1432
4abd5ed2
JB
14332015-12-22 Joel Brobecker <brobecker@adacore.com>
1434
1435 * lynx-low.c (lynx_delete_thread_callback): New function.
1436 (lynx_mourn): Properly delete our process and all of its
1437 threads. Remove call to clear_inferiors.
1438
0e50fe5c
JB
14392015-12-22 Joel Brobecker <brobecker@adacore.com>
1440
1441 * target.c (thread_search_callback): Add check that
1442 the thread_stopped target callback is not NULL before
1443 calling it.
1444
35adc03f
YQ
14452015-12-21 Yao Qi <yao.qi@linaro.org>
1446
1447 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1448 arm breakpoint.
1449
bd2b2909
AT
14502015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1451
1452 * server.c (handle_query): Call target_supports_software_single_step.
1453
7fe5e27e
AT
14542015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1455
1456 * linux-low.c (single_step): New function.
1457 (linux_resume_one_lwp_throw): Call single_step.
1458 (start_step_over): Likewise.
1459
d9311bfa
AT
14602015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1461
1462 * Makefile.in (SFILES): Append arch/arm-linux.c,
1463 arch/arm-get-next-pcs.c.
1464 (arm-linux.o): New rule.
1465 (arm-get-next-pcs.o): New rule.
1466 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1467 arm-linux.o.
1468 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1469 to linux-aarch32-low.c.
1470 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1471 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1472 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1473 (thumb2_breakpoint_len): Likewise.
1474 (arm_is_thumb_mode): Make non-static.
1475 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1476 from linux-aarch32-low.c.
1477 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1478 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1479 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1480 (thumb2_breakpoint_len): Likewise.
1481 (arm_is_thumb_mode): New declaration.
1482 * linux-arm-low.c: Include arch/arm-linux.h
1483 aarch/arm-get-next-pcs.h, sys/syscall.h.
1484 (get_next_pcs_ops): New struct.
1485 (get_next_pcs_addr_bits_remove): New function.
1486 (get_next_pcs_is_thumb): New function.
1487 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1488 (arm_sigreturn_next_pc): Likewise.
1489 (get_next_pcs_syscall_next_pc): Likewise.
1490 (arm_gdbserver_get_next_pcs): Likewise.
1491 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1492 Initialize.
1493 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1494 * server.h: Include gdb_vecs.h.
1495
68ce2059
AT
14962015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1497
1498 * Makefile.in (SFILES): Append common/common-regcache.c.
1499 (OBS): Append common-regcache.o.
1500 (common-regcache.o): New rule.
1501 * regcache.c (init_register_cache): Initialize cache to
1502 REG_UNAVAILABLE.
1503 (regcache_raw_read_unsigned): New function.
1504 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1505 register_status enum.
1506
fa5308bd
AT
15072015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1508
1509 * linux-aarch64-low.c (the_low_targets): Rename
1510 breakpoint_reinsert_addr to get_next_pcs.
1511 * linux-arm-low.c (the_low_targets): Likewise.
1512 * linux-bfin-low.c (the_low_targets): Likewise.
1513 * linux-cris-low.c (the_low_targets): Likewise.
1514 * linux-crisv32-low.c (the_low_targets): Likewise.
1515 * linux-low.c (can_software_single_step): Likewise.
1516 (install_software_single_step_breakpoints): New function.
1517 (start_step_over): Use install_software_single_step_breakpoints.
1518 * linux-low.h: New CORE_ADDR vector.
1519 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1520 get_next_pcs.
1521 * linux-mips-low.c (the_low_targets): Likewise.
1522 * linux-nios2-low.c (the_low_targets): Likewise.
1523 * linux-sparc-low.c (the_low_targets): Likewise.
1524
4a6ed09b
PA
15252015-12-17 Pedro Alves <palves@redhat.com>
1526
1527 * linux-low.c (linux_kill_one_lwp): Remove references to
1528 LinuxThreads.
1529 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1530 to 'kill'.
1531 (linux_init_signals): Delete.
1532 (initialize_low): Adjust.
1533 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1534
7544db95
PA
15352015-12-16 Pedro Alves <palves@redhat.com>
1536
1537 * configure.ac (compiler warning flags): When testing a
1538 -Wno-foo option, check whether -Wfoo works instead.
1539 * configure: Regenerate.
1540
8020350c
DB
15412015-12-11 Don Breazeal <donb@codesourcery.com>
1542
1543 * server.c (process_serial_event): Don't exit from gdbserver
1544 in remote mode if there are still active inferiors.
1545
db91f502
YQ
15462015-12-11 Yao Qi <yao.qi@linaro.org>
1547
1548 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1549 arm_breakpoint_at if the process is 32-bit.
1550
b37a6290
YQ
15512015-12-11 Yao Qi <yao.qi@linaro.org>
1552
1553 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1554 arm breakpoint.
1555
17b1509a
YQ
15562015-12-07 Yao Qi <yao.qi@linaro.org>
1557
1558 * configure.srv: Append arm.o to srv_tgtobj for
1559 aarch64*-*-linux* target.
1560 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1561 from linux-arm-low.c.
1562 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1563 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1564 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1565 (thumb2_breakpoint_len): Likewise.
1566 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1567 (arm_breakpoint_kinds): Likewise.
1568 (arm_breakpoint_kind_from_pc): Likewise.
1569 (arm_sw_breakpoint_from_kind): Likewise.
1570 (arm_breakpoint_kind_from_current_state): Likewise.
1571 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1572 (arm_sw_breakpoint_from_kind): Declare.
1573 (arm_breakpoint_kind_from_current_state): Declare.
1574 (arm_breakpoint_at): Declare.
1575 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1576 arm_sw_breakpoint_from_kind if process is 32-bit.
1577 (aarch64_breakpoint_kind_from_pc): New function.
1578 (aarch64_breakpoint_kind_from_current_state): New function.
1579 (the_low_target): Initialize fields breakpoint_kind_from_pc
1580 and breakpoint_kind_from_current_state.
1581 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1582 linux-aarch32-low.c.
1583 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1584 (arm_breakpoint, arm_breakpoint_len): Likewise.
1585 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1586 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1587 (arm_is_thumb_mode): Likewise.
1588 (arm_breakpoint_at): Likewise.
1589 (arm_breakpoint_kind_from_pc): Likewise.
1590 (arm_sw_breakpoint_from_kind): Likewise.
1591 (arm_breakpoint_kind_from_current_state): Likewise.
1592
1593 Revert:
1594 2015-08-04 Yao Qi <yao.qi@linaro.org>
1595
1596 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1597 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1598 * server.c (extended_protocol): Remove "static".
1599 * server.h (extended_protocol): Declare it.
1600
ece66d65
JS
16012015-12-04 Josh Stone <jistone@redhat.com>
1602
1603 * target.h (struct target_ops) <arch_setup>: Rename to ...
1604 (struct target_ops) <post_create_inferior>: ... this.
1605 (target_arch_setup): Rename to ...
1606 (target_post_create_inferior): ... this, calling post_create_inferior.
1607 * server.c (start_inferior): Update target_arch_setup calls to
1608 target_post_create_inferior.
1609 * linux-low.c (linux_low_ptrace_options): Forward declare.
1610 (linux_arch_setup): Update its comment for general use.
1611 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1612 (struct linux_target_ops): Use linux_post_create_inferior.
1613 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1614 to post_create_inferior.
1615 * nto-low.c (struct nto_target_ops): Likewise.
1616 * spu-low.c (struct spu_target_ops): Likewise.
1617 * win32-low.c (struct win32_target_ops): Likewise.
1618
e58c48b4
AT
16192015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1620
1621 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1622
fbec8956
AT
16232015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1624
1625 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1626 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1627 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1628 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1629 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1630 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1631 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1632 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1633 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1634 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1635 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1636 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1637
9b4c5f87
AT
16382015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1639
1640 * linux-low.c (linux_look_up_symbols): Don't call
1641 linux_supports_traceclone.
1642 * linux-low.h (thread_db_init): Remove use_events argument.
1643 * thread-db.c (thread_db_use_event): Remove global variable.
1644 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1645 (struct thread_db) <td_create_bp>: Remove field.
1646 (thread_db_create_event): Remove function.
1647 (thread_db_enable_reporting): Likewise.
1648 (find_one_thread): Don't check for thread_db_use_events.
1649 (attach_thread): Likewise.
1650 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1651 (try_thread_db_load_1): Don't check for thread_db_use_events.
1652 (thread_db_init): Remove use_events argument and thread events
1653 handling.
1654 (remove_thread_event_breakpoints): Remove function.
1655 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1656
7d00775e
AT
16572015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1658
1659 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1660 New function.
1661 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1662 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1663 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1664 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1665 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1666 Initialize.
1667 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1668 New function.
1669 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1670 * linux-low.c (can_hardware_single_step): Use
1671 supports_hardware_single_step.
1672 (can_software_single_step): New function.
1673 (start_step_over): Call can_software_single_step.
1674 (linux_supports_hardware_single_step): New function.
1675 (struct target_ops) <supports_software_single_step>: Initialize.
1676 * linux-low.h (struct linux_target_ops)
1677 <supports_hardware_single_step>: Initialize.
1678 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1679 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1680 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1681 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1682 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1683 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1684 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1685 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1686 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1687 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1688 Initialize.
1689 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1690 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1691 Initialize.
1692 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1693 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1694 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1695 New function.
1696 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1697 * target.h (struct target_ops): <supports_software_single_step>:
1698 New field.
1699 (target_supports_software_single_step): New macro.
1700
2d97cd35
AT
17012015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1702
1703 * linux-low.c (linux_wait_1): Fix pc advance condition.
1704 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1705 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1706
769ef81f
AT
17072015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1708
1709 * linux-arm-low.c (arm_is_thumb_mode): New function.
1710 (arm_breakpoint_at): Use arm_is_thumb_mode.
1711 (arm_breakpoint_kind_from_current_state): New function.
1712 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1713 Initialize.
1714 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1715 (linux_breakpoint_kind_from_current_state): New function.
1716 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1717 * linux-low.h (struct linux_target_ops)
1718 <breakpoint_kind_from_current_state>: New field.
1719 * target.h (struct target_ops): Likewise.
1720 (target_breakpoint_kind_from_current_state): New macro.
1721
1bebeeca
PA
17222015-11-30 Pedro Alves <palves@redhat.com>
1723
1724 * linux-low.c (linux_resume): Wake up the event loop before
1725 returning.
1726
a67a9fae
PA
17272015-11-30 Pedro Alves <palves@redhat.com>
1728
1729 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1730 check.
1731 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1732 to -1.
1733 * target.c (struct thread_search): New structure.
1734 (thread_search_callback): New function.
1735 (prev_general_thread): New global.
1736 (prepare_to_access_memory, done_accessing_memory): New functions.
1737 * target.h (prepare_to_access_memory, done_accessing_memory):
1738 Replace macros with function declarations.
1739
f2faf941
PA
17402015-11-30 Pedro Alves <palves@redhat.com>
1741
1742 PR 14618
1743 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1744 report TARGET_WAITKIND_NO_RESUMED.
1745 * remote-utils.c (prepare_resume_reply): Handle
1746 TARGET_WAITKIND_NO_RESUMED.
1747 * server.c (report_no_resumed): New global.
1748 (handle_query) <qSupported>: Handle "no-resumed+". Report
1749 "no-resumed+" support.
1750 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1751 return error if the client doesn't support no-resumed events.
1752 (push_stop_notification): New function.
1753 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1754 events if the client supports them.
1755
a681f9c9
PA
17562015-11-30 Pedro Alves <palves@redhat.com>
1757
1758 * linux-low.c (thread_still_has_status_pending_p): Don't check
1759 vCont;t here.
1760 (lwp_resumed): New function.
1761 (status_pending_p_callback): Return early if the LWP is not
1762 supposed to be resumed.
1763
65706a29
PA
17642015-11-30 Pedro Alves <palves@redhat.com>
1765
1766 * linux-low.c (handle_extended_wait): Assert that the LWP's
1767 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1768 thread create events, leave the new child's status pending.
1769 (linux_low_filter_event): If GDB wants to hear about thread exit
1770 events, leave the LWP marked dead and don't delete it.
1771 (linux_wait_for_event_filtered): Don't check for thread exit.
1772 (filter_exit_event): New function.
1773 (linux_wait_1): Use it, when returning an exit event.
1774 (linux_resume_one_lwp_throw): Assert that the LWP's
1775 waitstatus is TARGET_WAITKIND_IGNORE.
1776 * remote-utils.c (prepare_resume_reply): Handle
1777 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1778 * server.c (report_thread_events): New global.
1779 (handle_general_set): Handle QThreadEvents.
1780 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1781 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1782 TARGET_WAITKIND_THREAD_EXITED.
1783 * server.h (report_thread_events): Declare.
1784
56cf4bed
PA
17852015-11-30 Pedro Alves <palves@redhat.com>
1786
1787 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1788 the thread's last_resume_kind was resume_stop.
1789
500c1d85
PA
17902015-11-30 Pedro Alves <palves@redhat.com>
1791
1792 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1793 before returning.
1794
de979965
PA
17952015-11-30 Pedro Alves <palves@redhat.com>
1796
1797 * server.c (handle_v_requests): Handle vCtrlC.
1798
34c65914
PA
17992015-11-30 Pedro Alves <palves@redhat.com>
1800
1801 * gdbthread.h (find_any_thread_of_pid): Declare.
1802 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1803 functions.
1804 * server.c (handle_query): If current_thread is NULL, look for
1805 another thread of the selected process.
1806
79efa585 18072015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 1808 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
1809
1810 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1811 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1812 name in reply.
1813 * target.h (struct target_ops) <thread_name>: New field.
1814 (target_thread_name): New macro.
1815
80d82c19
JB
18162015-11-23 Joel Brobecker <brobecker@adacore.com>
1817
1818 * regcache.h (regcache_invalidate_pid): Add declaration.
1819 * regcache.c (regcache_invalidate_pid): New function, extracted
1820 from regcache_invalidate.
1821 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1822 Add trivial documentation comment.
1823 * lynx-low.c: Use regcache_invalidate_pid instead of
1824 regcache_invalidate.
1825
64da5dd5
JB
18262015-11-23 Joel Brobecker <brobecker@adacore.com>
1827
1828 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1829 and Elf64_auxv_t if the target is Android.
1830
37ce4055
DE
18312015-11-22 Doug Evans <xdje42@gmail.com>
1832
1833 * target.h: #include <sys/types.h>.
1834
06e03fff
PA
18352015-11-19 Pedro Alves <palves@redhat.com>
1836
1837 * linux-low.c (linux_process_qsupported): Change prototype.
1838 Adjust.
1839 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1840 Change prototype.
1841 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1842 and adjust to loop over all features.
1843 * server.c (handle_query) <qSupported>: Adjust to call
1844 target_process_qsupported once, passing it a vector of unprocessed
1845 features.
1846 * target.h (struct target_ops) <process_qsupported>: Change
1847 prototype.
1848 (target_process_qsupported): Adjust.
1849
9a084706
PA
18502015-11-19 Pedro Alves <palves@redhat.com>
1851
1852 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1853 mode.
1854 * configure: Regenerate.
1855
dad44a1f
PA
18562015-11-19 Pedro Alves <palves@redhat.com>
1857
1858 * configure: Regenerate.
1859
231c0592
YQ
18602015-11-19 Yao Qi <yao.qi@linaro.org>
1861
1862 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1863 type to uint32_t.
1864
6c1c9a8b
YQ
18652015-11-19 Yao Qi <yao.qi@linaro.org>
1866
1867 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1868 (struct aarch64_operand): Move enum out.
1869
9caa3311
YQ
18702015-11-19 Yao Qi <yao.qi@linaro.org>
1871
1872 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1873 struct user_fpsimd_state *.
1874 (aarch64_store_fpregset): Likewise.
1875
6a69a054
YQ
18762015-11-19 Yao Qi <yao.qi@linaro.org>
1877
1878 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1879 struct user_pt_regs *.
1880 (aarch64_store_gregset): Likewise.
1881
1798301e
PA
18822015-11-18 Pedro Alves <palves@redhat.com>
1883
1884 * Makefile.in (all_object_files): Add $IPA_OBJS.
1885
ce7715e2
PA
18862015-11-17 Pedro Alves <palves@redhat.com>
1887
1888 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1889 GDB_SIGNAL_0 and gdb_signal_to_string.
1890
c0879059
PA
18912015-11-17 Pedro Alves <palves@redhat.com>
1892
1893 * win32-low.c (handle_output_debug_string): Remove parameter.
1894 (win32_kill): Remove our_status local and adjust call to
1895 handle_output_debug_string.
1896 (get_child_debug_event): Adjust call to
1897 handle_output_debug_string.
1898
1996e237
SM
18992015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1900
1901 * linux-mips-low.c (mips_fill_gregset): Add cast.
1902 (mips_store_gregset): Likewise.
1903 (mips_fill_fpregset): Likewise.
1904 (mips_store_fpregset): Likewise.
1905
cbec665b
SM
19062015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1907
1908 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1909 priv.
1910
eb3e3c67
SM
19112015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1912
1913 * linux-mips-low.c (mips_linux_new_thread): Change type of
1914 watch_type to enum target_hw_bp_type.
1915
171de4b8
SM
19162015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1917
1918 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1919 Change return type to arm_hwbp_type.
1920
04248ead
SM
19212015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1922
1923 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1924 (arm_store_gregset): Likewise.
1925 * linux-arm-low.c (arm_get_hwcap): Likewise.
1926 (arm_read_description): Likewise.
1927
04b3479c
SM
19282015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1929
1930 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1931
2bc84e8a
SM
19322015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1933
1934 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1935 (ppc_fill_vsxregset): Likewise.
1936 (ppc_store_vsxregset): Likewise.
1937 (ppc_fill_vrregset): Likewise.
1938 (ppc_store_vrregset): Likewise.
1939 (ppc_fill_evrregset): Likewise.
1940 (ppc_store_evrregset): Likewise.
1941
e6c5bb05
SM
19422015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1943
1944 * linux-ppc-low.c (ppc_usrregs_info): Remove
1945 forward-declaration.
1946 (ppc_arch_setup): Move lower in file.
1947
7ea45d72
SM
19482015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1949
1950 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1951 (ps_pdwrite): Likewise.
1952
69291610
HW
19532015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1954
1955 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1956 to after assert checks.
1957
b42945fd
SM
19582015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1959
1960 * proc-service.c (ps_pdread): Add/adjust casts.
1961 (ps_pdwrite): Add/adjust casts.
1962
d6f85c84
SM
19632015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1964
1965 * server.c (handle_search_memory_1): Cast return value of
1966 memmem.
1967
f98cd059
SM
19682015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1969
1970 * server.c (write_qxfer_response): Change type of data to
1971 gdb_byte *.
1972
d2412fa5
PA
19732015-10-29 Pedro Alves <palves@redhat.com>
1974
1975 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1976
c17414a2
PA
19772015-10-29 Pedro Alves <palves@redhat.com>
1978
1979 * tracepoint.c (clear_installed_tracepoints): Add casts.
1980
e053fbc4
PA
19812015-10-29 Pedro Alves <palves@redhat.com>
1982
1983 * server.c (handle_v_cont, process_serial_event): Add enum
1984 gdb_signal casts to signal parsing code.
1985
add67df8
PA
19862015-10-29 Pedro Alves <palves@redhat.com>
1987
1988 * linux-low.h (NULL_REGSET): Define.
1989 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1990 * linux-arm-low.c (arm_regsets): Likewise.
1991 * linux-crisv32-low.c (cris_regsets): Likewise.
1992 * linux-m68k-low.c (m68k_regsets): Likewise.
1993 * linux-mips-low.c (mips_regsets): Likewise.
1994 * linux-nios2-low.c (nios2_regsets): Likewise.
1995 * linux-ppc-low.c (ppc_regsets): Likewise.
1996 * linux-s390-low.c (s390_regsets): Likewise.
1997 * linux-sh-low.c (sh_regsets): Likewise.
1998 * linux-sparc-low.c (sparc_regsets): Likewise.
1999 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2000 * linux-tile-low.c (tile_regsets): Likewise.
2001 * linux-x86-low.c (x86_regsets): Likewise.
2002 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2003
50bc912a
PA
20042015-10-29 Pedro Alves <palves@redhat.com>
2005
2006 * linux-low.h (NULL_REGSET): Define.
2007 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2008 * linux-arm-low.c (arm_regsets): Likewise.
2009 * linux-crisv32-low.c (cris_regsets): Likewise.
2010 * linux-m68k-low.c (m68k_regsets): Likewise.
2011 * linux-mips-low.c (mips_regsets): Likewise.
2012 * linux-nios2-low.c (nios2_regsets): Likewise.
2013 * linux-ppc-low.c (ppc_regsets): Likewise.
2014 * linux-s390-low.c (s390_regsets): Likewise.
2015 * linux-sh-low.c (sh_regsets): Likewise.
2016 * linux-sparc-low.c (sparc_regsets): Likewise.
2017 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2018 * linux-tile-low.c (tile_regsets): Likewise.
2019 * linux-x86-low.c (x86_regsets): Likewise.
2020 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2021
682b2546
DE
20222015-10-26 Doug Evans <dje@google.com>
2023
2024 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2025
963843d4
DE
20262015-10-26 Doug Evans <dje@google.com>
2027
2028 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2029
d41401ac
DE
20302015-10-26 Doug Evans <dje@google.com>
2031
2032 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2033 for debug_printf.
2034 (attach_thread, find_new_threads_callback): Ditto.
2035
3db28855
AT
20362015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2037
2038 * mem-break.h (set_breakpoint_data): Remove.
2039
fb78e89c
AT
20402015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2041
2042 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2043 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2044 (initialize_low): Remove set_breakpoint_data call.
2045 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2046 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2047 (initialize_low): Remove set_breakpoint_data call.
2048 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2049 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2050 (initialize_low): Remove set_breakpoint_data call.
2051
2e6ee069
AT
20522015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2053
2054 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2055 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2056 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2057 * target.h (target_breakpoint_kind_from_pc): New macro.
2058
1652a986
AT
20592015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2060
2061 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2062 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2063 the default breakpoint kind.
2064
abeead09
AT
20652015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2066
2067 * linux-arm-low.c (arm_supports_z_point_type): Add software
2068 breakpoint support.
2069
b0b4b501
AT
20702015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2071
2072 * linux-arm-low.c: Refactor breakpoint definitions.
2073 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2074 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2075
8689682c
AT
20762015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2077
2078 * Makefile.in: Add arm.c/o.
2079 * configure.srv: Likewise.
2080 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2081 (arm_breakpoint_kind_from_pc): New function.
2082 (arm_sw_breakpoint_from_kind): Return proper kind.
2083 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2084
27165294
AT
20852015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2086
2087 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2088 removal.
2089 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2090 (struct raw_breakpoint) <size>: Remove.
2091 (struct raw_breakpoint) <kind>: Add.
2092 (bp_size): New function.
2093 (bp_opcode): Likewise.
2094 (find_raw_breakpoint_at): Adjust for kind.
2095 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2096 (remove_memory_breakpoint): Adjust for kind call bp_size.
2097 (set_raw_breakpoint_at): Adjust for kind.
2098 (set_breakpoint): Likewise.
2099 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2100 (delete_raw_breakpoint): Adjust for kind.
2101 (delete_breakpoint): Likewise.
2102 (find_gdb_breakpoint): Likewise.
2103 (set_gdb_breakpoint_1): Likewise.
2104 (set_gdb_breakpoint): Likewise.
2105 (delete_gdb_breakpoint_1): Likewise.
2106 (delete_gdb_breakpoint): Likewise.
2107 (uninsert_raw_breakpoint): Likewise.
2108 (reinsert_raw_breakpoint): Likewise.
2109 (set_breakpoint_data): Remove.
2110 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2111 (check_mem_read): Adjust for kind call bp_size.
2112 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2113 (clone_one_breakpoint): Adjust for kind.
2114 * mem-break.h (set_gdb_breakpoint): Likewise.
2115 (delete_gdb_breakpoint): Likewise.
2116 * server.c (process_serial_event): Likewise.
2117
dd373349
AT
21182015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2119
2120 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2121 (struct linux_target_ops) <breakpoint>: Remove.
2122 (struct linux_target_ops) <breakpoint_len>: Remove.
2123 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2124 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2125 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2126 (arm_sw_breakpoint_from_kind): New function.
2127 * linux-bfin-low.c (bfin_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-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2133 (struct linux_target_ops) <breakpoint>: Remove.
2134 (struct linux_target_ops) <breakpoint_len>: Remove.
2135 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2136 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2137 * linux-crisv32-low.c (cris_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-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2143 and sw_breakpoint_from_kind to increment the pc.
2144 (linux_breakpoint_kind_from_pc): New function.
2145 (linux_sw_breakpoint_from_kind): New function.
2146 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2147 (initialize_low): Call breakpoint_kind_from_pc and
2148 sw_breakpoint_from_kind to replace breakpoint_data/len.
2149 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2150 New field.
2151 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2152 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2153 (struct linux_target_ops) <breakpoint>: Remove.
2154 (struct linux_target_ops) <breakpoint_len>: Remove.
2155 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2156 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2157 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2158 (struct linux_target_ops) <breakpoint>: Remove.
2159 (struct linux_target_ops) <breakpoint_len>: Remove.
2160 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2161 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2162 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2163 (struct linux_target_ops) <breakpoint>: Remove.
2164 (struct linux_target_ops) <breakpoint_len>: Remove.
2165 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2166 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2167 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2168 (struct linux_target_ops) <breakpoint>: Remove.
2169 (struct linux_target_ops) <breakpoint_len>: Remove.
2170 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2171 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2172 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2173 (struct linux_target_ops) <breakpoint>: Remove.
2174 (struct linux_target_ops) <breakpoint_len>: Remove.
2175 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2176 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2177 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2178 (struct linux_target_ops) <breakpoint>: Remove.
2179 (struct linux_target_ops) <breakpoint_len>: Remove.
2180 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2181 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2182 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2183 (struct linux_target_ops) <breakpoint>: Remove.
2184 (struct linux_target_ops) <breakpoint_len>: Remove.
2185 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2186 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2187 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2188 (struct linux_target_ops) <breakpoint>: Remove.
2189 (struct linux_target_ops) <breakpoint_len>: Remove.
2190 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2191 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2192 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2193 (struct linux_target_ops) <breakpoint>: Remove.
2194 (struct linux_target_ops) <breakpoint_len>: Remove.
2195 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2196 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2197 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2198 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2199 (struct linux_target_ops) <breakpoint>: Remove.
2200 (struct linux_target_ops) <breakpoint_len>: Remove.
2201 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2202 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2203 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2204 (struct linux_target_ops) <breakpoint>: Remove.
2205 (struct linux_target_ops) <breakpoint_len>: Remove.
2206 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2207 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2208
4cd98a19
AT
22092015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2210
2211 * linux-cris-low.c (cris_get_pc): Remove void arg.
2212
774ee6d2
AR
22132015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2214
2215 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2216 variable name.
2217
833dcd29
AR
22182015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2219
2220 * inferiors.c (thread_pid_matches_callback): New function.
2221 (find_thread_process): New function.
2222 (remove_thread): Reset current_thread.
2223 (remove_process): Assert threads have been removed first.
2224
8d689ee5
YQ
22252015-10-15 Yao Qi <yao.qi@linaro.org>
2226
2227 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2228 if it is 3.
2229 (aarch64_remove_point): Likewise.
2230 * regcache.c (regcache_register_size): New function.
2231
1c2e1515
YQ
22322015-10-12 Yao Qi <yao.qi@linaro.org>
2233
2234 * linux-aarch64-low.c: Update all callers as emit_load_store
2235 is renamed to aarch64_emit_load_store.
2236
e1c587c3
YQ
22372015-10-12 Yao Qi <yao.qi@linaro.org>
2238
2239 * linux-aarch64-low.c: Update all callers of function renaming
2240 from emit_insn to aarch64_emit_insn.
2241
b6542f81
YQ
22422015-10-12 Yao Qi <yao.qi@linaro.org>
2243
2244 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2245 arch/aarch64-insn.h.
2246 (struct aarch64_memory_operand): Likewise.
2247 (ENCODE): Likewise.
2248 (emit_insn): Move to arch/aarch64-insn.c.
2249 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2250 (emit_load_store): Move to arch/aarch64-insn.c.
2251 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2252 (can_encode_int32): Remove.
2253
246994ce
YQ
22542015-10-12 Yao Qi <yao.qi@linaro.org>
2255
2256 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2257 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2258 (aarch64_relocate_instruction): Likewise.
2259 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2260 (struct aarch64_insn_visitor): Likewise.
2261
0badd99f
YQ
22622015-10-12 Yao Qi <yao.qi@linaro.org>
2263
2264 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2265 (struct aarch64_insn_visitor): New.
2266 (struct aarch64_insn_relocation_data): New.
2267 (aarch64_ftrace_insn_reloc_b): New function.
2268 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2269 (aarch64_ftrace_insn_reloc_cb): Likewise.
2270 (aarch64_ftrace_insn_reloc_tb): Likewise.
2271 (aarch64_ftrace_insn_reloc_adr): Likewise.
2272 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2273 (aarch64_ftrace_insn_reloc_others): Likewise.
2274 (visitor): New.
2275 (aarch64_relocate_instruction): Use visitor.
2276
dfaffe9d
YQ
22772015-10-12 Yao Qi <yao.qi@linaro.org>
2278
2279 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2280 int. Add argument buf.
2281 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2282 aarch64_relocate_instruction.
2283
70b439f0
YQ
22842015-10-12 Yao Qi <yao.qi@linaro.org>
2285
2286 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2287 argument insn. Remove local variable insn. Don't call
2288 target_read_uint32.
2289 (aarch64_install_fast_tracepoint_jump_pad): Call
2290 target_read_uint32.
2291
7781c06f
YQ
22922015-09-30 Yao Qi <yao.qi@linaro.org>
2293
2294 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2295 (emit_load_store_pair): Likewise.
2296
9a3c8263
SM
22972015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2298
2299 * dll.c (match_dll): Add cast(s).
2300 (unloaded_dll): Likewise.
2301 * linux-low.c (second_thread_of_pid_p): Likewise.
2302 (delete_lwp_callback): Likewise.
2303 (count_events_callback): Likewise.
2304 (select_event_lwp_callback): Likewise.
2305 (linux_set_resume_request): Likewise.
2306 * server.c (accumulate_file_name_length): Likewise.
2307 (emit_dll_description): Likewise.
2308 (handle_qxfer_threads_worker): Likewise.
2309 (visit_actioned_threads): Likewise.
2310 * thread-db.c (any_thread_of): Likewise.
2311 * tracepoint.c (same_process_p): Likewise.
2312 (match_blocktype): Likewise.
2313 (build_traceframe_info_xml): Likewise.
2314
224c3ddb
SM
23152015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2316
2317 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2318 assignment.
2319 (gdb_unparse_agent_expr): Likewise.
2320 * hostio.c (require_data): Likewise.
2321 (handle_pread): Likewise.
2322 * linux-low.c (disable_regset): Likewise.
2323 (fetch_register): Likewise.
2324 (store_register): Likewise.
2325 (get_dynamic): Likewise.
2326 (linux_qxfer_libraries_svr4): Likewise.
2327 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2328 (set_fast_tracepoint_jump): Likewise.
2329 (uninsert_fast_tracepoint_jumps_at): Likewise.
2330 (reinsert_fast_tracepoint_jumps_at): Likewise.
2331 (validate_inserted_breakpoint): Likewise.
2332 (clone_agent_expr): Likewise.
2333 * regcache.c (init_register_cache): Likewise.
2334 * remote-utils.c (putpkt_binary_1): Likewise.
2335 (decode_M_packet): Likewise.
2336 (decode_X_packet): Likewise.
2337 (look_up_one_symbol): Likewise.
2338 (relocate_instruction): Likewise.
2339 (monitor_output): Likewise.
2340 * server.c (handle_search_memory): Likewise.
2341 (handle_qxfer_exec_file): Likewise.
2342 (handle_qxfer_libraries): Likewise.
2343 (handle_qxfer): Likewise.
2344 (handle_query): Likewise.
2345 (handle_v_cont): Likewise.
2346 (handle_v_run): Likewise.
2347 (captured_main): Likewise.
2348 * target.c (write_inferior_memory): Likewise.
2349 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2350 * tracepoint.c (init_trace_buffer): Likewise.
2351 (add_tracepoint_action): Likewise.
2352 (add_traceframe): Likewise.
2353 (add_traceframe_block): Likewise.
2354 (cmd_qtdpsrc): Likewise.
2355 (cmd_qtdv): Likewise.
2356 (cmd_qtstatus): Likewise.
2357 (response_source): Likewise.
2358 (response_tsv): Likewise.
2359 (cmd_qtnotes): Likewise.
2360 (gdb_collect): Likewise.
2361 (initialize_tracepoint): Likewise.
2362
afbe19f8
PL
23632015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2364
2365 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2366 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2367 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2368 <NOP>: New.
2369 (enum aarch64_condition_codes): New enum.
2370 (w0): New static global.
2371 (fp): Likewise.
2372 (lr): Likewise.
2373 (struct aarch64_memory_operand) <type>: New
2374 MEMORY_OPERAND_POSTINDEX type.
2375 (postindex_memory_operand): New helper function.
2376 (emit_ret): New function.
2377 (emit_load_store_pair): New function, factored out of emit_stp
2378 with support for MEMORY_OPERAND_POSTINDEX.
2379 (emit_stp): Rewrite using emit_load_store_pair.
2380 (emit_ldp): New function.
2381 (emit_load_store): Likewise.
2382 (emit_ldr): Mention post-index instruction in comment.
2383 (emit_ldrh): New function.
2384 (emit_ldrb): New function.
2385 (emit_ldrsw): Mention post-index instruction in comment.
2386 (emit_str): Likewise.
2387 (emit_subs): New function.
2388 (emit_cmp): Likewise.
2389 (emit_and): Likewise.
2390 (emit_orr): Likewise.
2391 (emit_orn): Likewise.
2392 (emit_eor): Likewise.
2393 (emit_mvn): Likewise.
2394 (emit_lslv): Likewise.
2395 (emit_lsrv): Likewise.
2396 (emit_asrv): Likewise.
2397 (emit_mul): Likewise.
2398 (emit_sbfm): Likewise.
2399 (emit_sbfx): Likewise.
2400 (emit_ubfm): Likewise.
2401 (emit_ubfx): Likewise.
2402 (emit_csinc): Likewise.
2403 (emit_cset): Likewise.
2404 (emit_nop): Likewise.
2405 (emit_ops_insns): New helper function.
2406 (emit_pop): Likewise.
2407 (emit_push): Likewise.
2408 (aarch64_emit_prologue): New function.
2409 (aarch64_emit_epilogue): Likewise.
2410 (aarch64_emit_add): Likewise.
2411 (aarch64_emit_sub): Likewise.
2412 (aarch64_emit_mul): Likewise.
2413 (aarch64_emit_lsh): Likewise.
2414 (aarch64_emit_rsh_signed): Likewise.
2415 (aarch64_emit_rsh_unsigned): Likewise.
2416 (aarch64_emit_ext): Likewise.
2417 (aarch64_emit_log_not): Likewise.
2418 (aarch64_emit_bit_and): Likewise.
2419 (aarch64_emit_bit_or): Likewise.
2420 (aarch64_emit_bit_xor): Likewise.
2421 (aarch64_emit_bit_not): Likewise.
2422 (aarch64_emit_equal): Likewise.
2423 (aarch64_emit_less_signed): Likewise.
2424 (aarch64_emit_less_unsigned): Likewise.
2425 (aarch64_emit_ref): Likewise.
2426 (aarch64_emit_if_goto): Likewise.
2427 (aarch64_emit_goto): Likewise.
2428 (aarch64_write_goto_address): Likewise.
2429 (aarch64_emit_const): Likewise.
2430 (aarch64_emit_call): Likewise.
2431 (aarch64_emit_reg): Likewise.
2432 (aarch64_emit_pop): Likewise.
2433 (aarch64_emit_stack_flush): Likewise.
2434 (aarch64_emit_zero_ext): Likewise.
2435 (aarch64_emit_swap): Likewise.
2436 (aarch64_emit_stack_adjust): Likewise.
2437 (aarch64_emit_int_call_1): Likewise.
2438 (aarch64_emit_void_call_2): Likewise.
2439 (aarch64_emit_eq_goto): Likewise.
2440 (aarch64_emit_ne_goto): Likewise.
2441 (aarch64_emit_lt_goto): Likewise.
2442 (aarch64_emit_le_goto): Likewise.
2443 (aarch64_emit_gt_goto): Likewise.
2444 (aarch64_emit_ge_got): Likewise.
2445 (aarch64_emit_ops_impl): New static global variable.
2446 (aarch64_emit_ops): New target function, return
2447 &aarch64_emit_ops_impl.
2448 (struct linux_target_ops): Install it.
2449
bb903df0
PL
24502015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2451
2452 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2453 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2454 aarch64-ipa.o.
2455 * linux-aarch64-ipa.c: New file.
2456 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2457 and endian.h.
2458 (aarch64_get_thread_area): New target method.
2459 (extract_signed_bitfield): New helper function.
2460 (aarch64_decode_ldr_literal): New function.
2461 (enum aarch64_opcodes): New enum.
2462 (struct aarch64_register): New struct.
2463 (struct aarch64_operand): New struct.
2464 (x0): New static global.
2465 (x1): Likewise.
2466 (x2): Likewise.
2467 (x3): Likewise.
2468 (x4): Likewise.
2469 (w2): Likewise.
2470 (ip0): Likewise.
2471 (sp): Likewise.
2472 (xzr): Likewise.
2473 (aarch64_register): New helper function.
2474 (register_operand): Likewise.
2475 (immediate_operand): Likewise.
2476 (struct aarch64_memory_operand): New struct.
2477 (offset_memory_operand): New helper function.
2478 (preindex_memory_operand): Likewise.
2479 (enum aarch64_system_control_registers): New enum.
2480 (ENCODE): New macro.
2481 (emit_insn): New helper function.
2482 (emit_b): New function.
2483 (emit_bcond): Likewise.
2484 (emit_cb): Likewise.
2485 (emit_tb): Likewise.
2486 (emit_blr): Likewise.
2487 (emit_stp): Likewise.
2488 (emit_ldp_q_offset): Likewise.
2489 (emit_stp_q_offset): Likewise.
2490 (emit_load_store): Likewise.
2491 (emit_ldr): Likewise.
2492 (emit_ldrsw): Likewise.
2493 (emit_str): Likewise.
2494 (emit_ldaxr): Likewise.
2495 (emit_stxr): Likewise.
2496 (emit_stlr): Likewise.
2497 (emit_data_processing_reg): Likewise.
2498 (emit_data_processing): Likewise.
2499 (emit_add): Likewise.
2500 (emit_sub): Likewise.
2501 (emit_mov): Likewise.
2502 (emit_movk): Likewise.
2503 (emit_mov_addr): Likewise.
2504 (emit_mrs): Likewise.
2505 (emit_msr): Likewise.
2506 (emit_sevl): Likewise.
2507 (emit_wfe): Likewise.
2508 (append_insns): Likewise.
2509 (can_encode_int32_in): New helper function.
2510 (aarch64_relocate_instruction): New function.
2511 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2512 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2513 (struct linux_target_ops): Install aarch64_get_thread_area,
2514 aarch64_install_fast_tracepoint_jump_pad and
2515 aarch64_get_min_fast_tracepoint_insn_len.
2516
787749ea
PL
25172015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2518
2519 * Makefile.in (aarch64-insn.o): New rule.
2520 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2521
9812b2e6
YQ
25222015-09-21 Yao Qi <yao.qi@linaro.org>
2523
2524 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2525
18fe412b
YQ
25262015-09-21 Yao Qi <yao.qi@linaro.org>
2527
2528 * tracepoint.c (max_jump_pad_size): Remove.
2529
a0cc84cd
YQ
25302015-09-18 Yao Qi <yao.qi@linaro.org>
2531
2532 * linux-aarch64-low.c: Don't include sys/uio.h.
2533 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2534
d78908cf
WW
25352015-09-16 Wei-cheng Wang <cole945@gmail.com>
2536
2537 * tracepoint.c (eval_result_type): Change prototype.
2538 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2539
d57e0d50
PA
25402015-09-15 Pedro Alves <palves@redhat.com>
2541
2542 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2543 Check whether to report exec events instead of checking whether
2544 multiprocess is enabled.
2545
5a676acc
PA
25462015-09-15 Pedro Alves <palves@redhat.com>
2547
2548 PR remote/18965
2549 * remote-utils.c (prepare_resume_reply): Merge
2550 TARGET_WAITKIND_VFORK_DONE switch case with the
2551 TARGET_WAITKIND_FORKED case.
2552
7c5d0fad
YQ
25532015-09-15 Yao Qi <yao.qi@linaro.org>
2554
2555 * server.c (handle_query): Check string comparison using
2556 "else if" instead of "if".
2557
750ce8d1
YQ
25582015-09-15 Yao Qi <yao.qi@linaro.org>
2559
2560 * server.c (vCont_supported): New global variable.
2561 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2562 matches. Append ";vContSupported+" to own_buf.
2563 (handle_v_requests): Append ";s;S" to own_buf if target supports
2564 hardware single step or vCont_supported is false.
2565 (capture_main): Set vCont_supported to zero.
2566
70b90b91
YQ
25672015-09-15 Yao Qi <yao.qi@linaro.org>
2568
2569 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2570 it to ...
2571 (linux_supports_hardware_single_step): ... New function.
2572 (linux_target_ops): Update.
2573 * lynx-low.c (lynx_target_ops): Set field
2574 supports_hardware_single_step to target_can_do_hardware_single_step.
2575 * nto-low.c (nto_target_ops): Likewise.
2576 * spu-low.c (spu_target_ops): Likewise.
2577 * win32-low.c (win32_target_ops): Likewise.
2578 * target.c (target_can_do_hardware_single_step): New function.
2579 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2580 Remove. <supports_hardware_single_step>: New field.
2581 (target_supports_conditional_breakpoints): Remove.
2582 (target_supports_hardware_single_step): New macro.
2583 (target_can_do_hardware_single_step): Declare.
2584 * server.c (handle_query): Use target_supports_hardware_single_step
2585 instead of target_supports_conditional_breakpoints.
2586
ade90bde
YQ
25872015-09-15 Yao Qi <yao.qi@linaro.org>
2588
2589 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2590 function.
2591 (struct linux_target_ops the_low_target): Install
2592 aarch64_linux_siginfo_fixup.
2593
94585166
DB
25942015-09-11 Don Breazeal <donb@codesourcery.com>
2595 Luis Machado <lgustavo@codesourcery.com>
2596
2597 * linux-low.c (linux_mourn): Static declaration.
2598 (linux_arch_setup): Move in front of
2599 handle_extended_wait.
2600 (linux_arch_setup_thread): New function.
2601 (handle_extended_wait): Handle exec events. Call
2602 linux_arch_setup_thread. Make event_lwp argument a
2603 pointer-to-a-pointer.
2604 (check_zombie_leaders): Do not check stopped threads.
2605 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2606 (linux_low_filter_event): Add lwp and thread for exec'ing
2607 non-leader thread if leader thread has been deleted.
2608 Refactor code into linux_arch_setup_thread and call it.
2609 Pass child lwp pointer by reference to handle_extended_wait.
2610 (linux_wait_for_event_filtered): Update comment.
2611 (linux_wait_1): Prevent clobbering exec event status.
2612 (linux_supports_exec_events): New function.
2613 (linux_target_ops) <supports_exec_events>: Initialize new member.
2614 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2615 new member.
2616 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2617 * server.c (report_exec_events): New global variable.
2618 (handle_query): Handle qSupported query for exec-events feature.
2619 (captured_main): Initialize report_exec_events.
2620 * server.h (report_exec_events): Declare new global variable.
2621 * target.h (struct target_ops) <supports_exec_events>: New
2622 member.
2623 (target_supports_exec_events): New macro.
2624 * win32-low.c (win32_target_ops) <supports_exec_events>:
2625 Initialize new member.
2626
0568462b
MM
26272015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2628
2629 * linux-low.c (linux_low_enable_btrace): Remove.
2630 (linux_target_ops): Replace linux_low_enable_btrace with
2631 linux_enable_btrace.
2632
39edd165
YQ
26332015-09-03 Yao Qi <yao.qi@linaro.org>
2634
2635 * linux-aarch64-low.c (aarch64_insert_point): Call
2636 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2637 returns true.
2638
1db33b5a
UW
26392015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2640
2641 * linux-low.c (check_stopped_by_breakpoint): Use
2642 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2643
ab290430
PA
26442015-08-27 Pedro Alves <palves@redhat.com>
2645
2646 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2647
8d749320
SM
26482015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2649
6711b7f8
SM
2650 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2651 the XNEW-family equivalent.
8d749320
SM
2652 (compile_bytecodes): Likewise.
2653 * dll.c (loaded_dll): Likewise.
2654 * event-loop.c (append_callback_event): Likewise.
2655 (create_file_handler): Likewise.
2656 (create_file_event): Likewise.
2657 * hostio.c (handle_open): Likewise.
2658 * inferiors.c (add_thread): Likewise.
2659 (add_process): Likewise.
2660 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2661 * linux-arm-low.c (arm_new_process): Likewise.
2662 (arm_new_thread): Likewise.
2663 * linux-low.c (add_to_pid_list): Likewise.
2664 (linux_add_process): Likewise.
2665 (handle_extended_wait): Likewise.
2666 (add_lwp): Likewise.
2667 (enqueue_one_deferred_signal): Likewise.
2668 (enqueue_pending_signal): Likewise.
2669 (linux_resume_one_lwp_throw): Likewise.
2670 (linux_resume_one_thread): Likewise.
2671 (linux_read_memory): Likewise.
2672 (linux_write_memory): Likewise.
2673 * linux-mips-low.c (mips_linux_new_process): Likewise.
2674 (mips_linux_new_thread): Likewise.
2675 (mips_add_watchpoint): Likewise.
2676 * linux-x86-low.c (initialize_low_arch): Likewise.
2677 * lynx-low.c (lynx_add_process): Likewise.
2678 * mem-break.c (set_raw_breakpoint_at): Likewise.
2679 (set_breakpoint): Likewise.
2680 (add_condition_to_breakpoint): Likewise.
2681 (add_commands_to_breakpoint): Likewise.
2682 (clone_agent_expr): Likewise.
2683 (clone_one_breakpoint): Likewise.
2684 * regcache.c (new_register_cache): Likewise.
2685 * remote-utils.c (look_up_one_symbol): Likewise.
2686 * server.c (queue_stop_reply): Likewise.
2687 (start_inferior): Likewise.
2688 (queue_stop_reply_callback): Likewise.
2689 (handle_target_event): Likewise.
2690 * spu-low.c (fetch_ppc_memory): Likewise.
2691 (store_ppc_memory): Likewise.
2692 * target.c (set_target_ops): Likewise.
2693 * thread-db.c (thread_db_load_search): Likewise.
2694 (try_thread_db_load_1): Likewise.
2695 * tracepoint.c (add_tracepoint): Likewise.
2696 (add_tracepoint_action): Likewise.
2697 (create_trace_state_variable): Likewise.
2698 (cmd_qtdpsrc): Likewise.
2699 (cmd_qtro): Likewise.
2700 (add_while_stepping_state): Likewise.
2701 * win32-low.c (child_add_thread): Likewise.
2702 (get_image_name): Likewise.
2703
ed8b7b42
YQ
27042015-08-25 Yao Qi <yao.qi@linaro.org>
2705
2706 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2707
db3cb7cb
YQ
27082015-08-25 Yao Qi <yao.qi@linaro.org>
2709
2710 * Makefile.in (aarch64-linux.o): New rule.
2711 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2712 srv_tgtobj.
2713 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2714 (aarch64_init_debug_reg_state): Make it extern.
2715 (aarch64_linux_prepare_to_resume): Remove.
2716
f6011a1c
YQ
27172015-08-25 Yao Qi <yao.qi@linaro.org>
2718
2719 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2720 lwp_arch_private_info and ptid_of_lwp.
2721
88e2cf7e
YQ
27222015-08-25 Yao Qi <yao.qi@linaro.org>
2723
2724 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2725 Find proc_info by find_process_pid. All callers updated.
2726
5e35436e
YQ
27272015-08-25 Yao Qi <yao.qi@linaro.org>
2728
2729 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2730 Remove.
2731 (debug_reg_change_callback): Remove.
2732 (aarch64_notify_debug_reg_change): Remove.
2733
4a8a7965
YQ
27342015-08-25 Yao Qi <yao.qi@linaro.org>
2735
2736 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2737 Call current_lwp_ptid.
2738
32a271ee
YQ
27392015-08-25 Yao Qi <yao.qi@linaro.org>
2740
2741 * linux-aarch64-low.c (debug_reg_change_callback): Use
2742 debug_printf.
2743
0d51c8d7
YQ
27442015-08-25 Yao Qi <yao.qi@linaro.org>
2745
2746 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2747
31a43dd5
YQ
27482015-08-25 Yao Qi <yao.qi@linaro.org>
2749
2750 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2751
8ee52567
YQ
27522015-08-25 Yao Qi <yao.qi@linaro.org>
2753
2754 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2755 the code.
2756
ff3f0f45
YQ
27572015-08-25 Yao Qi <yao.qi@linaro.org>
2758
2759 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2760 Remove.
2761 (debug_reg_change_callback): Remove argument entry and add argument
2762 lwp. Remove local variable thread. Don't print thread id in the
2763 debugging output. Don't check whether pid of thread equals to pid.
2764 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2765 iterate_over_lwps instead find_inferior.
2766
3d40fbb5
PA
27672015-08-24 Pedro Alves <palves@redhat.com>
2768
2769 * inferiors.c (get_first_process): New function.
2770 * inferiors.h (get_first_process): New declaration.
2771 * remote-utils.c (read_ptid): Default to the first process in the
2772 list, instead of to the current thread's process.
2773
438e1e42
PA
27742015-08-24 Pedro Alves <palves@redhat.com>
2775
2776 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2777 * event-loop.c: Likewise.
2778 * remote-utils.c: Likewise.
2779 * tracepoint.c: Likewise.
2780
a8c6d4fc
PA
27812015-08-24 Pedro Alves <palves@redhat.com>
2782
2783 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2784 ptid_get_lwp.
2785
99b0bb12
PA
27862015-08-21 Pedro Alves <palves@redhat.com>
2787
2788 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2789 instead of literal 1.
2790
f8904751
PA
27912015-08-21 Pedro Alves <palves@redhat.com>
2792
2793 * tdesc.c (default_description): Explicitly zero-initialize.
2794
465a859e
PA
27952015-08-21 Pedro Alves <palves@redhat.com>
2796
2797 PR gdb/18749
2798 * inferiors.c (remove_thread): Discard any pending stop reply for
2799 this thread.
2800 * server.c (remove_all_on_match_pid): Rename to ...
2801 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2802 instead of a pid.
2803 (discard_queued_stop_replies): Change parameter to a ptid. Now
2804 extern.
2805 (handle_v_kill, kill_inferior_callback, captured_main)
2806 (process_serial_event): Adjust.
2807 * server.h (discard_queued_stop_replies): Declare.
2808
f0db101d
PA
28092015-08-21 Pedro Alves <palves@redhat.com>
2810
2811 * linux-low.c (wait_for_sigstop): Always switch to no thread
2812 selected if the previously current thread dies.
2813 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2814 process instead of the current thread's.
2815 * remote-utils.c (input_interrupt): Don't check if there's no
2816 current thread.
2817 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2818 current thread to the general thread fails, error out.
2819 (handle_qxfer_auxv, handle_qxfer_libraries)
2820 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2821 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2822 (handle_query): Check if there's a thread selected instead of
2823 checking whether there's any thread in the thread list.
2824 (handle_qxfer_threads, handle_qxfer_btrace)
2825 (handle_qxfer_btrace_conf): Don't error out early if there's no
2826 thread in the thread list.
2827 (handle_v_cont, myresume): Don't set the current thread to the
2828 continue thread.
2829 (process_serial_event) <Hg handling>: Also set thread_id if the
2830 previous general thread is still alive.
2831 (process_serial_event) <g/G handling>: If setting the current
2832 thread to the general thread fails, error out.
2833 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2834 thread's lwp instead of the current thread's.
2835 * target.c (set_desired_thread): If the desired thread was not
2836 found, leave the current thread pointing to NULL. Return an int
2837 (boolean) indicating success.
2838 * target.h (set_desired_thread): Change return type to int.
2839
40045d91
MF
28402015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2841
2842 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2843 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2844 #includes.
2845 (ps_get_thread_area): New function.
2846
45face3b
GB
28472015-08-19 Gary Benson <gbenson@redhat.com>
2848
2849 * hostio.c (handle_pread): Do not attempt to read more data
2850 than hostio_reply_with_data can fit in a packet.
2851
16d5f642
JB
28522015-08-18 Joel Brobecker <brobecker@adacore.com>
2853
2854 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2855
a738da3a
MF
28562015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2857
2858 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2859
33ebda9d
PA
28602015-08-06 Pedro Alves <palves@redhat.com>
2861
2862 * tracepoint.c (expr_eval_result): Now an int.
2863
a44892be
PA
28642015-08-06 Pedro Alves <palves@redhat.com>
2865
2866 * gdbthread.h (struct regcache): Forward declare.
2867 (struct thread_info) <regcache_data>: Now a struct regcache
2868 pointer.
2869 * inferiors.c (inferior_regcache_data)
2870 (set_inferior_regcache_data): Now work with struct regcache
2871 pointers.
2872 * inferiors.h (struct regcache): Forward declare.
2873 (inferior_regcache_data, set_inferior_regcache_data): Now work
2874 with struct regcache pointers.
2875 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2876 (free_register_cache_thread): Remove struct regcache pointer
2877 casts.
2878
608a1e46
PA
28792015-08-06 Pedro Alves <palves@redhat.com>
2880
2881 * server.c (captured_main): On error, print the exception message
2882 to stderr, and if run_once is set, throw a quit.
2883
f0ce0d3a
PA
28842015-08-06 Pedro Alves <palves@redhat.com>
2885
2886 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2887 the current thread.
2888
bf47e248
PA
28892015-08-06 Pedro Alves <palves@redhat.com>
2890
2891 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2892 reading beyond the passed in buffer length.
2893
b6b9ffcc
PL
28942015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2895
2896 * tracepoint.c (symbol_list) <required>: Remove.
2897
863d01bd
PA
28982015-08-06 Pedro Alves <palves@redhat.com>
2899
2900 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2901 count if stopping and suspending threads.
2902 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2903 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2904 (linux_detach): Complete an ongoing step-over.
2905 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2906 throughout.
2907 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2908 (linux_wait_1): If passing a signal to the inferior after
2909 finishing a step-over, unsuspend and re-resume all lwps. If we
2910 see a single-step event but the thread should be continuing, don't
2911 pass the trap to gdb.
2912 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2913 internal_error instead of gdb_assert.
2914 (enqueue_pending_signal): New function.
2915 (check_ptrace_stopped_lwp_gone): Add debug output.
2916 (start_step_over): Use internal_error instead of gdb_assert.
2917 (complete_ongoing_step_over): New function.
2918 (linux_resume_one_thread): Don't resume a suspended thread.
2919 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2920 it stepping.
2921
00db26fa
PA
29222015-08-06 Pedro Alves <palves@redhat.com>
2923
2924 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2925 (linux_thread_alive): Use lwp_is_marked_dead.
2926 (extended_event_reported): Delete.
2927 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2928 instead of extended_event_reported.
2929 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2930 as well.
2931 (lwp_is_marked_dead): New function.
2932 (lwp_running): Use lwp_is_marked_dead.
2933 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2934 comment.
2935
ad071a30
PA
29362015-08-06 Pedro Alves <palves@redhat.com>
2937
2938 * linux-low.c (linux_wait_1): Move fork event output out of the
2939 !report_to_gdb check. Pass event_child->waitstatus to
2940 target_waitstatus_to_string instead of ourstatus.
2941
524b57e6
YQ
29422015-08-04 Yao Qi <yao.qi@linaro.org>
2943
2944 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2945 if current_thread is 32 bit.
2946
6085d6f6
YQ
29472015-08-04 Yao Qi <yao.qi@linaro.org>
2948
2949 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2950 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2951 * server.c (extended_protocol): Remove "static".
2952 * server.h (extended_protocol): Declare it.
2953
8a7e4587
YQ
29542015-08-04 Yao Qi <yao.qi@linaro.org>
2955
2956 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2957 both aarch64 and aarch32.
2958 (aarch64_set_pc): Likewise.
2959
3b53ae99
YQ
29602015-08-04 Yao Qi <yao.qi@linaro.org>
2961
2962 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2963 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2964 arm-with-neon.xml to srv_xmlfiles.
2965 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2966 (is_64bit_tdesc): New function.
2967 (aarch64_linux_read_description): New function.
2968 (aarch64_arch_setup): Call aarch64_linux_read_description.
2969 (regs_info): Rename to regs_info_aarch64.
2970 (aarch64_regs_info): Return right regs_info.
2971 (initialize_low_arch): Call initialize_low_arch_aarch32.
2972
bd9e6534
YQ
29732015-08-04 Yao Qi <yao.qi@linaro.org>
2974
2975 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2976 * linux-aarch32-low.c: New file.
2977 * linux-aarch32-low.h: New file.
2978 * linux-arm-low.c (arm_fill_gregset): Move it to
2979 linux-aarch32-low.c.
2980 (arm_store_gregset): Likewise.
2981 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2982 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2983 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2984 (regs_info): Rename to regs_info_arm.
2985 (arm_regs_info): Return regs_info_aarch32 if
2986 have_ptrace_getregset is 1 and target description is
2987 arm_with_neon or arm_with_vfpv3.
2988 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2989 Call initialize_low_arch_aarch32 instead.
2990
ded48a5e
YQ
29912015-08-04 Yao Qi <yao.qi@linaro.org>
2992
2993 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2994 * linux-low.c: ... here.
2995 * linux-low.h (have_ptrace_getregset): Declare it.
2996
96e9210f
PA
29972015-08-04 Pedro Alves <palves@redhat.com>
2998
2999 * thread-db.c (struct thread_db): Use new typedefs.
3000 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3001 CHK calls.
3002 (disable_thread_event_reporting): Cast result of dlsym to
3003 destination function pointer type.
3004 (thread_db_mourn): Use td_ta_delete_ftype.
3005
af60a1ef
SL
30062015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3007
3008 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3009 arch variant.
3010 (CDX_BREAKPOINT): Define for R2.
3011 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3012 (the_low_target): Add comments.
3013
e8b41681
YQ
30142015-07-30 Yao Qi <yao.qi@linaro.org>
3015
3016 * linux-arm-low.c (arm_hwcap): Remove it.
3017 (arm_read_description): New local variable arm_hwcap. Don't
3018 set arm_hwcap to zero.
3019
89abb039
YQ
30202015-07-30 Yao Qi <yao.qi@linaro.org>
3021
3022 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3023 Use regcache->tdesc instead.
3024 (arm_store_wmmxregset): Likewise.
3025 (arm_fill_vfpregset): Likewise.
3026 (arm_store_vfpregset): Likewise.
3027
deca266c
YQ
30282015-07-30 Yao Qi <yao.qi@linaro.org>
3029
3030 * linux-arm-low.c: Include arch/arm.h.
3031 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3032 (arm_store_gregset): Likewise.
3033
aa58a496
SM
30342015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3035
3036 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3037 ptrace's 4th parameter.
3038
50904b25
YQ
30392015-07-27 Yao Qi <yao.qi@linaro.org>
3040
3041 * configure.srv (case aarch64*-*-linux*): Don't set
3042 srv_linux_usrregs.
3043
5826e159
PA
30442015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3045
3046 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3047 sys/ptrace.h.
3048 * linux-arm-low.c: Likewise.
3049 * linux-cris-low.c: Likewise.
3050 * linux-crisv32-low.c: Likewise.
3051 * linux-low.c: Likewise.
3052 * linux-m68k-low.c: Likewise.
3053 * linux-mips-low.c: Likewise.
3054 * linux-nios2-low.c: Likewise.
3055 * linux-s390-low.c: Likewise.
3056 * linux-sparc-low.c: Likewise.
3057 * linux-tic6x-low.c: Likewise.
3058 * linux-tile-low.c: Likewise.
3059 * linux-x86-low.c: Likewise.
3060
54019719
PA
30612015-07-24 Pedro Alves <palves@redhat.com>
3062
3063 * config.in: Regenerate.
3064 * configure: Regenerate.
3065
eb7aa561
PA
30662015-07-24 Pedro Alves <palves@redhat.com>
3067
3068 * acinclude.m4: Include ../ptrace.m4.
3069 * configure.ac: Call GDB_AC_PTRACE.
3070 * config.in, configure: Regenerate.
3071
55d7b841
YQ
30722015-07-24 Yao Qi <yao.qi@linaro.org>
3073
3074 * linux-low.c (linux_create_inferior): Remove setting to
3075 proc->priv->new_inferior.
3076 (linux_attach): Likewise.
3077 (linux_low_filter_event): Likewise.
3078 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3079
c06cbd92
YQ
30802015-07-24 Yao Qi <yao.qi@linaro.org>
3081
3082 * linux-low.c (linux_arch_setup): New function.
3083 (linux_low_filter_event): If proc->tdesc is NULL and
3084 proc->attached is true, call the_low_target.arch_setup.
3085 Otherwise, keep status pending, and return.
3086 (linux_resume_one_lwp_throw): Don't call get_pc if
3087 thread->while_stepping isn't NULL. Don't call
3088 get_thread_regcache if proc->tdesc is NULL.
3089 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3090 (linux_target_ops): Install arch_setup.
3091 * server.c (start_inferior): Call the_target->arch_setup.
3092 * target.h (struct target_ops) <arch_setup>: New field.
3093 (target_arch_setup): New marco.
3094 * lynx-low.c (lynx_target_ops): Update.
3095 * nto-low.c (nto_target_ops): Update.
3096 * spu-low.c (spu_target_ops): Update.
3097 * win32-low.c (win32_target_ops): Update.
3098
5ae3ebba
YQ
30992015-07-24 Yao Qi <yao.qi@linaro.org>
3100
3101 * linux-low.c (linux_add_process): Don't set
3102 proc->priv->new_inferior.
3103 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3104 (linux_attach): Likewise.
3105
eb97750b
YQ
31062015-07-24 Yao Qi <yao.qi@linaro.org>
3107
3108 * server.c (start_inferior): Code refactor.
3109
51aee833
YQ
31102015-07-24 Yao Qi <yao.qi@linaro.org>
3111
3112 * server.c (process_serial_event): Set general_thread.
3113
af1b22f3
YQ
31142015-07-21 Yao Qi <yao.qi@linaro.org>
3115
3116 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3117 aarch64_linux_get_debug_reg_capacity.
3118
554717a3
YQ
31192015-07-17 Yao Qi <yao.qi@linaro.org>
3120
3121 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3122 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3123 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3124 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3125 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3126 (AARCH64_HWP_ALIGNMENT): Likewise.
3127 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3128 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3129 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3130 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3131 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3132 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3133 (struct aarch64_debug_reg_state): Likewise.
3134 (struct arch_lwp_info): Likewise.
3135 (aarch64_align_watchpoint): Likewise.
3136 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3137 (aarch64_watchpoint_length): Likewise.
3138 (aarch64_point_encode_ctrl_reg): Likewise
3139 (aarch64_point_is_aligned): Likewise.
3140 (aarch64_align_watchpoint): Likewise.
3141 (aarch64_linux_set_debug_regs):
3142 (aarch64_dr_state_insert_one_point): Likewise.
3143 (aarch64_dr_state_remove_one_point): Likewise.
3144 (aarch64_handle_breakpoint): Likewise.
3145 (aarch64_handle_aligned_watchpoint): Likewise.
3146 (aarch64_handle_unaligned_watchpoint): Likewise.
3147 (aarch64_handle_watchpoint): Likewise.
3148
c67ca4de
YQ
31492015-07-17 Yao Qi <yao.qi@linaro.org>
3150
3151 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3152 and don't aarch64_get_debug_reg_state. All callers update.
3153 (aarch64_handle_aligned_watchpoint): Likewise.
3154 (aarch64_handle_unaligned_watchpoint): Likewise.
3155 (aarch64_handle_watchpoint): Likewise.
3156 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3157 (aarch64_remove_point): Likewise.
3158
25abf979
YQ
31592015-07-17 Yao Qi <yao.qi@linaro.org>
3160
3161 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3162 debug_printf.
3163 (aarch64_handle_unaligned_watchpoint): Likewise.
3164
db1ff28b
JK
31652015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3166
3167 Revert the previous 3 commits:
3168 Move gdb_regex* to common/
3169 Move linux_find_memory_regions_full & co.
3170 gdbserver build-id attribute generator
3171
700ca40f
JK
31722015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3173 Jan Kratochvil <jan.kratochvil@redhat.com>
3174
3175 gdbserver build-id attribute generator.
3176 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3177 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3178 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3179 (find_phdr): New.
3180 (get_dynamic): Use find_pdhr to traverse program headers.
3181 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3182 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3183 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3184 (get_hex_build_id): New.
3185 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3186 to reply XML document.
3187
9904185c
JK
31882015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3189 Jan Kratochvil <jan.kratochvil@redhat.com>
3190
3191 * target.c: Include target/target-utils.h and fcntl.h.
3192 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3193 (target_fileio_read_stralloc): New functions.
3194
6e5b4429
JK
31952015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3196
3197 * Makefile.in (OBS): Add gdb_regex.o.
3198 (gdb_regex.o): New.
3199 * config.in: Rebuilt.
3200 * configure: Rebuilt.
3201
ddc98fbf
JK
32022015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3203 Jan Kratochvil <jan.kratochvil@redhat.com>
3204
3205 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3206 * Makefile.in (OBS): Add target-utils.o.
3207 (linux-maps.o, target-utils.o): New.
3208 * configure.srv (srv_linux_obj): Add linux-maps.o.
3209
e57bb7a0
PL
32102015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3211
3212 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3213 function, return 1.
3214 (the_low_target): Install it.
3215
586b02a9
PA
32162015-07-14 Pedro Alves <palves@redhat.com>
3217
3218 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3219 Instead, ignore ECHILD, and throw an error for other errnos.
3220
58c1b36c
PA
32212015-07-10 Pedro Alves <palves@redhat.com>
3222
3223 * event-loop.c (struct callback_event) <data>: Change type to
3224 gdb_client_data instance instead of gdb_client_data pointer.
3225 (append_callback_event): Adjust.
3226
421530db
PL
32272015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3228
3229 * linux-aarch64-low.c: Add comments for each linux_target_ops
3230 method. Remove comments already covered in target_ops and
3231 linux_target_ops definitions.
3232 (the_low_target): Add comments for each unimplemented method.
3233
c2d65f38
YQ
32342015-07-09 Yao Qi <yao.qi@linaro.org>
3235
3236 * linux-aarch64-low.c (aarch64_regmap): Remove.
3237 (aarch64_usrregs_info): Remove.
3238 (regs_info): Set field usrregs to NULL.
3239
b20a6524
MM
32402015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3241
3242 * linux-low.c: Include "rsp-low.h"
3243 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3244 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3245 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3246 (handle_btrace_enable_pt): New.
3247 (handle_btrace_general_set): Support "pt".
3248 (handle_btrace_conf_general_set): Support "pt:size".
3249
96c97461
PL
32502015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3251
3252 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3253 Z_PACKET_SW_BP.
3254
37d66942
PL
32552015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3256
3257 * linux-aarch64-low.c: Remove comment about endianness.
3258 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3259 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3260 memcmp.
3261
dc06243f
GB
32622015-06-24 Gary Benson <gbenson@redhat.com>
3263
3264 * linux-i386-ipa.c (stdint.h): Do not include.
3265 * lynx-i386-low.c (stdint.h): Likewise.
3266 * lynx-ppc-low.c (stdint.h): Likewise.
3267 * mem-break.c (stdint.h): Likewise.
3268 * thread-db.c (stdint.h): Likewise.
3269 * tracepoint.c (stdint.h): Likewise.
3270 * win32-low.c (stdint.h): Likewise.
3271
124e13d9
SM
32722015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3273
3274 * server.c (write_qxfer_response): Update call to
3275 remote_escape_output.
3276
909c2cda
JK
32772015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3278 Jan Kratochvil <jan.kratochvil@redhat.com>
3279
3280 Merge multiple hex conversions.
3281 * gdbreplay.c (tohex): Rename to 'fromhex'.
3282 (logchar): Use fromhex.
3283
24c05f46
JK
32842015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3285
3286 * server.c (handle_qxfer_libraries): Set `version' attribute for
3287 <library-list>.
3288
14d2069a
GB
32892015-06-10 Gary Benson <gbenson@redhat.com>
3290
3291 * target.h (struct target_ops) <multifs_open>: New field.
3292 <multifs_unlink>: Likewise.
3293 <multifs_readlink>: Likewise.
3294 * linux-low.c (nat/linux-namespaces.h): New include.
3295 (linux_target_ops): Initialize the_target->multifs_open,
3296 the_target->multifs_unlink and the_target->multifs_readlink.
3297 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3298 * hostio.c (hostio_fs_pid): New static variable.
3299 (hostio_handle_new_gdb_connection): New function.
3300 (handle_setfs): Likewise.
3301 (handle_open): Use the_target->multifs_open as appropriate.
3302 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3303 (handle_readlink): Use the_target->multifs_readlink as
3304 appropriate.
3305 (handle_vFile): Handle vFile:setfs packets.
3306 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3307 after target_handle_new_gdb_connection.
3308
4b8b5e72
GB
33092015-06-10 Gary Benson <gbenson@redhat.com>
3310
3311 * configure.ac (AC_CHECK_FUNCS): Add setns.
3312 * config.in: Regenerate.
3313 * configure: Likewise.
3314 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3315 (linux-namespaces.o): New rule.
3316 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3317
3ac2e371
GB
33182015-06-09 Gary Benson <gbenson@redhat.com>
3319
3320 * hostio.c (handle_open): Process mode argument with
3321 fileio_to_host_mode.
3322
ca9b78ce
YQ
33232015-06-01 Yao Qi <yao.qi@linaro.org>
3324
3325 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3326 * linux-x86-low.c: Likewise.
3327
bfacd19d
DB
33282015-05-28 Don Breazeal <donb@codesourcery.com>
3329
3330 * linux-low.c (handle_extended_wait): Initialize
3331 thread_info.last_resume_kind for new fork children.
3332
452003ef
PA
33332015-05-15 Pedro Alves <palves@redhat.com>
3334
3335 * target.h (target_handle_new_gdb_connection): Rewrite using if
3336 wrapped in do/while.
3337
1041a03c
JB
33382015-05-14 Joel Brobecker <brobecker@adacore.com>
3339
3340 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3341 * configure, config.in: Regenerate.
3342 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3343 Declare typedef.
3344
c269dbdb
DB
33452015-05-12 Don Breazeal <donb@codesourcery.com>
3346
3347 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3348 PTRACE_EVENT_VFORK_DONE.
3349 (linux_low_ptrace_options, extended_event_reported): Add vfork
3350 events.
3351 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3352 and "vforkdone" for RSP 'T' Stop Reply Packet.
3353 * server.h (report_vfork_events): Declare
3354 global variable.
3355
3a8a0396
DB
33562015-05-12 Don Breazeal <donb@codesourcery.com>
3357
3358 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3359 (the_low_target) <new_fork>: Initialize new member.
3360 * linux-arm-low.c (arm_new_fork): New function.
3361 (the_low_target) <new_fork>: Initialize new member.
3362 * linux-low.c (handle_extended_wait): Call new target function
3363 new_fork.
3364 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3365 * linux-mips-low.c (mips_add_watchpoint): New function
3366 extracted from mips_insert_point.
3367 (the_low_target) <new_fork>: Initialize new member.
3368 (mips_linux_new_fork): New function.
3369 (mips_insert_point): Call mips_add_watchpoint.
3370 * linux-x86-low.c (x86_linux_new_fork): New function.
3371 (the_low_target) <new_fork>: Initialize new member.
3372
de0d863e
DB
33732015-05-12 Don Breazeal <donb@codesourcery.com>
3374
3375 * linux-low.c (handle_extended_wait): Implement return value,
3376 rename argument 'event_child' to 'event_lwp', handle
3377 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3378 (linux_low_ptrace_options): New function.
3379 (linux_low_filter_event): Call linux_low_ptrace_options,
3380 use different argument fo linux_enable_event_reporting,
3381 use return value from handle_extended_wait.
3382 (extended_event_reported): New function.
3383 (linux_wait_1): Call extended_event_reported and set
3384 status to report fork events.
3385 (linux_write_memory): Add pid to debug message.
3386 (reset_lwp_ptrace_options_callback): New function.
3387 (linux_handle_new_gdb_connection): New function.
3388 (linux_target_ops): Initialize new structure member.
3389 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3390 * lynx-low.c: Initialize new structure member.
3391 * remote-utils.c (prepare_resume_reply): Implement stop reason
3392 "fork" for "T" stop message.
3393 * server.c (handle_query): Call handle_new_gdb_connection.
3394 * server.h (report_fork_events): Declare global flag.
3395 * target.h (struct target_ops) <handle_new_gdb_connection>:
3396 New member.
3397 (target_handle_new_gdb_connection): New macro.
3398 * win32-low.c: Initialize new structure member.
3399
ddcbc397
DB
34002015-05-12 Don Breazeal <donb@codesourcery.com>
3401
3402 * mem-break.c (APPEND_TO_LIST): Define macro.
3403 (clone_agent_expr): New function.
3404 (clone_one_breakpoint): New function.
3405 (clone_all_breakpoints): New function.
3406 * mem-break.h: Declare new functions.
3407
89245bc0
DB
34082015-05-12 Don Breazeal <donb@codesourcery.com>
3409
3410 * linux-low.c (linux_supports_fork_events): New function.
3411 (linux_supports_vfork_events): New function.
3412 (linux_target_ops): Initialize new structure members.
3413 (initialize_low): Call linux_check_ptrace_features.
3414 * lynx-low.c (lynx_target_ops): Initialize new structure
3415 members.
3416 * server.c (report_fork_events, report_vfork_events):
3417 New global flags.
3418 (handle_query): Add new features to qSupported packet and
3419 response.
3420 (captured_main): Initialize new global variables.
3421 * target.h (struct target_ops) <supports_fork_events>:
3422 New member.
3423 <supports_vfork_events>: New member.
3424 (target_supports_fork_events): New macro.
3425 (target_supports_vfork_events): New macro.
3426 * win32-low.c (win32_target_ops): Initialize new structure
3427 members.
3428
835205d0
GB
34292015-05-12 Gary Benson <gbenson@redhat.com>
3430
3431 * server.c (handle_qxfer_exec_file): Use current process
3432 if annex is empty.
3433
21e94bd9
SL
34342015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3435
3436 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3437 Remove HAVE_PTRACE_GETREGS conditionals.
3438 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3439 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3440
45614f15
YQ
34412015-05-08 Yao Qi <yao.qi@linaro.org>
3442
3443 * linux-low.c (linux_supports_conditional_breakpoints): New
3444 function.
3445 (linux_target_ops): Install new target method.
3446 * lynx-low.c (lynx_target_ops): Install NULL hook for
3447 supports_conditional_breakpoints.
3448 * nto-low.c (nto_target_ops): Likewise.
3449 * spu-low.c (spu_target_ops): Likewise.
3450 * win32-low.c (win32_target_ops): Likewise.
3451 * server.c (handle_query): Check
3452 target_supports_conditional_breakpoints.
3453 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3454 New field.
3455 (target_supports_conditional_breakpoints): New macro.
3456
80ad801e
PA
34572015-05-06 Pedro Alves <palves@redhat.com>
3458
3459 PR server/18081
3460 * server.c (start_inferior): If the process exits, mourn it.
3461
819843c7
GB
34622015-04-21 Gary Benson <gbenson@redhat.com>
3463
3464 * hostio.c (fileio_open_flags_to_host): Factored out to
3465 fileio_to_host_openflags in common/fileio.c. Single use
3466 updated.
3467
a2d5a9d7
MF
34682015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3469
3470 * linux-xtensa-low.c (xtensa_fill_gregset)
3471 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3472 XCHAL_HAVE_LOOP.
3473
deb44829
MF
34742015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3475
3476 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3477 (regs_info): Replace usrregs pointer with NULL.
3478
e57f1de3
GB
34792015-04-17 Gary Benson <gbenson@redhat.com>
3480
3481 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3482 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3483 * server.c (handle_qxfer_exec_file): New function.
3484 (qxfer_packets): Add exec-file entry.
3485 (handle_query): Report qXfer:exec-file:read as supported packet.
3486
62828379
RN
34872015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3488
3489 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3490
b88bb450
GB
34912015-04-09 Gary Benson <gbenson@redhat.com>
3492
3493 * hostio-errno.c (errno_to_fileio_error): Remove function.
3494 Update caller to use remote_fileio_to_fio_error.
3495
c8f4bfdd
YQ
34962015-04-09 Yao Qi <yao.qi@linaro.org>
3497
3498 * linux-low.c (linux_insert_point): Call
3499 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3500 (linux_remove_point): Call remove_memory_breakpoint if type is
3501 raw_bkpt_type_sw.
3502 * linux-x86-low.c (x86_insert_point): Don't call
3503 insert_memory_breakpoint.
3504 (x86_remove_point): Don't call remove_memory_breakpoint.
3505
41f98f02
PA
35062015-04-01 Pedro Alves <palves@redhat.com>
3507 Cleber Rosa <crosa@redhat.com>
3508
3509 * server.c (gdbserver_usage): Reorganize and extend the usage
3510 message.
3511
2bf6fb9d
PA
35122015-03-24 Pedro Alves <palves@redhat.com>
3513
3514 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3515 output. Also dump TRAP_TRACE.
3516 (linux_low_filter_event): In debug output, distinguish a
3517 resume_stop SIGSTOP from a delayed SIGSTOP.
3518
369f6daa
GB
35192015-03-24 Gary Benson <gbenson@redhat.com>
3520
3521 * linux-x86-low.c (x86_linux_new_thread): Moved to
3522 nat/x86-linux.c.
3523 (x86_linux_prepare_to_resume): Likewise.
3524
8e5d4070
GB
35252015-03-24 Gary Benson <gbenson@redhat.com>
3526
3527 * Makefile.in (x86-linux-dregs.o): New rule.
3528 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3529 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3530 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3531 (x86_linux_dr_get): Likewise.
3532 (x86_linux_dr_set): Likewise.
3533 (update_debug_registers_callback): Likewise.
3534 (x86_linux_dr_set_addr): Likewise.
3535 (x86_linux_dr_get_addr): Likewise.
3536 (x86_linux_dr_set_control): Likewise.
3537 (x86_linux_dr_get_control): Likewise.
3538 (x86_linux_dr_get_status): Likewise.
3539 (x86_linux_update_debug_registers): Likewise.
3540
2b95d440
GB
35412015-03-24 Gary Benson <gbenson@redhat.com>
3542
3543 * linux-x86-low.c (x86_linux_update_debug_registers):
3544 New function, factored out from...
3545 (x86_linux_prepare_to_resume): ...this.
3546
14b0bc68
GB
35472015-03-24 Gary Benson <gbenson@redhat.com>
3548
3549 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3550 (x86_linux_dr_set): Likewise.
3551 (update_debug_registers_callback): Likewise.
3552 (x86_linux_dr_set_addr): Likewise.
3553 (x86_linux_dr_get_addr): Likewise.
3554 (x86_linux_dr_set_control): Likewise.
3555 (x86_linux_dr_get_control): Likewise.
3556 (x86_linux_dr_get_status): Likewise.
3557 (x86_linux_prepare_to_resume): Likewise.
3558
5dfe6ca8
GB
35592015-03-24 Gary Benson <gbenson@redhat.com>
3560
3561 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3562 Use perror_with_name. Pass string through gettext.
3563 (x86_linux_dr_set): Likewise.
3564
d33472ad
GB
35652015-03-24 Gary Benson <gbenson@redhat.com>
3566
3567 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3568 (x86_linux_dr_set_addr): ...this.
3569 (x86_dr_low_get_addr): Rename to...
3570 (x86_linux_dr_get_addr): ...this.
3571 (x86_dr_low_set_control): Rename to...
3572 (x86_linux_dr_set_control): ...this.
3573 (x86_dr_low_get_control): Rename to...
3574 (x86_linux_dr_get_control): ...this.
3575 (x86_dr_low_get_status): Rename to...
3576 (x86_linux_dr_get_status): ...this.
3577 (x86_dr_low): Update with new function names.
3578
4b134ca1
GB
35792015-03-24 Gary Benson <gbenson@redhat.com>
3580
3581 * Makefile.in (x86-linux.o): New rule.
3582 * configure.srv: Add x86-linux.o to relevant targets.
3583 * linux-low.c (lwp_set_arch_private_info): New function.
3584 (lwp_arch_private_info): Likewise.
3585 * linux-x86-low.c: Include nat/x86-linux.h.
3586 (arch_lwp_info): Removed structure.
3587 (update_debug_registers_callback):
3588 Use lwp_set_debug_registers_changed.
3589 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3590 and lwp_set_debug_registers_changed.
3591 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3592
34c703da
GB
35932015-03-24 Gary Benson <gbenson@redhat.com>
3594
3595 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3596 * linux-arm-low.c (arm_new_thread): Likewise.
3597 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3598 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3599 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3600 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3601
cff068da
GB
36022015-03-24 Gary Benson <gbenson@redhat.com>
3603
3604 * linux-low.c (ptid_of_lwp): New function.
3605 (lwp_is_stopped): Likewise.
3606 (lwp_stop_reason): Likewise.
3607 * linux-x86-low.c (update_debug_registers_callback):
3608 Use lwp_is_stopped.
3609 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3610 lwp_stop_reason.
3611
b2f7c7e8
GB
36122015-03-24 Gary Benson <gbenson@redhat.com>
3613
3614 * linux-low.h (linux_stop_lwp): Remove declaration.
3615
6d4ee8c6
GB
36162015-03-24 Gary Benson <gbenson@redhat.com>
3617
3618 * linux-low.h: Include nat/linux-nat.h.
3619 * linux-low.c (iterate_over_lwps_args): New structure.
3620 (iterate_over_lwps_filter): New function.
3621 (iterate_over_lwps): Likewise.
3622 * linux-x86-low.c (update_debug_registers_callback):
3623 Update signature to what iterate_over_lwps expects.
3624 Remove PID check that iterate_over_lwps now performs.
3625 (x86_dr_low_set_addr): Use iterate_over_lwps.
3626 (x86_dr_low_set_control): Likewise.
3627
70a0bb6b
GB
36282015-03-24 Gary Benson <gbenson@redhat.com>
3629
3630 * linux-x86-low.c (x86_debug_reg_state): New function.
3631 (x86_linux_prepare_to_resume): Use the above.
3632
7b669087
GB
36332015-03-24 Gary Benson <gbenson@redhat.com>
3634
3635 * linux-low.c (current_lwp_ptid): New function.
3636 * linux-x86-low.c: Include nat/linux-nat.h.
3637 (x86_dr_low_get_addr): Use current_lwp_ptid.
3638 (x86_dr_low_get_control): Likewise.
3639 (x86_dr_low_get_status): Likewise.
3640
eef49a3d
PA
36412015-03-20 Pedro Alves <palves@redhat.com>
3642
3643 * tracepoint.c (cmd_qtstatus): Make "str" const.
3644
b2333d22
PA
36452015-03-20 Pedro Alves <palves@redhat.com>
3646
3647 * server.c (handle_general_set): Make "req_str" const.
3648
23f238d3
PA
36492015-03-19 Pedro Alves <palves@redhat.com>
3650
3651 * linux-low.c (linux_resume_one_lwp): Rename to ...
3652 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3653 instead call perror_with_name.
3654 (check_ptrace_stopped_lwp_gone): New function.
3655 (linux_resume_one_lwp): Reimplement as wrapper around
3656 linux_resume_one_lwp_throw that swallows errors if the LWP is
3657 gone.
3658
91baf43f
PA
36592015-03-19 Pedro Alves <palves@redhat.com>
3660
3661 * linux-low.c (count_events_callback, select_event_lwp_callback):
3662 No longer check whether the thread has resume_stop as last resume
3663 kind.
3664
8bf3b159
PA
36652015-03-19 Pedro Alves <palves@redhat.com>
3666
3667 * linux-low.c (count_events_callback, select_event_lwp_callback):
3668 Use the lwp's status_pending_p field, not the thread's.
3669
b90fc188
PA
36702015-03-19 Pedro Alves <palves@redhat.com>
3671
3672 * linux-low.c (select_event_lwp_callback): Update comments to
3673 no longer mention SIGTRAP.
3674
464b0089
GB
36752015-03-18 Gary Benson <gbenson@redhat.com>
3676
3677 * server.c (handle_query): Do not report vFile:fstat as supported.
3678
aa9e327f
GB
36792015-03-11 Gary Benson <gbenson@redhat.com>
3680
3681 * hostio.c (sys/types.h): New include.
3682 (sys/stat.h): Likewise.
3683 (common-remote-fileio.h): Likewise.
3684 (handle_fstat): New function.
3685 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 3686
791c0056
GB
36872015-03-11 Gary Benson <gbenson@redhat.com>
3688
3689 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3690 struct stat.st_blocks and struct stat.st_blksize.
3691 * configure: Regenerate.
3692 * config.in: Likewise.
3693 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3694 (OBS): Add common-remote-fileio.o.
3695 (common-remote-fileio.o): New rule.
3696
9a9df970
PA
36972015-03-09 Pedro Alves <palves@redhat.com>
3698
3699 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3700 'struct sockaddr' pointer in 'accept' call.
3701
9eb1356e
PA
37022015-03-09 Pedro Alves <palves@redhat.com>
3703
3704 Revert:
3705 2015-03-07 Pedro Alves <palves@redhat.com>
3706 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3707 or <winsock2.h> here. Instead include "gdb_socket.h".
3708 (remote_open): Use union gdb_sockaddr_u.
3709 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3710 or <winsock2.h> here. Instead include "gdb_socket.h".
3711 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3712 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3713 or <sys/un.h>.
3714 (init_named_socket, gdb_agent_helper_thread): Use union
3715 gdb_sockaddr_u.
3716
aac331e4
PA
37172015-03-07 Pedro Alves <palves@redhat.com>
3718
3719 * configure.ac (build_warnings): Move
3720 -Wdeclaration-after-statement to the C-specific set.
3721 * configure: Regenerate.
3722
366c75fc
PA
37232015-03-07 Pedro Alves <palves@redhat.com>
3724
3725 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3726 or <winsock2.h> here. Instead include "gdb_socket.h".
3727 (remote_open): Use union gdb_sockaddr_u.
3728 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3729 or <winsock2.h> here. Instead include "gdb_socket.h".
3730 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3731 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3732 or <sys/un.h>.
3733 (init_named_socket, gdb_agent_helper_thread): Use union
3734 gdb_sockaddr_u.
3735
492d29ea
PA
37362015-03-07 Pedro Alves <palves@redhat.com>
3737
3738 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3739 instead.
3740
60a191ed
YQ
37412015-03-06 Yao Qi <yao.qi@linaro.org>
3742
3743 * linux-aarch64-low.c (aarch64_insert_point): Use
3744 show_debug_regs as a boolean.
3745 (aarch64_remove_point): Likewise.
3746
f5771b1d
PA
37472015-03-05 Pedro Alves <palves@redhat.com>
3748
3749 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3750 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3751 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3752 * nto-low.c (nto_target_ops): Likewise.
3753 * spu-low.c (spu_target_ops): Likewise.
3754 * win32-low.c (win32_target_ops): Likewise.
3755
3e572f71
PA
37562015-03-04 Pedro Alves <palves@redhat.com>
3757
72f4393d 3758 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
3759 Decide whether a breakpoint triggered based on the SIGTRAP's
3760 siginfo.si_code.
72f4393d
L
3761 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3762 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
3763 (linux_low_filter_event): Check for breakpoints before checking
3764 watchpoints.
3765 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3766 siginfo.si_code.
72f4393d
L
3767 (linux_stopped_by_sw_breakpoint)
3768 (linux_supports_stopped_by_sw_breakpoint)
3769 (linux_stopped_by_hw_breakpoint)
3770 (linux_supports_stopped_by_hw_breakpoint): New functions.
3771 (linux_target_ops): Install new target methods.
3e572f71 3772
1ec68e26
PA
37732015-03-04 Pedro Alves <palves@redhat.com>
3774
3775 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3776 * server.c (swbreak_feature, hwbreak_feature): New globals.
3777 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3778 (captured_main): Clear swbreak_feature and hwbreak_feature.
3779 * server.h (swbreak_feature, hwbreak_feature): Declare.
3780 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3781 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3782 supports_stopped_by_hw_breakpoint>: New fields.
3783 (target_supports_stopped_by_sw_breakpoint)
3784 (target_stopped_by_sw_breakpoint)
3785 (target_supports_stopped_by_hw_breakpoint)
3786 (target_stopped_by_hw_breakpoint): Declare.
3787
15c66dd6
PA
37882015-03-04 Pedro Alves <palves@redhat.com>
3789
3790 enum lwp_stop_reason -> enum target_stop_reason
3791 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3792 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3793 (linux_wait_1, stuck_in_jump_pad_callback)
3794 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3795 (linux_stopped_by_watchpoint):
3796 * linux-low.h (enum lwp_stop_reason): Delete.
3797 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3798 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3799
98fc70d6
YQ
38002015-03-04 Yao Qi <yao.qi@linaro.org>
3801
3802 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3803
dd2ac174
GB
38042015-03-03 Gary Benson <gbenson@redhat.com>
3805
3806 * hostio.c (handle_vFile): Fix prefix lengths.
3807
d68e53f4
MM
38082015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3809
3810 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3811 ptr_bits.
3812
bf2d68ab
AA
38132015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3814
3815 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3816 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3817 (clean): Add "rm -f" for above C files.
3818 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3819 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3820 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3821 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3822 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3823 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3824 (init_registers_s390x_vx_linux64)
3825 (init_registers_s390x_tevx_linux64)
3826 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3827 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3828 declarations.
3829 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3830 (s390_store_vxrs_high): New functions.
3831 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3832 NT_S390_VXRS_HIGH.
3833 (s390_arch_setup): Add logic for selecting one of the new target
3834 descriptions. Activate the new vector regsets if applicable.
3835 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3836 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3837 and init_registers_s390x_tevx_linux64.
3838
c966a859
PA
38392015-03-01 Pedro Alves <palves@redhat.com>
3840
3841 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3842 parameter.
3843
4180215b
PA
38442015-02-27 Pedro Alves <palves@redhat.com>
3845
3846 * linux-x86-low.c (u_debugreg_offset): New function.
3847 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3848
749bab01
PA
38492015-02-27 Pedro Alves <palves@redhat.com>
3850
3851 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3852 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3853 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3854 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3855 (ps_lsetfpregs, ps_getpid)
3856 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3857 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3858 (ps_lsetxregs, ps_plog): Declare.
3859
3c14e5a3
PA
38602015-02-27 Pedro Alves <palves@redhat.com>
3861
3862 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3863 IP_AGENT_EXPORT_FUNC.
3864 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3865 IP_AGENT_EXPORT_FUNC.
3866 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3867 (IP_AGENT_EXPORT): Delete.
3868 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3869 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3870 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3871 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3872 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3873 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3874 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3875 (traceframe_read_count, traceframe_write_count)
3876 (traceframes_created, trace_state_variables, get_raw_reg)
3877 (get_trace_state_variable_value, set_trace_state_variable_value)
3878 (ust_loaded, helper_thread_id, cmd_buf): Use
3879 IPA_SYM_EXPORTED_NAME.
3880 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3881 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3882 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3883 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3884 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3885 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3886 EXTERN_C_PUSH/EXTERN_C_POP.
3887 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3888 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3889 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3890 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3891 (traceframe_write_count, traceframe_read_count)
3892 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3893 (about_to_request_buffer_space, get_trace_state_variable_value)
3894 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3895 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3896 EXTERN_C_PUSH/EXTERN_C_POP.
3897 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3898 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3899 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3900 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3901 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3902 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3903 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3904 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3905 Define.
3906 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3907 (IP_AGENT_EXPORT_VAR_DECL): Define.
3908 (tracing): Declare.
3909 (gdb_agent_get_raw_reg): Declare.
3910
fe978cb0
PA
39112015-02-27 Tom Tromey <tromey@redhat.com>
3912 Pedro Alves <palves@redhat.com>
3913
3914 Rename symbols whose names are reserved C++ keywords throughout.
3915
3bc3d82a
PA
39162015-02-27 Pedro Alves <palves@redhat.com>
3917
3918 * Makefile.in (COMPILER): New, get it from autoconf.
3919 (CXX): Get from autoconf instead.
3920 (COMPILE.pre): Use COMPILER.
3921 (CC-LD): Rename to ...
3922 (CC_LD): ... this. Use COMPILER.
3923 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3924 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3925 * acinclude.m4: Include build-with-cxx.m4.
3926 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3927 Disable -Werror by default if building in C++ mode.
3928 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3929 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3930 the C++ compiler. Save/restore CXXFLAGS too.
3931 * configure: Regenerate.
3932
07697489
PA
39332015-02-27 Pedro Alves <palves@redhat.com>
3934
3935 * acinclude.m4: Include libiberty.m4.
3936 * configure.ac: Call libiberty_INIT.
3937 * config.in, configure: Regenerate.
3938
9beb7c4e
PA
39392015-02-26 Pedro Alves <palves@redhat.com>
3940
3941 * linux-low.c (linux_wait_1): When incrementing the PC past a
3942 program breakpoint always use the_low_target.breakpoint_len as
3943 increment, rather than the maximum between that and
3944 the_low_target.decr_pc_after_break.
3945
8090aef2
PA
39462015-02-23 Pedro Alves <palves@redhat.com>
3947
3948 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3949 thread was doing a step-over; always adjust the PC if
3950 we stepped over a permanent breakpoint.
3951 (linux_wait_1): If we stepped over breakpoint that was on top of a
3952 permanent breakpoint, manually advance the PC past it.
3953
bc9540e8
PA
39542015-02-23 Pedro Alves <palves@redhat.com>
3955
3956 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3957 modes.
3958 (x86_fill_gregset, x86_store_gregset): Use it when handling
3959 $orig_eax.
3960
2db9a427
PA
39612015-02-20 Pedro Alves <palves@redhat.com>
3962
3963 * thread-db.c: Include "nat/linux-procfs.h".
3964 (thread_db_init): Skip listing new threads if the kernel supports
3965 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3966
afa8d396
PA
39672015-02-20 Pedro Alves <palves@redhat.com>
3968
3969 * linux-low.c (status_pending_p_callback): Use ptid_match.
3970
c9587f88
AT
39712015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3972
3973 PR breakpoints/16812
3974 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3975 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3976 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3977
b05ec7a5
AT
39782015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3979
3980 PR breakpoints/15956
3981 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3982
d33501a5
MM
39832015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3984
3985 * linux-low.c (linux_low_btrace_conf): Print size.
3986 * server.c (handle_btrace_conf_general_set): New.
3987 (hanle_general_set): Call handle_btrace_conf_general_set.
3988 (handle_query): Report Qbtrace-conf:bts:size as supported.
3989
f4abbc16
MM
39902015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3991
3992 * linux-low.c (linux_low_enable_btrace): Update parameters.
3993 (linux_low_btrace_conf): New.
3994 (linux_target_ops)<to_btrace_conf>: Initialize.
3995 * server.c (current_btrace_conf): New.
3996 (handle_btrace_enable): Rename to ...
3997 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3998 to target_enable_btrace. Update comment. Update users.
3999 (handle_qxfer_btrace_conf): New.
4000 (qxfer_packets): Add btrace-conf entry.
4001 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4002 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4003 (target_ops)<read_btrace_conf>: New.
4004 (target_enable_btrace): Update parameters.
4005 (target_read_btrace_conf): New.
4006
043c3577
MM
40072015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4008
4009 * server.c (handle_btrace_general_set): Remove call to
4010 target_supports_btrace.
4011 (supported_btrace_packets): New.
4012 (handle_query): Call supported_btrace_packets.
4013 * target.h: include btrace-common.h.
4014 (btrace_target_info): Removed.
4015 (supports_btrace, target_supports_btrace): Update parameters.
4016
734b0e4b
MM
40172015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4018
4019 * Makefile.in (SFILES): Add common/btrace-common.c.
4020 (OBS): Add common/btrace-common.o.
4021 (btrace-common.o): Add build rules.
4022 * linux-low: Include btrace-common.h.
4023 (linux_low_read_btrace): Use struct btrace_data. Call
4024 btrace_data_init and btrace_data_fini.
4025
d6c146e9
PA
40262015-02-06 Pedro Alves <palves@redhat.com>
4027
4028 * thread-db.c (find_new_threads_callback): Add debug output.
4029
20ba1ce6
PA
40302015-02-04 Pedro Alves <palves@redhat.com>
4031
4032 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4033 (resume_stopped_resumed_lwps): New function.
4034 (linux_wait_for_event_filtered): Use it.
4035
8cc73a39
SDJ
40362015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4037
4038 * Makefile.in (SFILES): Add linux-personality.c.
4039 (linux-personality.o): New rule.
4040 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4041 list of objects to be built.
4042 * linux-low.c: Include nat/linux-personality.h.
4043 (linux_create_inferior): Remove code to disable address space
4044 randomization (moved to ../nat/linux-personality.c). Create
4045 cleanup to disable address space randomization.
4046
fb23d554
SDJ
40472015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4048
4049 * Makefile.in (posix-strerror.o): New rule.
4050 (mingw-strerror.o): Likewise.
4051 * configure: Regenerated.
4052 * configure.ac: Source file ../common/common.host. Initialize new
4053 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4054
cdf43629
YQ
40552015-01-14 Yao Qi <yao@codesourcery.com>
4056
4057 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4058 (ppc-linux.o): New rule.
4059 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4060 * configure.ac: AC_CHECK_FUNCS(getauxval).
4061 * config.in: Re-generated.
4062 * configure: Re-generated.
4063 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4064 ppc64_64bit_inferior_p
4065
514c5338
YQ
40662015-01-14 Yao Qi <yao@codesourcery.com>
4067
4068 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4069 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4070 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4071 (PT_ORIG_R3, PT_TRAP): Likewise.
4072 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4073 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4074 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4075
3368c1e5
JB
40762015-01-10 Joel Brobecker <brobecker@adacore.com>
4077
4078 * i387-fp.c (i387_cache_to_xsave): In look over
4079 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4080 zmmh_low_space field by use of zmmh_high_space.
4081
582511be
PA
40822015-01-09 Pedro Alves <palves@redhat.com>
4083
4084 * linux-low.c (step_over_bkpt): Move higher up in the file.
4085 (handle_extended_wait): Don't store the stop_pc here.
4086 (get_stop_pc): Adjust comments and rename to ...
4087 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4088 stopped for a software breakpoint or hardware breakpoint.
4089 (thread_still_has_status_pending_p): New function.
4090 (status_pending_p_callback): Use
4091 thread_still_has_status_pending_p. If the event is no longer
4092 interesting, resume the LWP.
4093 (handle_tracepoints): Add assert.
4094 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4095 (wstatus_maybe_breakpoint): New function.
4096 (cancel_breakpoint): Delete function.
4097 (check_stopped_by_watchpoint): New function, factored out from
4098 linux_low_filter_event.
4099 (lp_status_maybe_breakpoint): Delete function.
4100 (linux_low_filter_event): Remove filter_ptid argument.
4101 Leave thread group exits pending here. Store the LWP's stop PC.
4102 Always leave events pending.
4103 (linux_wait_for_event_filtered): Pull all events out of the
4104 kernel, and leave them all pending.
4105 (count_events_callback, select_event_lwp_callback): Consider all
4106 events.
4107 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4108 (select_event_lwp): Only give preference to the stepping LWP in
4109 all-stop mode. Adjust comments.
4110 (ignore_event): New function.
4111 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4112 references to cancel_breakpoints. Adjust to renames. Also give
4113 equal priority to all LWPs that have had events in non-stop mode.
4114 If reporting a software breakpoint event, unadjust the LWP's PC.
4115 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4116 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4117 Adjust.
4118 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4119 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4120 (linux_stopped_by_watchpoint): Adjust.
4121 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4122 * linux-low.h (enum lwp_stop_reason): New.
4123 (struct lwp_info) <stop_pc>: Adjust comment.
4124 <stopped_by_watchpoint>: Delete field.
4125 <stop_reason>: New field.
4126 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4127 * mem-break.c (software_breakpoint_inserted_here)
4128 (hardware_breakpoint_inserted_here): New function.
4129 * mem-break.h (software_breakpoint_inserted_here)
4130 (hardware_breakpoint_inserted_here): Declare.
4131 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4132 (cancel_breakpoints): Delete.
4133 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4134 (upload_fast_traceframes): Remove references to
4135 cancel_breakpoints.
4136
a33e3959
PA
41372015-01-09 Pedro Alves <palves@redhat.com>
4138
4139 * thread-db.c (find_new_threads_callback): Ignore thread if the
4140 kernel thread ID is -1.
4141
8784d563
PA
41422015-01-09 Pedro Alves <palves@redhat.com>
4143
4144 * linux-low.c (linux_attach_fail_reason_string): Move to
4145 nat/linux-ptrace.c, and rename.
4146 (linux_attach_lwp): Update comment.
4147 (attach_proc_task_lwp_callback): New function.
4148 (linux_attach): Adjust to rename and use
4149 linux_proc_attach_tgid_threads.
4150 (linux_attach_fail_reason_string): Delete declaration.
4151
76f2b779
JB
41522015-01-01 Joel Brobecker <brobecker@adacore.com>
4153
4154 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4155 * server.c (gdbserver_version): Likewise.
4156
fafcc06a
SDJ
41572014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4158
4159 * remote-utils.c: Include ctype.h.
4160 (input_interrupt): Explicitly handle the case when the char
4161 received is the NUL byte. Improve the printing of non-ASCII
4162 characters.
4163
beed38b8
JB
41642014-12-16 Joel Brobecker <brobecker@adacore.com>
4165
4166 * linux-low.c (linux_low_filter_event): Update call to
4167 linux_enable_event_reporting following the addition of
4168 a new parameter to that function.
4169
bf330350
CU
41702014-12-16 Catalin Udma <catalin.udma@freescale.com>
4171
4172 PR server/17457
4173 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4174 (AARCH64_FPCR_REGNO): Likewise.
4175 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4176 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4177 (aarch64_store_fpregset): Likewise.
4178
5227d625
JB
41792014-12-15 Joel Brobecker <brobecker@adacore.com>
4180
4181 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4182 Remove FIXME comment about assumption about N.
4183
f93b65a0
JB
41842014-12-13 Joel Brobecker <brobecker@adacore.com>
4185
4186 * configure.ac: If large-file support is disabled in GDBserver,
4187 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4188 * configure: Regenerate.
4189
e5a9158d
AA
41902014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4191
4192 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4193 warning upon ENODATA from ptrace.
4194 * linux-s390-low.c (s390_store_tdb): New.
4195 (s390_regsets): Add regset for NT_S390_TDB.
4196
feea5f36
AA
41972014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4198
4199 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4200 without a fill_function.
4201 * linux-s390-low.c (s390_fill_last_break): Remove.
4202 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4203 (s390_arch_setup): Use regset's size instead of fill_function for
4204 loop end condition.
4205
098dbe61
AA
42062014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4207
4208 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4209 the regset's store function when ptrace returned an error.
4210 * regcache.c (get_thread_regcache): Invalidate register cache
4211 before fetching inferior's registers.
4212
28eef672
AA
42132014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4214
4215 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4216 while-loop as for-loop.
4217 (regsets_store_inferior_registers): Likewise.
4218
bdca27a2
YQ
42192014-11-28 Yao Qi <yao@codesourcery.com>
4220
4221 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4222 * config.in, configure: Re-generate.
4223 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4224 is defined.
4225
9c232dda
YQ
42262014-11-21 Yao Qi <yao@codesourcery.com>
4227
4228 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4229 (AC_CHECK_HEADERS): Remove malloc.h.
4230 * configure: Re-generated.
4231 * config.in: Re-generated.
4232 * server.h: Don't include alloca.h and malloc.h.
4233 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4234 Don't include malloc.h.
4235
43968415
JB
42362014-11-17 Joel Brobecker <brobecker@adacore.com>
4237
4238 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4239 corresponding ERRNO check in same block.
4240
40e91bc7
PA
42412014-11-12 Pedro Alves <palves@redhat.com>
4242
4243 * server.c (cont_thread): Update comment.
4244 (start_inferior, attach_inferior): No longer clear cont_thread.
4245 (handle_v_cont): No longer set cont_thread.
4246 (captured_main): Clear cont_thread each time a GDB connects.
4247
c2c118cf
PA
42482014-11-12 Pedro Alves <palves@redhat.com>
4249
4250 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4251 thread, and don't resume all threads if the Hc thread has exited.
4252
78708b7c
PA
42532014-11-12 Pedro Alves <palves@redhat.com>
4254
4255 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4256 the process group instead of to a specific LWP.
4257
a2abc7de
PA
42582014-10-15 Pedro Alves <palves@redhat.com>
4259
4260 PR server/17487
4261 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4262 parameter.
4263 (arm_set_thread_context): Delete.
4264 (the_low_target): Adjust.
4265 * win32-i386-low.c (debug_registers_changed)
4266 (debug_registers_used): Delete.
4267 (update_debug_registers_callback): New function.
4268 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4269 needing to update their debug registers.
4270 (win32_get_current_dr): New function.
4271 (x86_dr_low_get_addr, x86_dr_low_get_control)
4272 (x86_dr_low_get_status): Fetch the debug register from the thread
4273 record's context.
4274 (i386_initial_stuff): Adjust.
4275 (i386_get_thread_context): Remove current_event parameter. Don't
4276 clear debug_registers_changed nor copy DR values to
4277 debug_reg_state.
4278 (i386_set_thread_context): Delete.
4279 (i386_prepare_to_resume): New function.
4280 (i386_thread_added): Mark the thread as needing to update irs
4281 debug registers.
4282 (the_low_target): Remove i386_set_thread_context and install
4283 i386_prepare_to_resume.
4284 * win32-low.c (win32_get_thread_context): Adjust.
4285 (win32_set_thread_context): Use SetThreadContext
4286 directly.
4287 (win32_prepare_to_resume): New function.
4288 (win32_require_context): New function, factored out from ...
4289 (thread_rec): ... this.
4290 (continue_one_thread): Call win32_prepare_to_resume on each thread
4291 we're about to continue.
4292 (win32_resume): Call win32_prepare_to_resume on the event thread.
4293 * win32-low.h (struct win32_thread_info)
4294 <debug_registers_changed>: New field.
4295 (struct win32_target_ops): Change prototype of set_thread_context,
4296 delete set_thread_context and add prepare_to_resume.
4297 (win32_require_context): New declaration.
4298
a442d071
GB
42992014-10-08 Gary Benson <gbenson@redhat.com>
4300
4301 * server.h: Do not include common-exceptions.h.
4302
6f1947e8
GB
43032014-10-08 Gary Benson <gbenson@redhat.com>
4304
4305 * server.h: Do not include cleanups.h.
4306
63b434a4
JH
43072014-09-30 James Hogan <james.hogan@imgtec.com>
4308
4309 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4310 mips64-dsp-linux.c.
4311
c4d9ceb6
YQ
43122014-09-23 Yao Qi <yao@codesourcery.com>
4313
4314 * linux-low.c (lp_status_maybe_breakpoint): New function.
4315 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4316 (count_events_callback): Likewise.
4317 (select_event_lwp_callback): Likewise.
4318 (cancel_breakpoints_callback): Likewise.
4319
89a5711c
DB
43202014-09-19 Don Breazeal <donb@codesourcery.com>
4321
4322 * linux-low.c (handle_extended_wait): Call
4323 linux_ptrace_get_extended_event.
4324 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4325 linux_is_extended_waitstatus.
4326
bffc0964
JB
43272014-09-16 Joel Brobecker <brobecker@adacore.com>
4328
4329 * Makefile.in (CPPFLAGS): Define.
4330 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4331 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4332
0bfdf32f
GB
43332014-09-16 Gary Benson <gbenson@redhat.com>
4334
4335 * inferiors.h (current_inferior): Renamed as...
4336 (current_thread): New variable. All uses updated.
4337 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4338 (maybe_move_out_of_jump_pad): Likewise.
4339 (cancel_breakpoint): Likewise.
4340 (linux_low_filter_event): Likewise.
4341 (wait_for_sigstop): Likewise.
4342 (linux_resume_one_lwp): Likewise.
4343 (need_step_over_p): Likewise.
4344 (start_step_over): Likewise.
4345 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4346 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4347 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4348 and save_inferior as saved_thread.
4349 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4350 saved_thread.
4351 (regcache_invalidate_thread): Likewise.
4352 * remote-utils.c (prepare_resume_reply): Likewise.
4353 * thread-db.c (thread_db_get_tls_address): Likewise.
4354 (disable_thread_event_reporting): Likewise.
4355 (remove_thread_event_breakpoints): Likewise.
4356 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4357 as saved_thread.
4358 * target.h (set_desired_inferior): Renamed as...
4359 (set_desired_thread): New declaration. All uses updated.
4360 * server.c (myresume): Updated comment to reference thread instead
4361 of inferior.
4362 (handle_serial_event): Likewise.
4363 (handle_target_event): Likewise.
4364
361c8ade
GB
43652014-09-12 Tom Tromey <tromey@redhat.com>
4366 Gary Benson <gbenson@redhat.com>
4367
4368 * regcache.h: Include common-regcache.h.
4369 (regcache_read_pc): Don't declare.
4370 * regcache.c (get_thread_regcache_for_ptid): New function.
4371
bd9269f7
GB
43722014-09-11 Tom Tromey <tromey@redhat.com>
4373 Gary Benson <gbenson@redhat.com>
4374
4375 * symbol.c: New file.
4376 * Makefile.in (SFILES): Add symbol.c.
4377 (OBS): Add symbol.o.
4378
f8c1d06b
GB
43792014-09-11 Gary Benson <gbenson@redhat.com>
4380
4381 * target.c (target_stop_ptid, target_continue_ptid): New
4382 functions.
4383
721ec300
GB
43842014-09-11 Tom Tromey <tromey@redhat.com>
4385 Gary Benson <gbenson@redhat.com>
4386
4387 * target.h: Include target/target.h.
4388 * target.c (target_read_memory, target_read_uint32)
4389 (target_write_memory): New functions.
4390
c5e92cca
GB
43912014-09-11 Gary Benson <gbenson@redhat.com>
4392
4393 * server.h (debug_hw_points): Don't declare.
4394 * server.c (debug_hw_points): Don't define. Replace all uses
4395 with show_debug_regs.
4396 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4397 all uses with show_debug_regs.
4398
2e4bb98a
EBM
43992014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4400
4401 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4402 endianness into account.
4403 (ppc_supply_ptrace_register): Likewise.
4404
ac740bc7
JH
44052014-09-03 James Hogan <james.hogan@imgtec.com>
4406
4407 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4408 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4409
97ea6506
GB
44102014-09-03 Gary Benson <gbenson@redhat.com>
4411
4412 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4413 ALL_DEBUG_ADDRESS_REGISTERS.
4414
df7e5265
GB
44152014-09-02 Gary Benson <gbenson@redhat.com>
4416
4417 * i386-low.h: Renamed as...
4418 * x86-low.h: New file. All type, function and variable name
4419 prefixes changed from "i386_" to "x86_". All references updated.
4420 * i386-low.c: Renamed as...
4421 * x86-low.c: New file. All type, function and variable name
4422 prefixes changed from "i386_" to "x86_". All references updated.
4423
ed859da7
GB
44242014-09-02 Gary Benson <gbenson@redhat.com>
4425
4426 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4427 (x86_linux_new_thread): Likewise.
4428
860789c7
GB
44292014-08-29 Gary Benson <gbenson@redhat.com>
4430
4431 * server.h (setjmp.h): Do not include.
4432 (toplevel): Do not declare.
4433 (common-exceptions.h): Include.
4434 (cleanups.h): Likewise.
4435 * server.c (toplevel): Do not define.
4436 (exit_code): New static global.
4437 (detach_or_kill_for_exit_cleanup): New function.
4438 (main): New function. Original main renamed to...
4439 (captured_main): New function.
4440 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4441
ff55e1b5
GB
44422014-08-29 Gary Benson <gbenson@redhat.com>
4443
4444 * Makefile.in (SFILES): Add common/common-exceptions.c.
4445 (OBS): Add common-exceptions.o.
4446 (common-exceptions.o): New rule.
4447 * utils.c (prepare_to_throw_exception): New function.
4448
e9bcb658
GB
44492014-08-29 Gary Benson <gbenson@redhat.com>
4450
4451 * config.in: Regenerate.
4452 * configure: Likewise.
4453
e3180625
GB
44542014-08-29 Gary Benson <gbenson@redhat.com>
4455
4456 * Makefile.in (SFILES): Add common/cleanups.c.
4457 (OBS): cleanups.o.
4458 (cleanups.o): New rule.
4459
e3d6ba5d
GB
44602014-08-29 Gary Benson <gbenson@redhat.com>
4461
4462 * utils.c (internal_vwarning): New function.
4463
7096e886
GB
44642014-08-28 Gary Benson <gbenson@redhat.com>
4465
4466 * utils.h (fatal): Remove declaration.
4467 * utils.c (fatal): Remove function.
4468
14ce3192
GB
44692014-08-28 Gary Benson <gbenson@redhat.com>
4470
4471 * tracepoint.c (gdb_agent_init): Replace fatal with
4472 perror_with_name.
4473 (initialize_tracepoint): Likewise.
4474
50278d59
GB
44752014-08-28 Gary Benson <gbenson@redhat.com>
4476
4477 * remote-utils.c (remote_prepare): Replace fatal with error.
4478
aa96c426
GB
44792014-08-28 Gary Benson <gbenson@redhat.com>
4480
4481 * linux-low.c (linux_async): Replace fatal with warning.
4482 Tidy up and return.
4483 (linux_start_non_stop): Return -1 if linux_async failed.
4484
f7160e97
GB
44852014-08-28 Gary Benson <gbenson@redhat.com>
4486
4487 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4488 gdb_assert.
4489 (i386_dr_low_get_addr): Remove vague comment.
4490 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4491 gdb_assert.
4492
38e08fca
GB
44932014-08-28 Gary Benson <gbenson@redhat.com>
4494
4495 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4496 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4497 internal_error.
4498 (linux_resume_one_lwp): Likewise.
4499 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4500 gdb_assert.
4501 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4502 with internal_error.
4503 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4504 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4505 (find_register_by_name): Replace fatal with internal_error.
4506 (find_regno): Likewise.
4507 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4508 * thread-db.c (thread_db_create_event): Likewise.
4509 (thread_db_load_search): Likewise.
4510 (try_thread_db_load_1): Likewise.
4511 * tracepoint.c (get_jump_space_head): Replace fatal with
4512 internal_error.
4513 (claim_trampoline_space): Likewise.
4514 (have_fast_tracepoint_trampoline_buffer): Likewise.
4515 (cmd_qtstart): Likewise.
4516 (stop_tracing): Likewise.
4517 (fast_tracepoint_collecting): Likewise.
4518 (target_malloc): Likewise.
4519 (download_tracepoint): Likewise.
4520 (download_trace_state_variables): Replace check with gdb_assert.
4521 (upload_fast_traceframes): Replace fatal with internal_error.
4522
34abf635
GB
45232014-08-19 Tom Tromey <tromey@redhat.com>
4524 Gary Benson <gbenson@redhat.com>
4525
4526 * Makefile.in (SFILES): Add common/common-debug.c.
4527 (OBS): Add common-debug.o.
4528 (common-debug.o): New rule.
4529 * debug.h (debug_printf): Don't declare.
4530 * debug.c (debug_printf): Renamed and rewritten as...
4531 (debug_vprintf): New function.
4532
f6e94d78
GB
45332014-08-19 Gary Benson <gbenson@redhat.com>
4534
4535 * utils.h: Do not include print-utils.h.
4536
9239eeab
GB
45372014-08-19 Tom Tromey <tromey@redhat.com>
4538 Gary Benson <gbenson@redhat.com>
4539
4540 * server.h: Add static assertion.
4541 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4542
ef87c8bb
GB
45432014-08-19 Tom Tromey <tromey@redhat.com>
4544 Gary Benson <gbenson@redhat.com>
4545
4546 * Makefile.in (SFILES): Add common/errors.c.
4547 (OBS): Add errors.o.
4548 (IPA_OBS): Add errors-ipa.o.
4549 (errors.o): New rule.
4550 (errors-ipa.o): Likewise.
4551 * utils.h (perror_with_name, error, warning): Don't declare.
4552 * utils.c (warning): Renamed and rewritten as...
4553 (vwarning): New function.
4554 (error): Renamed and rewritten as...
4555 (verror): New function.
4556 (internal_error): Renamed and rewritten as...
4557 (internal_verror): New function.
4558
bb974a24
GB
45592014-08-07 Gary Benson <gbenson@redhat.com>
4560
4561 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4562 * configure: Regenerate.
4563 * config.in: Likewise.
4564 * server.h: Do not include errno.h.
4565 * event-loop.c: Likewise.
4566 * hostio-errno.c: Likewise.
4567 * linux-low.c: Likewise.
4568 * remote-utils.c: Likewise.
4569 * spu-low.c: Likewise.
4570 * utils.c: Likewise.
4571 * gdbreplay.c: Unconditionally include errno.h.
4572
6d3d12eb
GB
45732014-08-07 Gary Benson <gbenson@redhat.com>
4574
4575 * server.h: Do not include string.h.
4576 * event-loop.c: Likewise.
4577 * linux-low.c: Likewise.
4578 * regcache.c: Likewise.
4579 * remote-utils.c: Likewise.
4580 * spu-low.c: Likewise.
4581 * utils.c: Likewise.
4582
dccbb609
GB
45832014-08-07 Gary Benson <gbenson@redhat.com>
4584
4585 * server.h: Do not include gdb_assert.h.
4586
e76df0d0
GB
45872014-08-07 Gary Benson <gbenson@redhat.com>
4588
4589 * server.h: Do not include common-utils.h.
4590
4cb9c816
GB
45912014-08-07 Gary Benson <gbenson@redhat.com>
4592
4593 * server.h: Do not include ptid.h.
4594 * notif.h: Likewise.
4595
3995eeee
GB
45962014-08-07 Gary Benson <gbenson@redhat.com>
4597
4598 * server.h: Do not include gdb_locale.h.
4599
cb9f1a9b
GB
46002014-08-07 Gary Benson <gbenson@redhat.com>
4601
4602 * server.h: Do not include gdb/signals.h.
4603 * win32-low.c: Likewise.
4604
a5fceff8
GB
46052014-08-07 Gary Benson <gbenson@redhat.com>
4606
4607 * server.h: Do not include pathmax.h.
4608
b9391142
GB
46092014-08-07 Gary Benson <gbenson@redhat.com>
4610
4611 * server.h: Do not include libiberty.h.
4612 * linux-bfin-low.c: Likewise.
4613
0e443c87
GB
46142014-08-07 Gary Benson <gbenson@redhat.com>
4615
4616 * server.h: Do not include ansidecl.h.
4617
8ebb3f56
GB
46182014-08-07 Gary Benson <gbenson@redhat.com>
4619
4620 * linux-x86-low.c: Do not include stddef.h.
4621 * lynx-ppc-low.c: Likewise.
4622 * tracepoint.c: Likewise.
4623
8980bdf6
GB
46242014-08-07 Gary Benson <gbenson@redhat.com>
4625
4626 * server.h: Do not include stdarg.h.
4627 * nto-low.c: Likewise.
4628
d7096f71
GB
46292014-08-07 Gary Benson <gbenson@redhat.com>
4630
4631 * server.h: Do not include stdlib.h.
4632 * inferiors.c: Likewise.
4633 * linux-low.c: Likewise.
4634 * regcache.c: Likewise.
4635 * spu-low.c: Likewise.
4636 * tracepoint.c: Likewise.
4637 * utils.c: Likewise.
4638
d02f550d
GB
46392014-08-07 Gary Benson <gbenson@redhat.com>
4640
4641 * server.h: Do not include stdio.h.
4642 * linux-low.c: Likewise.
4643 * remote-utils.c: Likewise.
4644 * spu-low.c: Likewise.
4645 * utils.c: Likewise.
4646 * wincecompat.c: Likewise.
4647
87f6c4e3
GB
46482014-08-06 Gary Benson <gbenson@redhat.com>
4649
4650 * regcache.c (init_register_cache): Move conditionals inside if.
4651
7089dca4
GB
46522014-08-06 Gary Benson <gbenson@redhat.com>
4653
4654 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4655
462f517e
GB
46562014-07-31 Gary Benson <gbenson@redhat.com>
4657
4658 * ax.h: Do not include server.h.
4659 * gdbthread.h: Likewise.
4660 * lynx-low.h: Likewise.
4661 * notif.h: Likewise.
4662
976411d6
GB
46632014-07-30 Gary Benson <gbenson@redhat.com>
4664
4665 * server.h: Include common-defs.h.
4666 Do not include config.h or build-gnulib-gdbserver/config.h.
4667
d41f6d8e
GB
46682014-07-30 Gary Benson <gbenson@redhat.com>
4669
4670 * hostio-errno.c: Move server.h to top of includes list.
4671 * inferiors.c: Likewise.
4672 * linux-x86-low.c: Likewise.
4673 * notif.c: Include server.h.
4674
314c6a35
TT
46752014-07-24 Tom Tromey <tromey@redhat.com>
4676 Gary Benson <gbenson@redhat.com>
4677
4678 * server.h (CORE_ADDR): Now unsigned.
4679
69ff6be5
PA
46802014-07-16 Pedro Alves <palves@redhat.com>
4681
4682 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4683
ce9e3fe7
PA
46842014-07-15 Pedro Alves <palves@redhat.com>
4685
4686 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4687 copy.
4688
e76126e8
PA
46892014-07-11 Pedro Alves <palves@redhat.com>
4690
4691 * linux-low.c (kill_wait_lwp): New function, based on
4692 kill_one_lwp_callback, but use my_waitpid directly.
4693 (kill_one_lwp_callback, linux_kill): Use it.
4694
8e9db26e
PA
46952014-06-23 Pedro Alves <palves@redhat.com>
4696
4697 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4698 before setting DR0..DR3.
4699
698b3e08
GB
47002014-06-20 Gary Benson <gbenson@redhat.com>
4701
4702 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4703 * configure: Regenerated.
4704 * config.in: Likewise.
4705
125f8a3d
GB
47062014-06-20 Gary Benson <gbenson@redhat.com>
4707
4708 * Makefile.in (SFILES): Update locations for files moved
4709 from common to nat.
4710 (object file files): Reordered.
4711
42995dbd
GB
47122014-06-20 Gary Benson <gbenson@redhat.com>
4713
4714 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4715 (i386_dr_low_set_addr): Likewise.
4716 (i386_dr_low_get_addr): Likewise.
4717 (i386_dr_low_can_set_control): Likewise.
4718 (i386_dr_low_set_control): Likewise.
4719 (i386_dr_low_get_control): Likewise.
4720 (i386_dr_low_get_status): Likewise.
4721 (i386_get_debug_register_length): Likewise.
4722 * linux-x86-low.c (i386_dr_low_set_addr):
4723 Changed signature. Made static.
4724 (i386_dr_low_get_addr): Likewise.
4725 (i386_dr_low_set_control): Likewise.
4726 (i386_dr_low_get_control): Likewise.
4727 (i386_dr_low_get_status): Likewise.
4728 (i386_dr_low): New global variable.
4729 * win32-i386-low.c (i386_dr_low_set_addr):
4730 Changed signature. Made static.
4731 (i386_dr_low_get_addr): Likewise.
4732 (i386_dr_low_set_control): Likewise.
4733 (i386_dr_low_get_control): Likewise.
4734 (i386_dr_low_get_status): Likewise.
4735 (i386_dr_low): New global variable.
4736
e1d2394b
MS
47372014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4738
4739 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4740 * Makefile.in (AR, AR_FLAGS): Define.
4741 * configure: Regenerate.
4742
3a8ee006
GB
47432014-06-19 Gary Benson <gbenson@redhat.com>
4744
4745 * Makefile.in (i386-dregs.o): New rule.
4746 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4747 * i386-low.c (target.h): Remove include.
4748 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4749 (DR_CONTROL_SHIFT): Likewise.
4750 (DR_CONTROL_SIZE): Likewise.
4751 (DR_RW_EXECUTE): Likewise.
4752 (DR_RW_WRITE): Likewise.
4753 (DR_RW_READ): Likewise.
4754 (DR_RW_IORW): Likewise.
4755 (DR_LEN_1): Likewise.
4756 (DR_LEN_2): Likewise.
4757 (DR_LEN_4): Likewise.
4758 (DR_LEN_8): Likewise.
4759 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4760 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4761 (DR_ENABLE_SIZE): Likewise.
4762 (DR_LOCAL_SLOWDOWN): Likewise.
4763 (DR_GLOBAL_SLOWDOWN): Likewise.
4764 (DR_CONTROL_RESERVED): Likewise.
4765 (I386_DR_CONTROL_MASK): Likewise.
4766 (I386_DR_VACANT): Likewise.
4767 (I386_DR_LOCAL_ENABLE): Likewise.
4768 (I386_DR_GLOBAL_ENABLE): Likewise.
4769 (I386_DR_DISABLE): Likewise.
4770 (I386_DR_SET_RW_LEN): Likewise.
4771 (I386_DR_GET_RW_LEN): Likewise.
4772 (I386_DR_WATCH_HIT): Likewise.
4773 (i386_wp_op_t): Likewise.
4774 (i386_show_dr): Likewise.
4775 (i386_length_and_rw_bits): Likewise.
4776 (i386_insert_aligned_watchpoint): Likewise.
4777 (i386_remove_aligned_watchpoint): Likewise.
4778 (i386_handle_nonaligned_watchpoint): Likewise.
4779 i386_update_inferior_debug_regs(): Likewise.
4780 (i386_dr_insert_watchpoint): Likewise.
4781 (i386_dr_remove_watchpoint): Likewise.
4782 (i386_dr_region_ok_for_watchpoint): Likewise.
4783 (i386_dr_stopped_data_address): Likewise.
4784 (i386_dr_stopped_by_watchpoint): Likewise.
4785
8f26655c
GB
47862014-06-19 Gary Benson <gbenson@redhat.com>
4787
4788 * i386-low.c (i386_dr_show): Renamed to
4789 i386_show_dr and made static. All uses updated.
4790 (i386_dr_length_and_rw_bits): Renamed to
4791 i386_length_and_rw_bits and made static.
4792 All uses updated.
4793 (i386_dr_insert_aligned_watchpoint): Renamed to
4794 i386_insert_aligned_watchpoint and made static.
4795 All uses updated.
4796 (i386_dr_remove_aligned_watchpoint): Renamed to
4797 i386_remove_aligned_watchpoint and made static.
4798 All uses updated.
4799 (i386_dr_update_inferior_debug_regs): Renamed to
4800 i386_update_inferior_debug_regs and made static.
4801 All uses updated.
4802
b9228891
GB
48032014-06-18 Gary Benson <gbenson@redhat.com>
4804
5171def3
GB
4805 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4806 (i386_dr_low_can_set_control): Likewise.
4807 (i386_get_debug_register_length): Likewise.
4808 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4809 (i386_dr_low_can_set_control): Likewise.
4810 (i386_get_debug_register_length): Likewise.
4811
48122014-06-17 Gary Benson <gbenson@redhat.com>
4813
b9228891
GB
4814 * i386-low.h (i386-dregs.h): New include.
4815 (DR_FIRSTADDR): Now in i386-dregs.h.
4816 (DR_LASTADDR): Likewise.
4817 (DR_NADDR): Likewise.
4818 (DR_STATUS): Likewise.
4819 (DR_CONTROL): Likewise.
4820 (i386_debug_reg_state): Likewise.
4821 (i386_dr_insert_watchpoint): Likewise.
4822 (i386_dr_remove_watchpoint): Likewise.
4823 (i386_dr_region_ok_for_watchpoint): Likewise.
4824 (i386_dr_stopped_data_address): Likewise.
4825 (i386_dr_stopped_by_watchpoint): Likewise.
4826 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4827
4be83cc2
GB
48282014-06-18 Gary Benson <gbenson@redhat.com>
4829
4830 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4831 i386_dr_insert_watchpoint.
4832 (i386_low_remove_watchpoint): Renamed to
4833 i386_dr_remove_watchpoint.
4834 (i386_low_region_ok_for_watchpoint): Renamed to
4835 i386_dr_region_ok_for_watchpoint.
4836 (i386_low_stopped_data_address): Renamed to
4837 i386_dr_stopped_data_address.
4838 (i386_low_stopped_by_watchpoint): Renamed to
4839 i386_dr_stopped_by_watchpoint.
4840 * i386-low.c (i386_show_dr): Renamed to
4841 i386_dr_show and made nonstatic. All uses updated.
4842 (i386_length_and_rw_bits): Renamed to
4843 i386_dr_length_and_rw_bits and made nonstatic.
4844 All uses updated.
4845 (i386_insert_aligned_watchpoint): Renamed to
4846 i386_dr_insert_aligned_watchpoint and made nonstatic.
4847 All uses updated.
4848 (i386_remove_aligned_watchpoint): Renamed to
4849 i386_dr_remove_aligned_watchpoint and made nonstatic.
4850 All uses updated.
4851 (i386_update_inferior_debug_regs): Renamed to
4852 i386_dr_update_inferior_debug_regs and made nonstatic.
4853 All uses updated.
4854 (i386_low_insert_watchpoint): Renamed to
4855 i386_dr_insert_watchpoint. All uses updated.
4856 (i386_low_remove_watchpoint): Renamed to
4857 i386_dr_remove_watchpoint. All uses updated.
4858 (i386_low_region_ok_for_watchpoint): Renamed to
4859 i386_dr_region_ok_for_watchpoint. All uses updated.
4860 (i386_low_stopped_data_address): Renamed to
4861 i386_dr_stopped_data_address. All uses updated.
4862 (i386_low_stopped_by_watchpoint): Renamed to
4863 i386_dr_stopped_by_watchpoint. All uses updated.
4864
131aa0d4
GB
48652014-06-18 Gary Benson <gbenson@redhat.com>
4866
4867 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4868 (i386_dr_low_can_set_control): Likewise.
4869 (i386_insert_aligned_watchpoint): New check.
4870
d9305f7f
GB
48712014-06-18 Gary Benson <gbenson@redhat.com>
4872
4873 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4874 Renamed to state.
4875
e927c9fc
GB
48762014-06-18 Gary Benson <gbenson@redhat.com>
4877
4878 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4879 instead of fatal and error.
4880 (i386_handle_nonaligned_watchpoint): Likewise.
4881
1b6d4134
GB
48822014-06-18 Gary Benson <gbenson@redhat.com>
4883
4884 * i386-low.c (i386_get_debug_register_length): New macro.
4885 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4886 (i386_show_dr): Use debug_printf instead of fprintf. Use
4887 phex to format values.
4888
6e62758f
GB
48892014-06-18 Gary Benson <gbenson@redhat.com>
4890
4891 * i386-low.h: Comment changes.
4892 * i386-low.c: Likewise.
4893
fc6e2f03
GB
48942014-06-18 Gary Benson <gbenson@redhat.com>
4895
4896 * i386-low.c: Whitespace changes.
4897
f9d1eeed
TT
48982014-06-12 Tom Tromey <tromey@redhat.com>
4899
4900 * utils.c (freeargv): Remove.
4901
0b04e523
TT
49022014-06-12 Tom Tromey <tromey@redhat.com>
4903
4904 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4905 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4906 (parse_debug_format_options): Likewise.
4907 (gdbserver_usage): Likewise.
4908 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4909 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4910 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4911 against libiberty.
4912 ($(LIBGNU)): Depend on libiberty.
4913 (all-lib): Recurse into all subdirs.
4914 (install-only): Invoke "install" target in subdirs.
4915 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4916 targets.
4917 * configure: Rebuild.
4918 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4919 for vasprintf, vsnprintf, or gettimeofday.
4920 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4921 srv_tgtobj.
4922
270c9937
JB
49232014-06-05 Joel Brobecker <brobecker@adacore.com>
4924
4925 * development.sh: Delete.
4926 * Makefile.in (config.status): Adjust dependency on development.sh.
4927 * configure.ac: Adjust development.sh source call.
4928 * configure: Regenerate.
4929
0a261ed8
PA
49302014-06-02 Pedro Alves <palves@redhat.com>
4931
4932 * ax.c (gdb_free_agent_expr): New function.
4933 * ax.h (gdb_free_agent_expr): New declaration.
4934 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4935 list.
4936 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4937 static.
4938 (clear_breakpoint_conditions_and_commands): New function.
4939 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4940 (clear_breakpoint_conditions_and_commands): New declaration.
4941
e9dae05e
RR
49422014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4943
4944 * linux-aarch64-low.c (asm/ptrace.h): Include.
4945
5876f503
JK
49462014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4947
4948 Fix TLS access for -static -pthread.
4949 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4950 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4951 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4952
802e8e6d
PA
49532014-05-20 Pedro Alves <palves@redhat.com>
4954
4955 * linux-aarch64-low.c (aarch64_insert_point)
4956 (aarch64_remove_point): No longer check whether the type is
4957 supported here. Adjust to new interface.
4958 (the_low_target): Install aarch64_supports_z_point_type as
4959 supports_z_point_type method.
4960 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4961 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4962 instead of a Z packet char. Adjust.
4963 (arm_supports_z_point_type): New function.
4964 (arm_insert_point, arm_remove_point): Adjust to new interface.
4965 (the_low_target): Install arm_supports_z_point_type.
4966 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4967 (cris_insert_point, cris_remove_point): Adjust to new interface.
4968 Don't check whether the type is supported here.
4969 (the_low_target): Install cris_supports_z_point_type.
4970 * linux-low.c (linux_supports_z_point_type): New function.
4971 (linux_insert_point, linux_remove_point): Adjust to new interface.
4972 * linux-low.h (struct linux_target_ops) <insert_point,
4973 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4974 raw_breakpoint pointer parameter.
4975 <supports_z_point_type>: New method.
4976 * linux-mips-low.c (mips_supports_z_point_type): New function.
4977 (mips_insert_point, mips_remove_point): Adjust to new interface.
4978 Use mips_supports_z_point_type.
4979 (the_low_target): Install mips_supports_z_point_type.
4980 * linux-ppc-low.c (the_low_target): Install NULL as
4981 supports_z_point_type method.
4982 * linux-s390-low.c (the_low_target): Install NULL as
4983 supports_z_point_type method.
4984 * linux-sparc-low.c (the_low_target): Install NULL as
4985 supports_z_point_type method.
4986 * linux-x86-low.c (x86_supports_z_point_type): New function.
4987 (x86_insert_point): Adjust to new insert_point interface. Use
4988 insert_memory_breakpoint. Adjust to new
4989 i386_low_insert_watchpoint interface.
4990 (x86_remove_point): Adjust to remove_point interface. Use
4991 remove_memory_breakpoint. Adjust to new
4992 i386_low_remove_watchpoint interface.
4993 (the_low_target): Install x86_supports_z_point_type.
4994 * lynx-low.c (lynx_target_ops): Install NULL as
4995 supports_z_point_type callback.
4996 * nto-low.c (nto_supports_z_point_type): New.
4997 (nto_insert_point, nto_remove_point): Adjust to new interface.
4998 (nto_target_ops): Install nto_supports_z_point_type.
4999 * mem-break.c: Adjust intro comment.
5000 (struct raw_breakpoint) <raw_type, size>: New fields.
5001 <inserted>: Update comment.
5002 <shlib_disabled>: Delete field.
5003 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5004 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5005 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5006 (raw_bkpt_type_to_target_hw_bp_type): New function.
5007 (find_enabled_raw_code_breakpoint_at): New function.
5008 (find_raw_breakpoint_at): New type and size parameters. Use them.
5009 (insert_memory_breakpoint): New function, based off
5010 set_raw_breakpoint_at.
5011 (remove_memory_breakpoint): New function.
5012 (set_raw_breakpoint_at): Reimplement.
5013 (set_breakpoint): New, based on set_breakpoint_at.
5014 (set_breakpoint_at): Reimplement.
5015 (delete_raw_breakpoint): Go through the_target->remove_point
5016 instead of assuming memory breakpoints.
5017 (find_gdb_breakpoint_at): Delete.
5018 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5019 (find_gdb_breakpoint): New function.
5020 (set_gdb_breakpoint_at): Delete.
5021 (z_type_supported): New function.
5022 (set_gdb_breakpoint_1): New function, loosely based off
5023 set_gdb_breakpoint_at.
5024 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5025 (delete_gdb_breakpoint_at): Delete.
5026 (delete_gdb_breakpoint_1): New function, loosely based off
5027 delete_gdb_breakpoint_at.
5028 (delete_gdb_breakpoint): New function.
5029 (clear_gdb_breakpoint_conditions): Rename to ...
5030 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5031 breakpoint.
5032 (add_condition_to_breakpoint): Make static.
5033 (add_breakpoint_condition): Take a struct breakpoint pointer
5034 instead of an address. Adjust.
5035 (gdb_condition_true_at_breakpoint): Rename to ...
5036 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5037 z_type parameter.
5038 (gdb_condition_true_at_breakpoint): Reimplement.
5039 (add_breakpoint_commands): Take a struct breakpoint pointer
5040 instead of an address. Adjust.
5041 (gdb_no_commands_at_breakpoint): Rename to ...
5042 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5043 parameter. Return true if no breakpoint was found. Change debug
5044 output.
5045 (gdb_no_commands_at_breakpoint): Reimplement.
5046 (run_breakpoint_commands): Rename to ...
5047 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5048 and change return type to boolean.
5049 (run_breakpoint_commands): New function.
5050 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5051 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5052 breakpoint. Go through the_target->remove_point instead of
5053 assuming memory breakpoint.
5054 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5055 software and hardware breakpoints.
5056 (reinsert_raw_breakpoint): Go through the_target->insert_point
5057 instead of assuming memory breakpoint.
5058 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5059 software and hardware breakpoints.
5060 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5061 Check both software and hardware breakpoints.
5062 (validate_inserted_breakpoint): Assert the breakpoint is a
5063 software breakpoint. Set the inserted flag to -1 instead of
5064 setting shlib_disabled.
5065 (delete_disabled_breakpoints): Adjust.
5066 (validate_breakpoints): Only validate software breakpoints.
5067 Adjust to inserted flag change.
5068 (check_mem_read, check_mem_write): Skip breakpoint types other
5069 than software breakpoints. Adjust to inserted flag change.
5070 * mem-break.h (enum raw_bkpt_type): New enum.
5071 (raw_breakpoint, struct process_info): Forward declare.
5072 (Z_packet_to_target_hw_bp_type): Delete declaration.
5073 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5074 (set_gdb_breakpoint, delete_gdb_breakpoint)
5075 (clear_breakpoint_conditions): New declarations.
5076 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5077 (breakpoint_inserted_here): Update comment.
5078 (add_breakpoint_condition, add_breakpoint_commands): Replace
5079 address parameter with a breakpoint pointer parameter.
5080 (gdb_breakpoint_here): Update comment.
5081 (delete_gdb_breakpoint_at): Delete.
5082 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5083 * server.c (process_point_options): Take a struct breakpoint
5084 pointer instead of an address. Adjust.
5085 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5086 delete_gdb_breakpoint.
5087 * spu-low.c (spu_target_ops): Install NULL as
5088 supports_z_point_type method.
5089 * target.h: Include mem-break.h.
5090 (struct target_ops) <prepare_to_access_memory>: Update comment.
5091 <supports_z_point_type>: New field.
5092 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5093 instead of a char. Also take a raw breakpoint pointer.
5094 * win32-arm-low.c (the_low_target): Install NULL as
5095 supports_z_point_type.
5096 * win32-i386-low.c (i386_supports_z_point_type): New function.
5097 (i386_insert_point, i386_remove_point): Adjust to new interface.
5098 (the_low_target): Install i386_supports_z_point_type.
5099 * win32-low.c (win32_supports_z_point_type): New function.
5100 (win32_insert_point, win32_remove_point): Adjust to new interface.
5101 (win32_target_ops): Install win32_supports_z_point_type.
5102 * win32-low.h (struct win32_target_ops):
5103 <supports_z_point_type>: New method.
5104 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5105 instead of a char. Also take a raw breakpoint pointer.
5106
932539e3
PA
51072014-05-20 Pedro Alves <palves@redhat.com>
5108
5109 * mem-break.h: Include break-common.h.
5110 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5111 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5112 (Z_packet_to_target_hw_bp_type): New declaration.
5113 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5114 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5115 (Z_PACKET_ACCESS_WP): Delete macros.
5116 (Z_packet_to_hw_type): Delete function.
5117 * i386-low.h: Don't include break-common.h here.
5118 (Z_packet_to_hw_type): Delete declaration.
5119 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5120 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5121 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5122 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5123 * linux-aarch64-low.c: Don't include break-common.h here.
5124 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5125 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5126 (Z_packet_to_target_hw_bp_type): Delete function.
5127 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5128 function.
5129 (mips_insert_point, mips_remove_point): Use
5130 Z_packet_to_target_hw_bp_type.
5131
4ff0d3d8
PA
51322014-05-20 Pedro Alves <palves@redhat.com>
5133
5134 * linux-aarch64-low.c: Include break-common.h.
5135 (enum target_point_type): Delete.
5136 (Z_packet_to_point_type): Rename to ...
5137 (Z_packet_to_target_hw_bp_type): ... this, and return a
5138 target_hw_bp_type instead.
5139 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5140 instead of an enum target_point_type.
5141 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5142 breakpoint type.
5143 (aarch64_dr_state_insert_one_point)
5144 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5145 (aarch64_handle_aligned_watchpoint)
5146 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5147 Take an enum target_hw_bp_type instead of an enum
5148 target_point_type.
5149 (aarch64_supports_z_point_type): New function.
5150 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5151 use Z_packet_to_target_hw_bp_type.
5152
786dc519
JB
51532014-05-20 Joel Brobecker <brobecker@adacore.com>
5154
5155 * configure.ac: Only use -Werror by default when DEVELOPMENT
5156 is true.
5157 * configure: Regenerate.
5158
9e0aa64f
JK
51592014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5160
5161 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5162 * linux-x86-low.c (X86_64_USER_REGS): New.
5163 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5164
2b577b92
YQ
51652014-04-28 Yao Qi <yao@codesourcery.com>
5166
5167 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5168 name.
5169
94611da2
PA
51702014-04-25 Pedro Alves <palves@redhat.com>
5171
5172 PR server/16255
5173 * linux-low.c (linux_attach_fail_reason_string): New function.
5174 (linux_attach_lwp): Delete.
5175 (linux_attach_lwp_1): Rename to ...
5176 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5177 argument. Remove "initial" parameter. Return int instead of
5178 void. Don't error or warn here.
5179 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5180 failure to attach to the tgid. Call warning when failing to
5181 attach to an lwp.
5182 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5183 argument. Remove "initial" parameter. Return int instead of
5184 void. Don't error or warn here.
5185 (linux_attach_fail_reason_string): New declaration.
5186 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5187 interface change. Use linux_attach_fail_reason_string.
5188
01f9f808
MS
51892014-04-24 Michael Sturm <michael.sturm@mintel.com>
5190 Walfred Tedeschi <walfred.tedeschi@intel.com>
5191
5192 * Makefile.in: Added rules to handle new files
5193 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5194 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5195 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5196 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5197 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5198 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5199 x32-avx512-linux.o.
5200 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5201 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5202 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5203 i386/x32-avx512.xml.
5204 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5205 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5206 i386/x32-avx512-linux.xml.
5207 * i387-fp.c (num_avx512_k_registers): New constant for number
5208 of K registers.
5209 (num_avx512_zmmh_low_registers): New constant for number of
5210 lower ZMM registers (0-15).
5211 (num_avx512_zmmh_high_registers): New constant for number of
5212 higher ZMM registers (16-31).
5213 (num_avx512_ymmh_registers): New contant for number of higher
5214 YMM registers (ymm16-31 added by avx521 on x86_64).
5215 (num_avx512_xmm_registers): New constant for number of higher
5216 XMM registers (xmm16-31 added by AVX512 on x86_64).
5217 (struct i387_xsave): Add space for AVX512 registers.
5218 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5219 Add code to handle AVX512 registers.
5220 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5221 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5222 prototypei from generated file.
5223 (tdesc_amd64_avx512_linux): Likewise.
5224 (init_registers_x32_avx512_linux): Likewise.
5225 (tdesc_x32_avx512_linux): Likewise.
5226 (init_registers_i386_avx512_linux): Likewise.
5227 (tdesc_i386_avx512_linux): Likewise.
5228 (x86_64_regmap): Add AVX512 registers.
5229 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5230 mask.
5231 (initialize_low_arch): Add code to initialize AVX512 registers.
5232
51aa91f9
PA
52332014-04-23 Pedro Alves <palves@redhat.com>
5234
5235 * mem-break.c (find_gdb_breakpoint_at): Make static.
5236 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5237
a4165e94
PA
52382014-04-23 Pedro Alves <palves@redhat.com>
5239
5240 * i386-low.c: Don't include break-common.h here.
5241 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5242 prototype to take target_hw_bp_type as argument instead of a Z
5243 packet char.
5244 * i386-low.h: Include break-common.h here.
5245 (Z_packet_to_hw_type): Declare.
5246 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5247 prototypes.
5248 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5249 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5250 (x86_remove_point): Convert the packet number to a
5251 target_hw_bp_type before calling i386_low_remove_watchpoint.
5252 * win32-i386-low.c (i386_insert_point): Convert the packet number
5253 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5254 (i386_remove_point): Convert the packet number to a
5255 target_hw_bp_type before calling i386_low_remove_watchpoint.
5256
b8acf843
PA
52572014-04-23 Pedro Alves <palves@redhat.com>
5258
5259 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5260
d708bcd1
PA
52612014-04-10 Pedro Alves <palves@redhat.com>
5262
5263 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5264 Check if the condition or command is NULL before checking if the
5265 breakpoint is known. On success, return true.
5266 * mem-break.h (add_breakpoint_condition): Document return.
5267 (add_breakpoint_commands): Add describing comment.
5268 * server.c (skip_to_semicolon): New function.
5269 (process_point_options): Use it.
5270
2eec7d5b
PA
52712014-04-09 Pedro Alves <palves@redhat.com>
5272
5273 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5274 to lwpid_of.
5275
fa96cb38
PA
52762014-02-27 Pedro Alves <palves@redhat.com>
5277
5278 PR 12702
5279 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5280 macros.
5281 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5282 output.
5283 (last_thread_of_process_p): Take a PID argument instead of a
5284 thread pointer.
5285 (linux_wait_for_lwp): Delete.
5286 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5287 functions.
5288 (linux_low_filter_event): New function, party factored out from
5289 linux_wait_for_event.
5290 (linux_wait_for_event): Rename to ...
5291 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5292 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5293 sigsuspend. Check for zombie leaders.
5294 (linux_wait_for_event): Reimplement as wrapper around
5295 linux_wait_for_event_filtered.
5296 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5297 a normal or signal exit is seen, it's the whole process exiting.
5298 (wait_for_sigstop): No longer a for_each_inferior callback.
5299 Rewrite on top of linux_wait_for_event_filtered.
5300 (stop_all_lwps): Call wait_for_sigstop directly.
5301 * server.c (resume, handle_target_event): Handle
5302 TARGET_WAITKIND_NO_RESUMED.
5303
d763de10
JB
53042014-02-26 Joel Brobecker <brobecker@adacore.com>
5305
5306 * win32-low.c (psapi_get_dll_name,
5307 * win32_CreateToolhelp32Snapshot): Delete.
5308 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5309 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5310 Delete.
5311 (handle_load_dll): Add function description.
5312 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5313
850a0f76
JB
53142014-02-26 Joel Brobecker <brobecker@adacore.com>
5315
5316 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5317 Add comment.
5318 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5319 base address when calling win32_add_one_solib.
5320 (handle_load_dll): Delete local variable load_addr.
5321 Remove 0x1000 offset applied to DLL base address when calling
5322 win32_add_one_solib.
5323 (handle_unload_dll): Add comment.
5324
f25b3fc3
JB
53252014-02-26 Joel Brobecker <brobecker@adacore.com>
5326
5327 * win32-low.c (win32_add_all_dlls): Renames
5328 win32_ensure_ntdll_loaded. Rewrite function documentation.
5329 Adjust implementation to always load all DLLs.
5330 Add 0x1000 offset to DLL base address when calling
5331 win32_add_one_solib.
5332 (child_initialization_done): New static global.
5333 (do_initial_child_stuff): Set child_initialization_done to
5334 zero during child initialization, and 1 after. Replace call
5335 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5336 Add comment.
5337 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5338 (handle_unload_dll): Add function documentation.
5339 (get_child_debug_event): Ignore load and unload DLL events
5340 during child initialization.
5341
d86d4aaf
DE
53422014-02-20 Doug Evans <dje@google.com>
5343
3bc32da3 5344 Remove global all_lwps.
d86d4aaf
DE
5345 * inferiors.h (ptid_of): Move here from linux-low.h.
5346 (pid_of, lwpid_of): Ditto.
5347 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5348 parameter is a struct thread_info * now.
5349 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5350 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5351 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5352 directly.
5353 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5354 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5355 * linux-arm-low.c (update_registers_callback): Update, "entry"
5356 parameter is a struct thread_info * now.
5357 Fetch lwpid from current_inferior directly.
5358 (arm_insert_point): Pass &all_threads to find_inferior instead of
5359 &all_lwps.
5360 (arm_remove_point): Ditto.
5361 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5362 (arm_prepare_to_resume): Fetch pid from thread.
5363 (arm_read_description): Fetch lwpid from current_inferior directly.
5364 * linux-low.c (all_lwps): Delete.
5365 (delete_lwp): Delete call to remove_inferior.
5366 (handle_extended_wait): Fetch lwpid from thread.
5367 (add_lwp): Don't set lwp->entry.id. Remove call to
5368 add_inferior_to_list.
5369 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5370 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5371 (kill_one_lwp_callback): Ditto.
5372 (linux_kill): Don't dereference NULL pointer.
5373 Fetch ptid,lwpid from thread.
5374 (get_detach_signal): Fetch ptid from thread.
5375 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5376 Simplify call to regcache_invalidate_thread.
5377 (delete_lwp_callback): Update, "entry" parameter is a
5378 struct thread_info * now. Fetch pid from thread.
5379 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5380 (status_pending_p_callback): Update, "entry" parameter is a
5381 struct thread_info * now. Fetch ptid from thread.
5382 (find_lwp_pid): Update, "entry" parameter is a
5383 struct thread_info * now.
5384 (linux_wait_for_lwp): Fetch pid from thread.
5385 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5386 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5387 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5388 (dequeue_one_deferred_signal): Ditto.
5389 (cancel_breakpoint): Fetch ptid from current_inferior.
5390 (linux_wait_for_event): Pass &all_threads to find_inferior,
5391 not &all_lwps. Fetch ptid, lwpid from thread.
5392 (count_events_callback): Update, "entry" parameter is a
5393 struct thread_info * now.
5394 (select_singlestep_lwp_callback): Ditto.
5395 (select_event_lwp_callback): Ditto.
5396 (cancel_breakpoints_callback): Ditto.
5397 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5398 not &all_lwps.
5399 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5400 (unsuspend_one_lwp): Update, "entry" parameter is a
5401 struct thread_info * now.
5402 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5403 not &all_lwps.
5404 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5405 Fetch lwpid from thread, not lwp.
5406 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5407 Pass &all_threads to find_inferior, not &all_lwps.
5408 (send_sigstop): Fetch lwpid from thread, not lwp.
5409 (send_sigstop_callback): Update, "entry" parameter is a
5410 struct thread_info * now.
5411 (suspend_and_send_sigstop_callback): Ditto.
5412 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5413 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5414 struct thread_info * now.
5415 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5416 from thread, lwp.
5417 (lwp_running): Update, "entry" parameter is a
5418 struct thread_info * now.
5419 (stop_all_lwps): Fetch ptid from thread.
5420 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5421 (linux_resume_one_lwp): Fetch lwpid from thread.
5422 (linux_set_resume_request): Update, "entry" parameter is a
5423 struct thread_info * now. Fetch pid, lwpid from thread.
5424 (resume_status_pending_p): Update, "entry" parameter is a
5425 struct thread_info * now.
5426 (need_step_over_p): Ditto. Fetch lwpid from thread.
5427 (start_step_over): Fetch lwpid from thread.
5428 (linux_resume_one_thread): Update, "entry" parameter is a
5429 struct thread_info * now. Fetch lwpid from thread.
5430 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5431 (proceed_one_lwp): Update, "entry" parameter is a
5432 struct thread_info * now. Fetch lwpid from thread.
5433 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5434 struct thread_info * now.
5435 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5436 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5437 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5438 directly.
5439 (regsets_store_inferior_registers): Ditto.
5440 (fetch_register, store_register): Ditto.
5441 (linux_read_memory, linux_write_memory): Ditto.
5442 (linux_request_interrupt): Ditto.
5443 (linux_read_auxv): Ditto.
5444 (linux_xfer_siginfo): Ditto.
5445 (linux_qxfer_spu): Ditto.
5446 (linux_qxfer_libraries_svr4): Ditto.
5447 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5448 moved to inferiors.h.
5449 (get_lwp): Delete.
5450 (get_thread_lwp): Update.
5451 (struct lwp_info): Delete member "entry". Simplify comment for
5452 member "thread".
5453 (all_lwps): Delete.
5454 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5455 current_inferior directly.
5456 (update_watch_registers_callback): Update, "entry" parameter is a
5457 struct thread_info * now. Fetch pid from thread.
5458 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5459 (mips_insert_point): Fetch lwpid from current_inferior.
5460 Pass &all_threads to find_inferior, not &all_lwps.
5461 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5462 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5463 directly.
5464 (mips_stopped_data_address): Ditto.
5465 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5466 directly.
5467 * linux-tile-low.c (tile_arch_setup): Ditto.
5468 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5469 (update_debug_registers_callback): Update, "entry" parameter is a
5470 struct thread_info * now. Fetch pid from thread.
5471 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5472 Pass &all_threads to find_inferior, not &all_lwps.
5473 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5474 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5475 Pass &all_threads to find_inferior, not &all_lwps.
5476 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5477 (i386_dr_low_get_status): Ditto.
5478 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5479 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5480 (x86_linux_read_description): Ditto.
5481 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5482
3b8361aa
DE
54832014-02-20 Doug Evans <dje@google.com>
5484
5485 * inferiors.c (get_first_inferior): Fix buglet.
5486
f7667f0d
DE
54872014-02-19 Doug Evans <dje@google.com>
5488
5489 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5490 * inferiors.c (add_thread): Change result type to struct thread_info *.
5491 All callers updated.
5492 (add_lwp): Call add_thread here instead of in callers.
5493 All callers updated.
5494 * linux-low.h (get_lwp_thread): Rewrite.
5495 (struct lwp_info): New member "thread".
5496
b3312d80
DE
54972014-02-19 Doug Evans <dje@google.com>
5498
5499 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5500 All callers updated.
5501
ecc6f45c
DE
55022014-02-19 Doug Evans <dje@google.com>
5503
5504 * inferiors.c (add_thread): Fix whitespace.
5505
649ebbca
DE
55062014-02-19 Doug Evans <dje@google.com>
5507
5508 * dll.c (clear_dlls): Replace accessing list implemention details
5509 with API function.
5510 * gdbthread.h (get_first_thread): Declare.
5511 * inferiors.c (for_each_inferior_with_data): New function.
5512 (get_first_thread): New function.
5513 (find_thread_ptid): Simplify.
5514 (get_first_inferior): New function.
5515 (clear_list): Delete.
5516 (one_inferior_p): New function.
5517 (clear_inferior_list): New function.
5518 (clear_inferiors): Update.
5519 * inferiors.h (for_each_inferior_with_data): Declare.
5520 (clear_inferior_list): Declare.
5521 (one_inferior_p): Declare.
5522 (get_first_inferior): Declare.
5523 * linux-low.c (linux_wait_for_event): Replace accessing list
5524 implemention details with API function.
5525 * server.c (target_running): Ditto.
5526 (accumulate_file_name_length): New function.
5527 (emit_dll_description): New function.
5528 (handle_qxfer_libraries): Replace accessing list implemention
5529 details with API function.
5530 (handle_qxfer_threads_worker): New function.
5531 (handle_qxfer_threads_proper): Replace accessing list implemention
5532 details with API function.
5533 (handle_query): Ditto.
5534 (visit_actioned_threads_callback_ftype): New typedef.
5535 (visit_actioned_threads_data): New struct.
5536 (visit_actioned_threads): Rewrite to be find_inferior callback.
5537 (resume): Call find_inferior.
5538 (handle_status): Replace accessing list implemention
5539 details with API function.
5540 (process_serial_event): Replace accessing list implemention details
5541 with API function.
5542 * target.c (set_desired_inferior): Replace accessing list implemention
5543 details with API function.
5544 * tracepoint.c (same_process_p): New function.
5545 (gdb_agent_about_to_close): Replace accessing list implemention
5546 details with API function.
5547 * win32-low.c (child_delete_thread): Replace accessing list
5548 implemention details with API function.
5549 (match_dll_by_basename): New function.
5550 (dll_is_loaded_by_basename): New function.
5551 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5552 details call to dll_is_loaded_by_basename.
5553
80894984
DE
55542014-02-19 Doug Evans <dje@google.com>
5555
5556 * dll.h (struct dll_info): Add comment.
5557 * gdbthread.h (struct thread_info): Add comment.
5558 (current_ptid): Simplify.
5559 * inferiors.c (add_process): Update.
5560 (remove_process): Update.
5561 * inferiors.h (struct process_info): Rename member "head" to "entry".
5562 * linux-low.c (delete_lwp): Update.
5563 (add_lwp): Update.
5564 (last_thread_of_process_p): Update.
5565 (kill_one_lwp_callback, linux_kill): Update.
5566 (status_pending_p_callback): Update.
5567 (wait_for_sigstop): Update. Simplify read of ptid.
5568 (start_step_over): Update.
5569 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5570 (get_lwp_thread): Update.
5571 (struct lwp_info): Rename member "head" to "entry".
5572 * regcache.h (inferior_list_entry): Delete.
5573 * server.c (kill_inferior_callback): Update.
5574 (detach_or_kill_inferior_callback): Update.
5575 (print_started_pid): Update.
5576 (print_attached_pid): Update.
5577 (process_serial_event): Simplify read of ptid.
5578 * thread-db.c (thread_db_create_event): Update.
5579 (thread_db_get_tls_address): Update.
5580 * win32-low.c (current_inferior_ptid): Simplify.
5581
46917d26
TT
55822014-02-19 Tom Tromey <tromey@redhat.com>
5583
5584 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5585 argument.
5586 (target_supports_btrace): Update.
5587
0759a81e
YQ
55882014-02-14 Yao Qi <yao@codesourcery.com>
5589
5590 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5591 (rsp-low-ipa.o): New target.
5592
a7191e8b
TT
55932014-02-12 Tom Tromey <tromey@redhat.com>
5594
5595 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5596 convert_ascii_to_int.
5597 * regcache.c (registers_to_string): Likewise.
5598 * remote-utils.c (decode_M_packet): Likewise.
5599 * server.c (process_serial_event): Likewise.
5600
ff0e980e
TT
56012014-02-12 Tom Tromey <tromey@redhat.com>
5602
5603 * server.c (handle_query, handle_v_run): Use hex2bin, not
5604 unhexify.
5605 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5606
e9371aff
TT
56072014-02-12 Tom Tromey <tromey@redhat.com>
5608
5609 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5610 convert_int_to_ascii.
5611 * regcache.c (registers_to_string, collect_register_as_string):
5612 Likewise.
5613 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5614 Likewise.
5615 * server.c (process_serial_event): Likewise.
5616 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5617 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5618
971dc0b8
TT
56192014-02-12 Tom Tromey <tromey@redhat.com>
5620
5621 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5622 bin2hex, not hexify.
5623 * tracepoint.c (cmd_qtstatus): Likewise.
5624
0a822afb
TT
56252014-02-12 Tom Tromey <tromey@redhat.com>
5626
5627 * remote-utils.c (monitor_output): Pass explicit length to
5628 hexify.
5629
9c3d6531
TT
56302014-02-12 Tom Tromey <tromey@redhat.com>
5631
5632 * tracepoint.c: Include rsp-low.h.
5633 * server.c: Include rsp-low.h.
5634 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5635 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5636 declare.
5637 * remote-utils.c: Include rsp-low.h.
5638 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5639 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5640 (convert_int_to_ascii, convert_ascii_to_int): Move to
5641 common/rsp-low.c.
5642 * regcache.c: Include rsp-low.h.
5643 * ax.c: Include rsp-low.h.
5644 * Makefile.in (SFILES): Add common/rsp-low.c.
5645 (OBS): Add rsp-low.o.
5646 (rsp-low.o): New target.
5647
01fd3ea5
TT
56482014-02-12 Tom Tromey <tromey@redhat.com>
5649
5650 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5651 Include print-utils.h.
5652 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5653 (plongest, thirty_two, phex_nz): Remove.
5654 * Makefile.in (SFILES): Add common/print-utils.c.
5655 (OBS): Add print-utils.o.
5656 (print-utils-ipa.o): New target.
5657 (print-utils.o): New target.
5658 (IPA_OBJS): Add print-utils-ipa.o.
5659
e99dc820
TT
56602014-02-06 Tom Tromey <tromey@redhat.com>
5661
5662 * Makefile.in (SFILES): Fix indentation.
5663
ee1e2d4f
DE
56642014-02-05 Doug Evans <dje@google.com>
5665
5666 * linux-low.c (linux_wait_for_event): Improve comment.
5667 (linux_wait_1): Keep current_inferior in sync with event_child.
5668
f5a02773
DE
56692014-01-22 Doug Evans <dje@google.com>
5670
5671 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5672
87ce2a04
DE
56732014-01-22 Doug Evans <dje@google.com>
5674
5675 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5676 * configure: Regenerate.
5677 * config.in: Regenerate.
5678 * Makefile.in (SFILES): Add debug.c.
5679 (OBS): Add debug.o.
5680 * debug.c: New file.
5681 * debug.h: New file.
5682 * linux-aarch64-low.c (*): Update all debugging printfs to use
5683 debug_printf instead of fprintf.
5684 * linux-arm-low.c (*): Ditto.
5685 * linux-cris-low.c (*): Ditto.
5686 * linux-crisv32-low.c (*): Ditto.
5687 * linux-m32r-low.c (*): Ditto.
5688 * linux-sparc-low.c (*): Ditto.
5689 * linux-x86.c (*): Ditto.
5690 * linux-low.c (*): Ditto.
5691 (linux_wait_1): Add calls to debug_enter, debug_exit.
5692 (linux_wait): Remove redundant debugging printf.
5693 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5694 (linux_resume, unstop_all_lwps): Ditto.
5695 * mem-break.c (*): Update all debugging printfs to use
5696 debug_printf instead of fprintf.
5697 * remote-utils.c (*): Ditto.
5698 * thread-db.c (*): Ditto.
5699 * server.c #include <ctype.h>, "gdb_vecs.h".
5700 (debug_threads): Moved to debug.c.
5701 (*): Update all debugging printfs to use debug_printf instead of
5702 fprintf.
5703 (start_inferior): Replace call to fflush with call to debug_flush.
5704 (monitor_show_help): Mention set debug-format.
5705 (parse_debug_format_options): New function.
5706 (handle_monitor_command): Handle "monitor set debug-format".
5707 (gdbserver_usage): Mention --debug-format.
5708 (main): Parse --debug-format.
5709 * server.h (debug_threads): Declaration moved to debug.h.
5710 #include "debug.h".
5711 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5712 trace_debug_1 that uses debug_printf.
5713 (tracepoint_look_up_symbols): Update all debugging printfs to use
5714 debug_printf instead of fprintf.
5715
e671835b
BS
57162014-01-20 Baruch Siach <baruch@tkos.co.il>
5717
5718 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5719 sys/ptrace.h.
5720
b5737fa9
PA
57212014-01-17 Pedro Alves <palves@redhat.com>
5722
ea38d2a9 5723 PR build/16445
c7faa97a
PA
5724 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5725 defined after including gdb_proc_service.h.
b5737fa9 5726
40ed484e
DE
57272014-01-16 Doug Evans <dje@google.com>
5728
5729 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5730 (match_dll): Use it.
5731
969c39fb
MM
57322014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5733
5734 * target.h (target_ops) <read_btrace>: Change parameters and
5735 return type to allow error reporting.
5736 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5737 trace reading errors on.
5738 * linux-low.c (linux_low_read_btrace): Pass trace reading
5739 errors on.
5740 (linux_low_disable_btrace): New.
5741
ab7f45ba
DE
57422014-01-15 Doug Evans <dje@google.com>
5743
5744 * inferiors.c (thread_id_to_gdb_id): Delete.
5745 * inferiors.h (thread_id_to_gdb_id): Delete.
5746
66af0f44
EZ
57472014-01-13 Eli Zaretskii <eliz@gnu.org>
5748
5749 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5750 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5751 versions.
5752
9939e131
PA
57532014-01-08 Pedro Alves <palves@redhat.com>
5754
5755 * server.c (handle_status): Don't discard previous queued stop
5756 replies or thread's pending status here.
5757 (main) <disconnection>: Do it here instead.
5758
b7ea362b
PA
57592014-01-08 Pedro Alves <palves@redhat.com>
5760
5761 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5762 * server.c (visit_actioned_threads, handle_pending_status): New
5763 function.
5764 (handle_v_cont): Factor out parts to ...
5765 (resume): ... this new function. If in all-stop, and a thread
5766 being resumed has a pending status, report it without actually
5767 resuming.
5768 (myresume): Adjust to use the new 'resume' function.
5769 (clear_pending_status_callback, set_pending_status_callback)
5770 (find_status_pending_thread_callback): New functions.
5771 (handle_status): Handle the case of multiple threads having
5772 interesting statuses to report. Report threads' real last signal
5773 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5774 with an interesting thread to report the status for, instead of
5775 always reporting the status of the first thread.
5776
28498c42
JB
57772014-01-01 Joel Brobecker <brobecker@adacore.com>
5778
5779 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5780 * gdbreplay.c (gdbreplay_version): Likewise.
5781
f45c82da
YZ
57822013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5783
5784 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5785 iov.iov_len with the real length in use.
5786
379a5e2d
JB
57872013-12-13 Joel Brobecker <brobecker@adacore.com>
5788
5789 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5790 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5791 for all targets that use win32-low.c.
5792 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5793 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5794
4210d83e
PA
57952013-12-13 Pedro Alves <palves@redhat.com>
5796
5797 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5798 if equal to TARGET_WAITKIND_LOADED.
5799 * win32-low.c (cached_status): New static global.
5800 (win32_wait): Add declaration.
5801 (do_initial_child_stuff): Flush all initial pending debug events
5802 up to the initial breakpoint.
5803 (win32_wait): If CACHED_STATUS was set, return that instead
5804 of doing a real wait. Remove the code resuming the execution
5805 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5806 during the initial phase. Also remove the code changing
5807 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5808 TARGET_WAITKIND_STOPPED.
5809
e7f0d979
YQ
58102013-12-11 Yao Qi <yao@codesourcery.com>
5811
5812 * notif.c (handle_notif_ack): Return 0 if no notification
5813 matches.
5814
ebcf782c
DE
58152013-11-20 Doug Evans <dje@google.com>
5816
5817 * linux-low.c (linux_set_resume_request): Fix comment.
5818
20ad9378
DE
58192013-11-20 Doug Evans <dje@google.com>
5820
5821 * linux-low.c (resume_status_pending_p): Tweak comment.
5822
a196ebeb
WT
58232013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5824
5825 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5826 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5827 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5828 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5829 (srv_amd64_regobj): Add amd64-mpx.o.
5830 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5831 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5832 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5833 * i387-fp.c (num_pl_bnd_register) Added constant.
5834 (num_pl_bnd_cfg_registers) Added constant.
5835 (struct i387_xsave) Added reserved area and MPX fields.
5836 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5837 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5838 function.
5839 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5840 (init_registers_amd64_mpx_linux): Declare new function.
5841 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5842 (x86_64_regmap): Add MPX registers.
5843 (x86_linux_read_description): Add MPX case.
5844 (initialize_low_arch): Initialize MPX targets.
5845
0080a2f6
TT
58462013-11-18 Tom Tromey <tromey@redhat.com>
5847
5848 * configure: Rebuild.
5849 * configure.ac: Don't check for stdlib.h.
5850 * gdbreplay.c: Unconditionally include stdlib.h.
5851
2978b111
TT
58522013-11-18 Tom Tromey <tromey@redhat.com>
5853
5854 * config.in: Rebuild.
5855 * configure: Rebuild.
5856 * configure.ac: Don't use AC_HEADER_DIRENT.
5857
a3d08894
TT
58582013-11-18 Tom Tromey <tromey@redhat.com>
5859
5860 * server.h: Don't check HAVE_STRING_H.
5861 * gdbreplay.c: Don't check HAVE_STRING_H.
5862 * configure: Rebuild.
5863
0a5dd17d
TT
58642013-11-18 Tom Tromey <tromey@redhat.com>
5865
5866 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5867 LIBGNU.
5868
1bd2f0ba
TT
58692013-11-08 Tom Tromey <tromey@redhat.com>
5870
5871 * configure, config.in: Rebuild.
5872 * configure.ac: Remove unused configury.
5873
3266f10b
TT
58742013-11-08 Tom Tromey <tromey@redhat.com>
5875
5876 * acinclude.m4: Include common.m4, codeset.m4.
5877 * configure, config.in: Rebuild.
5878 * configure.ac: Use GDB_AC_COMMON.
5879
6682d959
AA
58802013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5881
5882 * linux-s390-low.c (HWCAP_S390_TE): New define.
5883 (s390_arch_setup): Consider the TE field in the HWCAP for
5884 determining 'have_regset_tdb'.
5885
fd0a4d76
SDJ
58862013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5887
5888 PR gdb/16014
5889 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5890 call to sizeof.
5891
1a3d890b
PA
58922013-10-02 Pedro Alves <palves@redhat.com>
5893
5894 * server.c (process_serial_event): Don't output "GDBserver
5895 exiting" if GDB is connected through stdio.
5896 * target.c (mywait): Likewise, be silent if GDB is connected
5897 through stdio.
5898
97ad4581
JB
58992013-10-01 Joel Brobecker <brobecker@adacore.com>
5900
5901 * lynx-low.c (lynx_add_threads_after_attach): New function.
5902 (lynx_attach): Remove call to add_thread. Add call to
5903 lynx_add_threads_after_attach instead.
5904
5b4e221c
MF
59052013-09-28 Mike Frysinger <vapier@gentoo.org>
5906
5907 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5908 * config.in, configure: Regenerated.
5909
ee47b2f8
YQ
59102013-09-18 Yao Qi <yao@codesourcery.com>
5911
5912 PR server/15959
5913 * server.c (start_inferior): Clear 'resume_info'.
5914
d6707650 59152013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5916
d6707650
JW
5917 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5918 for each register.
5919
9243dd0e 59202013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5921
9243dd0e
JW
5922 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5923 linux-tile-low.o to srv_tgtobj.
5924
c623a6ef
WN
59252013-09-16 Will Newton <will.newton@linaro.org>
5926
5927 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5928 out regs.
5929
fb71d39e
PA
59302013-09-06 Pedro Alves <palves@redhat.com>
5931
5932 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5933 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5934 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5935 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5936 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5937 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5938
8e7e9910
PA
59392013-09-06 Pedro Alves <palves@redhat.com>
5940
5941 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5942 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5943
7c3a12ca
PA
59442013-09-06 Pedro Alves <palves@redhat.com>
5945
5946 * linux-amd64-ipa.c: Include tracepoint.h.
5947 * linux-i386-ipa.c: Include tracepoint.h.
5948
8eb3d7b6
RW
59492013-09-06 Ricard Wanderlof <ricardw@axis.com>
5950
5951 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5952 (ps_get_thread_area): New function.
5953
eddddb9d
RW
59542013-09-06 Ricard Wanderlof <ricardw@axis.com>
5955
5956 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5957 (initialize_low_arch): Call init_registers_crisv32 rather than
5958 init_register_crisv32.
5959
533b0600
PA
59602013-09-05 Pedro Alves <palves@redhat.com>
5961
5962 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5963 to ...
5964 * hostio.h: ... this new file.
5965 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5966 win32-low.c: Include hostio.h.
5967
0ce3d3b5
PA
59682013-09-05 Pedro Alves <palves@redhat.com>
5969
5970 * server.h (gdb_client_data, handler_func, callback_handler_func)
5971 (delete_file_handler, add_file_handler, append_callback_event)
5972 (delete_callback_event, start_event_loop, initialize_event_loop):
5973 Move to event-loop.h and include it.
5974 * event-loop.h: New file.
5975
799cdc37
PA
59762013-09-05 Pedro Alves <palves@redhat.com>
5977
5978 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5979 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5980 (loaded_dll, unloaded_dll): Move to ...
5981 * dll.h: ... this new file.
5982 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5983
6a6bbd9d
PA
59842013-09-05 Pedro Alves <palves@redhat.com>
5985
5986 * server.h (current_process, get_thread_process, all_processes)
5987 (add_inferior_to_list, for_each_inferior, current_inferior)
5988 (remove_inferior, add_process, remove_process, find_process_pid)
5989 (have_started_inferiors_p, have_attached_inferiors_p)
5990 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5991 (clear_inferiors, find_inferior, find_inferior_id)
5992 (inferior_target_data, set_inferior_target_data)
5993 (inferior_regcache_data, set_inferior_regcache_data): Move to
5994 inferiors.h, and include it.
5995 * inferiors.h: New file.
5996
f699aaba
PA
59972013-09-05 Pedro Alves <palves@redhat.com>
5998
5999 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6000 Move ...
72f4393d 6001 * ax.h: ... here.
f699aaba 6002
c144c7a0
PA
60032013-09-05 Pedro Alves <palves@redhat.com>
6004
6005 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6006 tracepoint.h.
6007 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6008 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6009 (handle_tracepoint_general_set, handle_tracepoint_query)
6010 (tracepoint_finished_step, tracepoint_was_hit)
6011 (release_while_stepping_state_list, current_traceframe)
6012 (in_readonly_region, traceframe_read_mem)
6013 (fetch_traceframe_registers, traceframe_read_sdata)
6014 (traceframe_read_info, struct fast_tpoint_collect_status)
6015 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6016 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6017 (supply_fast_tracepoint_registers)
6018 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6019 (ipa_tdesc, claim_trampoline_space)
6020 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6021 (agent_mem_read, agent_get_trace_state_variable_value)
6022 (agent_set_trace_state_variable_value, agent_tsv_read)
6023 (agent_mem_read_string, get_raw_reg_func_addr)
6024 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6025 * tracepoint.h: ... this new file.
6026
ff42e6ab
PA
60272013-09-05 Pedro Alves <palves@redhat.com>
6028
6029 * server.h (perror_with_name, error, fatal, warning, paddress)
6030 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6031 include it.
6032 * utils.h: New file.
6033
541af0f4
PA
60342013-09-05 Pedro Alves <palves@redhat.com>
6035
6036 * server.h (remote_debug, noack_mode, transport_is_reliable)
6037 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6038 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6039 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6040 (write_enn, initialize_async_io, enable_async_io)
6041 (disable_async_io, check_remote_input_interrupt_request)
6042 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6043 (dead_thread_notify, prepare_resume_reply)
6044 (decode_address_to_semicolon, decode_address, decode_m_packet)
6045 (decode_M_packet, decode_X_packet, decode_xfer_write)
6046 (decode_search_memory_packet, unhexify, hexify)
6047 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6048 (look_up_one_symbol, relocate_instruction)
6049 (monitor_output): Move to remote-utils.h, and include it.
6050 * remote-utils.h: New file.
6051
eebdf26b
PA
60522013-09-05 Pedro Alves <palves@redhat.com>
6053
6054 * server.h (_): Delete.
6055
3aafd2ff
PA
60562013-09-02 Pedro Alves <palves@redhat.com>
6057
6058 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6059 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6060 allocated.
6061 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6062
cee83bcb
PM
60632013-09-02 Pierre Muller <muller@sourceware.org>
6064
6065 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6066 or WriteProcessMemory complete successfully and handle
6067 ERROR_PARTIAL_COPY error.
6068
9a13b2fa
PA
60692013-09-02 Pedro Alves <palves@redhat.com>
6070
6071 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6072 error instead of EIO.
6073
602e3198
JK
60742013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6075
6076 PR server/15604
6077 * linux-low.c: Include filestuff.h.
6078 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6079 * lynx-low.c: Include filestuff.h.
6080 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6081 * server.c: Include filestuff.h.
6082 (main): Call notice_open_fds.
6083 * spu-low.c: Include filestuff.h.
6084 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6085
96d7229d
LM
60862013-08-22 Luis Machado <lgustavo@codesourcery.com>
6087
6088 * Makefile.in: Explain why ../target and ../nat are not
6089 listed as include file search paths.
6090 (linux-waitpid.o): New object file rule.
6091 * configure.srv (srv_native_linux_obj): New variable.
6092 Replace all occurrences of linux native object files with
6093 $srv_native_linux_obj.
6094 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6095 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6096 (linux_enable_event_reporting): Remove declaration.
6097 (my_waitpid): Moved to common/linux-waitpid.c.
6098 (linux_wait_for_event): Pass ptid when calling
6099 linux_enable_event_reporting.
6100 (linux_supports_tracefork_flag): Remove.
6101 (linux_enable_event_reporting): Likewise.
6102 (linux_tracefork_grandchild): Remove.
6103 (STACK_SIZE): Moved to common/linux-ptrace.c.
6104 (linux_tracefork_child): Remove.
6105 (linux_test_for_tracefork): Remove.
6106 (linux_look_up_symbols): Call linux_supports_traceclone.
6107 (initialize_low): Remove call to linux_test_for_tracefork.
6108 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6109 common/linux-ptrace.h.
6110 (PTRACE_TYPE_ARG4): Likewise.
6111 Include linux-ptrace.h.
6112
32940073
PA
61132013-08-21 Pedro Alves <palves@redhat.com>
6114
6115 * config.in: Renegerate.
6116
33b60d58 61172013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6118
33b60d58
LM
6119 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6120 (SFILES): Remove $(srcdir)/common/target-common.c and
6121 add $(srcdir)/target/waitstatus.c.
6122 (OBS): Remove target-common.o and add waitstatus.o.
6123 (server_h): Remove $(srcdir)/../common/target-common.h and
6124 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6125 and $(srcdir)/../target/waitstatus.h.
6126 (target-common.o): Remove.
6127 (waitstatus.o): New target object file.
6128 * target.h: Do not include target-common.h and
6129 include target/resume.h, target/wait.h and
6130 target/waitstatus.h.
6131
b8e1b30e
LM
61322013-08-13 Luis Machado <lgustavo@codesourcery.com>
6133
6134 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6135 to PTRACE_TYPE_ARG3.
6136 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6137 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6138 PTRACE_TYPE_ARG4.
6139 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6140 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6141
7a60ad40
YQ
61422013-07-27 Jie Zhang <jie@codesourcery.com>
6143 Daniel Jacobowitz <dan@codesourcery.com>
6144 Yao Qi <yao@codesourcery.com>
6145
6146 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6147 (mips-linux-watch.o): New rule.
6148 (mips_linux_watch_h): New variable.
6149 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6150 srv_tgtobj.
6151 * linux-mips-low.c: Include mips-linux-watch.h.
6152 (struct arch_process_info, struct arch_lwp_info): New.
6153 (update_watch_registers_callback): New function.
6154 (mips_linux_new_process, mips_linux_new_thread) New functions.
6155 (mips_linux_prepare_to_resume, mips_insert_point): New
6156 functions.
6157 (mips_remove_point, mips_stopped_by_watchpoint): New
6158 functions.
6159 (rsp_bp_type_to_target_hw_bp_type): New function.
6160 (mips_stopped_data_address): New function.
6161 (the_low_target): Add watchpoint support functions.
6162
de6f69ad
YQ
61632013-07-27 Yao Qi <yao@codesourcery.com>
6164
6165 * i386-low.c: Include break-common.h.
6166 (enum target_hw_bp_type): Remove.
6167
3360c0bf
LM
61682013-07-24 Luis Machado <lgustavo@codesourcery.com>
6169
6170 * Makefile.in (SFILES): /common/target-common.c.
6171 (OBS): Add target-common.o.
6172 (server_h): Add $(srcdir)/../common/target-common.h.
6173 (target-common.o): New target.
6174 * server.c (queue_stop_reply_callback): Free
6175 status string after use.
6176 * target.c (target_waitstatus_to_string): Remove.
6177 * target.h: Include target-common.h.
6178 (resume_kind): Likewise.
6179 (target_waitkind): Likewise.
6180 (target_waitstatus): Likewise.
6181 (TARGET_WNOHANG): Likewise.
6182
bd885420
YQ
61832013-07-04 Yao Qi <yao@codesourcery.com>
6184
6185 * Makefile.in (host_alias): Use @host_noncanonical@.
6186 (target_alias): Use @target_noncanonical@.
6187 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6188 ACX_NONCANONICAL_HOST.
6189 * configure: Regenerated.
6190
6191 Revert:
6192 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6193
6194 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6195 * configure: Rebuild.
6196 * Makefile.in (version_host, version_target): Get from configure.
6197 (version.c): Use $(version_host) and $(version_target).
6198
17ef446e
PA
61992013-07-03 Pedro Alves <palves@redhat.com>
6200
6201 * Makefile.in (config.status): Depend on development.sh.
6202 * acinclude.m4: Include libmcheck.m4.
6203 * configure: Regenerate.
6204
7a9a7487
MG
62052013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6206
6207 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6208 attribute inside the parentheses.
6209 (winapi_DebugSetProcessKillOnExit): Ditto.
6210 (winapi_DebugBreakProcess): Ditto.
6211 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6212
49b64de6
MG
62132013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6214
6215 * notif.h (notif_event): Add a dummy member to avoid compiler
6216 errors.
6217
d5749ee7
PA
62182013-07-01 Pedro Alves <palves@redhat.com>
6219
6220 * hostio.c (HOSTIO_PATH_MAX): Define.
6221 (require_filename, handle_open, handle_unlink, handle_readlink):
6222 Use it.
6223
d8d2a3ee
PA
62242013-07-01 Pedro Alves <palves@redhat.com>
6225
6226 * server.h: Include "pathmax.h".
6227 * linux-low.c: Don't include sys/param.h.
6228 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6229 MAXPATHLEN.
6230 * win32-low.c: Don't include sys/param.h.
6231 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6232
bc7dea8d
PA
62332013-07-01 Pedro Alves <palves@redhat.com>
6234
6235 * event-loop.c: Don't check HAVE_UNISTD_H before including
6236 <unistd.h>.
6237 * gdbreplay.c: Likewise.
6238 * remote-utils.c: Likewise.
6239 * server.c: Likewise.
6240 * configure.ac: Don't check for unistd.h.
6241 * configure: Regenerate.
6242
d6c2da54
TT
62432013-06-28 Tom Tromey <tromey@redhat.com>
6244
6245 * Makefile.in (version.c): Use version.in, not
6246 common/version.in.
6247
257b6bec
MG
62482013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6249
6250 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6251 * configure: Rebuild.
6252 * Makefile.in (version_host, version_target): Get from configure.
6253 (version.c): Use $(version_host) and $(version_target).
6254
86ebe149
DK
62552013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6256
6257 Fix trace-status to output user name without trailing colon.
6258 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6259
f30aa5af
DK
62602013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6261
6262 Fix trace-status to output proper start-time and stop-time.
6263 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6264 output start time and stop time in hex as gdb expects.
6265
28a93511
YQ
62662013-06-26 Pedro Alves <pedro@codesourcery.com>
6267
6268 * tracepoint.c (build_traceframe_info_xml): Output trace state
6269 variables present in the trace buffer.
6270
01208463
TT
62712013-06-24 Tom Tromey <tromey@redhat.com>
6272
6273 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6274 create-version.sh.
6275 (version.o): Remove.
6276 * gdbreplay.c: Include version.h.
6277 (version, host_name): Don't declare.
6278 * server.h: Include version.h.
6279 (version, host_name): Don't declare.
6280
760256f9
PA
62812013-06-12 Pedro Alves <palves@redhat.com>
6282
6283 * linux-x86-low.c (linux_is_elf64): Delete global.
6284 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6285 with local linux_pid_exe_is_elf_64_file use.
6286
030031ee
PA
62872013-06-11 Pedro Alves <palves@redhat.com>
6288
6289 * linux-low.c (regset_disabled, disable_regset): New functions.
6290 (regsets_fetch_inferior_registers)
6291 (regsets_store_inferior_registers): Use them.
6292 (initialize_regsets_info); Don't allocate the disabled_regsets
6293 array here.
6294 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6295 comment.
6296
5da6eb0a
PA
62972013-06-11 Pedro Alves <palves@redhat.com>
6298
6299 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6300 xmalloc.
6301
7e5aaa09
PA
63022013-06-11 Pedro Alves <palves@redhat.com>
6303
6304 * linux-x86-low.c (initialize_low_arch): Call
6305 init_registers_x32_avx_linux.
6306
d878444c
JK
63072013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6308
6309 Fix compatibility with Android Bionic.
6310 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6311 it is not empty.
6312
3aee8918
PA
63132013-06-07 Pedro Alves <palves@redhat.com>
6314
5f2b57b5 6315 PR server/14823
3aee8918
PA
6316 * Makefile.in (OBS): Add tdesc.o.
6317 (IPA_OBJS): Add tdesc-ipa.o.
6318 (tdesc-ipa.o): New rule.
6319 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6320 interface.
6321 * linux-low.c (new_inferior): Delete.
6322 (disabled_regsets, num_regsets): Delete.
6323 (linux_add_process): Adjust to set the new per-process
6324 new_inferior flag.
6325 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6326 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6327 was a stop. When calling arch_setup, switch the current inferior
6328 to the thread that got an event.
6329 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6330 (regsets_fetch_inferior_registers)
6331 (regsets_store_inferior_registers): New regsets_info parameter.
6332 Adjust to use it.
6333 (linux_register_in_regsets): New regs_info parameter. Adjust to
6334 use it.
6335 (register_addr, fetch_register, store_register): New usrregs_info
6336 parameter. Adjust to use it.
6337 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6338 parameter regs_info. Adjust to use it.
6339 (linux_fetch_registers): Get the current inferior's regs_info, and
6340 adjust to use it.
6341 (linux_store_registers): Ditto.
6342 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6343 (initialize_low): Don't initialize the target_regsets here. Call
6344 initialize_low_arch.
6345 * linux-low.h (target_regsets): Delete declaration.
6346 (struct regsets_info): New.
6347 (struct usrregs_info): New.
6348 (struct regs_info): New.
6349 (struct process_info_private) <new_inferior>: New field.
6350 (struct linux_target_ops): Delete the num_regs, regmap, and
6351 regset_bitmap fields. New field regs_info.
6352 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6353 * i387-fp.c (num_xmm_registers): Delete.
6354 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6355 calls to new interface.
6356 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6357 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6358 Infer the number of xmm registers from the regcache's target
6359 description.
6360 * i387-fp.h (num_xmm_registers): Delete.
6361 * inferiors.c (add_thread): Don't install the thread's regcache
6362 here.
6363 * proc-service.c (gregset_info): Fetch the current inferior's
6364 regs_info. Adjust to use it.
6365 * regcache.c: Include tdesc.h.
6366 (register_bytes, reg_defs, num_registers)
6367 (gdbserver_expedite_regs): Delete.
6368 (get_thread_regcache): If the thread doesn't have a regcache yet,
6369 create one, instead of aborting gdbserver.
6370 (regcache_invalidate_one): Rename to ...
6371 (regcache_invalidate_thread): ... this.
6372 (regcache_invalidate_one): New.
6373 (regcache_invalidate): Only invalidate registers of the current
6374 process.
6375 (init_register_cache): Add target_desc parameter, and use it.
6376 (new_register_cache): Ditto. Assert the target description has a
6377 non zero registers_size.
6378 (regcache_cpy): Add assertions. Adjust.
6379 (realloc_register_cache, set_register_cache): Delete.
6380 (registers_to_string, registers_from_string): Adjust.
6381 (find_register_by_name, find_regno, find_register_by_number)
6382 (register_cache_size): Add target_desc parameter, and use it.
6383 (free_register_cache_thread, free_register_cache_thread_one)
6384 (regcache_release, register_cache_size): New.
6385 (register_size): Add target_desc parameter, and use it.
6386 (register_data, supply_register, supply_register_zeroed)
6387 (supply_regblock, supply_register_by_name, collect_register)
6388 (collect_register_as_string, collect_register_by_name): Adjust.
6389 * regcache.h (struct target_desc): Forward declare.
6390 (struct regcache) <tdesc>: New field.
6391 (init_register_cache, new_register_cache): Add target_desc
6392 parameter.
6393 (regcache_invalidate_thread): Declare.
6394 (regcache_invalidate_one): Delete declaration.
6395 (regcache_release): Declare.
6396 (find_register_by_number, register_cache_size, register_size)
6397 (find_regno): Add target_desc parameter.
6398 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6399 declarations.
6400 * remote-utils.c: Include tdesc.h.
6401 (outreg, prepare_resume_reply): Adjust.
6402 * server.c: Include tdesc.h.
6403 (gdbserver_xmltarget): Delete declaration.
6404 (get_features_xml, process_serial_event): Adjust.
6405 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6406 declare.
6407 (struct process_info) <tdesc>: New field.
6408 (ipa_tdesc): Declare.
6409 * tdesc.c: New file.
6410 * tdesc.h: New file.
6411 * tracepoint.c: Include tdesc.h.
6412 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6413 (get_context_regcache): Adjust to pass ipa_tdesc down.
6414 (do_action_at_tracepoint): Adjust to get the register cache size
6415 from the context regcache's description.
6416 (traceframe_walk_blocks): Adjust to get the register cache size
6417 from the current trace frame's description.
6418 (traceframe_get_pc): Adjust to get current trace frame's
6419 description and pass it down.
6420 (gdb_collect): Adjust to get the register cache size from the
6421 IPA's description.
6422 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6423 (gdbserver_xmltarget): Delete.
6424 (initialize_low_tracepoint): Set the ipa's target description.
6425 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6426 (initialize_low_tracepoint): Set the ipa's target description.
6427 * linux-x86-low.c: Include tdesc.h.
6428 [__x86_64__] (is_64bit_tdesc): New.
6429 (ps_get_thread_area, x86_get_thread_area): Use it.
6430 (i386_cannot_store_register): Rename to ...
6431 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6432 (i386_cannot_fetch_register): Rename to ...
6433 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6434 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6435 to new interface.
6436 (target_regsets): Rename to ...
6437 (x86_regsets): ... this.
6438 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6439 interface.
6440 (x86_siginfo_fixup): Use is_64bit_tdesc.
6441 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6442 (tdesc_x32_avx_linux, tdesc_x32_linux)
6443 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6444 Declare.
6445 (x86_linux_update_xmltarget): Delete.
6446 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6447 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6448 (AMD64_LINUX_USER64_CS): New.
6449 (x86_linux_read_description): New, based on
6450 x86_linux_update_xmltarget.
6451 (same_process_callback): New.
6452 (x86_arch_setup_process_callback): New.
6453 (x86_linux_update_xmltarget): New.
6454 (x86_regsets_info): New.
6455 (amd64_linux_regs_info): New.
6456 (i386_linux_usrregs_info): New.
6457 (i386_linux_regs_info): New.
6458 (x86_linux_regs_info): New.
6459 (x86_arch_setup): Reimplement.
6460 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6461 (x86_emit_ops): Ditto.
6462 (the_low_target): Adjust. Install x86_linux_regs_info,
6463 x86_cannot_fetch_register, and x86_cannot_store_register.
6464 (initialize_low_arch): New.
6465 * linux-ia64-low.c (tdesc_ia64): Declare.
6466 (ia64_fetch_register): Adjust.
6467 (ia64_usrregs_info, regs_info): New globals.
6468 (ia64_regs_info): New function.
6469 (the_low_target): Adjust.
6470 (initialize_low_arch): New function.
6471 * linux-sparc-low.c (tdesc_sparc64): Declare.
6472 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6473 Adjust.
6474 (sparc_arch_setup): New function.
6475 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6476 (the_low_target): Adjust.
6477 (initialize_low_arch): New function.
6478 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6479 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6480 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6481 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6482 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6483 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6484 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6485 (tdesc_powerpc_isa205_vsx64l): Declare.
6486 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6487 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6488 (ppc_set_pc, ppc_get_hwcap): Adjust.
6489 (ppc_usrregs_info): Forward declare.
6490 (!__powerpc64__) ppc_regmap_adjusted: New global.
6491 (ppc_arch_setup): Adjust to the current process'es target
6492 description.
6493 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6494 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6495 (ppc_store_evrregset): Adjust.
6496 (target_regsets): Rename to ...
6497 (ppc_regsets): ... this, and make static.
6498 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6499 (ppc_regs_info): New function.
6500 (the_low_target): Adjust.
6501 (initialize_low_arch): New function.
6502 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6503 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6504 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6505 (tdesc_s390x_linux64v2): Declare.
6506 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6507 (s390_fill_gregset, s390_store_last_break): Adjust.
6508 (target_regsets): Rename to ...
6509 (s390_regsets): ... this, and make static.
6510 (s390_get_pc, s390_set_pc): Adjust.
6511 (s390_get_hwcap): New target_desc parameter, and use it.
6512 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6513 (s390_arch_setup): Adjust to set the current process'es target
6514 description. Don't adjust the regmap.
6515 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6516 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6517 (regs_info_3264): New globals.
6518 (s390_regs_info): New function.
6519 (the_low_target): Adjust.
6520 (initialize_low_arch): New function.
6521 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6522 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6523 [__mips64] (init_registers_mips_linux)
6524 (init_registers_mips_dsp_linux): Delete defines.
6525 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6526 (have_dsp): New global.
6527 (mips_read_description): New, based on mips_arch_setup.
6528 (mips_arch_setup): Reimplement.
6529 (get_usrregs_info): New function.
6530 (mips_cannot_fetch_register, mips_cannot_store_register)
6531 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6532 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6533 (target_regsets): Rename to ...
6534 (mips_regsets): ... this, and make static.
6535 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6536 (dsp_regs_info, regs_info): New globals.
6537 (mips_regs_info): New function.
6538 (the_low_target): Adjust.
6539 (initialize_low_arch): New function.
6540 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6541 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6542 Declare.
6543 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6544 (arm_read_description): New, with bits factored from
6545 arm_arch_setup.
6546 (arm_arch_setup): Reimplement.
6547 (target_regsets): Rename to ...
6548 (arm_regsets): ... this, and make static.
6549 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6550 (arm_regs_info): New function.
6551 (the_low_target): Adjust.
6552 (initialize_low_arch): New function.
6553 * linux-m68k-low.c (tdesc_m68k): Declare.
6554 (target_regsets): Rename to ...
6555 (m68k_regsets): ... this, and make static.
6556 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6557 (m68k_regs_info): New function.
6558 (m68k_arch_setup): New function.
6559 (the_low_target): Adjust.
6560 (initialize_low_arch): New function.
6561 * linux-sh-low.c (tdesc_sharch): Declare.
6562 (target_regsets): Rename to ...
6563 (sh_regsets): ... this, and make static.
6564 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6565 (sh_regs_info, sh_arch_setup): New functions.
6566 (the_low_target): Adjust.
6567 (initialize_low_arch): New function.
6568 * linux-bfin-low.c (tdesc_bfin): Declare.
6569 (bfin_arch_setup): New function.
6570 (bfin_usrregs_info, regs_info): New globals.
6571 (bfin_regs_info): New function.
6572 (the_low_target): Adjust.
6573 (initialize_low_arch): New function.
6574 * linux-cris-low.c (tdesc_cris): Declare.
6575 (cris_arch_setup): New function.
6576 (cris_usrregs_info, regs_info): New globals.
6577 (cris_regs_info): New function.
6578 (the_low_target): Adjust.
6579 (initialize_low_arch): New function.
6580 * linux-cris-low.c (tdesc_crisv32): Declare.
6581 (cris_arch_setup): New function.
6582 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6583 (cris_regs_info): New function.
6584 (the_low_target): Adjust.
6585 (initialize_low_arch): New function.
6586 * linux-m32r-low.c (tdesc_m32r): Declare.
6587 (m32r_arch_setup): New function.
6588 (m32r_usrregs_info, regs_info): New globals.
6589 (m32r_regs_info): Adjust.
6590 (initialize_low_arch): New function.
6591 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6592 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6593 (tic6x_usrregs_info): Forward declare.
6594 (tic6x_read_description): New function, based on ...
6595 (tic6x_arch_setup): ... this. Reimplement.
6596 (target_regsets): Rename to ...
6597 (tic6x_regsets): ... this, and make static.
6598 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6599 (tic6x_regs_info): New function.
6600 (the_low_target): Adjust.
6601 (initialize_low_arch): New function.
6602 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6603 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6604 (target_regsets): Rename to ...
6605 (xtensa_regsets): ... this, and make static.
6606 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6607 globals.
6608 (xtensa_arch_setup, xtensa_regs_info): New functions.
6609 (the_low_target): Adjust.
6610 (initialize_low_arch): New function.
6611 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6612 (nios2_arch_setup): Set the current process'es tdesc.
6613 (target_regsets): Rename to ...
6614 (nios2_regsets): ... this.
6615 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6616 (nios2_regs_info): New function.
6617 (the_low_target): Adjust.
6618 (initialize_low_arch): New function.
a261b8f5
PA
6619 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6620 (aarch64_arch_setup): Set the current process'es tdesc.
6621 (target_regsets): Rename to ...
6622 (aarch64_regsets): ... this.
6623 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6624 (aarch64_regs_info): New function.
6625 (the_low_target): Adjust.
6626 (initialize_low_arch): New function.
3aee8918
PA
6627 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6628 globals.
6629 (target_regsets): Rename to ...
6630 (tile_regsets): ... this.
6631 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6632 (tile_regs_info): New function.
6633 (tile_arch_setup): Set the current process'es tdesc.
6634 (the_low_target): Adjust.
6635 (initialize_low_arch): New function.
6636 * spu-low.c (tdesc_spu): Declare.
6637 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6638 * win32-arm-low.c (tdesc_arm): Declare.
6639 (arm_arch_setup): New function.
6640 (the_low_target): Install arm_arch_setup instead of
6641 init_registers_arm.
6642 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6643 (init_windows_x86): Rename to ...
6644 (i386_arch_setup): ... this. Set `win32_tdesc'.
6645 (the_low_target): Adjust.
6646 * win32-low.c (win32_tdesc): New global.
6647 (child_add_thread): Don't create the thread cache here.
6648 (do_initial_child_stuff): Set the new process'es tdesc.
6649 * win32-low.h (struct target_desc): Forward declare.
6650 (win32_tdesc): Declare.
6651 * lynx-i386-low.c (tdesc_i386): Declare global.
6652 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6653 * lynx-low.c (lynx_tdesc): New global.
6654 (lynx_add_process): Set the new process'es tdesc.
6655 * lynx-low.h (struct target_desc): Forward declare.
6656 (lynx_tdesc): Declare global.
6657 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6658 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6659 * nto-low.c (nto_tdesc): New global.
6660 (do_attach): Set the new process'es tdesc.
6661 * nto-low.h (struct target_desc): Forward declare.
6662 (nto_tdesc): Declare.
6663 * nto-x86-low.c (tdesc_i386): Declare.
6664 (nto_x86_arch_setup): Set `nto_tdesc'.
6665
b1fbec62
GB
66662013-06-04 Gary Benson <gbenson@redhat.com>
6667
6668 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6669 to qSupported response when appropriate.
6670 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6671 with nonzero-length annex.
6672 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6673 arguments supplied in annex.
6674
d1ec4ce7
DE
66752013-05-31 Doug Evans <dje@google.com>
6676
ac44adcb 6677 PR server/15594
d1ec4ce7
DE
6678 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6679 64 bits in 64-cross-32 environment.
6680
9b25f2d3
PA
66812013-05-28 Pedro Alves <palves@redhat.com>
6682
6683 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6684 (aarch64-without-fpu.c): Delete rule.
6685 * configure.srv (aarch64*-*-linux*): Remove references to
6686 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6687 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6688 declaration.
6689
6740dc9c
PA
66902013-05-24 Pedro Alves <palves@redhat.com>
6691
6692 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6693 instead of strchr/decode_address. Error if the range isn't split
6694 with a ','. Don't assume there's be a ':' in the action.
6695
c2d6af84
PA
66962013-05-23 Yao Qi <yao@codesourcery.com>
6697 Pedro Alves <palves@redhat.com>
6698
6699 * linux-low.c (lwp_in_step_range): New function.
6700 (linux_wait_1): If the thread was range stepping and stopped
6701 outside the stepping range, report the stop to GDB. Otherwise,
6702 continue stepping. Add range stepping debug output.
6703 (linux_set_resume_request): Copy the step range from the resume
6704 request to the lwp.
6705 (linux_supports_range_stepping): New.
6706 (linux_target_ops) <supports_range_stepping>: Set to
6707 linux_supports_range_stepping.
6708 * linux-low.h (struct linux_target_ops)
6709 <supports_range_stepping>: New field.
6710 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6711 * linux-x86-low.c (x86_supports_range_stepping): New.
6712 (the_low_target) <supports_range_stepping>: Set to
6713 x86_supports_range_stepping.
6714 * server.c (handle_v_cont): Handle 'r' action.
6715 (handle_v_requests): Append ";r" if the target supports range
6716 stepping.
6717 * target.h (struct thread_resume) <step_range_start,
6718 step_range_end>: New fields.
6719 (struct target_ops) <supports_range_stepping>:
6720 New field.
6721 (target_supports_range_stepping): New macro.
6722
58794e1a
JB
67232013-05-17 Joel Brobecker <brobecker@adacore.com>
6724
6725 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6726 confusion in comment.
6727
d631c5a7
JB
67282013-05-17 Joel Brobecker <brobecker@adacore.com>
6729
6730 * lynx-low.c (struct process_info_private): New type.
6731 (lynx_add_process): New function.
6732 (lynx_create_inferior, lynx_attach): Replace calls to
6733 add_process by calls to lynx_add_process.
6734 (lynx_resume): If PTID is null, then try using
6735 current_process()->private->last_wait_event_ptid.
6736 Add comments.
6737 (lynx_clear_inferiors): Delete. The contents of that function
6738 has been inlined in lynx_mourn;
6739 (lynx_wait_1): Save the ptid in the process's private data.
6740 (lynx_mourn): Free the process' private data. Replace call
6741 to lynx_clear_inferiors by call to clear_inferiors.
6742
96f7a20f
YQ
67432013-05-17 Yao Qi <yao@codesourcery.com>
6744
6745 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6746 the right place.
6747
db0dfaa0
LM
67482013-05-16 Luis Machado <lgustavo@codesourcery.com>
6749
6750 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6751 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6752 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6753 PT_TEXT_END_ADDR guards. Update comments.
6754 (linux_target_op) <read_offsets>: Conditionally define to
6755 linux_read_offsets if the target is UCLIBC and if it defines
6756 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6757
68f5f838
SL
67582013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6759 Andrew Jenner <andrew@codesourcery.com>
6760
6761 * Makefile.in (SFILES): Add linux-nios2-low.c.
6762 (clean): Add action to delete nios2-linux.c.
6763 (nios2-linux.c): New rule.
6764 * configure.srv: Add nios2*-*-linux*.
6765 * linux-nios2-low.c: New.
6766
1ebff1fd
HAQ
67672013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6768
6769 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6770
f6150862
HZ
67712013-04-25 Hui Zhu <hui@codesourcery.com>
6772
6773 PR gdb/15186
f6150862
HZ
6774 * ax.c (ax_printf): Add fflush.
6775
614c279d
TT
67762013-04-22 Tom Tromey <tromey@redhat.com>
6777
6778 * Makefile.in (SFILES): Add filestuff.c.
6779 (OBS): Add filestuff.o.
6780 (filestuff.o): New target.
6781 * config.in, configure: Rebuild.
6782 * configure.ac: Check for fdwalk, pipe2.
6783
7d4e5717
PA
67842013-04-17 Pedro Alves <palves@redhat.com>
6785
6786 * configure.ac (USE_THREAD_DB): Delete variable.
6787 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6788 Don't AC_SUBST USE_THREAD_DB.
6789 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6790 * config.in, configure: Regenerate.
6791
d5c93e41
PA
67922013-04-16 Pedro Alves <palves@redhat.com>
6793
6794 * linux-low.h (struct lwp_info) <thread_known>: Move under
6795 the USE_THREAD_DB #ifdef.
6796
04f5fe89
PA
67972013-04-16 Pedro Alves <palves@redhat.com>
6798
6799 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6800 (linux-low.o): Delete rule.
6801 * linux-low.h: Always include "gdb_thread_db.h" instead of
6802 conditionally including thread_db.h.
6803 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6804 HAVE_THREAD_DB_H.
6805
480b27bf
JK
68062013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6807
6808 * Makefile.in (install-only): Fix make install regression.
6809
43662968
JK
68102013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6811
6812 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6813 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6814 installation.
6815 * gdbserver.1: Remove.
6816
3e74e146
PA
68172013-03-22 Pedro Alves <palves@redhat.com>
6818
6819 * linux-low.c (handle_extended_wait): Don't call
6820 linux_enable_event_reporting.
6821
a8347a2a
TT
68222013-03-15 Tony Theodore <tonyt@logyst.com>
6823
6824 PR build/9098:
6825 * Makefile.in (SHELL): Use @SHELL@.
6826
eeb56fa7
SDJ
68272013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6828
6829 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6830 compiler warning.
6831
4fa7e2ff
JB
68322013-03-13 Joel Brobecker <brobecker@adacore.com>
6833
6834 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6835 Remove extraneous NULL element.
6836
8ddb1965
YQ
68372013-03-13 Yao Qi <yao@codesourcery.com>
6838
6839 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6840 'V' block in trace frame.
6841
9accd112
MM
68422013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6843
6844 * target.h (struct target_ops): Add btrace ops.
6845 (target_supports_btrace): New macro.
6846 (target_enable_btrace): New macro.
6847 (target_disable_btrace): New macro.
6848 (target_read_btrace): New macro.
6849 * gdbthread.h (struct thread_info): Add btrace field.
6850 * server.c: Include btrace-common.h.
6851 (handle_btrace_general_set): New function.
6852 (handle_btrace_enable): New function.
6853 (handle_btrace_disable): New function.
6854 (handle_general_set): Call handle_btrace_general_set.
6855 (handle_qxfer_btrace): New function.
6856 (struct qxfer qxfer_packets[]): Add btrace entry.
6857 * inferiors.c (remove_thread): Disable btrace.
6858 * linux-low: Include linux-btrace.h.
6859 (linux_low_enable_btrace): New function.
6860 (linux_low_read_btrace): New function.
6861 (linux_target_ops): Add btrace ops.
6862 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6863 Add srv_linux_btrace=yes.
6864 (x86_64-*-linux*): Add linux-btrace.o.
6865 Add srv_linux_btrace=yes.
6866 * configure.ac: Define HAVE_LINUX_BTRACE.
6867 * config.in: Regenerated.
6868 * configure: Regenerated.
6869
5cc22e4c
MM
68702013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6871
6872 * server.c (handle_qxfer): Preserve error message if -3 is
6873 returned.
6874 (qxfer): Document the -3 return value.
6875
7c97f91e
MM
68762013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6877
6878 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6879 (linux_btrace_h): New variable.
6880 (linux-btrace.o): New rule.
6881
be9a119c 68822013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
6883 Hafiz Abid Qadeer <abidh@codesourcery.com>
6884
6885 * tracepoint.c (trace_buffer_size): New global.
6886 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6887 (init_trace_buffer): Change to one-argument function. Allocate
6888 trace buffer memory.
6889 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6890 handle QTBuffer:size packet.
6891 (cmd_bigqtbuffer_size): New function.
6892 (initialize_tracepoint): Call init_trace_buffer with
6893 DEFAULT_TRACE_BUFFER_SIZE.
6894 * server.c (handle_query): Add QTBuffer:size in the
6895 supported packets.
6896
e64f7499
YQ
68972013-03-07 Yao Qi <yao@codesourcery.com>
6898
6899 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6900 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6901 of -1.
6902 (cmd_qtsp): Adjust condition. Do post increment.
6903 Set cur_action and cur_step_action back to 0.
6904
f0ae6fc3
PA
69052013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6906
6907 PR server/15236
6908 * linux-low.c (linux_write_memory): Return early success if LEN is
6909 zero.
6910
b5b0b0af
CV
69112013-03-05 Corinna Vinschen <vinschen@redhat.de>
6912
334ad4a8 6913 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 6914
589bc927
TT
69152013-02-28 Tom Tromey <tromey@redhat.com>
6916
6917 * configure.ac: Invoke AC_SYS_LARGEFILE.
6918 * configure, config.in: Rebuild.
6919
dfe07582
CV
69202013-02-28 Corinna Vinschen <vinschen@redhat.com>
6921
6922 * win32-low.c: Throughout, fix format strings and casts of
6923 printf-like functions to avoid type related warnings on all
6924 platforms.
6925 (get_child_debug_event): Print dwDebugEventCode as hex since
6926 that's how it's usually documented.
6927
736cd585
YQ
69282013-02-28 Yao Qi <yao@codesourcery.com>
6929
6930 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6931 pulongest.
6932
e1f58301
JW
69332013-02-27 Jiong Wang <jiwang@tilera.com>
6934
6935 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6936 (reg-tilegx32.c): New rule.
6937 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6938 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6939 different register info initializer according to elf class.
6940 (init_registers_tilgx32): New function. The tilegx32 register info
6941 initializer.
6942 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6943 (tile_store_gregset): Likewise.
6944
d171ca78
YQ
69452013-02-27 Yao Qi <yao@codesourcery.com>
6946
6947 * server.c (process_point_options): Print debug message when
6948 debug_threads is true.
6949
282bbdf3
YQ
69502013-02-26 Yao Qi <yao@codesourcery.com>
6951
6952 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6953
aca22551
PA
69542013-02-19 Pedro Alves <palves@redhat.com>
6955 Kai Tietz <ktietz@redhat.com>
6956
6957 PR gdb/15161
6958
6959 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6960 instead of strtoul to extract address from packet.
6961 (process_serial_event) <'z'>: Likewise.
6962
4f3cee1c
YQ
69632013-02-18 Yao Qi <yao@codesourcery.com>
6964
6965 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6966
8e1d55a3
PA
69672013-02-14 Pedro Alves <palves@redhat.com>
6968
6969 Plug memory leak.
6970
6971 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6972 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6973
458820da
PA
69742013-02-14 Pedro Alves <palves@redhat.com>
6975
6976 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6977
baea0dae
PA
69782013-02-14 Pedro Alves <palves@redhat.com>
6979
6980 * tracepoint.c (save_string): Delete.
6981 (add_tracepoint_action): Use savestring instead of save_string.
6982
0b1afbb3
PA
69832013-02-12 Pedro Alves <palves@redhat.com>
6984
6985 * linux-xtensa-low.c: Ditto.
6986 * xtensa-xtregs.c: Ditto.
6987
8a4ac37e
PA
69882013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6989
6990 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6991 thread_db.
6992
148de6bb
MS
69932013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6994
6995 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6996 aarch64_num_wp_regs and aarch64_num_bp_regs to
6997 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6998
55fac6e0
MS
69992013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7000
7001 * linux-aarch64-low.c (ps_get_thread_area): Replace
7002 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7003
176eb98c
MS
70042013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7005 Marcus Shawcroft <marcus.shawcroft@arm.com>
7006 Nigel Stephens <nigel.stephens@arm.com>
7007 Yufeng Zhang <yufeng.zhang@arm.com>
7008
7009 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7010 (aarch64.c, aarch64-without-fpu.c): New targets.
7011 * configure.srv (aarch64*-*-linux*): New.
7012 * linux-aarch64-low.c: New file.
7013
56f7af9c
MS
70142013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7015
43aaf8b6 7016 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7017 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7018 (dequeue_one_deferred_signal, linux_resume_one_thread)
7019 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7020 (linux_tracefork_grandchild, linux_test_for_tracefork)
7021 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7022 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7023 where the argument is 0.
7024
60f662b0
YQ
70252013-01-25 Yao Qi <yao@codesourcery.com>
7026
7027 * event-loop.c: Include "queue.h".
7028 (gdb_event_p): New typedef.
7029 (struct gdb_event) <next_event>: Remove.
7030 (event_queue): Change to QUEUE(gdb_event_p).
7031 (async_queue_event): Remove.
7032 (gdb_event_xfree): New.
7033 (initialize_event_loop): New.
7034 (process_event): Use API from QUEUE.
7035 (wait_for_event): Likewise.
7036 * server.c (main): Call initialize_event_loop.
7037 * server.h (initialize_event_loop): Declare.
7038
5ae4861a
YQ
70392013-01-18 Yao Qi <yao@codesourcery.com>
7040
7041 * ax.h (struct eval_agent_expr_context): New.
7042 (gdb_eval_agent_expr): Update declaration.
7043 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7044 TFRAME. Add new argument CTX.
7045 * server.h (struct eval_agent_expr_context): Declare.
7046 (agent_mem_read, agent_tsv_read): Update declaration.
7047 (agent_mem_read_string): Likewise.
7048 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7049 (add_traceframe_block): Add new argument TPOINT.
7050 Increase TPOINT->traceframe_usage.
7051 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7052 eval_tracepoint_agent_expr.
7053 (condition_true_at_tracepoint): Likewise.
7054 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7055 (agent_mem_read_string, agent_tsv_read): Likewise.
7056
85e00e85
YQ
70572013-01-16 Yao Qi <yao@codesourcery.com>
7058
7059 * linux-low.c (linux_resume_one_lwp): Don't check
7060 'lwp->bp_reinsert != 0'.
7061
4039cf45
JB
70622013-01-07 Joel Brobecker <brobecker@adacore.com>
7063 Pedro Alves <palves@redhat.com>
7064
7065 * lynx-low.c (ptrace_request_to_str): Define a temporary
7066 macro and use it to simplify this function's implementation.
7067
9044dee2
JB
70682013-01-07 Joel Brobecker <brobecker@adacore.com>
7069
7070 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7071 sets errno.
7072
e6352c8f
JB
70732013-01-07 Joel Brobecker <brobecker@adacore.com>
7074
7075 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7076
50681a27
JB
70772013-01-07 Joel Brobecker <brobecker@adacore.com>
7078
7079 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7080
3f6e77ef
JB
70812013-01-07 Joel Brobecker <brobecker@adacore.com>
7082
7083 * lynx-low.c (lynx_resume): Use the resume_info parameter
7084 to determine the ptid for the lynx_ptrace call, unless
7085 it is equal to minus_one_ptid, in which case we use the
7086 ptid of the current_inferior.
7087 (lynx_wait_1): After having received a thread create/exit
7088 event, resume the inferior's execution using the signaling
7089 thread's ptid, rather than the old ptid.
7090
7fda33ae
JB
70912013-01-07 Joel Brobecker <brobecker@adacore.com>
7092
7093 * lynx-low.c (lynx_resume): Delete variable ret.
7094
b9786c74
JB
70952013-01-01 Joel Brobecker <brobecker@adacore.com>
7096
7097 * gdbreplay.c (gdbreplay_version): Update copyright year.
7098 * server.c (gdbserver_version): Likewise.
7099
8b93d60f
JB
71002012-12-17 Joel Brobecker <brobecker@adacore.com>
7101
7102 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7103 new thread.
7104
037335a7
JB
71052012-12-17 Joel Brobecker <brobecker@adacore.com>
7106
7107 * lynx-low.c (ptrace_request_to_str): Add handling for
7108 PTRACE_GETTRACESIG.
7109
52d4cbd8
JB
71102012-12-17 Joel Brobecker <brobecker@adacore.com>
7111
7112 * lynx-low.c (lynx_attach): Delete variable new_process.
7113
ab8f6ca9
JB
71142012-12-17 Joel Brobecker <brobecker@adacore.com>
7115
7116 * lynx-low.c (lynx_create_inferior): Delete variable
7117 new_process.
7118
78cbc024
JB
71192012-12-17 Joel Brobecker <brobecker@adacore.com>
7120
7121 * lynx-low.c (ptrace_request_to_str): Do not handle
7122 PTRACE_GETTHREADLIST if this macro does not exist.
7123
14a00470
YQ
71242012-12-15 Yao Qi <yao@codesourcery.com>
7125
7126 * Makefile.in (OBS): Add notif.o.
7127 * notif.c, notif.h: New.
7128 * server.c: Include "notif.h".
7129 (struct vstop_notif) <next>: Remove.
7130 <base>: New field.
7131 (queue_stop_reply): Update.
7132 (push_event, send_next_stop_reply): Remove.
7133 (discard_queued_stop_replies): Update.
7134 (notif_stop): New variable.
7135 (handle_v_stopped): Remove.
7136 (handle_v_requests): Don't call handle_v_stopped. Call
7137 handle_ack_notif instead.
7138 (queue_stop_reply_callback): Call notif_event_enque instead
7139 of queue_stop_reply.
7140 (handle_status): Don't call send_next_stop_reply, call
7141 notif_write_event instead.
7142 (kill_inferior_callback): Likewise.
7143 (detach_or_kill_inferior_callback): Likewise.
7144 (main): Call initialize_notif.
7145 (process_serial_event): Call QUEUE_is_empty.
7146 (handle_target_event): Call notif_push instead of push event.
7147 * server.h (push_event): Remove declaration.
7148
61c125b9
TT
71492012-12-10 Tom Tromey <tromey@redhat.com>
7150
7151 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7152 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7153 macros.
7154 (.c.o): Rewrite.
7155 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7156 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7157 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7158 (amd64-linux-ipa.o, ax.o): Rewrite.
7159 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7160 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7161 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7162 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7163 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7164 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7165 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7166 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7167 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7168 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7169 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7170 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7171 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7172 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7173 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7174 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7175 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7176 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7177 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7178 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7179 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7180 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7181 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7182 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7183 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7184 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7185 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7186 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7187 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7188 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7189 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7190 (reg-tilegx.o): Remove.
7191 (all_object_files): New macro.
7192 Include .deps files.
7193 * aclocal.m4, configure: Rebuild.
7194 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7195 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7196 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7197
e90e9ad9
TT
71982012-12-05 Tom Tromey <tromey@redhat.com>
7199
7200 PR gdb/14917:
7201 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7202
02d403bf 72032012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7204
7205 * configure.ac: Check for linux/perf_event.h.
7206 * config.in: Regenerated.
7207 * configure: Regenerated.
7208
0270a750
PA
72092012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7210
7211 * hostio.c (handle_readlink): Decrease buffer size
7212 parameter passed to readlink by one byte.
7213
8c29b58e
YQ
72142012-11-26 Yao Qi <yao@codesourcery.com>
7215
7216 * configure.ac (build_warnings): Append '-Wempty-body'.
7217 * configure: Regenerated.
7218 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7219 body.
7220
8bdce1ff
PM
72212012-11-15 Pierre Muller <muller@sourceware.org>
7222
7223 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7224 * config.in: Regenerate.
7225 * configure: Regenerate.
7226 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7227 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7228 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7229 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7230 header.
7231 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7232 instead of <sys/wait.h> header.
7233 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7234
02d403bf 72352012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7236
7237 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7238 (various make rules): Remove -DGDBSERVER
7239
fbd5db48
YQ
72402012-11-09 Yao Qi <yao@codesourcery.com>
7241
7242 * spu-low.c (current_ptid): Move it to ..
7243 * gdbthread.h: ... here. New.
7244 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7245 * server.c (myresume, process_serial_event): Likewise.
7246 * thread-db.c (thread_db_find_new_threads): Likewise.
7247 * tracepoint.c (run_inferior_command): Likewise.
7248
b3dc46ff
AB
72492012-10-01 Andrew Burgess <aburgess@broadcom.com>
7250
7251 * server.c (handle_search_memory_1): Include access length in
7252 warning message.
7253
07c04788
HPN
72542012-09-05 Michael Brandt <michael.brandt@axis.com>
7255
7256 * linux-crisv32-low.c: Fix compile errors.
7257
918d227b
YQ
72582012-09-04 Yao Qi <yao@codesourcery.com>
7259
7260 * tracepoint.c (cmd_qtsv): Adjust debug message.
7261 Don't check CUR_TPOINT.
7262
18c1b81a
YQ
72632012-08-28 Yao Qi <yao@codesourcery.com>
7264
7265 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7266 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7267 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7268 Remove declarations of xmalloc, xreallloc, xstrdup and
7269 freeargv.
7270 * Makefile.in (libiberty_h): New.
7271 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7272 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7273
dc82f37b
YQ
72742012-08-23 Yao Qi <yao@codesourcery.com>
7275
7276 * server.h: Remove declaration of 'xsnprintf'.
7277
406b1477
KS
72782012-08-22 Keith Seitz <keiths@redhat.com>
7279
7280 * server.h: Include build-gnulib-gbserver/config.h.
7281 * gdbreplay.c: Likewise.
7282
e6712ff1
DE
72832012-08-08 Doug Evans <dje@google.com>
7284
7285 * Makefile.in (SFILES): Add gdb_vecs.c.
7286 (OBS): Add gdb_vecs.o.
7287 (gdb_vecs_h, host_defs_h): New variables.
7288 (thread-db.o): Add $(gdb_vecs_h) dependency.
7289 (gdb_vecs.o): New rule.
7290 * thread-db.c: #include "gdb_vecs.h".
7291 (thread_db_load_search): Use a vector to iterate over path elements.
7292 Handle text appearing after "$pdir".
7293
7294 * configure.ac: Add check for strstr.
7295 * config.in: Regenerate.
7296 * configure: Regenerate.
7297
7c3270ae
UW
72982012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7299
7300 * hostio.c (handle_pread): If pread fails, fall back to attempting
7301 lseek/read.
7302 (handle_pwrite): Likewise for pwrite.
7303
b62e2b27
UW
73042012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7305
7306 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7307 between unsupported TYPE and unimplementable ADDR/LEN combination.
7308 (arm_insert_point): Act on new return value.
7309
78a99e91
PA
73102012-07-31 Pedro Alves <palves@redhat.com>
7311
7312 * server.c (process_point_options): Only skip tokens if we find
7313 one that is unrecognized. Don't treat 'X' specially while
7314 skipping unrecognized tokens.
7315
fcf303ab
UW
73162012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7317
7318 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7319 to 4-byte-align HW breakpoint addresses for Thumb.
7320
7255706c
YQ
73212012-07-27 Yao Qi <yao@codesourcery.com>
7322
7323 PR remote/14161.
7324
7325 * server.h: Declare gdb_agent_about_to_close.
7326 * target.c (kill_inferior): Include "agent.h".
7327 New. Send command 'kill'.
7328 * target.h (kill_inferior): Removed macro.
7329 * tracepoint.c (gdb_agent_about_to_close): New.
7330 (gdb_agent_helper_thread): Handle command 'close'.
7331 Wait endlessly until the inferior stops.
7332 Install gdb_agent_remove_socket to atexit hook.
7333 (agent_socket_name): New static variable.
7334 (gdb_agent_socket_init): Replace local variable 'name' with
7335 'agent_socket_name'.
7336 (gdb_agent_remove_socket): New.
7337
5a3f286f
YQ
73382012-07-27 Yao Qi <yao@codesourcery.com>
7339
7340 * server.c (process_point_options): Stop at 'X' when parsing.
7341
961bd387
ME
73422012-07-19 Michael Eager <eager@eagercon.com>
7343
a261b8f5 7344 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7345 to hw_execute.
7346 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7347 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7348 hardware breakpoint.
7349
aa7c7447
JK
73502012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7351
7352 * gdbserver/linux-low.c (initialize_low): Call
7353 linux_ptrace_init_warnings.
7354
7f216e7c
DE
73552012-07-02 Doug Evans <dje@google.com>
7356
7357 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7358 pointer to int.
7359
d3ce09f5
SS
73602012-07-02 Stan Shebs <stan@codesourcery.com>
7361
7362 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7363 (ax.o): Add it to build rule.
7364 (ax-ipa.o): Ditto.
7365 (OBS): Add format.o.
7366 (IPA_OBS): Add format.o.
7367 * server.c (handle_query): Claim support for breakpoint commands.
7368 (process_point_options): Add command case.
7369 (process_serial_event): Leave running if there are printfs in
7370 effect.
7371 * mem-break.h (any_persistent_commands): Declare.
7372 (add_breakpoint_commands): Declare.
7373 (gdb_no_commands_at_breakpoint): Declare.
7374 (run_breakpoint_commands): Declare.
7375 * mem-break.c (struct point_command_list): New struct.
7376 (struct breakpoint): New field command_list.
7377 (any_persistent_commands): New function.
7378 (add_commands_to_breakpoint): New function.
7379 (add_breakpoint_commands): New function.
7380 (gdb_no_commands_at_breakpoint): New function.
7381 (run_breakpoint_commands): New function.
7382 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7383 locally.
7384 * ax.c: Include format.h.
7385 (ax_printf): New function.
7386 (gdb_eval_agent_expr): Add printf opcode.
7387
2f8f6aed
YQ
73882012-06-13 Yao Qi <yao@codesourcery.com>
7389
7390 * server.c (start_inferior): Remove duplicated writes to fields
7391 'last_resume_kind' and 'last_status' of 'current_inferior'.
7392
0c9070b3
YQ
73932012-06-12 Yao Qi <yao@codesourcery.com>
7394 Pedro Alves <palves@redhat.com>
7395
7396 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7397 comment.
7398 * server.c (handle_v_cont): Extend comment.
7399
c52daf70
YQ
74002012-06-11 Yao Qi <yao@codesourcery.com>
7401
7402 * linux-low.c (linux_attach): Add 'static'.
7403
d38bbb0a
YQ
74042012-06-06 Yao Qi <yao@codesourcery.com>
7405
7406 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7407
89dc0afd
JK
74082012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7409
7410 Fix gcc -flto compilation warning.
7411 * server.c (main): Make variable multi_mode and attach volatile.
7412
75f62ce7
TJB
74132012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7414
7415 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7416 if the platform doesn't know about it.
7417
65f479b6
PA
74182012-05-30 Jeff Kenton <jkenton@tilera.com>
7419
7420 * Makefile.in (SFILES): Add linux-tile-low.c.
7421 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7422 * configure.srv: Handle tilegx-*-linux*.
7423 * linux-tile-low.c: New file.
7424
0c5bf5a9
JK
74252012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7426
7427 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7428
a493e3e2
PA
74292012-05-24 Pedro Alves <palves@redhat.com>
7430
7431 PR gdb/7205
7432
43aaf8b6 7433 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7434
2ea28649
PA
74352012-05-24 Pedro Alves <palves@redhat.com>
7436
7437 PR gdb/7205
7438
7439 Replace target_signal with gdb_signal throughout.
7440
8d409d16
MR
74412012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7442
7443 * linux-low.c (linux_store_registers): Avoid the copying sequence
7444 when no data has been retrieved by ptrace.
7445
23512c01
MGD
74462012-05-22 Will Deacon <will.deacon@arm.com>
7447
7448 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7449 Include asm/ptrace.h.
7450 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7451 already defined.
7452
4934b29e
MR
74532012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7454
7455 * linux-low.c (linux_store_registers): Don't re-retrieve data
7456 with ptrace that has already been obtained from /proc. Always
7457 copy any data retrieved with ptrace to the buffer supplied.
7458
bde24c0a
PA
74592012-05-11 Yao Qi <yao@codesourcery.com>
7460 Pedro Alves <palves@redhat.com>
7461
7462 * linux-low.c (enum stopping_threads_kind): New.
7463 (stopping_threads): Change type to `enum stopping_threads_kind'.
7464 (handle_extended_wait): If stopping and suspending threads, leave
7465 the new_lwp suspended too.
7466 (linux_wait_for_event): Adjust.
7467 (stop_all_lwps): Set `stopping_threads' to
7468 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7469 whether we're suspending threads or just stopping them. Assert no
7470 recursion happens.
7471
623b6bdf
YQ
74722012-04-29 Yao Qi <yao@codesourcery.com>
7473
7474 * server.h: Move some code to ...
7475 * gdbthread.h: ... here. New.
7476 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7477 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7478 (nto-low.o, win32-low.o): Likewise.
7479 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7480 * regcache.c, remote-utils.c, server.c: Likewise.
7481 * target.c, tracepoint.c, win32-low.c: Likewise.
7482
f15f9948
TJB
74832012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7484
7485 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7486 (PTRACE_ARG4_TYPE): Likewise.
7487 (PTRACE_XFER_TYPE): Likewise.
7488 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7489 ptrace to PTRACE_ARG3_TYPE.
7490 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7491 (PTRACE_ARG4_TYPE): Likewise.
7492 (PTRACE_XFER_TYPE): Likewise.
7493 (linux_detach_one_lwp): Cast fourth argument of
7494 ptrace to long then PTRACE_ARG4_TYPE.
7495 (regsets_fetch_inferior_registers): Cast third argument of
7496 ptrace to long then PTRACE_ARG3_TYPE.
7497 (regsets_store_inferior_registers): Likewise.
7498
38ea300a
PA
74992012-04-20 Pedro Alves <palves@redhat.com>
7500
7501 * configure: Regenerate.
7502
c971b7fa
PA
75032012-04-19 Pedro Alves <palves@redhat.com>
7504
43aaf8b6 7505 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7506 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7507 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7508 (all, install-only, uninstall, clean-info, all-lib, clean): No
7509 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7510 (maintainer-clean realclean distclean): Use subdir_do.
7511 (subdir_do): New.
7512 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7513 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7514 * acinclude.m4: Include acx_configure_dir.m4.
7515 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7516 calls. Call AC_PROG_RANLIB. Configure gnulib using
7517 ACX_CONFIGURE_DIR.
7518 (GNULIB): New.
7519 (GNULIB_STDINT_H): Adjust.
7520 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7521 * gdbreplay.c: Include build-gnulib/config.h.
7522 * server.h: Likewise.
7523 * aclocal.m4: Regenerate.
7524 * config.in: Regenerate.
7525 * configure: Regenerate.
c971b7fa 7526
809277f8
PA
75272012-04-19 Pedro Alves <palves@redhat.com>
7528
7529 * Makefile.in (LIBGNU, INCGNU): Adjust.
7530 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7531 (all, install-only, uninstall, clean-info, all-lib, clean)
7532 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7533 * configure.ac: Adjust AC_OUTPUT output.
7534 * aclocal.m4: Regenerate.
7535 * configure: Regenerate.
7536
fd9bb8b8
PA
75372012-04-19 Pedro Alves <palves@redhat.com>
7538
7539 * Makefile.in (generated_files): New.
7540 (server_h): Remove the explicit dependency on config.h, and depend
7541 on $generated_files.
7542
1c298c66
PA
75432012-04-19 Pedro Alves <palves@redhat.com>
7544
7545 * Makefile.in (INCGNU): Add -Ignulib.
7546
57c4b50b
PA
75472012-04-19 Pedro Alves <palves@redhat.com>
7548
7549 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7550 (INCGNU): ... this, and spell out -I here.
7551 (GNULIB_LIB): Rename to ...
7552 (LIBGNU): ... this.
7553 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7554
1030e047
PA
75552012-04-19 Pedro Alves <palves@redhat.com>
7556
7557 * config.in: Regenerate.
7558
447d4319
PA
75592012-04-19 Pedro Alves <palves@redhat.com>
7560
7561 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7562 * server.h (memmem): Remove declaration.
7563 * config.in: Regenerate.
7564 * configure: Regenerate.
7565
aad9eab9
YQ
75662012-04-19 Yao Qi <yao@codesourcery.com>
7567
7568 * Makefile.in (SFILES): Add common/vec.c.
7569 (OBS): Add vec.o.
7570 (vec.o): New rule.
7571
3e10640f
YQ
75722012-04-19 Yao Qi <yao@codesourcery.com>
7573
7574 * remote-utils.c (prepare_resume_reply): Replace with macro
7575 target_core_of_thread.
7576 * server.c (handle_qxfer_threads_proper): Likewise.
7577 * target.h (traget_core_of_thread): New macro.
7578
71622373
PA
75792012-04-18 Pedro Alves <palves@redhat.com>
7580
7581 * aclocal.m4: Regenerate.
7582 * configure: Regenerate.
7583
80d26939
YQ
75842012-04-16 Yao Qi <yao@codesourcery.com>
7585
7586 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7587 duplicated on address.
7588
42476b70
YQ
75892012-04-16 Yao Qi <yao@codesourcery.com>
7590
7591 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7592 (struct tracepoint_action_ops) <send>: New field.
7593 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7594 (agent_expr_send, x_tracepoint_action_send): New.
7595 (l_tracepoint_action_send): New.
7596 (cmd_qtdp): Download and install tracepoint
7597 according to `use_agent'.
7598 (run_inferior_command): Add one more parameter `len'.
7599 Update callers.
7600 (tracepoint_send_agent): New.
7601 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7602
7bc83639
YQ
76032012-04-16 Yao Qi <yao@codesourcery.com>
7604
7605 * tracepoint.c (download_tracepoints): Moved to ...
7606 (cmd_qtstart): ... here.
7607
5f18041e
YQ
76082012-04-14 Yao Qi <yao@codesourcery.com>
7609
7610 * tracepoint.c: Include inttypes.h.
7611 (struct collect_memory_action): Use sized types.
7612 (struct tracepoint): Likewise.
7613 (cmd_qtdp, stop_tracing): Update print specifiers.
7614 (cmd_qtp, response_tracepoint): Likewise.
7615 (collect_data_at_tracepoint): Likewise.
7616 (collect_data_at_step): Likewise.
7617
55a8c076
YQ
76182012-04-14 Yao Qi <yao@codesourcery.com>
7619
7620 Import gnulib module inttypes.
7621 * aclocal.m4, config.in, configure: Regenerated.
7622
dc750257
YQ
76232012-04-14 Yao Qi <yao@codesourcery.com>
7624
7625 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7626 Makefile and config.status at last.
7627
0ab5faf9
YQ
76282012-04-13 Yao Qi <yao@codesourcery.com>
7629
7630 * tracepoint.c: Include stdint.h unconditionally.
7631
18f5fd81
TJB
76322012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7633
7634 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7635 on BFD_HAVE_SYS_PROCFS_TYPE.
7636 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7637 * configure: Regenerate.
7638 * config.in: Likewise.
7639
4d47af5c
L
76402012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7641
7642 * Makefile.in (clean): Also remove x32.c x32-linux.c
7643 x32-avx.c x32-avx-linux.c.
7644 (x32.o): New target.
7645 (x32.c): Likewise.
7646 (x32-linux.o): Likewise.
7647 (x32-linux.c): Likewise.
7648 (x32-avx.o): Likewise.
7649 (x32-avx.c): Likewise.
7650 (x32-avx-linux.o): Likewise.
7651 (x32-avx-linux.c): Likewise.
7652
7653 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7654 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7655 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7656 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7657 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7658 i386/x32-avx-linux.xml.
7659
7660 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7661 (init_registers_x32_avx_linux): Likwise.
7662 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7663 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7664
ecedbe58
PA
76652012-04-13 Pedro Alves <palves@redhat.com>
7666
7667 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7668 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7669 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7670 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7671 the sub-make.
7672
c92b5177
L
76732012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7674
7675 * linux-x86-low.c (compat_x32_clock_t): New.
7676 (compat_x32_siginfo_t): Likewise.
7677 (compat_x32_siginfo_from_siginfo): Likewise.
7678 (siginfo_from_compat_x32_siginfo): Likewise.
7679 (linux_is_elf64): Likewise.
7680 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7681 and siginfo_from_compat_x32_siginfo for x32.
7682 (x86_arch_setup): Set linux_is_elf64.
7683
214d508e
L
76842012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7685
7686 PR gdb/13969
7687 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7688 e_machine field.
7689 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7690 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7691 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7692 compatible with process.
7693
c9a1864a
YQ
76942012-04-12 Yao Qi <yao@codesourcery.com>
7695
7696 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7697 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7698 (install-only, install-info, clean): Handle sub dir gnulib.
7699 (all-lib, am--refresh): New targets.
7700 (memmem.o): Remove target.
7701 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7702 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7703 (AC_REPLACE_FUNCS): Remove memmem.
7704 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7705 (AC_OUTPUT): Generate Makefile in gnulib/.
7706 * aclocal.m4, config.in, configure: Regenerated.
7707
367ba2c2
MR
77082012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7709
7710 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7711
9d236627
PA
77122012-04-05 Pedro Alves <palves@redhat.com>
7713
7714 -Werror=strict-aliasing
7715
7716 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7717 pointer.
7718
111217b3
PA
77192012-04-04 Pedro Alves <palves@redhat.com>
7720
7721 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7722 (sparc_store_gregset_from_stack, sparc_store_gregset)
7723 (sparc_breakpoint_at): Fix formatting.
7724
8365dcf5
TJB
77252012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7726
7727 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7728 are available.
7729 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7730 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7731 * config.in: Regenerate.
7732 * configure: Likewise.
7733
689cc2ae
PA
77342012-03-29 Pedro Alves <palves@redhat.com>
7735
7736 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7737 Correct ptrace arguments.
7738
c14dfd32
PA
77392012-03-28 Pedro Alves <palves@redhat.com>
7740
7741 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7742 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7743 (IA64_FR1_REGNUM): New defines.
7744 (ia64_fetch_register): New.
7745 (the_low_target): Install it.
7746 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7747 field.
7748 * linux-low.c (linux_fetch_registers): Try the
7749 the_low_target.fetch_register hook first.
7750
7751 * linux-arm-low.c (the_low_target): Adjust.
7752 * linux-bfin-low.c (the_low_target): Adjust.
7753 * linux-cris-low.c (the_low_target): Adjust.
7754 * linux-crisv32-low.c (the_low_target): Adjust.
7755 * linux-m32r-low.c (the_low_target): Adjust.
7756 * linux-m68k-low.c (the_low_target): Adjust.
7757 * linux-mips-low.c (the_low_target): Adjust.
7758 * linux-ppc-low.c (the_low_target): Adjust.
7759 * linux-s390-low.c (the_low_target): Adjust.
7760 * linux-sh-low.c (the_low_target): Adjust.
7761 * linux-sparc-low.c (the_low_target): Adjust.
7762 * linux-tic6x-low.c (the_low_target): Adjust.
7763 * linux-x86-low.c (the_low_target): Adjust.
7764 * linux-xtensa-low.c (the_low_target): Adjust.
7765
63c88e13
PA
77662012-03-26 Pedro Alves <palves@redhat.com>
7767
7768 * server.c (handle_qxfer_libraries): Don't bail early if
7769 the_target->qxfer_libraries_svr4 is not NULL.
7770
fb723180
PA
77712012-03-26 Pedro Alves <palves@redhat.com>
7772
7773 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7774
0afae3cf
PA
77752012-03-23 Pedro Alves <palves@redhat.com>
7776
7777 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7778 "library-list-svr4" element's start tag when the the DSO list is
7779 empty.
7780
485f1ee4
PA
77812012-03-23 Pedro Alves <palves@redhat.com>
7782
7783 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7784 a variable whose type size is the same as the inferior's pointer
7785 size.
7786
a5362b9a
TS
77872012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7788
7789 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7790 struct siginfo.
7791 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7792 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7793 * linux-low.h: Include <signal.h>.
7794 (struct siginfo): Remove forward declaration.
7795 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7796 struct siginfo.
7797
d226c142
MF
77982012-03-21 Mike Frysinger <vapier@gentoo.org>
7799
7800 * .gitignore: Ignore more files.
7801
122f36ef
PA
78022012-03-19 Pedro Alves <palves@redhat.com>
7803 Jan Kratochvil <jan.kratochvil@redhat.com>
7804
7805 * server.c (cont_thread, general_thread): Add describing comments.
7806 (start_inferior): Clear `cont_thread'.
7807 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7808 of a process.
7809
fc3e5175
YQ
78102012-03-15 Yao Qi <yao@codesourcery.com>
7811
7812 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7813 handling to ...
7814 (cmd_qtdp): ... here.
7815
8d0d92cd
YQ
78162012-03-15 Yao Qi <yao@codesourcery.com>
7817
7818 * tracepoint.c (struct tracepoint_action_ops): New.
7819 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7820 (m_tracepoint_action_download): New.
7821 (r_tracepoint_action_download): New.
7822 (x_tracepoint_action_download): New.
7823 (l_tracepoint_action_download): New.
7824 (add_tracepoint_action): Install `action->ops' according type.
7825 (download_tracepoint_1): Move code `download' function pointer
7826 of various tracepoint_action_ops.
7827
87b0bb13
JK
78282012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7829
7830 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7831 linux_ptrace_attach_warnings.
7832
5f572dec
JK
78332012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7834
7835 * Makefile.in (linux-ptrace.o): New.
7836 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7837 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7838 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7839 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7840 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7841 of these targets.
7842 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7843
f4647387
YQ
78442012-03-08 Yao Qi <yao@codesourcery.com>
7845 Pedro Alves <palves@redhat.com>
7846
7847 Fix PR server/13392.
7848 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7849 offset of JMP insn.
7850 * tracepoint.c (remove_tracepoint): New.
7851 (cmd_qtdp): Call remove_tracepoint when failed to install.
7852
9b224c5e
PA
78532012-03-07 Pedro Alves <palves@redhat.com>
7854
7855 * linux-low.c (get_detach_signal): New.
7856 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7857 Pass on pending signals to PTRACE_DETACH. Check the result of the
7858 ptrace call.
7859 * server.c (program_signals, program_signals_p): New.
7860 (handle_general_set): Handle QProgramSignals.
7861 * server.h (program_signals, program_signals_p): Declare.
7862
e237a7e2
JK
78632012-03-05 Pedro Alves <palves@redhat.com>
7864 Jan Kratochvil <jan.kratochvil@redhat.com>
7865
7866 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7867 New comment why.
7868
5808517f
YQ
78692012-03-03 Yao Qi <yao@codesourcery.com>
7870
7871 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7872 agent_look_up_symbols.
7873
58b4daa5
YQ
78742012-03-03 Yao Qi <yao@codesourcery.com>
7875
7876 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7877 (linux-x86-low.o): Likewise.
7878 * server.h: Remove in_process_agent_loaded.
7879 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7880 common/agent.c.
7881 Update callers.
7882
8ffcbaaf
YQ
78832012-03-03 Yao Qi <yao@codesourcery.com>
7884
7885 * tracepoint.c (gdb_agent_capability): New global.
7886 (in_process_agent_loaded_ust): Renamed to
7887 `in_process_agent_supports_ust'.
7888 Update callers.
7889 (in_process_agent_supports_ust): Call agent_capability_check.
7890 (clear_installed_tracepoints): Assert that agent supports
7891 agent.
7892
d1feda86
YQ
78932012-03-03 Yao Qi <yao@codesourcery.com>
7894
7895 * linux-low.c (linux_supports_agent): New.
7896 (linux_target_ops): Initialize field `supports_agent' with
7897 linux_supports_agent.
7898 * target.h (struct target_ops) <supports_agent>: New.
7899 (target_supports_agent): New macro.
7900 * server.c (handle_general_set): Handle packet 'QAgent'.
7901 (handle_query): Send `QAgent+'.
7902 * Makefile.in (server.o): Depends on agent.h.
7903
2fa291ac
YQ
79042012-03-03 Yao Qi <yao@codesourcery.com>
7905
7906 * Makefile.in (OBS): Add agent.o.
7907 Add new rule for agent.o.
7908 Track dependence of tracepoint.c on agent.h.
7909 * tracepoint.c (run_inferior_command_1):
7910 (run_inferior_command): Call agent_run_command.
7911 (gdb_ust_connect_sync_socket): Deleted. Move it to
7912 common/agent.c.
7913 (resume_thread, stop_thread): Likewise.
7914 (gdb_ust_socket_init): Renamed to ...
7915 (gdb_agent_socket_init): ... New.
7916 (gdb_ust_thread): Renamed to ...
7917 (gdb_agent_helper_thread): ... New.
7918 (gdb_ust_init): Move some code to ...
7919 (gdb_agent_init): ... here. New.
7920 [HAVE_UST]: Call gdb_ust_init.
7921 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7922 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7923 * config.in, configure: Regenerated.
7924
05044653
PA
79252012-03-02 Pedro Alves <palves@redhat.com>
7926
7927 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7928 * linux-low.c (struct simple_pid_list): New.
7929 (stopped_pids): New a struct simple_pid_list pointer.
7930 (add_to_pid_list, pull_pid_from_list): New.
7931 (handle_extended_wait): Don't assume the first signal new children
7932 report is SIGSTOP. Adjust call to pull_pid_from_list.
7933 (linux_wait_for_lwp): Adjust.
7934
8d00225b
YQ
79352012-03-02 Yao Qi <yao@codesourcery.com>
7936
7937 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7938 debug log.
7939
19560ba5
YQ
79402012-03-02 Yao Qi <yao@codesourcery.com>
7941
7942 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7943 `stop_pc' and `tpoint'. Update caller.
7944
1faeff08
MR
79452012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7946
7947 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7948 * linux-low.c (use_linux_regsets): New macro.
7949 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7950 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7951 (linux_register_in_regsets): New function.
7952 (usr_fetch_inferior_registers): Skip registers covered by
7953 regsets.
7954 (usr_store_inferior_registers): Likewise.
7955 (usr_fetch_inferior_registers): New macro.
7956 (usr_store_inferior_registers): Likewise.
7957 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7958 (linux_store_registers): Likewise.
7959 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7960 prototype.
7961 (init_registers_mips64_dsp_linux): Likewise.
7962 (init_registers_mips_linux): New macro.
7963 (init_registers_mips_dsp_linux): Likewise.
7964 (mips_dsp_num_regs): Likewise.
7965 (DSP_BASE, DSP_CONTROL): New fallback macros.
7966 (mips_base_regs): New macro.
7967 (mips_regmap): Use it. Fix the size.
7968 (mips_dsp_regmap): New variable.
7969 (mips_dsp_regset_bitmap): Likewise.
7970 (mips_arch_setup): New function.
7971 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7972 than mips_regmap.
7973 (mips_cannot_store_register): Likewise.
7974 (the_low_target): Update .arch_setup, .num_regs and .regmap
7975 initializers. Add .regset_bitmap initializer.
7976 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7977 initializer.
7978 * linux-bfin-low.c (the_low_target): Likewise.
7979 * linux-cris-low.c (the_low_target): Likewise.
7980 * linux-crisv32-low.c (the_low_target): Likewise.
7981 * linux-ia64-low.c (the_low_target): Likewise.
7982 * linux-m32r-low.c (the_low_target): Likewise.
7983 * linux-m68k-low.c (the_low_target): Likewise.
7984 * linux-ppc-low.c (the_low_target): Likewise.
7985 * linux-s390-low.c (the_low_target): Likewise.
7986 * linux-sh-low.c (the_low_target): Likewise.
7987 * linux-sparc-low.c (the_low_target): Likewise.
7988 * linux-tic6x-low.c (the_low_target): Likewise.
7989 * linux-x86-low.c (the_low_target): Likewise.
7990 * linux-xtensa-low.c (the_low_target): Likewise.
7991 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7992 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7993 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7994 srv_xmlfiles.
7995 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7996 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7997
c03e6ccc
YQ
79982012-02-29 Yao Qi <yao@codesourcery.com>
7999 Pedro Alves <palves@redhat.com>
8000
8001 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8002 `step_over_finished' is true.
8003
644cebc9
PA
80042012-02-27 Pedro Alves <palves@redhat.com>
8005
8006 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8007 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8008
c14d7ab2
PA
80092012-02-27 Pedro Alves <palves@redhat.com>
8010
8011 PR server/9684
8012 * linux-low.c (pid_is_stopped): New.
8013 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8014
412c89dd
LM
80152012-02-25 Luis Machado <lgustavo@codesourcery.com>
8016
8017 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8018 of conditions.
8019
b745defe
MR
80202012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8021
8022 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8023
9f3a5c85
LM
80242012-02-24 Luis Machado <lgustavo@codesourcery>
8025
8026 * server.c (handle_query): Advertise support for target-side
8027 breakpoint condition evaluation.
8028 (process_point_options): New function.
8029 (process_serial_event): When inserting a breakpoint, check for
8030 a target-side condition that should be evaluated.
8031
8032 * mem-break.c: Include regcache.h and ax.h.
8033 (point_cond_list_t): New data structure.
8034 (breakpoint) <cond_list>: New field.
8035 (find_gdb_breakpoint_at): Make non-static.
8036 (delete_gdb_breakpoint_at): Clear any target-side
8037 conditions.
8038 (clear_gdb_breakpoint_conditions): New function.
8039 (add_condition_to_breakpoint): Likewise.
8040 (add_breakpoint_condition): Likewise.
8041 (gdb_condition_true_at_breakpoint): Likewise.
8042 (gdb_breakpoint_here): Return result directly instead
8043 of going through a local variable.
8044
8045 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8046 (clear_gdb_breakpoint_conditions): Likewise.
8047 (add_breakpoint_condition): Likewise.
8048 (gdb_condition_true_at_breakpoint): Likewise.
8049
8050 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8051 (need_step_over_p): Take target-side breakpoint condition into
8052 consideration.
8053
5e1dc496
LM
80542012-02-24 Luis Machado <lgustavo@codesourcery>
8055
8056 * server.h: Include tracepoint.h.
8057 (agent_mem_read, agent_get_trace_state_variable_value,
8058 agent_set_trace_state_variable_value,
8059 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8060 get_set_tsv_func_addr): New prototypes.
8061
8062 * ax.h: New include file.
8063 * ax.c: New source file.
8064
8065 * tracepoint.c: Include ax.h.
8066 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8067 agent_expr, eval_result_type): Move to ax.h.
8068 (parse_agent_expr): Rename to ...
8069 (gdb_parse_agent_expr): ... this, make it non-static and move
8070 to ax.h.
8071 (unparse_agent_expr) Rename to ...
8072 (gdb_unparse_agent_expr): ... this, make it non-static and move
8073 to ax.h.
8074 (eval_agent_expr): Rename to ...
8075 (eval_tracepoint_agent_expr): ... this.
8076 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8077 forward declarations.
8078 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8079 (agent_get_trace_state_variable_value): New function.
8080 (agent_set_trace_state_variable_value): New function.
8081 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8082 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8083 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8084 (condition_true_at_tracepoint): Likewise.
8085 (parse_agent_expr): Rename to ...
8086 (gdb_parse_agent_expr): ... this and move to ax.c.
8087 (unparse_agent_expr): Rename to ...
8088 (gdb_unparse_agent_expr): ... this and move to ax.c.
8089 (gdb_agent_op_name): Move to ax.c.
8090 (eval_agent_expr): Rename to ...
8091 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8092 and move to ax.c.
8093 (eval_tracepoint_agent_expr): New function.
8094 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8095 non-static.
5e1dc496
LM
8096 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8097 ax.c.
8098 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8099 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8100 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8101 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8102 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8103 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8104 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8105 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8106 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8107 (compile_bytecodes): Remove forward declaration.
8108 (is_goto_target): Move to ax.c.
8109 (compile_bytecodes): Move to ax.c and call
8110 agent_get_trace_state_variable_value (...) and
8111 agent_set_trace_state_variable_value (...).
8112
8113 * Makefile.in: Update ax.c and IPA dependencies.
8114
277e4e52
PA
81152012-02-24 Pedro Alves <palves@redhat.com>
8116
8117 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8118 (cmd_bigqtbuffer_circular): ... this. Only handle
8119 'QTBuffer:circular:'.
8120 (handle_tracepoint_general_set): Adjust.
8121
bf4c19f7
YQ
81222012-02-16 Yao Qi <yao@codesourcery.com>
8123
8124 * inferiors.c: Move code to ...
8125 * dll.c: .... here. New.
8126 * server.h: Declare clear_dlls.
8127 * Makefile.in (SFILES): Add dll.c.
8128 (OBS): Add dll.o
8129 (dll.o): New rule.
8130
d73f2619
YQ
81312012-02-11 Yao Qi <yao@codesourcery.com>
8132
8133 * server.c: (handle_monitor_command): Add a new parameter
8134 `own_buf'.
8135 (handle_query): Update caller.
8136
f8255c2a
JB
81372012-02-09 Joel Brobecker <brobecker@adacore.com>
8138
8139 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8140 * configure, config.in: Regenerate.
8141 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8142 is not defined.
8143
da84f473
PA
81442012-02-02 Pedro Alves <palves@redhat.com>
8145
8146 Try SIGKILL first, then PTRACE_KILL.
8147 * linux-low.c (linux_kill_one_lwp): New.
8148 (linux_kill_one_lwp): Rename to ...
8149 (kill_one_lwp_callback): ... this. Use the new
8150 linux_kill_one_lwp.
8151
e886a173
PA
81522012-02-02 Pedro Alves <palves@redhat.com>
8153
8154 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8155 inferior.
8156
be07f1a2
PA
81572012-01-27 Pedro Alves <palves@redhat.com>
8158
8159 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8160 (elf_64_file_p): Make static.
8161 (linux_pid_exe_is_elf_64_file): New.
8162 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8163 Delete declarations.
8164 (linux_pid_exe_is_elf_64_file): Declare.
8165 * linux-x86-low.c (x86_arch_setup): Use
8166 linux_pid_exe_is_elf_64_file.
8167
d8301ad1
JK
81682012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8169
8170 * linux-low.c (linux_wait_for_event_1): Rename to ...
8171 (linux_wait_for_event): ... here and merge it with former
8172 linux_wait_for_event - new variable wait_ptid, use it.
8173 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8174
01b17894
PA
81752012-01-23 Pedro Alves <palves@redhat.com>
8176
8177 * server.c (main): Avoid yet another case of infinite loop while
8178 detaching/killing after a longjmp.
8179
e825046f
JK
81802012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8181
8182 Code cleanup.
8183 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8184
b9e7b9c3
UW
81852012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8186
8187 * hostio.c (handle_readlink): New function.
8188 (handle_vFile): Call it to handle "vFile:readlink" packets.
8189
901f9912
UW
81902012-01-20 Pedro Alves <palves@redhat.com>
8191 Ulrich Weigand <ulrich.weigand@linaro.org>
8192
8193 * server.c (handle_v_requests): Only support vAttach and vRun to
8194 start multiple processes when in extended protocol mode.
8195
fc1ab1a0
PA
81962012-01-17 Pedro Alves <palves@redhat.com>
8197
8198 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8199 memalign plus mprotect to allocate the scratch buffer.
8200
7d5d4e98
PA
82012012-01-13 Pedro Alves <palves@redhat.com>
8202
8203 * server.c (attach_inferior): Clear `cont_thread'.
8204
f128d5e9
PA
82052012-01-13 Pedro Alves <palves@redhat.com>
8206
8207 * server.c (main): Avoid infinite loop while detaching/killing
8208 after a longjmp.
8209
06db92f0
DE
82102012-01-09 Doug Evans <dje@google.com>
8211
8212 * server.c (start_inferior): Set last_ptid in --wrapper case.
8213
32d92999
YQ
82142012-01-06 Yao Qi <yao@codesourcery.com>
8215
8216 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8217 defined.
8218 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8219
5e0a92a9
YQ
82202012-01-04 Yao Qi <yao@codesourcery.com>
8221
8222 * tracepoint.c (cmd_qtdp): Print debug message
8223 for static tracepoint.
8224
ae639e8c
YQ
82252012-01-04 Yao Qi <yao@codesourcery.com>
8226
8227 * tracepoint.c (trace_vdebug): Differentiate debug message
8228 between gdbserver and IPA.
8229
f72429c5
YQ
82302012-01-03 Yao Qi <yao@codesourcery.com>
8231
8232 * tracepoint.c (tracepoint_was_hit): Don't collect for
8233 static tracepoint.
8234
12c3e59c
JB
82352012-01-02 Joel Brobecker <brobecker@adacore.com>
8236
8237 * terminal.h: Reformat copyright header.
8238
67827812
JB
82392012-01-02 Joel Brobecker <brobecker@adacore.com>
8240
8241 * server.c (gdbserver_version): Update copyright year.
8242 * gdbreplay.c (gdbreplay_version): Likewise.
8243
3e52c33d
JK
82442011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8245
8246 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8247
8248 Revert:
8249 2011-12-18 Hui Zhu <teawater@gmail.com>
8250 * linux-low.c (linux_create_inferior): Save return value to ret.
8251
66f1260e
HZ
82522011-12-18 Hui Zhu <teawater@gmail.com>
8253
8254 * linux-low.c (linux_create_inferior): Save return value to ret.
8255
e77616d7
DE
82562011-12-16 Doug Evans <dje@google.com>
8257
e7b06c57
DE
8258 * linux-low.c (linux_create_inferior): If stdio connection,
8259 redirect stdin from /dev/null, stdout to stderr.
8260 * remote-utils.c (remote_is_stdio): New static global.
8261 (remote_connection_is_stdio): New function.
8262 (remote_prepare): Handle stdio connection.
8263 (remote_open): Ditto.
8264 (remote_close): Don't close stdin for stdio connections.
8265 (read_prim,write_prim): New functions. Replace all calls to
8266 read/write to these.
8267 * server.c (main): Watch for "-" argument. Move call to
8268 remote_prepare before start_inferior.
8269 * server.h (STDIO_CONNECTION_NAME): New macro.
8270 (remote_connection_is_stdio): Declare.
8271
e77616d7
DE
8272 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8273 in debugging output.
8274
82067193
YQ
82752011-12-15 Yao Qi <yao@codesourcery.com>
8276
8277 * tracepoint.c: Include sys/syscall.h.
8278 (gdb_ust_thread): Remove preprocessor conditional.
8279
82bfbe7e
PA
82802011-12-14 Pedro Alves <pedro@codesourcery.com>
8281
8282 * linux-low.c (linux_detach_one_lwp): Call
8283 the_low_target.prepare_to_resume before detaching.
8284
712c6575
YQ
82852011-12-14 Yao Qi <yao@codesourcery.com>
8286
8287 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8288 of write.
8289
d54d1edf
YQ
82902011-12-14 Yao Qi <yao@codesourcery.com>
8291
8292 * i386-low.c (i386_low_stopped_data_address): Initialize local
8293 variable `control'.
8294
6210a125
PA
82952011-12-13 Pedro Alves <pedro@codesourcery.com>
8296
8297 PR remote/13492
8298
8299 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8300 DR_CONTROL unless necessary. Extend comments.
8301 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8302 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8303
2ece8244
YQ
83042011-12-13 Yao Qi <yao@codesourcery.com>
8305
8306 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8307 macros.
8308 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8309
784867a5
JK
83102011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8311
8312 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8313 Print new debug message for such case.
8314
6bf36717
JK
83152011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8316
8317 Fix overlapping memcpy.
8318 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8319 the read_inferior_memory transfer.
8320 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8321 write_inferior_memory transfer.
8322 (set_fast_tracepoint_jump): New variable buf. Use it for the
8323 read_inferior_memory and write_inferior_memory transfers.
8324 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8325 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8326 Use it for the write_inferior_memory transfer.
8327 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8328 buffers.
8329
50275556
MR
83302011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8331
8332 * linux-low.c (fetch_register, store_register): Make code
8333 consistent, fix formatting.
8334
7325beb4
MR
83352011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8336
8337 * linux-low.c (usr_store_inferior_registers): Factor out code
8338 to handle individual registers into...
8339 (store_register): ... this new function.
8340
c642a434
UW
83412011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8342
8343 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8344 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8345 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8346 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8347 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8348 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8349 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8350 (srv_xmlfiles): Add new XML files.
8351
8352 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8353 and <sys/uio.h>.
8354 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8355 (init_registers_s390_linux32v1): Add prototype.
8356 (init_registers_s390_linux32v2): Likewise.
8357 (init_registers_s390_linux64v1): Likewise.
8358 (init_registers_s390_linux64v2): Likewise.
8359 (init_registers_s390x_linux64v1): Likewise.
8360 (init_registers_s390x_linux64v2): Likewise.
8361 (s390_num_regs): Increment to 52.
8362 (s390_regmap): Add orig_r2 register.
8363 (s390_num_regs_3264): Increment to 68.
8364 (s390_regmap_3264): Add orig_r2 register.
8365 (s390_collect_ptrace_register): Handle orig_r2 register.
8366 (s390_supply_ptrace_register): Likewise.
8367 (s390_fill_last_break): New function.
8368 (s390_store_last_break): Likewise.
8369 (s390_fill_system_call): New function.
8370 (s390_store_system_call): Likewise.
8371 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8372 register sets.
8373 (s390_check_regset): New function.
8374 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8375 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8376 Update target_regsets for available register sets.
8377
2268b414
JK
83782011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8379 Jan Kratochvil <jan.kratochvil@redhat.com>
8380
8381 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8382 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8383 New.
8384 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8385 * linux-low.h (struct process_info_private): New member r_debug.
8386 * server.c (handle_qxfer_libraries): Call
8387 the_target->qxfer_libraries_svr4.
8388 (handle_qxfer_libraries_svr4): New function.
8389 (qxfer_packets): New entry "libraries-svr4".
8390 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8391 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8392 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8393 PACKET_qXfer_libraries_svr4.
8394
d6db1fab
UW
83952011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8396
8397 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8398 PSW address/mask between 8-byte and 16-byte formats.
8399 (s390_supply_ptrace_register): Likewise.
8400 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8401 basic addressing mode bit.
8402
242f5f1c
SS
84032011-11-24 Stan Shebs <stan@codesourcery.com>
8404
8405 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8406
f196051f
SS
84072011-11-17 Stan Shebs <stan@codesourcery.com>
8408
8409 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8410 (tracing_start_time): New global.
8411 (tracing_stop_time): New global.
8412 (tracing_user_name): New global.
8413 (tracing_notes): New global.
8414 (tracing_stop_note): New global.
8415 (cmd_qtstart): Set traceframe_usage, start_time.
8416 (stop_tracing): Set stop_time.
8417 (cmd_qtstatus): Report additional status.
8418 (cmd_qtp): New function.
8419 (handle_tracepoint_query): Call it.
8420 (cmd_qtnotes): New function.
8421 (handle_tracepoint_general_set): Call it.
8422 (get_timestamp): Rename from tsv_get_timestamp.
8423
405f8e94
SS
84242011-11-14 Stan Shebs <stan@codesourcery.com>
8425 Kwok Cheung Yeung <kcy@codesourcery.com>
8426
8427 * linux-x86-low.c (small_jump_insn): New.
8428 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8429 trampoline and error message, build a trampoline and issue a small
8430 jump instruction to it.
8431 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8432 trampoline and error message.
8433 (x86_get_min_fast_tracepoint_insn_len): New.
8434 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8435 * linux-low.h (struct linux_target_ops): Add arguments to
8436 install_fast_tracepoint_jump_pad operation, add new operation.
8437 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8438 arguments.
8439 (linux_get_min_fast_tracepoint_insn_len): New function.
8440 (linux_target_op): Add new operation.
8441 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8442 (gdb_trampoline_buffer_end): Ditto.
8443 (gdb_trampoline_buffer_error): Ditto.
8444 (struct ipa_sym_addresses): Add fields for new IPA variables.
8445 (symbol_list): Add entries for new IPA variables.
8446 (struct tracepoint): Add fields to hold the address range of the
8447 trampoline used by the tracepoint.
8448 (trampoline_buffer_head): New static variable.
8449 (trampoline_buffer_tail): Ditto.
8450 (claim_trampoline_space): New function.
8451 (have_fast_tracepoint_trampoline_buffer): New function.
8452 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8453 structure.
8454 (install_fast_tracepoint): Ditto, also add error buffer argument.
8455 (cmd_qtminftpilen): New function.
8456 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8457 (fast_tracepoint_from_trampoline_address): New function.
8458 (fast_tracepoint_collecting): Handle trampoline as part of jump
8459 pad space.
8460 (set_trampoline_buffer_space): New function.
8461 (initialize_tracepoint): Initialize new IPA variables.
8462 * target.h (struct target_ops): Add arguments to
8463 install_fast_tracepoint_jump_pad operation, add new
8464 get_min_fast_tracepoint_insn_len operation.
8465 (target_get_min_fast_tracepoint_insn_len): New.
8466 (install_fast_tracepoint_jump_pad): Add arguments.
8467 * server.h (IPA_BUFSIZ): Define.
8468 * linux-i386-ipa.c: Include extra header files.
8469 (initialize_fast_tracepoint_trampoline_buffer): New function.
8470 (initialize_low_tracepoint): Call it.
8471 * server.h (set_trampoline_buffer_space): Declare.
8472 (claim_trampoline_space): Ditto.
8473 (have_fast_tracepoint_trampoline_buffer): Ditto.
8474
1e4d1764
YQ
84752011-11-14 Yao Qi <yao@codesourcery.com>
8476
8477 * server.c (handle_query): Handle InstallInTrace for qSupported.
8478 * tracepoint.c (add_tracepoint): Sort list.
8479 (install_tracepoint, download_tracepoint): New.
8480 (cmd_qtdp): Call them to install and download tracepoints.
8481 (sort_tracepoints): Removed.
8482 (cmd_qtstart): Update.
8483
5c73ff4e
YQ
84842011-11-14 Yao Qi <yao@codesourcery.com>
8485
8486 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8487 * mem-break.h: Declare.
8488 * tracepoint.c (cmd_qtstart): Move some code to ...
8489 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8490 New.
8491 (download_tracepoints): Move some code to ...
8492 (download_tracepoint_1): ... here. New.
8493
86a30030
YQ
84942011-11-08 Yao Qi <yao@codesourcery.com>
8495
8496 * remote-utils.c (relocate_instruction): A comment fix.
8497
8d26e50c
JB
84982011-11-07 Joel Brobecker <brobecker@adacore.com>
8499
8500 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8501 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8502 dr_status_mirror and dr_control_mirror from debug_reg_state.
8503 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8504 (i386_initial_stuff): Remove use of deleted globals.
8505 (i386_get_thread_context, i386_set_thread_context,
8506 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8507 from debug_reg_state.
8508
a59306a3
YQ
85092011-11-05 Yao Qi <yao@codesourcery.com>
8510
8511 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8512 address as TPOINT's.
8513
3065dfb6
SS
85142011-11-02 Stan Shebs <stan@codesourcery.com>
8515
8516 * tracepoint.c (agent_mem_read_string): New function.
8517 (eval_agent_expr): Call it for tracenz.
8518 * server.c (handle_query): Report support for tracenz.
8519
fd0d8c7c
YQ
85202011-11-02 Yao Qi <yao@codesourcery.com>
8521
8522 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8523
609086b1
YQ
85242011-11-02 Yao Qi <yao@codesourcery.com>
8525
8526 * target.h: Fix a typo in comment.
8527
b9fd1791
PA
85282011-10-31 Pedro Alves <pedro@codesourcery.com>
8529
8530 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8531 clobber the breakpoints' shadows with fast tracepoint jumps.
8532 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8533 * target.c (write_inferior_memory): Also pass MYADDR down to
8534 check_mem_write.
8535
03583c20
UW
85362011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8537
8538 * configure.ac: Check support for personality routine.
8539 * configure: Regenerate.
8540 * config.in: Likewise.
8541 * linux-low.c: Include <sys/personality.h>.
8542 Define ADDR_NO_RANDOMIZE if necessary.
8543 (linux_create_inferior): Disable address space randomization when
8544 forking inferior, if requested.
8545 (linux_supports_disable_randomization): New function.
8546 (linux_target_ops): Install it.
8547 * server.h (disable_randomization): Declare.
8548 * server.c (disable_randomization): New global variable.
8549 (handle_general_set): Handle QDisableRandomization.
8550 (handle_query): Likewise for qSupported.
8551 (main): Support --disable-randomization and --no-disable-randomization
8552 command line arguments.
8553 * target.h (struct target_ops): Add supports_disable_randomization.
8554 (target_supports_disable_randomization): New macro.
8555
723b724b
MF
85562011-09-29 Mike Frysinger <vapier@gentoo.org>
8557
8558 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8559 ifdef check.
8560 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8561 [!PT_GETDSBT] (target_loadmap): New definition.
8562 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8563 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8564 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8565 and PT_GETDSBT to LINUX_LOADMAP.
8566 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8567 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8568
55329a5c 85692011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8570
8571 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8572 (arm_linux_hwbp_cap): New static variable.
8573 (arm_linux_get_hwbp_cap): Replace by ...
8574 (arm_linux_init_hwbp_cap): ... this new function.
8575 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8576 (arm_linux_get_hw_watchpoint_count): Likewise.
8577 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8578 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8579 (arm_prepare_to_resume): Use perror_with_name instead of error.
8580
55329a5c 85812011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8582
8583 * linux-arm-low.c: Include <signal.h>.
8584 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8585 (struct arm_linux_hwbp_cap): New data type.
8586 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8587 (struct arm_linux_hw_breakpoint): New data type.
8588 (MAX_BPTS, MAX_WPTS): Define.
8589 (struct arch_process_info, struct arch_lwp_info): New data types.
8590 (arm_linux_get_hwbp_cap): New function.
8591 (arm_linux_get_hw_breakpoint_count): Likewise.
8592 (arm_linux_get_hw_watchpoint_count): Likewise.
8593 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8594 (arm_hwbp_control_initialize): Likewise.
8595 (arm_hwbp_control_is_enabled): Likewise.
8596 (arm_hwbp_control_is_initialized): Likewise.
8597 (arm_hwbp_control_disable): Likewise.
8598 (arm_linux_hw_breakpoint_equal): Likewise.
8599 (arm_linux_hw_point_initialize): Likewise.
8600 (struct update_registers_data): New data structure.
8601 (update_registers_callback: New function.
8602 (arm_insert_point): Likewise.
8603 (arm_remove_point): Likewise.
8604 (arm_stopped_by_watchpoint): Likewise.
8605 (arm_stopped_data_address): Likewise.
8606 (arm_new_process): Likewise.
8607 (arm_new_thread): Likewise.
8608 (arm_prepare_to_resume): Likewise.
8609 (the_low_target): Register arm_insert_point, arm_remove_point,
8610 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8611 arm_new_thread, and arm_prepare_to_resume.
8612
6b9801d4
SS
86132011-09-15 Stan Shebs <stan@codesourcery.com>
8614
8615 * server.h (struct emit_ops): Add compare-goto fields.
8616 * tracepoint.c (gdb_agent_op_sizes): New table.
8617 (emit_eq_goto): New function.
8618 (emit_ne_goto): New function.
8619 (emit_lt_goto): New function.
8620 (emit_le_goto): New function.
8621 (emit_gt_goto): New function.
8622 (emit_ge_goto): New function.
8623 (is_goto_target): New function.
8624 (compile_bytecodes): Recognize special cases of compare-goto
8625 combinations and call specialized emitters for them.
8626 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8627 (amd64_emit_ne_goto): New function.
8628 (amd64_emit_lt_goto): New function.
8629 (amd64_emit_le_goto): New function.
8630 (amd64_emit_gt_goto): New function.
8631 (amd64_emit_ge_goto): New function.
8632 (amd64_emit_ops): Add the new functions.
8633 (i386_emit_eq_goto): New function.
8634 (i386_emit_ne_goto): New function.
8635 (i386_emit_lt_goto): New function.
8636 (i386_emit_le_goto): New function.
8637 (i386_emit_gt_goto): New function.
8638 (i386_emit_ge_goto): New function.
8639 (i386_emit_ops): Add the new functions.
8640
bf15cbda
SS
86412011-09-08 Stan Shebs <stan@codesourcery.com>
8642
8643 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8644 (i386_emit_epilogue): Restore %ebx.
8645
943ca1dd
JZ
86462011-08-31 Jie Zhang <jzhang918@gmail.com>
8647
8648 * server.c (step_thread): Remove definition.
8649 (process_serial_event): Don't handle Hs.
8650 * server.h (step_thread): Remove declaration.
8651 * target.c (set_desired_inferior): Remove use of step_thread.
8652
e3deef73
LM
86532011-08-24 Luis Machado <lgustavo@codesourcery.com>
8654
8655 * linux-low.c: Include linux-procfs.h.
8656 (linux_attach_lwp_1): Update comments.
8657 (linux_attach): Scan for existing threads when attaching to a
8658 process that is the tgid.
8659 * Makefile.in: Update dependencies.
8660
13da1c97
LM
86612011-08-24 Luis Machado <lgustavo@codesourcery.com>
8662
8663 * configure.srv: Add linux-procfs.o dependencies.
8664
881127c9
YQ
86652011-08-14 Yao Qi <yao@codesourcery.com>
8666
8667 * target.h (struct target_ops): Fix indent.
8668 * win32-low.c (win32_target_ops): Fix comment.
8669
58dbd541
YQ
86702011-08-14 Andrew Jenner <andrew@codesourcery.com>
8671 Yao Qi <yao@codesourcery.com>
8672
8673 * Makefile.in (clean): Remove tic6x-*.c files.
8674 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8675 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8676 (tic6x-c64xp-linux.c): Likewise.
8677 * configure.srv: Add support for tic6x-*-uclinux.
8678 * linux-tic6x-low.c: New.
8679 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8680
78d85199
YQ
86812011-08-14 Andrew Stubbs <ams@codesourcery.com>
8682 Yao Qi <yao@codesourcery.com>
8683
8684 * target.h (struct target_ops): Add read_loadmap.
8685 * linux-low.c (struct target_loadseg): New type.
8686 (struct target_loadmap): New type.
8687 (linux_read_loadmap): New function.
8688 (linux_target_ops): Add linux_read_loadmap.
8689 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
8690 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8691 to NULL.
78d85199 8692
a959a88d
EZ
86932011-08-05 Eli Zaretskii <eliz@gnu.org>
8694
8695 * win32-low.c: Include <stdint.h>.
8696
1ced966e
PA
86972011-07-22 Pedro Alves <pedro@codesourcery.com>
8698
8699 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8700 to the inferior here.
8701 (i386_remove_aligned_watchpoint): Ditto.
8702 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8703 fit part of the watchpoint in the debug registers.
8704 (i386_update_inferior_debug_regs): New.
8705 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8706 registers, and only update the inferior on success.
8707 (i386_low_remove_watchpoint): Ditto.
8708
d26e3629
KY
87092011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8710
8711 * linux-low.c (compare_ints, unique, list_threads, show_process,
8712 linux_core_of_thread): Delete.
8713 (linux_target_ops): Change linux_core_of_thread to
8714 linux_common_core_of_thread.
8715 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8716 * utils.c (malloc_failure): Change type of argument.
8717 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8718 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8719 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8720 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8721 (IPA_OBJS): Add common-utils-ipa.o.
8722 (ptid_h, linux_osdata_h): New macros.
8723 (server_h): Add common/common-utils.h, common/xml-utils.h,
8724 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8725 common/ptid.h.
8726 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8727 ptid.o, buffer.o): New rules.
8728 (linux-low.o): Add common/linux-osdata.h as a dependency.
8729 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8730 * configure.ac: Add AC_HEADER_DIRENT check.
8731 * config.in: Regenerate.
8732 * configure: Regenerate.
8733 * remote-utils.c (xml_escape_text): Delete.
8734 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8735 buffer_xml_printf): Move to common/buffer.c.
8736 * server.c (main): Remove call to initialize_inferiors.
8737 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8738 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8739 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8740 internal_error, gdb_assert, gdb_assert_fail): Delete.
8741 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8742 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8743 common/buffer.h.
8744 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8745 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8746 initialize_inferiors): Delete.
8747
2275a1a7
PA
87482011-07-20 Pedro Alves <pedro@codesourcery.com>
8749
8750 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8751 symbol error.
8752
0a5b1e09
PA
87532011-05-31 Pedro Alves <pedro@codesourcery.com>
8754
8755 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8756 assertion.
8757 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8758
6938fd34
YQ
87592011-05-26 Yao Qi <yao@codesourcery.com>
8760
8761 * Makefile.in (thread-db.o): Track dependence to
8762 common/gdb_thread_db.h.
8763 * thread-db.c: include gdb_thread_db.h from right place.
8764
b481f9e0
TT
87652011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8766
8767 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8768 __FILE__ and __LINE__ to internal_error.
8769
98a5dd13
DE
87702011-05-13 Doug Evans <dje@google.com>
8771
8772 * thread-db.c (try_thread_db_load_from_sdir): New function.
8773 (try_thread_db_load_from_dir): New function.
8774 (thread_db_load_search): Handle $sdir, ignore $pdir.
8775 Remove trying of system directories if search of
8776 libthread-db-search-path fails, that is now done via $sdir.
8777
d248b706
KY
87782011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8779
8780 * server.c (handle_query): Add EnableDisableTracepoints to the list
8781 of supported features.
43aaf8b6 8782 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 8783 tracepoints.
43aaf8b6
PA
8784 (cmd_qtenable_disable): New.
8785 (cmd_qtstart): Install tracepoints even if disabled.
8786 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8787 receiving a QTEnable or QTDisable packet.
8788 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8789 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8790 tracepoints.
8791 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 8792
84e578fb
DE
87932011-05-10 Doug Evans <dje@google.com>
8794
8795 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8796
71f55dd8
DE
87972011-05-04 Doug Evans <dje@google.com>
8798
8799 * linux-low.c (linux_join): Skip process lookup.
8800 * spu-low.c (spu_join): Ditto.
8801 * server.c (join_inferiors_callback): Delete.
8802 (process_serial_event): For 'D' packet (detach) call join_inferior
8803 directly.
8804
4d393d60
JM
88052011-05-04 Joseph Myers <joseph@codesourcery.com>
8806
8807 * README: Don't mention xscale*-*-linux*.
8808 * configure.srv (xscale*-*-linux*): Don't handle target.
8809
b00ad6ff
NF
88102011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8811
8812 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8813 casting pointers.
8814 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8815 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8816 (i386_emit_void_call_2): Likewise.
8817
af96c192
YQ
88182011-04-26 Yao Qi <yao@codesourcery.com>
8819
43aaf8b6
PA
8820 * linux-low.c: Move common macros to linux-ptrace.h.
8821 Include linux-ptrace.h.
af96c192
YQ
8822 * Makefile.in (linux_ptrace_h): New.
8823 (linux-low.o): Depends on linux-ptrace.h.
8824
03f2bd59
JK
88252011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8826
8827 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8828 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8829 (remote_prepare): New function with most of the TCP code from ...
8830 (remote_open): ... here. Detect PORT here unconditionally. Move also
8831 setting transport_is_reliable.
8832 * server.c (run_once): New variable.
8833 (gdbserver_usage): Document it.
8834 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8835 the first run if RUN_ONCE.
8836 * server.h (run_once, remote_prepare): New declarations.
8837
7a9dd1b2
TT
88382011-04-19 Tom Tromey <tromey@redhat.com>
8839
8840 * win32-low.c (handle_load_dll): Remove duplicate "the".
8841
81239425
PM
88422011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8843
8844 Remove support for old Cygwin 1.5 versions.
8845 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8846 function to avoid warning.
8847 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8848 warning.
8849
9e0627f1
PM
88502011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8851
8852 * gdbserver/server.h (Macro _): Define it if not available.
8853
588eebee
MS
88542011-03-14 Michael Snyder <msnyder@vmware.com>
8855
348af9f7 8856 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 8857
43f70d4c
JB
88582011-03-10 Joel Brobecker <brobecker@adacore.com>
8859
8860 * Makefile.in (maintainer-clean realclean distclean): Remove
8861 "make ... subdir_do" command.
8862
348af9f7
MS
88632011-03-10 Michael Snyder <msnyder@vmware.com>
8864
8865 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8866
8867 * server.c (handle_v_run): Free alloced buffer on early return.
8868
e637a4f5
YQ
88692011-03-09 Yao Qi <yao@codesourcery.com>
8870
8871 Revert:
8872 2011-03-04 Yao Qi <yao@codesourcery.com>
8873
8874 * Makefile.in: Remove GNU make feature --directory.
8875
8876 2011-03-05 Yao Qi <yao@codesourcery.com>
8877
8878 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8879 (subdir_do): New make target. Copied from gdb/Makefile.
8880 (maintainer-clean, realclean, distclean, clean): Call corresponding
8881 make targets in common/Makefile.
8882
8883 2011-02-11 Yao Qi <yao@codesourcery.com>
8884
8885 * configure.ac: Call AC_PROG_RANLIB.
8886 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8887 * configure: Regenerate.
8888
e6edda56
JK
88892011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8890
8891 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8892
e5141119
JB
88932011-03-06 Yao Qi <yao@codesourcery.com>
8894
8895 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8896
64794aa4
JB
88972011-03-05 Yao Qi <yao@codesourcery.com>
8898
8899 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8900 (subdir_do): New make target. Copied from gdb/Makefile.
8901 (maintainer-clean, realclean, distclean, clean): Call corresponding
8902 make targets in common/Makefile.
8903
7a762829
YQ
89042011-03-04 Yao Qi <yao@codesourcery.com>
8905
8906 * Makefile.in: Remove GNU make feature --directory.
8907
348af9f7
MS
89082011-03-04 Michael Snyder <msnyder@vmware.com>
8909
8910 * server.c (queue_stop_reply): Call xmalloc not malloc.
8911
89122011-03-02 Michael Snyder <msnyder@vmware.com>
8913
8914 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8915
9f72fee2
MS
89162011-02-28 Michael Snyder <msnyder@vmware.com>
8917
588eebee
MS
8918 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8919 (cmd_qtframe): Ditto.
8920 (cmd_qtbuffer): Ditto.
8921 (cmd_bigqtbuffer): Ditto.
8922
9f72fee2
MS
8923 * utils.c (decimal2str): Initialize 'width' to nine, then
8924 don't mess with it.
8925
8040bd49
UW
89262011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8927
8928 * hostio.c (require_data): Free *data, not data.
8929
7e52cbd0
JK
89302011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8931
8932 * hostio.c (require_data): Use free, not xfree.
8933
9130f83e
MS
89342011-02-27 Michael Snyder <msnyder@vmware.com>
8935
4b812f4e
MS
8936 * server.c (handle_query): Discard unused value.
8937
9130f83e
MS
8938 * hostio.c (require_data): Free malloc memory before returning
8939 error.
8940
69d37113
MS
89412011-02-26 Michael Snyder <msnyder@vmware.com>
8942
8943 * linux-low.c (list_threads): Call closedir for dirent.
8944
35f5825a
MS
89452011-02-27 Michael Snyder <msnyder@vmware.com>
8946
2a589cef
MS
8947 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8948 a case statement falls through.
8949
0adea5f7
MS
8950 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8951
35f5825a
MS
8952 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8953 in comparison.
8954
238f1c74
MS
89552011-02-26 Michael Snyder <msnyder@vmware.com>
8956
8957 * utils.c (decimal2str): Eliminate dead code and dead param.
8958 (pulongest): Drop dead param from call to decimal2str.
8959 (plongest): Ditto.
8960
633ff500
JB
89612011-02-24 Joel Brobecker <brobecker@adacore.com>
8962
8963 Revert the following patch (not approved yet):
8964 2011-02-21 Hui Zhu <teawater@gmail.com>
8965 * tracepoint.c (tp_printf): New function.
8966 (eval_agent_expr): Handle gdb_agent_op_printf.
8967
f9c6ff72
HZ
89682011-02-21 Hui Zhu <teawater@gmail.com>
8969
8970 * tracepoint.c (tp_printf): New function.
8971 (eval_agent_expr): Handle gdb_agent_op_printf.
8972
94d5e490
TT
89732011-02-18 Tom Tromey <tromey@redhat.com>
8974
8975 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8976 (tracepoint.o): Likewise.
8977 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8978 (gdb_agent_op_names): Likewise.
8979
c7f96d2b
TT
89802011-02-18 Tom Tromey <tromey@redhat.com>
8981
8982 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8983 gdb_agent_op_rot>: New constants.
8984 (gdb_agent_op_names): Add pick and roll.
8985 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8986 cases.
8987
0feedb2c
JK
89882011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8989
8990 * aclocal.m4: Regenerated with aclocal-1.11.1.
8991
b3b9301e
PA
89922011-02-14 Pedro Alves <pedro@codesourcery.com>
8993
8994 * server.c (handle_qxfer_traceframe_info): New.
8995 (qxfer_packets): Register "traceframe-info".
8996 (handle_query): Report support for qXfer:traceframe-info:read+.
8997 * tracepoint.c (match_blocktype): New.
8998 (traceframe_find_block_type): Rename to ...
8999 (traceframe_walk_blocks): ... this. Add callback filter argument,
9000 and use it.
9001 (traceframe_find_block_type): New, reimplemented on top of
9002 traceframe_walk_blocks.
9003 (build_traceframe_info_xml): New.
9004 (traceframe_read_info): New.
9005 * server.h (traceframe_read_info): Declare.
9006
4f3e6fb7
YQ
90072011-02-11 Yao Qi <yao@codesourcery.com>
9008
9009 * configure.ac: Call AC_PROG_RANLIB.
9010 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9011 * configure: Regenerate.
9012
764880b7
PA
90132011-02-07 Pedro Alves <pedro@codesourcery.com>
9014
9015 * server.c (gdb_read_memory): Change return semantics to allow
9016 partial transfers.
9017 (handle_search_memory_1): Adjust.
9018 (process_serial_event) <'m' packet>: Handle partial transfers.
9019 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9020
1c79eb8a
PA
90212011-01-28 Pedro Alves <pedro@codesourcery.com>
9022
9023 * regcache.c (init_register_cache): Initialize
9024 regcache->register_status.
9025 (free_register_cache): Release regcache->register_status.
9026 (regcache_cpy): Copy register_status.
9027 (registers_to_string): Print 'x's for unavailable registers.
9028 (supply_register): Mark the register's status valid or
9029 unavailable, depending on whether a buffer was passed in or not.
9030 (supply_register_zeroed): New.
9031 (supply_regblock): Mark the registers' status valid or
9032 unavailable, depending on whether a buffer was passed in or not.
9033 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9034 (struct regcache): New `register_status' field.
9035 (supply_register_zeroed): Declare.
9036 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9037 supply_register_zeroed, rather than passing a NULL buffer to
9038 supply_register.
9039 * tracepoint.c (fetch_traceframe_registers): Update comment.
9040
85724a0e
PA
90412011-01-28 Pedro Alves <pedro@codesourcery.com>
9042
9043 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9044 buffer explicit.
9045
d08aafef
PA
90462011-01-25 Pedro Alves <pedro@codesourcery.com>
9047
9048 * server.h (decode_xfer_write): Change prototype.
9049 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9050 and don't extract the annex here.
9051 * server.c (decode_xfer_read): Remove `annex' parameter,
9052 and don't extract the annex here.
9053 (decode_xfer): New.
9054 (struct qxfer): New.
9055 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9056 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9057 (handle_qxfer_statictrace): New functions, abstracted out from
9058 handle_query, and made to use the struct qxfer interface.
9059 (handle_threads_qxfer_proper): Rename to ...
9060 (handle_qxfer_threads_proper): ... this.
9061 (handle_threads_qxfer): Rename to ...
9062 (handle_qxfer_threads): ... this. Adjust.
9063 (qxfer_packets): New array.
9064 (handle_qxfer): New function.
9065 (handle_query): Use handle_qxfer.
9066
493e2a69
MS
90672011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9068
9069 * gdbreplay.c: Shorten lines of >= 80 columns.
9070 * linux-low.c: Ditto.
9071 * linux-ppc-low.c: Ditto.
9072 * linux-s390-low.c: Ditto.
9073 * linux-sparc-low.c: Ditto.
9074 * linux-x86-low.c: Ditto.
9075 * linux-xtensa-low.c: Ditto.
9076 * mem-break.c: Ditto.
9077 * nto-low.c: Ditto.
9078 * regcache.h: Ditto.
9079 * remote-utils.c: Ditto.
9080 * server.c: Ditto.
9081 * server.h: Ditto.
9082 * thread-db.c: Ditto.
9083 * tracepoint.c: Ditto.
9084 * utils.c: Ditto.
9085 * win32-low.h: Ditto.
9086
44944448
JB
90872011-01-05 Joel Brobecker <brobecker@adacore.com>
9088
9089 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9090 update.
9091
71ce852c
JB
90922011-01-01 Joel Brobecker <brobecker@adacore.com>
9093
9094 * server.c (gdbserver_version): Update copyright year in version
9095 output.
9096 * gdbreplay.c (gdbreplay_version): Ditto.
9097
eb826dc6
MF
90982010-12-29 Jie Zhang <jie.zhang@analog.com>
9099
9100 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9101 * linux-bfin-low.c: New file.
9102 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9103 PT_DATA_ADDR for BFIN targets.
9104 * Makefile.in (SFILES): Add linux-bfin-low.c.
9105 (clean): Remove reg-bfin.c.
9106 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9107 * README: Mention supported Blackfin targets.
9108
39ab222a
MF
91092010-12-23 Mike Frysinger <vapier@gentoo.org>
9110
9111 * .gitignore: New file.
9112
a1f2ce7d
MF
91132010-11-16 Mike Frysinger <vapier@gentoo.org>
9114
9115 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9116
f474844c
JZ
91172010-10-22 Jie Zhang <jie@codesourcery.com>
9118
9119 * Makefile.in: Add FLAGS_TO_PASS variable.
9120 (install): Remove dependency of install-only and recursively
9121 invoke make for install-only.
9122
f1048712
DE
91232010-10-04 Doug Evans <dje@google.com>
9124
9125 * Makefile.in (uninstall): Use $(DESTDIR).
9126
b53a1623
PA
91272010-09-24 Pedro Alves <pedro@codesourcery.com>
9128
e6ee044d
PA
9129 PR gdb/11842
9130
b53a1623
PA
9131 * linux-x86-low.c (compat_siginfo_from_siginfo)
9132 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9133 si_code is < 0. Check for si_code == SI_TIMER before checking for
9134 si_code < 0.
9135
fa1bd1e4
JB
91362010-09-13 Joel Brobecker <brobecker@adacore.com>
9137
9138 * lynx-i386-low.c: New file.
9139 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9140
47fac8f8
JB
91412010-09-13 Joel Brobecker <brobecker@adacore.com>
9142
9143 * lynx-low.c (ptrace_request_to_str): Remove handling for
9144 request values that have been removed in LynxOS 5.x.
9145
1adfc54d
JB
91462010-09-13 Joel Brobecker <brobecker@adacore.com>
9147
9148 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9149 <ptrace.h>
9150
c2a66c29
NS
91512010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9152
9153 * configure.ac: Add --enable-inprocess-agent option.
9154 * configure: Rebuilt.
9155
32fcada3
YQ
91562010-09-06 Yao Qi <yao@codesourcery.com>
9157
9158 * linux-low.c (linux_kill): Remove unused variable.
9159 (linux_stabilize_threads): Likewise.
9160 * server.c (start_inferior): Likewise.
9161 (queue_stop_reply_callback): Likewise.
9162 * tracepoint.c (do_action_at_tracepoint): Likewise.
9163
0cccb683
YQ
91642010-09-06 Yao Qi <yao@codesourcery.com>
9165
9166 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9167 on return.
9168
423ec54c
JK
91692010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9170
9171 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9172
12ac6819
PA
91732010-09-06 Pedro Alves <pedro@codesourcery.com>
9174
9175 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9176 "$(IPA_DEPFILES)".
9177
8ed54b31
JB
91782010-09-01 Joel Brobecker <brobecker@adacore.com>
9179
9180 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9181 gdbserver/lynx-ppc-low.c: New files.
9182 * Makefile.in (lynx_low_h): New variable.
9183 (lynx-low.o, lynx-ppc-low.o): New rules.
9184 * configure.ac: On LynxOS, link with -lnetinet.
9185 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9186 * configure: regenerate.
9187
bb0116a4
JB
91882010-09-01 Joel Brobecker <brobecker@adacore.com>
9189
9190 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9191 * configure.ac: Add check for vasprintf and vsnprintf.
9192 * configure, config.in: Regenerate.
9193 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9194
a778ab81 91952010-09-01 Joel Brobecker <brobecker@adacore.com>
9196
9197 * gdbreplay.c: Move include of alloca.h up, next to include of
9198 malloc.h.
9199 * server.h: Add include of malloc.h.
9200 * mem-break.c: Remove include of malloc.h.
9201 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9202
8b034a19 92032010-09-01 Joel Brobecker <brobecker@adacore.com>
9204
9205 * Makefile.in (memmem.o): Build with -Wno-error.
9206
92072010-09-01 Joel Brobecker <brobecker@adacore.com>
9208
9209 * utils.c (xsnprintf): Make non-static.
9210 * server.h: Add xsnprintf declaration.
9211 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9212 replace calls to snprintf by calls to xsnprintf throughout.
9213
92142010-09-01 Joel Brobecker <brobecker@adacore.com>
9215
9216 * configure.ac: Add configure check for alloca.
9217 * configure, config.in: Regenerate.
9218 * server.h: Include alloca.h if it exists.
9219 * gdbreplay.c: Include alloca.h if it exists.
9220
1a981360
PA
92212010-08-28 Pedro Alves <pedro@codesourcery.com>
9222
9223 * linux-low.c (__SIGRTMIN): Define if not already defined.
9224 (linux_create_inferior): Check for __ANDROID__ rather than
9225 __SIGRTMIN.
9226 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9227 are already deferred.
9228 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9229 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9230 stopped and already has a pending signal to report.
9231 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9232 a pending signal to report or is moving out of a jump pad.
9233 (linux_init_signals): Check for __ANDROID__ rather than
9234 __SIGRTMIN.
9235
b4d51a55
PA
92362010-08-28 Pedro Alves <pedro@codesourcery.com>
9237
9238 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9239 debug_threads check. Avoid a linear search when not doing debug
9240 output.
9241
ec48365d
PA
92422010-08-27 Pedro Alves <pedro@codesourcery.com>
9243
9244 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9245 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9246 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9247 (process_event): Change local fd's type to gdb_fildes_t.
9248 (create_file_handler): Adjust prototype.
9249 (delete_file_handler): Adjust prototype.
9250 (handle_file_event): Adjust prototype. Use pfildes.
9251 (create_file_event): Adjsut prototype.
9252 * remote-utils.c (remote_desc, listen_desc): Change type to
9253 gdb_fildes_t.
9254 * server.h: New gdb_fildes_t typedef.
9255 [USE_WIN32API]: Include winsock2.h.
9256 (delete_file_handler, add_file_handler): Adjust prototypes.
9257 (pfildes): Declare.
9258 * utils.c (pfildes): New.
9259
854d88f0
PA
92602010-08-27 Pedro Alves <pedro@codesourcery.com>
9261
9262 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9263 * configure: Regenerate.
9264
0146f85b
PA
92652010-08-27 Pedro Alves <pedro@codesourcery.com>
9266
9267 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9268 (linux_done_accessing_memory): ... this.
9269 (linux_target_ops): Adjust.
9270 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9271 * nto-low.c (nto_target_ops): Adjust comment.
9272 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9273 * spu-low.c (spu_target_ops): Adjust comment.
9274 * target.h (target_ops): Rename unprepare_to_access_memory field
9275 to done_accessing_memory.
9276 (unprepare_to_access_memory): Rename to ...
9277 (done_accessing_memory): ... this.
9278
90d74c30
PA
92792010-08-26 Pedro Alves <pedro@codesourcery.com>
9280
9281 * linux-low.c (linux_prepare_to_access_memory): New.
9282 (linux_unprepare_to_access_memory): New.
9283 (linux_target_ops): Install them.
9284 * server.c (read_memory): Rename to ...
9285 (gdb_read_memory): ... this. Use
9286 prepare_to_access_memory/prepare_to_access_memory.
9287 (write_memory): Rename to ...
9288 (gdb_write_memory): ... this. Use
9289 prepare_to_access_memory/prepare_to_access_memory.
9290 (handle_search_memory_1): Adjust.
9291 (process_serial_event): Adjust.
9292 * target.h (struct target_ops): New fields
9293 prepare_to_access_memory and unprepare_to_access_memory.
9294 (prepare_to_access_memory, unprepare_to_access_memory): New.
9295 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9296 prepare_to_access_memory/prepare_to_access_memory.
9297 * nto-low.c (nto_target_ops): Adjust.
9298 * spu-low.c (spu_target_ops): Adjust.
9299 * win32-low.c (win32_target_ops): Adjust.
9300
fd467969
PA
93012010-08-26 Pedro Alves <pedro@codesourcery.com>
9302
9303 * Makefile.in (WARN_CFLAGS): Get it from configure.
9304 (WERROR_CFLAGS): New.
9305 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9306 * configure.ac: Introduce --enable-werror, which adds -Werror to
9307 the compiler command line. Enabled by default. Disable with
9308 --disable-werror. Add -Wdeclaration-after-statement
9309 Wpointer-arith and -Wformat-nonliteral to warning flags.
9310 * configure: Regenerate.
9311
331e2f5f
PA
93122010-08-26 Pedro Alves <pedro@codesourcery.com>
9313
9314 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9315
e581f2b4
PA
93162010-08-26 Pedro Alves <pedro@codesourcery.com>
9317
9318 * gdbreplay.c (remote_error): New.
9319 (gdbchar): New.
9320 (expect): Use gdbchar. Check for error reading from GDB.
9321 Clarify sync error output.
9322 (play): Check for errors writing to GDB.
9323 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9324 * remote-utils.c (getpkt): Check for errors writing to the remote
9325 descriptor.
9326
3c11dd79
PA
93272010-08-25 Pedro Alves <pedro@codesourcery.com>
9328
9329 * linux-low.c (linux_wait_1): Move non-debugging code out of
9330 `debug_threads' control.
9331
d20a8ad9
PA
93322010-08-25 Pedro Alves <pedro@codesourcery.com>
9333
9334 * linux-low.c (linux_wait_1): Don't set last_status here.
9335 * server.c (push_event, queue_stop_reply_callback): Assert we're
9336 not pushing a TARGET_WAITKIND_IGNORE event.
9337 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9338 (myresume, handle_target_event): Set the thread's last_resume_kind
9339 and last_status from the target returned status.
9340
964e4306
PA
93412010-08-25 Pedro Alves <pedro@codesourcery.com>
9342
9343 PR threads/10729
9344
9345 * linux-x86-low.c (update_debug_registers_callback): New.
9346 (i386_dr_low_set_addr): Use it.
9347 (i386_dr_low_get_addr): New.
9348 (i386_dr_low_set_control): Use update_debug_registers_callback.
9349 (i386_dr_low_get_control): New.
9350 (i386_dr_low_get_status): Adjust.
9351 * linux-low.c (linux_stop_lwp): New.
9352 * linux-low.h (linux_stop_lwp): Declare.
9353
9354 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9355 argument instead of a i386_debug_reg_state.
9356 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9357 a i386_debug_reg_state.
9358 (i386_insert_aligned_watchpoint): Adjust.
9359 (i386_remove_aligned_watchpoint): Adjust.
9360 (i386_low_stopped_data_address): Read the debug registers from the
9361 inferior instead of from the mirrors.
9362 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9363 (i386_dr_low_get_addr): Declare.
9364 (i386_dr_low_get_control): Declare.
9365 (i386_dr_low_get_status): Change prototype.
9366
9367 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9368 (i386_dr_low_get_addr): New.
9369 (i386_dr_low_get_control): New.
9370 (i386_dr_low_get_status): Adjust prototype. Return
9371 dr_status_mirror.
9372 (i386_initial_stuff): Clear dr_status_mirror and
9373 dr_control_mirror.
9374 (i386_get_thread_context): Adjust.
9375 (i386_set_thread_context): Adjust.
9376 (i386_thread_added): Adjust.
9377
5f21a75b
PA
93782010-08-24 Pedro Alves <pedro@codesourcery.com>
9379
9380 * linux-low.h (linux_thread_area): Delete declaration.
9381
3e4c1235
TS
93822010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9383
9384 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9385 after its termination.
9386
1971b033
PA
93872010-08-09 Pedro Alves <pedro@codesourcery.com>
9388
9389 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9390 (gdb_wants_all_stopped): Delete.
9391 (linux_wait_1): Don't call them.
9392 * server.c (handle_v_cont): Tag all threads as want-stopped.
9393 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9394 stopped as "client-wants-stopped".
9395
310444ac
PA
93962010-07-31 Pedro Alves <pedro@codesourcery.com>
9397
9398 * Makefile.in (signals_h): New.
9399 (server_h): Depend on it.
9400 (server.o): Don't depend on $(signals_def).
9401 (signals.o): Depend on $(signals_def).
9402
a19cae16
JK
94032010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9404
9405 * Makefile.in (signals_def): New.
9406 (server_h): Append include/gdb/signals.h and signals_def.
9407 (server.o): Append signals_def.
9408
30d50328
JK
94092010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9410
9411 * server.c (handle_target_event): Use target_signal_to_host for
9412 resume_info.sig initialization.
9413 * target.h (struct thread_resume) <sig>: New comment.
9414
5c3216e2
OS
94152010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9416
c6f46ca0
OS
9417 * server.c (handle_query): strcpy() the returned string from paddress()
9418 instead of sprintf().
5c3216e2
OS
9419 * utils.c (paddress): Return phex_nz().
9420
6bd31874
JB
94212010-07-07 Joel Brobecker <brobecker@adacore.com>
9422
9423 * server.c (handle_v_cont): Call mourn_inferior if process
9424 just exited.
9425 (myresume): Likewise.
9426
0fb4aa4b
PA
94272010-07-01 Pedro Alves <pedro@codesourcery.com>
9428
9429 Static tracepoints, and integration with UST.
9430
9431 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9432 * mem-break.c (uninsert_all_breakpoints)
9433 (reinsert_all_breakpoints): New.
9434 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9435 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9436 (gdb_agent_ust_loaded, helper_thread_id)
9437 (gdb_agent_helper_thread_id): New macros.
9438 (struct ipa_sym_addresses): Add addr_ust_loaded,
9439 addr_helper_thread_id, addr_cmd_buf.
9440 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9441 (in_process_agent_loaded_ust): New.
9442 (write_e_ust_not_loaded): New.
9443 (maybe_write_ipa_ust_not_loaded): New.
9444 (struct collect_static_trace_data_action): New.
9445 (enum tracepoint_type) <static_tracepoint>: New.
9446 (struct tracepoint) <handle>: Mention static tracepoints.
9447 (struct static_tracepoint_ctx): New.
9448 (CMD_BUF_SIZE): New.
9449 (add_tracepoint_action): Handle static tracepoint actions.
9450 (unprobe_marker_at): New.
9451 (clear_installed_tracepoints): Handle static tracepoints.
9452 (cmd_qtdp): Handle static tracepoints.
9453 (probe_marker_at): New.
9454 (cmd_qtstart): Handle static tracepoints.
9455 (response_tracepoint): Handle static tracepoints.
9456 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9457 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9458 (get_context_regcache): Handle static tracepoints.
9459 (do_action_at_tracepoint): Handle static tracepoint actions.
9460 (traceframe_find_block_type): Handle static trace data blocks.
9461 (traceframe_read_sdata): New.
9462 (download_tracepoints): Download static tracepoint actions.
9463 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9464 (GDB_PROBE_NAME): New.
9465 (ust_ops): New.
9466 (GET_UST_SYM): New.
9467 (USTF): New.
9468 (dlsym_ust): New.
9469 (ust_marker_to_static_tracepoint): New.
9470 (gdb_probe): New.
9471 (collect_ust_data_at_tracepoint): New.
9472 (gdb_ust_probe): New.
9473 (UNIX_PATH_MAX, SOCK_DIR): New.
9474 (gdb_ust_connect_sync_socket): New.
9475 (resume_thread, stop_thread): New.
9476 (run_inferior_command): New.
9477 (init_named_socket): New.
9478 (gdb_ust_socket_init): New.
9479 (cstr_to_hexstr): New.
9480 (next_st): New.
9481 (first_marker, next_marker): New.
9482 (response_ust_marker): New.
9483 (cmd_qtfstm, cmd_qtsstm): New.
9484 (unprobe_marker_at, probe_marker_at): New.
9485 (cmd_qtstmat, gdb_ust_thread): New.
9486 (gdb_ust_init): New.
9487 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9488 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9489 (ST_REGENTRY): New.
9490 (x86_64_st_collect_regmap): New.
9491 (X86_64_NUM_ST_COLLECT_GREGS): New.
9492 (AMD64_RIP_REGNUM): New.
9493 (supply_static_tracepoint_registers): New.
9494 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9495 (ST_REGENTRY): New.
9496 (i386_st_collect_regmap): New.
9497 (i386_NUM_ST_COLLECT_GREGS): New.
9498 (supply_static_tracepoint_registers): New.
9499 * server.c (handle_query): Handle qXfer:statictrace:read.
9500 <qSupported>: Report support for StaticTracepoints, and
9501 qXfer:statictrace:read features.
9502 * server.h (traceframe_read_sdata)
9503 (supply_static_tracepoint_registers): Declare.
9504 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9505 (unpack_varlen_hex): Include in IPA build.
9506 * Makefile.in (ustlibs, ustinc): New.
9507 (IPA_OBJS): Add remote-utils-ipa.o.
9508 ($(IPA_LIB)): Link -ldl and -lpthread.
9509 (UST_CFLAGS): New.
9510 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9511 * config.in, configure: Regenerate.
9512
9e4344e5
PA
95132010-06-20 Ian Lance Taylor <iant@google.com>
9514 Pedro Alves <pedro@codesourcery.com>
9515
9516 * linux-x86-low.c (always_true): Delete.
9517 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9518 trying to fool the compiler with always_true.
9519
c6beb2cb
PA
95202010-06-20 Pedro Alves <pedro@codesourcery.com>
9521
9522 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9523 conditions in gdbserver.
9524
d2ed6730
UW
95252010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9526
9527 * spu-low.c (spu_read_memory): Wrap around local store limit.
9528 (spu_write_memory): Likewise.
9529
4e29fb54
PA
95302010-06-15 Pedro Alves <pedro@codesourcery.com>
9531
9532 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9533 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9534 LONGEST uses.
9535 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9536 uses.
9537 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9538 uses with LONGEST uses.
9539
6a271cae
PA
95402010-06-14 Stan Shebs <stan@codesourcery.com>
9541 Pedro Alves <pedro@codesourcery.com>
9542
9543 Bytecode compiler.
9544
9545 * linux-x86-low.c: Include limits.h.
9546 (add_insns): New.
9547 (always_true): New.
9548 (EMIT_ASM): New.
9549 (EMIT_ASM32): New.
9550 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9551 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9552 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9553 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9554 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9555 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9556 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9557 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9558 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9559 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9560 (amd64_emit_void_call_2): New.
9561 (amd64_emit_ops): New.
9562 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9563 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9564 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9565 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9566 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9567 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9568 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9569 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9570 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9571 (i386_emit_stack_adjust, i386_emit_int_call_1)
9572 (i386_emit_void_call_2): New.
9573 (i386_emit_ops): New.
9574 (x86_emit_ops): New.
9575 (the_low_target): Install x86_emit_ops.
9576 * server.h (struct emit_ops): New.
9577 (get_raw_reg_func_addr): Declare.
9578 (current_insn_ptr, emit_error): Declare.
9579 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9580 (set_trace_state_variable_value): New defines.
9581 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9582 addr_get_trace_state_variable_value and
9583 addr_set_trace_state_variable_value.
9584 (symbol_list): New fields for get_raw_reg,
9585 get_trace_state_variable_value and set_trace_state_variable_value.
9586 (condfn): New typedef.
9587 (struct tracepoint): New field `compiled_cond'.
9588 (do_action_at_tracepoint): Clear compiled_cond.
9589 (get_trace_state_variable_value, set_trace_state_variable_value):
9590 Export in the IPA.
9591 (condition_true_at_tracepoint): If there's a compiled condition,
9592 run that.
9593 (current_insn_ptr, emit_error): New globals.
9594 (struct bytecode_address): New.
9595 (get_raw_reg_func_addr): New.
9596 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9597 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9598 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9599 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9600 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9601 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9602 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9603 (compile_tracepoint_condition, compile_bytecodes): New.
9604 * target.h (emit_ops): Forward declare.
9605 (struct target_ops): New field emit_ops.
9606 (target_emit_ops): New.
9607 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9608 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9609 * linux-low.c (linux_emit_ops): New.
9610 (linux_target_ops): Install it.
9611 * linux-low.h (struct linux_target_ops): New field emit_ops.
9612
92b72907
UW
96132010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9614
9615 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9616 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9617
fa593d66
PA
96182010-06-01 Pedro Alves <pedro@codesourcery.com>
9619 Stan Shebs <stan@codesourcery.com>
9620
9621 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9622 (all): Depend on $(extra_libraries).
9623 (install-only): Install the IPA.
9624 (IPA_OBJS, IPA_LIB): New.
9625 (clean): Remove the IPA lib.
9626 (IPAGENT_CFLAGS): New.
9627 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9628 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9629 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9630 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9631 * configure.ac: Check for atomic builtins support in the compiler.
9632 (IPA_DEPFILES, extra_libraries): Define.
9633 * configure.srv (ipa_obj): Add description.
9634 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9635 (i[34567]86-*-linux*): Set ipa_obj.
9636 (x86_64-*-linux*): Set ipa_obj.
9637 * linux-low.c (stabilizing_threads): New.
9638 (supports_fast_tracepoints): New.
9639 (linux_detach): Stabilize threads before detaching.
9640 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9641 the lwp is either not stabilizing, or is moving out of a jump pad.
9642 (linux_fast_tracepoint_collecting): New.
9643 (maybe_move_out_of_jump_pad): New.
9644 (enqueue_one_deferred_signal): New.
9645 (dequeue_one_deferred_signal): New.
9646 (linux_wait_for_event_1): If moving out of a jump pad, defer
9647 pending signals to later.
9648 (linux_stabilize_threads): New.
9649 (linux_wait_1): Check if threads need moving out of jump pads, and
9650 do it if so.
9651 (stuck_in_jump_pad_callback): New.
9652 (move_out_of_jump_pad_callback): New.
9653 (lwp_running): New.
9654 (linux_resume_one_lwp): Handle moving out of jump pads.
9655 (linux_set_resume_request): Dequeue deferred signals.
9656 (need_step_over_p): Also step over fast tracepoint jumps.
9657 (start_step_over): Also uninsert fast tracepoint jumps.
9658 (finish_step_over): Also reinsert fast tracepoint jumps.
9659 (linux_install_fast_tracepoint_jump): New.
9660 (linux_target_ops): Install linux_stabilize_threads and
9661 linux_install_fast_tracepoint_jump_pad.
9662 * linux-low.h (linux_target_ops) <get_thread_area,
9663 install_fast_tracepoint_jump_pad>: New fields.
9664 (struct lwp_info) <collecting_fast_tracepoint,
9665 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9666 (linux_get_thread_area): Declare.
9667 * linux-x86-low.c (jump_insn): New.
9668 (x86_get_thread_area): New.
9669 (append_insns): New.
9670 (push_opcode): New.
9671 (amd64_install_fast_tracepoint_jump_pad): New.
9672 (i386_install_fast_tracepoint_jump_pad): New.
9673 (x86_install_fast_tracepoint_jump_pad): New.
9674 (the_low_target): Install x86_get_thread_area and
9675 x86_install_fast_tracepoint_jump_pad.
9676 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9677 (struct fast_tracepoint_jump): New.
9678 (fast_tracepoint_jump_insn): New.
9679 (fast_tracepoint_jump_shadow): New.
9680 (find_fast_tracepoint_jump_at): New.
9681 (fast_tracepoint_jump_here): New.
9682 (delete_fast_tracepoint_jump): New.
9683 (set_fast_tracepoint_jump): New.
9684 (uninsert_fast_tracepoint_jumps_at): New.
9685 (reinsert_fast_tracepoint_jumps_at): New.
9686 (set_breakpoint_at): Use write_inferior_memory.
9687 (uninsert_raw_breakpoint): Use write_inferior_memory.
9688 (check_mem_read): Mask out fast tracepoint jumps.
9689 (check_mem_write): Mask out fast tracepoint jumps.
9690 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9691 (set_fast_tracepoint_jump): Declare.
9692 (delete_fast_tracepoint_jump)
9693 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9694 (reinsert_fast_tracepoint_jumps_at): Declare.
9695 * regcache.c: Don't compile many functions when building the
9696 in-process agent library.
9697 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9698 the register buffer in the heap.
9699 (free_register_cache): If the register buffer isn't owned by the
9700 regcache, don't free it.
9701 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9702 pre-existing register caches.
9703 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9704 type.
9705 (convert_ascii_to_int): : Constify `from' parameter type.
9706 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9707 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9708 the needed buffer in-place.
9709 (relocate_instruction): New.
9710 * server.c (handle_query) <qSymbols>: If the target supports
9711 tracepoints, give it a chance of looking up symbols. Report
9712 support for fast tracepoints.
9713 (handle_status): Stabilize threads.
9714 (process_serial_event): Adjust.
9715 * server.h (struct fast_tracepoint_jump): Forward declare.
9716 (struct process_info) <fast_tracepoint_jumps>: New field.
9717 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9718 (decode_X_packet, decode_M_packet): Adjust.
9719 (relocate_instruction): Declare.
9720 (in_process_agent_loaded): Declare.
9721 (tracepoint_look_up_symbols): Declare.
9722 (struct fast_tpoint_collect_status): Declare.
9723 (fast_tracepoint_collecting): Declare.
9724 (force_unlock_trace_buffer): Declare.
9725 (handle_tracepoint_bkpts): Declare.
9726 (initialize_low_tracepoint)
9727 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9728 * target.h (struct target_ops) <stabilize_threads,
9729 install_fast_tracepoint_jump_pad>: New fields.
9730 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9731 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9732 [HAVE_STDINT_H]: Include stdint.h.
9733 (trace_debug_1): Rename to ...
9734 (trace_vdebug): ... this.
9735 (trace_debug): Rename to ...
9736 (trace_debug_1): ... this. Add `level' parameter.
9737 (trace_debug): New.
9738 (ATTR_USED, ATTR_NOINLINE): New.
9739 (IP_AGENT_EXPORT): New.
9740 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9741 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9742 (about_to_request_buffer_space, trace_buffer_is_full)
9743 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9744 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9745 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9746 (traceframe_write_count, traceframes_created)
9747 (trace_state_variables)
9748 New renaming defines.
9749 (struct ipa_sym_addresses): New.
9750 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9751 (symbol_list): New.
9752 (ipa_sym_addrs): New.
9753 (all_tracepoint_symbols_looked_up): New.
9754 (in_process_agent_loaded): New.
9755 (write_e_ipa_not_loaded): New.
9756 (maybe_write_ipa_not_loaded): New.
9757 (tracepoint_look_up_symbols): New.
9758 (debug_threads) [IN_PROCESS_AGENT]: New.
9759 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9760 (UNKNOWN_SIDE_EFFECTS): New.
9761 (stop_tracing): New.
9762 (flush_trace_buffer): New.
9763 (stop_tracing_bkpt): New.
9764 (flush_trace_buffer_bkpt): New.
9765 (read_inferior_integer): New.
9766 (read_inferior_uinteger): New.
9767 (read_inferior_data_pointer): New.
9768 (write_inferior_data_pointer): New.
9769 (write_inferior_integer): New.
9770 (write_inferior_uinteger): New.
9771 (struct collect_static_trace_data_action): Delete.
9772 (enum tracepoint_type): New.
9773 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
9774 <actions_str, step_actions, step_actions_str>: Only include in
9775 GDBserver.
fa593d66
PA
9776 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9777 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9778 (tracepoints): Use IP_AGENT_EXPORT.
9779 (last_tracepoint): Don't include in the IPA.
9780 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9781 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9782 (alloced_trace_state_variables): New.
9783 (trace_state_variables): Use IP_AGENT_EXPORT.
9784 (traceframe_t): Delete unused variable.
9785 (circular_trace_buffer): Don't include in the IPA.
9786 (trace_buffer_start): Delete.
9787 (struct trace_buffer_control): New.
9788 (trace_buffer_free): Delete.
9789 (struct ipa_trace_buffer_control): New.
9790 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9791 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9792 New.
9793 (trace_buffer_ctrl): New.
9794 (TRACE_BUFFER_CTRL_CURR): New.
9795 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9796 Reimplement as macros.
9797 (trace_buffer_wrap): Delete.
9798 (traceframe_write_count, traceframe_read_count)
9799 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9800 (struct tracepoint_hit_ctx) <type>: New field.
9801 (struct fast_tracepoint_ctx): New.
9802 (memory_barrier): New.
9803 (cmpxchg): New.
9804 (record_tracepoint_error): Update atomically in the IPA.
9805 (clear_inferior_trace_buffer): New.
9806 (about_to_request_buffer_space): New.
9807 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9808 updating the same buffer.
9809 (add_tracepoint): Default the tracepoint's type to trap
9810 tracepoint, and orig_size to -1.
9811 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9812 internal variables.
9813 (create_trace_state_variable): New parameter `gdb'. Handle it.
9814 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9815 (cmd_qtdp): Handle fast tracepoints.
9816 (cmd_qtdv): Adjust.
9817 (max_jump_pad_size): New.
9818 (gdb_jump_pad_head): New.
9819 (get_jump_space_head): New.
9820 (claim_jump_space): New.
9821 (sort_tracepoints): New.
9822 (MAX_JUMP_SIZE): New.
9823 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9824 IPA.
9825 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9826 support. Upload fast traceframes, and delete internal IPA
9827 breakpoints.
9828 (stop_tracing_handler): New.
9829 (flush_trace_buffer_handler): New.
9830 (cmd_qtstop): Upload fast tracepoints.
9831 (response_tracepoint): Handle fast tracepoints.
9832 (tracepoint_finished_step): Upload fast traceframes. Set the
9833 tracepoint hit context's tracepoint type.
9834 (handle_tracepoint_bkpts): New.
9835 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9836 type. Add comment about fast tracepoints.
9837 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9838 non-existing action_str field.
9839 (get_context_regcache): Handle fast tracepoints.
9840 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9841 to the regcache.
9842 (fast_tracepoint_from_jump_pad_address): New.
9843 (fast_tracepoint_from_ipa_tpoint_address): New.
9844 (collecting_t): New.
9845 (force_unlock_trace_buffer): New.
9846 (fast_tracepoint_collecting): New.
9847 (collecting): New.
9848 (gdb_collect): New.
9849 (write_inferior_data_ptr): New.
9850 (target_tp_heap): New.
9851 (target_malloc): New.
9852 (download_agent_expr): New.
9853 (UALIGN): New.
9854 (download_tracepoints): New.
9855 (download_trace_state_variables): New.
9856 (upload_fast_traceframes): New.
9857 (IPA_FIRST_TRACEFRAME): New.
9858 (IPA_NEXT_TRACEFRAME_1): New.
9859 (IPA_NEXT_TRACEFRAME): New.
9860 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9861 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9862 (gdb_jump_pad_buffer_end): New.
9863 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9864 (initialize_tracepoint): Adjust.
9865 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9866 buffer. Initialize the low module.
9867 * utils.c (PREFIX, TOOLNAME): New.
9868 (malloc_failure): Use PREFIX.
9869 (error): In the IPA, an error causes an exit.
9870 (fatal, warning): Use PREFIX.
9871 (internal_error): Use TOOLNAME.
9872 (NUMCELLS): Increase to 10.
9873 * configure, config.in: Regenerate.
9874
d149dd1d
PA
98752010-06-01 Pedro Alves <pedro@codesourcery.com>
9876
9877 * server.c (handle_query) <qSupported>: Do two passes over the
9878 qSupported string to avoid nesting strtok.
9879
f6528abd
JK
98802010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9881
9882 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9883 (CDEPS): New.
9884 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9885 -Wl,--dynamic-list.
9886 * configure: Regenerate.
9887 * proc-service.list: New.
9888
ca2a87a0
JK
98892010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9890
9891 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9892 New comment.
9893
363a6e9f
OS
98942010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9895
9896 * gdbreplay.c (remote_open): Check error return from socket() call by
9897 its equality to -1 not by it being negative.
9898 * remote-utils.c (remote_open): Likewise.
9899
d23b6cb1
PA
99002010-05-23 Pedro Alves <pedro@codesourcery.com>
9901
9902 * config.h: Regenerate.
9903
28d3cf85
MK
99042010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9905
9906 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9907 doesn't provide PTRACE_GET_THREAD_AREA.
9908
fea36a59
MK
99092010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9910
9911 * linux-m68k-low.c: Include <asm/ptrace.h>
9912 (ps_get_thread_area): Implement.
9913
24b066ba
DE
99142010-05-03 Doug Evans <dje@google.com>
9915
9916 * event-loop.c (struct callback_event): New struct.
9917 (callback_list): New global.
9918 (append_callback_event, delete_callback_event): New functions.
9919 (process_callback): New function.
9920 (start_event_loop): Call it.
9921 * remote-utils.c (NOT_SCHEDULED): Define.
9922 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9923 moved out of readchar.
9924 (readchar): Rewrite. Call reschedule before returning.
9925 (reset_readchar): New function.
9926 (remote_close): Call it.
9927 (process_remaining, reschedule): New functions.
9928 * server.h (callback_handler_func): New typedef.
9929 (append_callback_event, delete_callback_event): Declare.
9930
9836d6ea
PA
99312010-05-03 Pedro Alves <pedro@codesourcery.com>
9932
9933 * proc-service.c (ps_pglobal_lookup): Use
9934 thread_db_look_up_one_symbol.
9935 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9936 parameter. Use it instead of all_symbols_looked_up.
9937 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9938 field.
9939 (all_symbols_looked_up): Don't declare.
9940 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9941 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9942 field.
9943 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9944 Set all_symbols_looked_up here.
9945 (thread_db_look_up_one_symbol): New.
9946 (thread_db_get_tls_address): Adjust.
9947 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9948 thread_db object on the heap, and tentatively set it in the
9949 process structure.
9950 (thread_db_init): Don't set all_symbols_looked_up here.
9951 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9952
7984d532
PA
99532010-05-03 Pedro Alves <pedro@codesourcery.com>
9954
9955 * linux-low.c (linux_kill, linux_detach): Adjust.
9956 (status_pending_p_callback): Remove redundant statement. Check
9957 for !TARGET_WAITIKIND_IGNORE, instead of
9958 TARGET_WAITKIND_STOPPED.
9959 (handle_tracepoints): Make sure LWP is locked. Adjust.
9960 (linux_wait_for_event_1): Adjust.
9961 (linux_cancel_breakpoints): New.
9962 (unsuspend_one_lwp): New.
9963 (unsuspend_all_lwps): New.
9964 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9965 (send_sigstop_callback): Change return type to int, add new
9966 `except' parameter and handle it.
9967 (suspend_and_send_sigstop_callback): New.
9968 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9969 pass them down. If SUSPEND, also increment the lwp's suspend
9970 count.
9971 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9972 (need_step_over_p): Don't consider suspended LWPs.
9973 (start_step_over): Adjust.
9974 (proceed_one_lwp): Change return type to int, add new `except'
9975 parameter and handle it.
9976 (unsuspend_and_proceed_one_lwp): New.
9977 (proceed_all_lwps): Use find_inferior instead of
9978 for_each_inferior.
9979 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9980 also decrement the suspend count of LWPs. Pass `except' down,
9981 instead of hacking its suspend count.
9982 (linux_pause_all): Add `freeze' parameter. Adjust.
9983 (linux_unpause_all): New.
9984 (linux_target_ops): Install linux_unpause_all.
9985 * server.c (handle_status): Adjust.
9986 * target.h (struct target_ops): New fields `unpause_all' and
9987 `cancel_breakpoints'. Add new parameter to `pause_all'.
9988 (pause_all): Add new `freeze' parameter.
9989 (unpause_all): New.
9990 (cancel_breakpoints): New.
9991 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9992 cancel breakpoints.
9993 (cmd_qtstart): Pause threads.
9994 (stop_tracing): Pause threads, and cancel breakpoints.
9995 * win32-low.c (win32_target_ops): Adjust.
9996
e471f25b
PA
99972010-05-03 Pedro Alves <pedro@codesourcery.com>
9998
9999 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10000 the inferior right away from here...
10001 (linux_wait_1): ... to here, and adjust to check the thread's
10002 last_resume_kind instead of the lwp's step or stop_expected flags.
10003
1915ef4f
PA
100042010-05-02 Pedro Alves <pedro@codesourcery.com>
10005
10006 * README: Use consistent `GDB' and `GDBserver' spellings.
10007
f9e39928
PA
100082010-05-02 Pedro Alves <pedro@codesourcery.com>
10009
10010 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10011 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10012 (linux_detach_one_lwp): Assume the lwp is stopped.
10013 (any_thread_of): Delete.
10014 (linux_detach): Stop all lwps here. Don't blindly delete all
10015 breakpoints.
10016 (delete_lwp_callback): New.
10017 (linux_mourn): Delete all lwps of the process that is gone.
10018 (linux_wait_1): Don't delete the last lwp of the process here.
10019 * mem-break.h (mark_breakpoints_out): Declare.
10020 * mem-break.c (mark_breakpoints_out): New.
10021 (free_all_breakpoints): Use it.
10022 * server.c (handle_target_event): If the process is gone, mark
10023 breakpoints out.
10024 * thread-db.c (struct thread_db) <create_bp>: New field.
10025 (thread_db_enable_reporting): Fix prototype. Store a thread event
10026 breakpoint reference in the thread_db struct.
10027 (thread_db_load_search): Clear the thread_db object.
10028 (try_thread_db_load_1): Ditto.
10029 (switch_to_process): New.
10030 (disable_thread_event_reporting): Use it.
10031 (remove_thread_event_breakpoints): New.
10032 (thread_db_detach, thread_db_mourn): Use it.
10033
1e7fc18c
PA
100342010-05-01 Pedro Alves <pedro@codesourcery.com>
10035
10036 * linux-low.c (linux_enable_event_reporting): New.
10037 (linux_wait_for_event_1, handle_extended_wait): Use it.
10038
02fc4de7
PA
100392010-04-30 Pedro Alves <pedro@codesourcery.com>
10040
10041 * linux-low.c (linux_kill_one_lwp, linux_kill)
10042 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10043 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10044 SIGSTOP even if the LWP is stopped.
10045 (send_sigstop_callback): New.
10046 (stop_all_lwps): Use send_sigstop_callback instead.
10047 (linux_resume_one_thread): Adjust.
10048 (proceed_one_lwp): Still proceed an LWP that the client has
10049 requested to stop, if we haven't reported it as stopped yet. Make
10050 sure that LWPs the client want stopped, have a pending SIGSTOP.
10051
bc3b5632
DE
100522010-04-26 Doug Evans <dje@google.com>
10053
ae1ada35
DE
10054 * server.c (handle_general_set): Make static.
10055
bc3b5632
DE
10056 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10057 Print received char after testing for error/eof instead of before.
10058 (input_interrupt): Tweak comment.
10059
65730243
DE
100602010-04-23 Doug Evans <dje@google.com>
10061
10062 * server.c (start_inferior): Print inferior argv if --debug.
10063
a8ae7dc0
AR
100642010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10065
10066 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10067 * nto-x86-low.c: Include server.h
10068
1c07cc19
PM
100692010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10070
10071 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10072 be consistent with other sources of this directory.
10073 (init_registers_amd64): Correct name of source file of this function
10074 in the comment.
10075
e0a61e09
PM
100762010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10077
10078 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10079 64-bit executables.
10080
54709339
PM
100812010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10082
10083 * win32-i386-low.c: Add 64-bit support.
10084 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10085 (init_registers_amd64): Declare.
10086 (mappings): Add 64-bit version of array.
10087 (init_windows_x86): New function.
10088 (the_low_target): Change init_arch field to init_windows_x86.
10089
e8f0053d
PM
100902010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10091
10092 * win32-low.c: Adapt to support also 64-bit architecture.
10093 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10094 (get_image_name): Use SIZE_T type for local variable `done'.
10095 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10096 (toolhelp_get_dll_name): Idem.
10097 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10098 Use uintptr_t typecast to avoid warning.
10099 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10100 (handle_exception): Use phex_nz to avoid warning.
10101 (win32_wait): Remove unused local variable `process'.
10102
c481e77e
PM
101032010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10104
10105 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10106 `amd64-avx.o'.
10107
12ea4b69
PM
101082010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10109
10110 * configure.ac: Use `ws2_32' library for srv_mingw.
10111 * configure: Regenerate.
10112 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10113 * remote-utils.c: Likewise.
10114
f6d1620c
L
101152010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10116
10117 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10118 if __x86_64__ is defined.
10119
8e642873
PM
101202010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10121
10122 * configure: Regenerate.
10123
711e434b
PM
101242010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10125
10126 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10127 * target.h (target_ops): New get_tib_address field.
10128 * win32-low.h (win32_thread_info): Add thread_local_base field.
10129 * win32-low.c (child_add_thread): Add tlb argument.
10130 Set thread_local_base field to TLB.
10131 (get_child_debug_event): Adapt to child_add_thread change.
10132 (win32_get_tib_address): New function.
10133 (win32_target_ops): Set get_tib_address field to
10134 win32_get_tib_address.
10135 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10136
505106cd
PA
101372010-04-12 Pedro Alves <pedro@codesourcery.com>
10138
505106cd
PA
10139 * linux-low.c (linux_mourn): Also remove the process.
10140 * server.c (handle_target_event): Don't remove the process here.
10141 * nto-low.c (nto_mourn): New.
10142 (nto_target_ops): Install it.
10143 * spu-low.c (spu_mourn): New.
10144 (spu_target_ops): Install it.
10145 * win32-low.c (win32_mourn): New.
10146 (win32_target_ops): Install it.
10147
e8470a06
PA
101482010-04-12 Pedro Alves <pedro@codesourcery.com>
10149
10150 * server.h (buffer_xml_printf): Remove redundant `;'.
10151
45ba0d02
PA
101522010-04-12 Pedro Alves <pedro@codesourcery.com>
10153
10154 * regcache.c (set_register_cache): Invalidate regcaches before
10155 changing the register cache layout.
10156 (regcache_invalidate_one): Allow a NULL regcache.
10157 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10158 regcaches before changing the register cache layout or the target
10159 regsets.
10160
59e04013
L
101612010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10162
10163 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10164 variable warning on Linux/x86-64.
10165
8336d594
PA
101662010-04-11 Pedro Alves <pedro@codesourcery.com>
10167
10168 GDBserver disconnected tracing support.
10169
10170 * linux-low.c (linux_remove_process): Delete.
10171 (add_lwp): Don't set last_resume_kind here.
10172 (linux_kill): Use `mourn'.
10173 (linux_detach): Use `thread_db_detach', and `mourn'.
10174 (linux_mourn): New.
10175 (linux_attach_lwp_1): Adjust comment.
10176 (linux_attach): last_resume_kind moved the thread_info; adjust.
10177 (status_pending_p_callback): Adjust.
10178 (linux_wait_for_event_1): Adjust.
10179 (count_events_callback, select_singlestep_lwp_callback)
10180 (select_event_lwp_callback, cancel_breakpoints_callback)
10181 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10182 (proceed_one_lwp): Adjust.
10183 (linux_async): Add debug output.
10184 (linux_thread_stopped): New.
10185 (linux_pause_all): New.
10186 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10187 linux_pause_all.
10188 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10189 (thread_db_free): Delete declaration.
10190 (thread_db_detach, thread_db_mourn): Declare.
10191 * thread-db.c (thread_db_init): Use thread_db_mourn.
10192 (thread_db_free): Delete, split in two.
10193 (disable_thread_event_reporting): New.
10194 (thread_db_detach): New.
10195 (thread_db_mourn): New.
10196
10197 * server.h (struct thread_info) <last_resume_kind>: New field.
10198 <attached>: Add comment.
10199 <gdb_detached>: New field.
10200 (handler_func): Change return type to int.
10201 (handle_serial_event, handle_target_event): Ditto.
10202 (gdb_connected): Declare.
10203 (tracing): Delete.
10204 (disconnected_tracing): Declare.
10205 (stop_tracing): Declare.
10206
10207 * server.c (handle_query) <qSupported>: Report support for
10208 disconnected tracing.
10209 (queue_stop_reply_callback): Account for running threads.
10210 (gdb_wants_thread_stopped): New.
10211 (gdb_wants_all_threads_stopped): New.
10212 (gdb_reattached_process): New.
10213 (handle_status): Clear the `gdb_detached' flag of all processes.
10214 In all-stop, stop all threads.
10215 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10216 (process_serial_event): If the remote connection breaks, or if an
10217 exit was forced with "monitor exit", force an event loop exit.
10218 Handle disconnected tracing on detach.
10219 (handle_serial_event): Adjust.
10220 (handle_target_event): If GDB isn't connected, forward events back
10221 to the inferior, unless the last process exited, in which case,
10222 exit gdbserver. Adjust interface.
10223
10224 * remote-utils.c (remote_open): Don't block in accept. Instead
10225 register an event loop source on the listen socket file
10226 descriptor. Refactor bits into ...
10227 (listen_desc): ... this new global.
10228 (gdb_connected): ... this new function.
10229 (enable_async_notification): ... this new function.
10230 (handle_accept_event): ... this new function.
10231 (remote_close): Clear remote_desc.
10232
10233 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10234
10235 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10236 New fields.
10237 (mourn_inferior): Define.
10238 (target_process_qsupported): Avoid the dangling else problem.
10239 (thread_stopped): Define.
10240 (pause_all): Define.
10241 (target_waitstatus_to_string): Declare.
10242 * target.c (target_waitstatus_to_string): New.
10243
10244 * tracepoint.c (tracing): Make extern.
10245 (disconnected_tracing): New.
10246 (stop_tracing): Make extern. Handle tracing stops due to GDB
10247 disconnecting.
10248 (cmd_qtdisconnected): New.
10249 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10250 (handle_tracepoint_general_set): Handle QTDisconnected.
10251
10252 * event-loop.c (event_handler_func): Change return type to int.
10253 (process_event): Bail out if the event handler wants the event
10254 loop to stop.
10255 (handle_file_event): Ditto.
10256 (start_event_loop): Bail out if the event handler wants the event
10257 loop to stop.
10258
10259 * nto-low.c (nto_target_ops): Adjust.
10260 * spu-low.c (spu_wait): Don't remove the process here.
10261 (spu_target_ops): Adjust.
10262 * win32-low.c (win32_wait): Don't remove the process here.
10263 (win32_target_ops): Adjust.
10264
5d267c4c
PA
102652010-04-11 Pedro Alves <pedro@codesourcery.com>
10266
10267 * regcache.c (realloc_register_cache): Invalidate inferior's
10268 regcache before recreating it.
10269
623ccd72
PA
102702010-04-09 Pedro Alves <pedro@codesourcery.com>
10271
10272 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10273
219f2f23
PA
102742010-04-09 Stan Shebs <stan@codesourcery.com>
10275 Pedro Alves <pedro@codesourcery.com>
10276
10277 * server.h (LONGEST): New.
10278 (struct thread_info) <while_stepping>: New field.
10279 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10280 Declare.
10281 (initialize_tracepoint, handle_tracepoint_general_set)
10282 (handle_tracepoint_query, tracepoint_finished_step)
10283 (tracepoint_was_hit, release_while_stepping_state_list):
10284 (current_traceframe): Declare.
10285 * server.c (handle_general_set): Handle tracepoint packets.
10286 (read_memory): New.
10287 (write_memory): New.
10288 (handle_search_memory_1): Use read_memory.
10289 (handle_query): Report support for conditional tracepoints, trace
10290 state variables, and tracepoint sources. Handle tracepoint
10291 queries.
10292 (main): Initialize the tracepoints module.
10293 (process_serial_event): Handle traceframe reads/writes.
10294
10295 * linux-low.c (handle_tracepoints): New.
10296 (linux_wait_1): Call it.
10297 (linux_resume_one_lwp): Handle while-stepping.
10298 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10299 (linux_target_ops): Install them.
10300 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10301 New field.
10302 * linux-x86-low.c (x86_supports_tracepoints): New.
10303 (the_low_target). Install it.
10304
10305 * mem-break.h (delete_breakpoint): Declare.
10306 * mem-break.c (delete_breakpoint): Make external.
10307
10308 * target.h (struct target_ops): Add `supports_tracepoints',
10309 `read_pc', and `write_pc' fields.
10310 (target_supports_tracepoints): Define.
10311 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10312 (phex_nz): New.
10313
10314 * regcache.h (struct regcache) <registers_owned>: New field.
10315 (init_register_cache, regcache_cpy): Declare.
10316 (regcache_read_pc, regcache_write_pc): Declare.
10317 (register_cache_size): Declare.
10318 (supply_regblock): Declare.
10319 * regcache.c (init_register_cache): New.
10320 (new_register_cache): Use it.
10321 (regcache_cpy): New.
10322 (register_cache_size): New.
10323 (supply_regblock): New.
10324 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10325
219f2f23
PA
10326 * tracepoint.c: New.
10327
10328 * Makefile.in (OBS): Add tracepoint.o.
10329 (tracepoint.o): New rule.
10330
3a13a53b
L
103312010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10332
10333 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10334 (i386-mmx.o): New.
10335 (i386-mmx.c): Likewise.
10336 (i386-mmx-linux.o): Likewise.
10337 (i386-mmx-linux.c): Likewise.
10338
10339 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10340 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10341 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10342 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10343
10344 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10345 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10346 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10347
1570b33e
L
103482010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10349
10350 * Makefile.in (clean): Updated.
10351 (i386-avx.o): New.
10352 (i386-avx.c): Likewise.
10353 (i386-avx-linux.o): Likewise.
10354 (i386-avx-linux.c): Likewise.
10355 (amd64-avx.o): Likewise.
10356 (amd64-avx.c): Likewise.
10357 (amd64-avx-linux.o): Likewise.
10358 (amd64-avx-linux.c): Likewise.
10359
10360 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10361 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10362 (srv_amd64_regobj): Add amd64-avx.o.
10363 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10364 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10365 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10366 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10367 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10368 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10369 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10370
10371 * i387-fp.c: Include "i386-xstate.h".
10372 (i387_xsave): New.
10373 (i387_cache_to_xsave): Likewise.
10374 (i387_xsave_to_cache): Likewise.
10375 (x86_xcr0): Likewise.
10376
10377 * i387-fp.h (i387_cache_to_xsave): Likewise.
10378 (i387_xsave_to_cache): Likewise.
10379 (x86_xcr0): Likewise.
10380
10381 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10382 * linux-crisv32-low.c (target_regsets): Likewise.
10383 * linux-m68k-low.c (target_regsets): Likewise.
10384 * linux-mips-low.c (target_regsets): Likewise.
10385 * linux-ppc-low.c (target_regsets): Likewise.
10386 * linux-s390-low.c (target_regsets): Likewise.
10387 * linux-sh-low.c (target_regsets): Likewise.
10388 * linux-sparc-low.c (target_regsets): Likewise.
10389 * linux-xtensa-low.c (target_regsets): Likewise.
10390
10391 * linux-low.c: Include <sys/uio.h>.
10392 (regsets_fetch_inferior_registers): Support nt_type.
10393 (regsets_store_inferior_registers): Likewise.
10394 (linux_process_qsupported): New.
10395 (linux_target_ops): Add linux_process_qsupported.
10396
10397 * linux-low.h (regset_info): Add nt_type.
10398 (linux_target_ops): Add process_qsupported.
10399
10400 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10401 and <sys/uio.h>.
10402 (init_registers_i386_avx_linux): New.
10403 (init_registers_amd64_avx_linux): Likewise.
10404 (xmltarget_i386_linux_no_xml): Likewise.
10405 (xmltarget_amd64_linux_no_xml): Likewise.
10406 (PTRACE_GETREGSET): Likewise.
10407 (PTRACE_SETREGSET): Likewise.
10408 (x86_fill_xstateregset): Likewise.
10409 (x86_store_xstateregset): Likewise.
10410 (use_xml): Likewise.
10411 (x86_linux_update_xmltarget): Likewise.
10412 (x86_linux_process_qsupported): Likewise.
10413 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10414 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10415 init_registers_i386_linux here. Call
10416 x86_linux_update_xmltarget.
10417 (the_low_target): Add x86_linux_process_qsupported.
10418
10419 * server.c (handle_query): Call target_process_qsupported.
10420
10421 * target.h (target_ops): Add process_qsupported.
10422 (target_process_qsupported): New.
10423
fc7238bb
PA
104242010-04-03 Pedro Alves <pedro@codesourcery.com>
10425
10426 * inferiors.c (add_thread): Set last_status kind to
10427 TARGET_WAITKIND_IGNORE.
10428 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10429 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10430 (linux_wait_1): Move `thread' local definition to block that uses
10431 it. Don't NULL initialize `event_child'.
10432 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10433 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10434 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10435
bdabb078
PA
104362010-04-01 Pedro Alves <pedro@codesourcery.com>
10437
10438 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10439 an extended waitstatus, or by a watchpoint.
10440 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10441 thread was stepping or has been stopped by a watchpoint.
10442
d3bbe7a0
PA
104432010-04-01 Pedro Alves <pedro@codesourcery.com>
10444
10445 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10446 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10447 of another, then delete the previous, and validate all
10448 breakpoints.
10449 (validate_inserted_breakpoint): New.
10450 (delete_disabled_breakpoints): New.
10451 (validate_breakpoints): New.
10452 (check_mem_read): Validate breakpoints before trusting their
10453 shadow. Delete disabled breakpoints.
10454 (check_mem_write): Validate breakpoints before trusting they
10455 should be inserted. Delete disabled breakpoints.
10456 * mem-break.h (validate_breakpoints):
10457 * server.c (handle_query): Validate breakpoints when we see a
10458 qSymbol query.
10459
8b07ae33
PA
104602010-04-01 Pedro Alves <pedro@codesourcery.com>
10461
10462 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10463 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10464 if we could tell there's a GDB breakpoint at stop_pc.
10465 (need_step_over_p): Don't do a step over if we find a GDB
10466 breakpoint at the resume PC.
10467
10468 * mem-break.c (struct raw_breakpoint): New.
10469 (enum bkpt_type): New type `gdb_breakpoint'.
10470 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10471 fields. New field `raw'.
10472 (find_raw_breakpoint_at): New.
10473 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10474 breakpoint instead.
10475 (set_breakpoint_at): Adjust.
10476 (delete_raw_breakpoint): New.
10477 (release_breakpoint): New.
10478 (delete_breakpoint): Rename to...
10479 (delete_breakpoint_1): ... this. Add proc parameter. Use
10480 release_breakpoint. Return ENOENT.
10481 (delete_breakpoint): Reimplement.
10482 (find_breakpoint_at): Delete.
10483 (find_gdb_breakpoint_at): New.
10484 (delete_breakpoint_at): Delete.
10485 (set_gdb_breakpoint_at): New.
10486 (delete_gdb_breakpoint_at): New.
10487 (gdb_breakpoint_here): New.
10488 (set_reinsert_breakpoint): Use release_breakpoint.
10489 (uninsert_breakpoint): Rename to ...
10490 (uninsert_raw_breakpoint): ... this.
10491 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10492 (reinsert_raw_breakpoint): Change parameter type to
10493 raw_breakpoint.
10494 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10495 instead.
10496 (check_breakpoints): Adjust. Use release_breakpoint.
10497 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10498 (breakpoint_inserted_here): Ditto.
10499 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10500 Don't trust the breakpoint's shadow if it is not inserted.
10501 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10502 (delete_all_breakpoints): Adjust.
10503 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10504 use delete_breakpoint_1.
10505
10506 * mem-break.h (breakpoints_supported): Delete declaration.
10507 (set_gdb_breakpoint_at): Declare.
10508 (gdb_breakpoint_here): Declare.
10509 (delete_breakpoint_at): Delete.
10510 (delete_gdb_breakpoint_at): Declare.
10511
10512 * server.h (struct raw_breakpoint): Forward declare.
10513 (struct process_info): New field `raw_breakpoints'.
10514
10515 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10516 breakpoints.
10517
6bf5e0ba
PA
105182010-03-24 Pedro Alves <pedro@codesourcery.com>
10519
10520 * linux-low.c (status_pending_p_callback): Fix comment.
10521 (linux_wait_for_event_1): Move most of the internal breakpoint
10522 handling from here...
10523 (linux_wait_1): ... to here.
10524 (count_events_callback): New.
10525 (select_singlestep_lwp_callback): New.
10526 (select_event_lwp_callback): New.
10527 (cancel_breakpoints_callback): New.
10528 (select_event_lwp): New.
10529 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10530 priority to all LWPs that have had events that should be reported
10531 to the client. Cancel breakpoints when about to reporting the
10532 event to the client, not while stopping lwps. No longer cancel
10533 finished single-steps here.
10534 (cancel_finished_single_step): Delete.
10535 (cancel_finished_single_steps): Delete.
10536
414a389f
PA
105372010-03-24 Pedro Alves <pedro@codesourcery.com>
10538
10539 * mem-break.c (enum bkpt_type): New.
10540 (struct breakpoint): New field `type'.
10541 (set_breakpoint_at): Change return type to struct breakpoint
10542 pointer. Set type to `other_breakpoint' by default.
10543 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10544 in the breakpoint list.
10545 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10546 (reinsert_breakpoint): Rename to ...
10547 (reinsert_raw_breakpoint): ... this.
10548 (reinsert_breakpoints_at): Adjust.
10549 * mem-break.h (struct breakpoint): Declare.
10550 (set_breakpoint_at): Change return type to struct breakpoint
10551 pointer.
10552
2280c721
PA
105532010-03-24 Pedro Alves <pedro@codesourcery.com>
10554
10555 * server.c (handle_query): Assign, not compare.
10556
d50171e4
PA
105572010-03-24 Pedro Alves <pedro@codesourcery.com>
10558
10559 Teach linux gdbserver to step-over-breakpoints.
10560
10561 * linux-low.c (can_hardware_single_step): New.
10562 (supports_breakpoints): New.
10563 (handle_extended_wait): If stopping threads, read the stop pc of
10564 the new cloned LWP.
10565 (get_pc): New.
10566 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10567 low target doesn't support retrieving the PC.
10568 (add_lwp): Set last_resume_kind to resume_continue.
10569 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10570 (linux_attach): Don't clear stop_expected. Set the lwp's
10571 last_resume_kind to resume_stop.
10572 (linux_detach_one_lwp): Don't check for removed breakpoints.
10573 (check_removed_breakpoint): Delete.
10574 (status_pending_p): Rename to ...
10575 (status_pending_p_callback): ... this. Don't check for removed
10576 breakpoints. Don't consider threads that are stopped from GDB's
10577 perspective.
10578 (linux_wait_for_lwp): Always read the stop_pc here.
10579 (cancel_breakpoint): New.
10580 (step_over_bkpt): New global.
10581 (linux_wait_for_event_1): Implement stepping over breakpoints.
10582 (gdb_wants_lwp_stopped): New.
10583 (gdb_wants_all_stopped): New.
10584 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10585 single-step traps here. Store the thread's last reported target
10586 wait status.
10587 (send_sigstop): Don't clear stop_expected. Always set it,
10588 instead.
10589 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10590 (cancel_finished_single_step): New.
10591 (cancel_finished_single_steps): New.
10592 (wait_for_sigstop): Don't cancel finished single-step traps here.
10593 (linux_resume_one_lwp): Don't check for removed breakpoints.
10594 Don't set `step' on non-hardware step archs.
10595 (linux_set_resume_request): Ignore resume_stop requests if already
10596 stopping or stopped. Set the lwp's last_resume_kind.
10597 (resume_status_pending_p): Don't check for removed breakpoints.
10598 (need_step_over_p): New.
10599 (start_step_over): New.
10600 (finish_step_over): New.
10601 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10602 requests. Clear the thread's last reported target waitstatus.
10603 Don't use the `suspended' flag. Don't consider pending breakpoints.
10604 (linux_resume): Start a step-over if necessary.
10605 (proceed_one_lwp): New.
10606 (proceed_all_lwps): New.
10607 (unstop_all_lwps): New.
10608 * linux-low.h (struct lwp_info): Rewrite comment for the
10609 `suspended' flag. Add the `stop_pc' field. Delete the
10610 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10611 Add `'last_resume_kind' and `need_step_over' fields.
10612 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10613 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10614 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10615 (set_raw_breakpoint_at): New.
10616 (set_breakpoint_at): Rewrite to use it.
10617 (reinsert_breakpoint_handler): Delete.
10618 (set_reinsert_breakpoint): New.
10619 (reinsert_breakpoint_by_bp): Delete.
10620 (delete_reinsert_breakpoints): New.
10621 (uninsert_breakpoint): Rewrite.
10622 (uninsert_breakpoints_at): New.
10623 (reinsert_breakpoint): Rewrite.
10624 (reinsert_breakpoints_at): New.
10625 (check_breakpoints): Rewrite.
10626 (breakpoint_here): New.
10627 (breakpoint_inserted_here): New.
10628 (check_mem_read): Adjust.
10629 * mem-break.h (breakpoints_supported, breakpoint_here)
10630 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10631 (reinsert_breakpoint_by_bp): Delete declaration.
10632 (delete_reinsert_breakpoints): Declare.
10633 (reinsert_breakpoint): Delete declaration.
10634 (reinsert_breakpoints_at): Declare.
10635 (uninsert_breakpoint): Delete declaration.
10636 (uninsert_breakpoints_at): Declare.
10637 (check_breakpoints): Adjust prototype.
10638 * server.h: Adjust include order.
10639 (struct thread_info): Declare here. Add a `last_status' field.
10640
30ba68cb
MS
106412010-03-23 Michael Snyder <msnyder@vmware.com>
10642
10643 * server.c (crc32): New function.
10644 (handle_query): Add handling for 'qCRC:' request.
10645
b9a881c2
PA
106462010-03-23 Pedro Alves <pedro@codesourcery.com>
10647
10648 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10649 lwp had been stopped by a watchpoint.
10650
e92d13d5
PA
106512010-03-16 Pedro Alves <pedro@codesourcery.com>
10652
10653 * server.h (internal_error): Declare.
10654 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10655 * utils.c (internal_error): New function.
10656
64daa791
AS
106572010-03-15 Andreas Schwab <schwab@redhat.com>
10658
10659 * configure.srv: Fix typo setting srv_regobj.
10660
f52cd8cd
PA
106612010-03-15 Pedro Alves <pedro@codesourcery.com>
10662
10663 * linux-low.c (fetch_register): Avoid passing a non string literal
10664 format to `error'.
10665 (usr_store_inferior_registers): Ditto.
10666
93ae6fdc
PA
106672010-03-14 Pedro Alves <pedro@codesourcery.com>
10668
10669 * linux-low.c (linux_write_memory): Bail out early if peeking
10670 memory failed.
10671
c3adc08c
PA
106722010-03-14 Pedro Alves <pedro@codesourcery.com>
10673
10674 * linux-low.h (struct lwp_info): New fields
10675 `stopped_by_watchpoint' and `stopped_data_address'.
10676 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10677 here, and cache them in the lwp object.
10678 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10679 directly.
10680 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10681 field.
10682 (linux_stopped_by_watchpoint): Rewrite.
10683 (linux_stopped_data_address): Rewrite.
10684
bce522a2
PA
106852010-03-06 Simo Melenius <simo.melenius@iki.fi>
10686
10687 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10688 switching the current inferior, not before.
10689
90884b2b
L
106902010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10691
10692 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10693 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10694 i386-linux.c and amd64-linux.c.
10695 (reg-i386.o): Removed.
10696 (reg-i386.c): Likewise.
10697 (reg-i386-linux.o): Likewise.
10698 (reg-i386-linux.c): Likewise.
10699 (reg-x86-64.o): Likewise.
10700 (reg-x86-64.c): Likewise.
10701 (reg-x86-64-linux.o): Likewise.
10702 (reg-x86-64-linux.c): Likewise.
10703 (i386.o): New.
10704 (i386.c): Likewise.
10705 (i386-linux.o): Likewise.
10706 (i386-linux.c): Likewise.
10707 (amd64.o): Likewise.
10708 (amd64.c): Likewise.
10709 (amd64-linux.o): Likewise.
10710 (amd64-linux.c): Likewise.
10711
10712 * configure.srv (srv_i386_regobj): New.
10713 (srv_i386_linux_regobj): Likewise.
10714 (srv_amd64_regobj): Likewise.
10715 (srv_amd64_linux_regobj): Likewise.
10716 (srv_i386_32bit_xmlfiles): Likewise.
10717 (srv_i386_64bit_xmlfiles): Likewise.
10718 (srv_i386_xmlfiles): Likewise.
10719 (srv_amd64_xmlfiles): Likewise.
10720 (srv_i386_linux_xmlfiles): Likewise.
10721 (srv_amd64_linux_xmlfiles): Likewise.
10722 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10723 srv_xmlfiles to $srv_i386_xmlfiles.
10724 (i[34567]86-*-mingw32ce*): Likewise.
10725 (i[34567]86-*-mingw*): Likewise.
10726 (i[34567]86-*-nto*): Likewise.
10727 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10728 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10729 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10730 (x86_64-*-linux*): Likewise.
10731
10732 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10733 (init_registers_amd64_linux): New.
10734 (x86_arch_setup): Replace init_registers_x86_64_linux with
10735 init_registers_amd64_linux.
10736
193f13e6
MK
107372010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10738
10739 * configure.ac: Check for libdl. If it is not available link against
10740 static libthread_db.
10741 * configure: Regenerate.
10742
85d721b8
PA
107432010-02-22 Pedro Alves <pedro@codesourcery.com>
10744
10745 PR9605
10746
10747 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10748 handing a read watchpoint.
10749 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10750
6076632b
DE
107512010-02-12 Doug Evans <dje@google.com>
10752
10753 * linux-low.c (linux_supports_tracefork_flag): Document.
10754 (linux_look_up_symbols): Add comment.
10755
3327ccf7
L
107562010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10757
10758 * regcache.c (supply_register): Clear regcache if buf is NULL.
10759
0718675c 107602010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 10761 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
10762
10763 * inferiors.c (find_inferior): Add function documentation.
10764 (unloaded_dll): Handle the case where the unloaded dll has not
10765 been previously registered in the dll list.
10766
177321bd
DJ
107672010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10768
10769 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10770 (thumb2_breakpoint): New.
10771 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10772
2b009048
DJ
107732010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10774
10775 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10776 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10777 breakpoints.
10778
3be029c7
PA
107792010-01-21 Pedro Alves <pedro@codesourcery.com>
10780
10781 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10782
18f5de3b
JK
107832010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10784
10785 * linux-s390-low.c (s390_collect_ptrace_register)
10786 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10787
3743bb4f
DE
107882010-01-21 Doug Evans <dje@google.com>
10789
14ce3065
DE
10790 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10791 (PTRACE_ARG4_TYPE): New macro.
10792 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10793 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10794 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10795 (usr_store_inferior_registers): Ditto.
10796 (linux_read_memory, linux_write_memory): Ditto.
10797 (linux_test_for_tracefork): Ditto.
10798
3743bb4f
DE
10799 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10800 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10801
8b315be5
PA
108022010-01-21 Pedro Alves <pedro@codesourcery.com>
10803
10804 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10805 target.
10806
85492558
PA
108072010-01-21 Pedro Alves <pedro@codesourcery.com>
10808
10809 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10810 prototype to take a regcache. Adjust.
10811
442ea881
PA
108122010-01-20 Pedro Alves <pedro@codesourcery.com>
10813
10814 * regcache.h (struct thread_info): Forward declare.
10815 (struct regcache): New.
10816 (new_register_cache): Adjust prototype.
10817 (get_thread_regcache): Declare.
10818 (free_register_cache): Adjust prototype.
10819 (registers_to_string, registers_from_string): Ditto.
10820 (supply_register, supply_register_by_name, collect_register)
10821 (collect_register_as_string, collect_register_by_name): Ditto.
10822 * regcache.c (struct inferior_regcache_data): Delete.
10823 (get_regcache): Rename to ...
10824 (get_thread_regcache): ... this. Adjust. Switch inferior before
10825 fetching registers.
10826 (regcache_invalidate_one): Adjust.
10827 (regcache_invalidate): Fix prototype.
10828 (new_register_cache): Return the new register cache.
10829 (free_register_cache): Change prototype.
10830 (realloc_register_cache): Adjust.
10831 (registers_to_string): Change prototype to take a regcache. Adjust.
10832 (registers_from_string): Ditto.
10833 (register_data): Ditto.
10834 (supply_register): Ditto.
10835 (supply_register_by_name): Ditto.
10836 (collect_register): Ditto.
10837 (collect_register_as_string): Ditto.
10838 (collect_register_by_name): Ditto.
10839 * server.c (process_serial_event): Adjust.
10840 * linux-low.h (regset_fill_func, regset_store_func): Change
10841 prototype.
10842 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10843 Change prototype.
10844 * linux-low.c (get_stop_pc): Adjust.
10845 (check_removed_breakpoint): Adjust.
10846 (linux_wait_for_event): Adjust.
10847 (linux_resume_one_lwp): Adjust.
10848 (fetch_register): Add regcache parameter. Adjust.
10849 (usr_store_inferior_registers): Ditto.
10850 (regsets_fetch_inferior_registers): Ditto.
10851 (regsets_store_inferior_registers): Ditto.
10852 (linux_fetch_registers, linux_store_registers): Ditto.
10853 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10854 regcache. Adjust.
43aaf8b6
PA
10855 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10856 Ditto.
442ea881
PA
10857 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10858 prototype to take a regcache.
10859 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10860 * remote-utils.c (convert_ascii_to_int, outreg)
10861 (prepare_resume_reply): Change prototype to take a regcache.
10862 Adjust.
10863 * target.h (struct target_ops) <fetch_registers, store_registers>:
10864 Change prototype to take a regcache.
10865 (fetch_inferior_registers, store_inferior_registers): Change
10866 prototype to take a regcache. Adjust.
10867 * proc-service.c (ps_lgetregs): Adjust.
10868 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10869 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10870 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10871 take a regcache. Adjust.
10872 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10873 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10874 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10875 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10876 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10877 (cris_cannot_fetch_register):
10878 (cris_breakpoint_at): Change prototype to take a regcache.
10879 Adjust.
10880 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10881 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10882 to take a regcache. Adjust.
10883 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10884 Adjust.
10885 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10886 take a regcache. Adjust.
10887 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10888 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10889 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10890 * linux-mips-low.c (mips_get_pc):
10891 (mips_set_pc): Change prototype to take a regcache. Adjust.
10892 (mips_reinsert_addr): Adjust.
10893 (mips_collect_register): Change prototype to take a regcache.
10894 Adjust.
10895 (mips_supply_register):
10896 (mips_collect_register_32bit, mips_supply_register_32bit)
10897 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10898 (mips_store_fpregset): Ditto.
43aaf8b6
PA
10899 * linux-ppc-low.c (ppc_supply_ptrace_register)
10900 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
10901 (parse_spufs_run): Adjust.
10902 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10903 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10904 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10905 take a regcache. Adjust.
10906 * linux-s390-low.c (s390_collect_ptrace_register)
10907 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10908 (s390_set_pc): Change prototype to take a regcache. Adjust.
10909 (s390_arch_setup): Adjust.
10910 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10911 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10912 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10913 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10914 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10915 regcache. Adjust.
10916 (sparc_breakpoint_at): Adjust.
10917 * linux-xtensa-low.c (xtensa_fill_gregset):
10918 (xtensa_store_gregset):
10919 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10920 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10921 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10922 prototype to take a regcache. Adjust.
10923 * win32-arm-low.c (arm_fetch_inferior_register)
10924 (arm_store_inferior_register): Change prototype to take a
10925 regcache. Adjust.
10926 * win32-i386-low.c (i386_fetch_inferior_register)
10927 (i386_store_inferior_register): Change prototype to take a
10928 regcache. Adjust.
10929 * win32-low.c (child_fetch_inferior_registers)
10930 (child_store_inferior_registers): Change prototype to take a
10931 regcache. Adjust.
10932 (win32_wait): Adjust.
10933 (win32_fetch_inferior_registers): Change prototype to take a
10934 regcache. Adjust.
10935 (win32_store_inferior_registers): Adjust.
10936 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10937 store_inferior_register>: Change prototype to take a regcache.
10938
60c3d7b0
DE
109392010-01-20 Doug Evans <dje@google.com>
10940
10941 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10942 #ifdef.
10943 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 10944 (W_STOPCODE): Provide definition if missing.
60c3d7b0 10945
dc146f7c
VP
109462010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10947
10948 * linux-low.c (linux_core_of_thread): New.
10949 (compare_ints, show_process, list_threads): New.
10950 (linux_qxfer_osdata): Report threads and cores.
10951 (linux_target_op): Register linux_core_of_thread.
10952 * remote-utils.c (prepare_resume_reply): Report the core.
10953 (buffer_xml_printf): Support %d specifier.
10954 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10955 New.
10956 (handle_query): Handle qXfer:threads. Announce availability
10957 thereof.
10958 * target.h (struct target_ops): New field core_of_thread.
10959
7803799a
UW
109602010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10961
10962 * Makefile.in (clean): Remove new generated files.
10963 (reg-s390.o, reg-s390.c): Remove rules.
10964 (reg-s390x.o, reg-s390x.c): Likewise.
10965 (s390-linux32.o, s390-linux32.c): Add rules.
10966 (s390-linux64.o, s390-linux64.c): Likewise.
10967 (s390x-linux64.o, s390x-linux64.c): Likewise.
10968 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10969 * linux-s390-low.c: Include <elf.h>.
10970 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10971 (init_registers_s390): Remove prototype.
10972 (init_registers_s390x): Likewise.
10973 (init_registers_s390_linux32): Add prototype.
10974 (init_registers_s390_linux64): Likewise.
10975 (init_registers_s390x_linux64): Likewise.
10976 (s390_num_regs_3264): New define.
10977 (s390_regmap_3264): New global variable.
10978 (s390_cannot_fetch_register): Remove obsolete check.
10979 (s390_cannot_store_register): Likewise.
10980 (s390_collect_ptrace_register): Handle upper/lower register halves.
10981 (s390_supply_ptrace_register): Likewise.
10982 (s390_fill_gregset): Update to register number changes.
10983 (s390_get_hwcap): New routine.
10984 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10985 Install appropriate regmap and register set.
10986
6e7ffa39
JB
109872010-01-01 Joel Brobecker <brobecker@adacore.com>
10988
10989 * server.c (gdbserver_version): Update copyright year to 2010.
10990 * gdbreplay.c (gdbreplay_version): Likewise.
10991
957f3f49
DE
109922009-12-28 Doug Evans <dje@google.com>
10993
10994 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10995 elf/external.h. Include <elf.h> instead but only if necessary.
10996
ca5c370d
PA
109972009-12-28 Pedro Alves <pedro@codesourcery.com>
10998
10999 * linux-low.c (linux_remove_process): Remove `detaching'
11000 parameter. Don't release/detach from thread_db here.
11001 (linux_kill): Release/detach from thread_db here, ...
11002 (linux_detach): ... and here, before actually detaching.
11003 (linux_wait_1): ... and here, when a process exits.
11004 * thread-db.c (any_thread_of): New.
11005 (thread_db_free): Switch the current inferior to a thread of the
11006 passed in process.
11007
4ee62156
DE
110082009-12-21 Doug Evans <dje@google.com>
11009
d90e6a88
DE
11010 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11011
c5f62d5f
DE
11012 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11013 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11014 warning ifndef __NR_tkill. Move setting of errno there too.
11015 Delete unnecessary resetting of errno after syscall.
11016 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11017
10e86dd7
DE
11018 * configure.ac: Check for dladdr.
11019 * config.in: Regenerate.
11020 * configure: Regenerate.
11021 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11022 (try_thread_db_load): Update.
11023
4ee62156
DE
11024 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11025
00f515da
DE
110262009-12-18 Doug Evans <dje@google.com>
11027
e9464885
DE
11028 * event-loop.c: Include unistd.h if it exists.
11029
07d4f67e
DE
11030 * linux-low.c (my_waitpid): Move definition away from being in
11031 between linux_tracefork_child/linux_test_for_tracefork.
11032
00f515da
DE
11033 * gdb_proc_service.h (psaddr_t): Fix type.
11034 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11035 signature to match glibc.
11036
1de1badb
DE
110372009-12-16 Doug Evans <dje@google.com>
11038
11039 * linux-low.c (linux_read_memory): Fix argument to read.
11040
aeeb81d1
PA
110412009-11-26 Pedro Alves <pedro@codesourcery.com>
11042
11043 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11044 events, don't leave current_inferior pointing at null.
11045
10357975
PA
110462009-11-26 Pedro Alves <pedro@codesourcery.com>
11047
11048 * win32-low.c (LOG): Delete.
11049 (OUTMSG): Output to stderr.
11050 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11051 on compile time LOG macro.
11052 (win32_wait): Fix debug output.
11053
cf6e3471
PA
110542009-11-26 Pedro Alves <pedro@codesourcery.com>
11055
11056 * win32-low.c (win32_add_one_solib): If the dll name is
11057 "ntdll.dll", prepend the system directory to the dll path.
11058
0c85e18e
MK
110592009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11060
11061 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11062
9ac544ce 110632009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11064 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11065
11066 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11067 * configure.ac: Check for __mcoldfire__ and set
11068 gdb_cv_m68k_is_coldfire.
11069 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11070 reg-cf.o and reg-m68k.o.
11071 * configure: Regenerated.
11072
fd7dd3e6
PA
110732009-11-16 Pedro Alves <pedro@codesourcery.com>
11074
11075 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11076 Pass it to thread_db_free.
11077 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11078 proper `detaching' argument to linux_remove_process.
11079 * linux-low.h (thread_db_free): Add `detaching' parameter.
11080 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11081 to thread_db_free.
11082 (thread_db_free): Add `detaching' parameter. Only
11083 call td_ta_clear_event if detaching from process.
11084
75aa492e
MK
110852009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11086
11087 * thread-db.c (thread_db_free): Fix typo.
11088
21e1bee4
PP
110892009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11090
11091 PR gdb/10838
11092 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11093
8838b45e
NS
110942009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11095
11096 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11097 with an i686 compiler.
11098 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11099 needed.
11100 * configure: Rebuilt.
11101
8a35fb51
SL
111022009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11103
11104 PR gdb/10783
11105
11106 * server.c (handle_search_memory_1): Correct read_addr initialization
11107 in loop for searching subsequent chunks.
11108
96f15937
PP
111092009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11110
11111 * configure.ac: New --with-libthread-db option.
11112 * thread-db.c: Allow direct dependence on libthread_db.
11113 (thread_db_free): Adjust.
11114 * config.in: Regenerate.
11115 * configure: Likewise.
889bf7c5 11116
5f7d1694
PP
111172009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11118
11119 PR gdb/10757
11120 * thread-db.c (attach_thread): New function.
11121 (maybe_attach_thread): Return success/failure.
11122 (find_new_threads_callback): Adjust.
889bf7c5
PA
11123 (thread_db_find_new_threads): Loop until no new threads.
11124
88e3b899
PA
111252009-10-13 Pedro Alves <pedro@codesourcery.com>
11126
11127 * proc-service.c (ps_lgetregs): Formatting.
11128
cdbfd419
PP
111292009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11130
11131 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11132 * configure.ac: Adjust.
11133 * linux-low.h (struct process_info_private): Move members to struct
11134 thread_db.
11135 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11136 * linux-low.c (linux_remove_process): Adjust.
11137 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11138 * server.c (handle_query): Move code ...
11139 (handle_monitor_command): ... here. New function.
11140 * target.h (struct target_ops): New member.
11141 * thread-db.c (struct thread_db): New.
11142 (libthread_db_search_path): New variable.
11143 (thread_db_create_event, thread_db_enable_reporting)
11144 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11145 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11146 (try_thread_db_load_1, dladdr_to_soname): New functions.
11147 (try_thread_db_load, thread_db_load_search): New functions.
11148 (thread_db_init): Search for libthread_db.
11149 (thread_db_free): New function.
11150 (thread_db_handle_monitor_command): Likewise.
11151 * config.in: Regenerate.
11152 * configure: Regenerate.
889bf7c5 11153
4168d2d6
UW
111542009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11155
11156 * spu-low.c (spu_kill): Wait for inferior to terminate.
11157 Call clear_inferiors.
11158 (spu_detach): Call clear_inferiors.
11159
81ecdfbb
RW
111602009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11161
11162 * aclocal.m4: Regenerate.
11163 * config.in: Likewise.
11164 * configure: Likewise.
11165
0b9ff2c0
UW
111662009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11167
11168 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11169 (parse_spufs_run): New function.
11170 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11171 (ppc_breakpoint_at): Handle SPU breakpoints.
11172
efcbbd14
UW
111732009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11174
11175 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11176 (SPUFS_MAGIC): Define.
11177 (spu_enumerate_spu_ids): New function.
11178 (linux_qxfer_spu): New function.
11179 (linux_target_ops): Install linux_qxfer_spu.
11180
f4d9bade
UW
111812009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11182
11183 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11184 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11185 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11186 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11187 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11188 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11189 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11190 (init_registers_powerpc_cell32l): Add prototype.
11191 (init_registers_powerpc_cell64l): Likewise.
11192 (ppc_arch_setup): Detect Cell/B.E. architecture.
11193
96e946ca
RW
111942009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11195
11196 * Makefile.in (datarootdir): New variable.
11197
58d6951d
DJ
111982009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11199
11200 * linux-low.c (linux_write_memory): Update debugging output.
11201 * Makefile.in (clean): Add new descriptions.
11202 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11203 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11204 * configure.srv: Add new files for arm*-*-linux*.
11205 * linux-arm-low.c: Add new declarations.
11206 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11207 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11208 (HWCAP_VFPv3D16): New.
11209 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11210 instead of __IWMMXT__.
11211 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11212 (arm_arch_setup): New.
11213 (target_regsets): Remove #ifdef. Add VFP regset.
11214 (the_low_target): Use arm_arch_setup.
11215
12b42a12
DJ
112162009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11217
11218 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11219 the main thread again.
11220
ac8c974e
AR
112212009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11222
11223 Adding Neutrino gdbserver.
11224 * configure: Regenerated.
11225 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11226 * configure.srv (i[34567]86-*-nto*): New target.
11227 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11228 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11229 (nto_comctrl) [__QNX__]: New function.
11230 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11231
4424e0c3 112322009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11233
11234 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11235 srv_tgtobj.
11236
912cf4ba
PA
112372009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11238 Pedro Alves <pedro@codesourcery.com>
11239
11240 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11241 don't support CONTEXT_EXTENDED_REGISTERS.
11242 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11243 (the_low_target): Install them.
11244 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11245 failing with ERROR_PIPE_NOT_CONNECTED.
11246
aa5ca48f
DE
112472009-06-30 Doug Evans <dje@google.com>
11248 Pierre Muller <muller@ics.u-strasbg.fr>
11249
11250 Add h/w watchpoint support to x86-linux, win32-i386.
11251 * Makefile.in (SFILES): Add i386-low.c
11252 (i386_low_h): Define.
11253 (i386-low.o): Add dependencies.
11254 (linux-x86-low.o): Add i386-low.h dependency.
11255 (win32-i386-low.o): Ditto.
11256 * i386-low.c: New file.
11257 * i386-low.h: New file.
11258 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11259 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11260 * linux-low.c (linux_add_process): Initialize arch_private.
11261 (linux_remove_process): Free arch_private.
11262 (add_lwp): Initialize arch_private.
11263 (delete_lwp): Free arch_private.
11264 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11265 provided.
11266 * linux-low.h (process_info_private): New member arch_private.
11267 (lwp_info): New member arch_private.
11268 (linux_target_ops): New members new_process, new_thread,
11269 prepare_to_resume.
11270 (ptid_of): New macro.
11271 * linux-x86-low.c: Include stddef.h, i386-low.h.
11272 (arch_process_info): New struct.
11273 (arch_lwp_info): New struct.
11274 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11275 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11276 (i386_dr_low_get_status): New function.
11277 (x86_insert_point, x86_remove_point): New functions.
11278 (x86_stopped_by_watchpoint): New function.
11279 (x86_stopped_data_address): New function.
11280 (x86_linux_new_process, x86_linux_new_thread): New functions.
11281 (x86_linux_prepare_to_resume): New function.
11282 (the_low_target): Add entries for insert_point, remove_point,
11283 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11284 prepare_to_resume.
11285 * server.c (debug_hw_points): New global.
11286 (monitor_show_help): Document set debug-hw-points.
11287 (handle_query): Process "set debug-hw-points".
11288 * server.h (debug_hw_points): Declare.
11289 (paddress): Declare.
11290 * utils.c (NUMCELLS, CELLSIZE): New macros.
11291 (get_sell, xsnprintf, paddress): New functions.
11292 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11293 remove_point, stopped_by_watchpoint, stopped_data_address.
11294 * win32-i386-low.c: Include i386-low.h.
11295 (debug_reg_state): Replaces dr.
11296 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11297 (i386_dr_low_get_status): New function.
11298 (i386_insert_point, i386_remove_point): New functions.
11299 (i386_stopped_by_watchpoint): New function.
11300 (i386_stopped_data_address): New function.
11301 (i386_initial_stuff): Update.
11302 (get_thread_context,set_thread_context,i386_thread_added): Update.
11303 (the_low_target): Add entries for insert_point,
11304 remove_point, stopped_by_watchpoint, stopped_data_address.
11305 * win32-low.c (win32_insert_watchpoint): New function.
11306 (win32_remove_watchpoint): New function.
11307 (win32_stopped_by_watchpoint): New function.
11308 (win32_stopped_data_address): New function.
11309 (win32_target_ops): Add entries for insert_watchpoint,
11310 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11311 * win32-low.h (win32_target_ops): New members insert_point,
11312 remove_point, stopped_by_watchpoint, stopped_data_address.
11313
d993e290
PA
113142009-06-25 Pedro Alves <pedro@codesourcery.com>
11315
11316 * server.c (process_serial_event): Re-return unsupported, not
11317 error, if the type isn't recognized. Re-allow supporting only
11318 insert or remove packets. Also call require_running for
11319 breakpoints. Add missing break statement to default case. Tidy.
11320 * target.h (struct target_ops): Rename insert_watchpoint to
11321 insert_point, and remove_watchpoint to remove_point.
11322
11323 * linux-low.h (struct linux_target_ops): Likewise.
11324 * linux-low.c (linux_insert_watchpoint): Rename to ...
11325 (linux_insert_point): ... this. Adjust.
11326 (linux_remove_watchpoint): Rename to ...
11327 (linux_remove_point): ... this. Adjust.
11328 (linux_target_ops): Adjust.
11329 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11330 (cris_insert_point): ... this.
11331 (cris_remove_watchpoint): Rename to ...
11332 (cris_remove_point): ... this.
11333 (the_low_target): Adjust.
11334
0f54c268
PM
113352009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11336
11337 * server.c (handle_v_kill): Pass signal_pid to
11338 kill_inferior if multi_process is zero.
11339
c6314022
AR
113402009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11341
11342 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11343 * target.h (target_ops): Comment for *_watchpoint to make it clear
11344 the functions can get types '0' and '1'.
11345
4463ce24
AR
113462009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11347
11348 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11349 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11350 * regcache.c (get_regcache): Likewise.
11351 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11352 * win32-low.c (child_fetch_inferior_registers): Remove check for
11353 regno 0.
11354
cf8fd78b
PA
113552009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11356 Pedro Alves <pedro@codesourcery.com>
11357
11358 * target.h (struct target_ops) <supports_multi_process>: New
11359 callback.
11360 (target_supports_multi_process): New.
11361 * server.c (handle_query): Even if GDB reports support, only
11362 enable multi-process if the target also supports it. Report
11363 multi-process support only if the target backend supports it.
11364 * linux-low.c (linux_supports_multi_process): New function.
11365 (linux_target_ops): Install it as target_supports_multi_process
11366 callback.
11367
47c0c975
DE
113682009-05-24 Doug Evans <dje@google.com>
11369
e09875d4
DE
11370 Global renaming of find_thread_pid to find_thread_ptid.
11371 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11372 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11373 All callers updated.
11374
e27d73f6
DE
11375 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11376 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11377 directly.
11378
47c0c975
DE
11379 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11380 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11381 (linux_resume_one_lwp): Ditto.
11382
2acc282a
DE
113832009-05-23 Doug Evans <dje@google.com>
11384
11385 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11386 from struct inferior_list_entry * to struct lwp_info *.
11387 All callers updated.
11388
9f1036c1
DE
113892009-05-13 Doug Evans <dje@google.com>
11390
11391 * linux-x86-low.c: Don't include assert.h.
11392 (x86_siginfo_fixup): Use fatal, not assert.
11393 (x86_arch_setup): Fix comment.
11394
d0722149
DE
113952009-05-12 Doug Evans <dje@google.com>
11396
11397 Biarch support for i386/amd64 gdbserver.
11398 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11399 Add linux-x86-low.c.
11400 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11401 (linux-x86-low.o): Add.
11402 * linux-x86-64-low.c: Delete.
11403 * linux-i386-low.c: Delete.
11404 * linux-x86-low.c: New file.
11405 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11406 linux-x86-low.o.
11407 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11408 linux-x86-low.o.
11409 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11410 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11411 (linux_child_pid_to_exec_file): New function.
11412 (elf_64_header_p, elf_64_file_p): New functions.
11413 (siginfo_fixup): New function.
11414 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11415 give target a chance to convert layout.
11416 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11417 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11418
fdeb2a12
DE
114192009-05-07 Doug Evans <dje@google.com>
11420
11421 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11422 (regsets_store_inferior_registers): Ditto.
11423
a6dbe5df
PA
114242009-05-06 Pedro Alves <pedro@codesourcery.com>
11425
11426 PR server/10048
11427
11428 * linux-low.c (must_set_ptrace_flags): Delete.
11429 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11430 of the global.
11431 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11432 `lwp->must_set_ptrace_flags' instead.
ba42693b 11433 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11434 (linux_wait_1): ... not here.
11435
5091eb23
DE
114362009-04-30 Doug Evans <dje@google.com>
11437
9f767825
DE
11438 * inferiors.c (started_inferior_callback): New function.
11439 (attached_inferior_callback): New function.
11440 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11441 * server.c (print_started_pid, print_attached_pid): New functions.
11442 (detach_or_kill_for_exit): New function.
11443 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11444 * server.h (have_started_inferiors_p): Declare.
11445 (have_attached_inferiors_p): Declare.
11446
5091eb23
DE
11447 * inferiors.c (remove_process): Fix memory leak, free process.
11448 * linux-low.c (linux_remove_process): New function.
11449 (linux_kill): Call it instead of remove_process.
11450 (linux_detach, linux_wait_1): Ditto.
11451
155c8968
PA
114522009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11453
11454 * configure.srv: Add x86 Windows CE target.
11455
7fe519cb
UW
114562009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11457
11458 * inferiors.c (get_thread_process): Make global.
11459 * server.h (get_thread_process): Add prototype.
11460 * thread-db.c (find_one_thread): Use get_thread_process
11461 instead of current_process.
11462 (thread_db_get_tls_address): Do not crash if called when
11463 thread layer is not yet initialized.
11464
5472f405
UW
114652009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11466
11467 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11468 * spu-low.c (current_tid): Rename to ...
11469 (current_ptid): ... this.
11470 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11471 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11472 ptid_get_lwp (current_ptid) instead of current_tid.
11473 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11474 instead of current_tid. Use find_process_pid to verify pid
11475 argument is valid. Pass proper argument to remove_process.
11476 (spu_thread_alive): Compare current_ptid instead of current_tid.
11477 (spu_resume): Likewise.
11478
55ac2b99
PA
114792009-04-02 Pedro Alves <pedro@codesourcery.com>
11480
11481 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11482 variable.
11483
95954743
PA
114842009-04-01 Pedro Alves <pedro@codesourcery.com>
11485
11486 Implement the multiprocess extensions, and add linux multiprocess
11487 support.
11488
11489 * server.h (ULONGEST): Declare.
11490 (struct ptid, ptid_t): New.
11491 (minus_one_ptid, null_ptid): Declare.
11492 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11493 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11494 (struct inferior_list_entry): Change `id' type from unsigned from
11495 to ptid_t.
11496 (struct sym_cache, struct breakpoint, struct
11497 process_info_private): Forward declare.
11498 (struct process_info): Declare.
11499 (current_process): Declare.
11500 (all_processes): Declare.
11501 (initialize_inferiors): Declare.
11502 (add_thread): Adjust to use ptid_t.
11503 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11504 (add_process, remove_process, find_thread_pid): Declare.
11505 (find_inferior_id): Adjust to use ptid_t.
11506 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11507 (multi_process): Declare.
11508 (push_event): Adjust to use ptid_t.
11509 (read_ptid, write_ptid): Declare.
11510 (prepare_resume_reply): Adjust to use ptid_t.
11511 (clear_symbol_cache): Declare.
11512 * inferiors.c (all_processes): New.
11513 (null_ptid, minus_one_ptid): New.
11514 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11515 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11516 (add_thread): Change unsigned long to ptid. Remove gdb_id
11517 parameter. Adjust.
11518 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11519 (gdb_id_to_thread): Rename to ...
11520 (find_thread_pid): ... this. Change unsigned long to ptid.
11521 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11522 (loaded_dll, pull_pid_from_list): Adjust.
11523 (add_process, remove_process, find_process_pid)
11524 (get_thread_process, current_process, initialize_inferiors): New.
11525 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11526 (struct target_waitstatus) <related_pid>: Ditto.
11527 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11528 return type to int.
11529 (struct target_ops) <join>: Add `pid' argument.
11530 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11531 (struct target_ops) <wait>: Add `ptid' field. Change return type
11532 to ptid.
11533 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11534 (mywait): Add `ptid' argument. Change return type to ptid_t.
11535 (target_pid_to_str): Declare.
11536 * target.c (set_desired_inferior): Adjust to use ptids.
11537 (mywait): Add new `ptid' argument. Adjust.
11538 (target_pid_to_str): New.
11539 * mem-break.h (free_all_breakpoints): Declare.
11540 * mem-break.c (breakpoints): Delelete.
11541 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11542 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11543 to use per-process breakpoint list.
11544 (free_all_breakpoints): New.
11545 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11546 (symbol_cache, all_symbols_looked_up): Delete.
11547 (hexchars): New.
11548 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11549 read_ptid): New.
11550 (prepare_resume_reply): Change ptid argument's type from unsigned
11551 long to ptid_t. Adjust. Implement W;process and X;process.
11552 (free_sym_cache, clear_symbol_cache): New.
11553 (look_up_one_symbol): Adjust to per-process symbol cache. *
11554 * server.c (cont_thread, general_thread, step_thread): Change type
11555 to ptid_t.
11556 (attached): Delete.
11557 (multi_process): New.
11558 (last_ptid): Change type to ptid_t.
11559 (struct vstop_notif) <ptid>: Change type to ptid_t.
11560 (queue_stop_reply, push_event): Change `ptid' argument's type to
11561 ptid_t.
11562 (discard_queued_stop_replies): Add `pid' argument.
11563 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11564 changes. Don't reference the `attached' global.
11565 (attach_inferior): Adjust to mywait interface changes.
11566 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11567 features. Handle and report "multiprocess+". Handle
11568 "qAttached:PID".
11569 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11570 changes.
11571 (handle_v_kill): New.
11572 (handle_v_stopped): Adjust to use target_pid_to_str.
11573 (handle_v_requests): Allow multiple attaches and runs when
11574 multiprocess extensions are in effect. Handle "vKill".
11575 (myresume): Adjust to use ptids.
11576 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11577 (handle_status): Adjust to discard_queued_stop_replies interface
11578 change.
11579 (first_thread_of, kill_inferior_callback)
11580 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11581 (main): Call initialize_inferiors. Adjust to use ptids, killing
11582 and detaching from all inferiors. Handle multiprocess packet
11583 variants.
11584 * linux-low.h: Include gdb_proc_service.h.
11585 (struct process_info_private): New.
11586 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11587 <lwpid_of>: Use ptid_get_lwp.
11588 (get_lwp_thread): Adjust.
11589 (struct lwp_info): Add `dead' member.
11590 (find_lwp_pid): Declare.
11591 * linux-low.c (thread_db_active): Delete.
11592 (new_inferior): Adjust comment.
11593 (inferior_pid): Delete.
11594 (linux_add_process): New.
11595 (handle_extended_wait): Adjust.
11596 (add_lwp): Change unsigned long to ptid.
11597 (linux_create_inferior): Add process to processes table. Adjust
11598 to use ptids. Don't set new_inferior here.
11599 (linux_attach_lwp): Rename to ...
11600 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11601 it. Adjust to use ptids.
11602 (linux_attach_lwp): New.
11603 (linux_attach): Add process to processes table. Don't set
11604 new_inferior here.
11605 (struct counter): New.
11606 (second_thread_of_pid_p, last_thread_of_process_p): New.
11607 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11608 multiple processes.
11609 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11610 processes. Remove process from process table.
11611 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11612 to multiple processes.
11613 (any_thread_of): New.
11614 (linux_detach): Add `pid' argument, and handle it. Remove process
11615 from processes table.
11616 (linux_join): Add `pid' argument. Handle it.
11617 (linux_thread_alive): Change unsighed long argument to ptid_t.
11618 Consider dead lwps as not being alive.
11619 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11620 threads we're not interested in.
11621 (same_lwp, find_lwp_pid): New.
11622 (linux_wait_for_lwp): Change `pid' argument's type from int to
11623 ptid_t. Adjust.
11624 (linux_wait_for_event): Rename to ...
11625 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11626 from int to ptid_t. Adjust.
11627 (linux_wait_for_event): New.
11628 (linux_wait_1): Add `ptid' argument. Change return type to
11629 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11630 that exit from the process table.
11631 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11632 Adjust.
11633 (mark_lwp_dead): New.
11634 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11635 stopping all threads, mark its main lwp as dead.
11636 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11637 ptids.
11638 (fetch_register, usr_store_inferior_registers)
11639 (regsets_fetch_inferior_registers)
11640 (regsets_store_inferior_registers, linux_read_memory)
11641 (linux_write_memory): Inline `inferior_pid'.
11642 (linux_look_up_symbols): Adjust to use per-process
11643 `thread_db_active'.
11644 (linux_request_interrupt): Adjust to use ptids.
11645 (linux_read_auxv): Inline `inferior_pid'.
11646 (initialize_low): Don't reference thread_db_active.
11647 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11648 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11649 (ps_getpid): Return the pid of the current inferior.
11650 * thread-db.c (proc_handle, thread_agent): Delete.
11651 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11652 per-process data.
11653 (find_one_thread): Change argument type to ptid_t. Adjust to
11654 per-process data.
11655 (maybe_attach_thread): Adjust to per-process data and ptids.
11656 (thread_db_find_new_threads): Ditto.
11657 (thread_db_init): Ditto.
11658 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11659 processes table. Adjust to use ptids.
11660 (spu_kill, spu_detach): Adjust interface. Remove process from
11661 processes table.
11662 (spu_join, spu_thread_alive): Adjust interface.
11663 (spu_wait): Adjust interface. Remove process from processes
11664 table. Adjust to use ptids.
11665 * win32-low.c (current_inferior_tid): Delete.
11666 (current_inferior_ptid): New.
11667 (debug_event_ptid): New.
11668 (thread_rec): Take a ptid. Adjust.
11669 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11670 (child_delete_thread): Ditto.
11671 (do_initial_child_stuff): Add `attached' argument. Add process to
11672 processes table.
11673 (child_fetch_inferior_registers, child_store_inferior_registers):
11674 Adjust.
11675 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11676 (win32_attach): Pass 1 to do_initial_child_stuff.
11677 (win32_kill): Adjust interface. Remove process from processes
11678 table.
11679 (win32_detach): Ditto.
11680 (win32_join): Adjust interface.
11681 (win32_thread_alive): Take a ptid.
11682 (win32_resume): Adjust to use ptids.
11683 (get_child_debug_event): Ditto.
11684 (win32_wait): Adjust interface. Remove exiting process from
11685 processes table.
11686
bd99dc85
PA
116872009-04-01 Pedro Alves <pedro@codesourcery.com>
11688
11689 Non-stop mode support.
11690
11691 * server.h (non_stop): Declare.
11692 (gdb_client_data, handler_func): Declare.
11693 (delete_file_handler, add_file_handler, start_event_loop):
11694 Declare.
11695 (handle_serial_event, handle_target_event, push_event)
11696 (putpkt_notif): Declare.
11697 * target.h (enum resume_kind): New.
11698 (struct thread_resume): Replace `step' field by `kind' field.
11699 (TARGET_WNOHANG): Define.
11700 (struct target_ops) <wait>: Add `options' argument.
11701 <supports_non_stop, async, start_non_stop>: New fields.
11702 (target_supports_non_stop, target_async): New.
11703 (start_non_stop): Declare.
11704 (mywait): Add `options' argument.
11705 * target.c (mywait): Add `options' argument. Print child exit
11706 notifications here.
11707 (start_non_stop): New.
11708 * server.c (non_stop, own_buf, mem_buf): New globals.
11709 (struct vstop_notif): New.
11710 (notif_queue): New global.
11711 (queue_stop_reply, push_event, discard_queued_stop_replies)
11712 (send_next_stop_reply): New.
11713 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11714 interface changes.
11715 (attach_inferior): In non-stop mode, don't wait for the target
11716 here.
11717 (handle_general_set): Handle QNonStop.
11718 (handle_query): When handling qC, return the current general
11719 thread, instead of the first thread of the list.
11720 (handle_query): If the backend supports non-stop mode, include
11721 QNonStop+ in the qSupported query response.
11722 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11723 and non-stop mode.
11724 (handle_v_attach, handle_v_run): Handle non-stop mode.
11725 (handle_v_stopped): New.
11726 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11727 (myresume): Adjust to use resume_kind. Handle non-stop.
11728 (queue_stop_reply_callback): New.
11729 (handle_status): Handle non-stop mode.
11730 (main): Clear non_stop flag on reconnection. Use the event-loop.
11731 Refactor serial protocol handling from here ...
11732 (process_serial_event): ... to this new function. When GDB
11733 selects any thread, select one here. In non-stop mode, wait until
11734 GDB acks all pending events before exiting.
11735 (handle_serial_event, handle_target_event): New.
11736 * remote-utils.c (remote_open): Install remote_desc in the event
11737 loop.
11738 (remote_close): Remove remote_desc from the event loop.
11739 (putpkt_binary): Rename to...
11740 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11741 (putpkt_binary): New as wrapper around putpkt_binary_1.
11742 (putpkt_notif): New.
11743 (prepare_resume_reply): In non-stop mode, don't change the
11744 general_thread.
11745 * event-loop.c: New.
11746 * Makefile.in (OBJ): Add event-loop.o.
11747 (event-loop.o): New rule.
11748
11749 * linux-low.h (pid_of): Moved here.
11750 (lwpid_of): New.
11751 (get_lwp_thread): Use lwpid_of.
11752 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11753 * linux-low.c (pid_of): Delete.
11754 (inferior_pid): Use lwpid_of.
11755 (linux_event_pipe): New.
11756 (target_is_async_p): New.
11757 (delete_lwp): New.
11758 (handle_extended_wait): Use lwpid_of.
11759 (add_lwp): Don't set lwpid field.
11760 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11761 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11762 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11763 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11764 first. Adjust to linux_wait_for_event interface changes. Use
11765 lwpid_of.
11766 (linux_detach): Don't delete the main lwp here.
11767 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11768 (status_pending_p): Don't consider explicitly suspended lwps.
11769 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11770 pointer. Add OPTIONS argument. Change return type to int. Use
11771 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11772 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11773 pointer. Add status pointer argument. Return a pid instead of a
11774 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11775 changes. In non-stop mode, don't switch to a random thread.
11776 (linux_wait): Rename to...
11777 (linux_wait_1): ... this. Add target_options argument, and handle
11778 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11779 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11780 clean exit and signal exit code. Don't stop all threads in
11781 non-stop mode. In all-stop mode, only stop all threads when
11782 reporting a stop to GDB. Handle explicit thread stop requests.
11783 (async_file_flush, async_file_mark): New.
11784 (linux_wait): New.
11785 (send_sigstop): Use lwpid_of.
11786 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11787 interface changes. In non-stop mode, don't switch to a random
11788 thread.
11789 (linux_resume_one_lwp): Use lwpid_of.
11790 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11791 (linux_resume_one_thread): ... this. Handle resume_stop. In
11792 non-stop mode, don't look for pending flag in all threads.
11793 (resume_status_pending_p): Don't consider explicitly suspended
11794 threads.
11795 (my_waitpid): Reimplement. Emulate __WALL.
11796 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11797 Use lwpid_of.
11798 (sigchld_handler, linux_supports_non_stop, linux_async)
11799 (linux_start_non_stop): New.
11800 (linux_target_ops): Register linux_supports_non_stop, linux_async
11801 and linux_start_non_stop.
11802 (initialize_low): Install SIGCHLD handler.
11803 * thread-db.c (thread_db_create_event, find_one_thread)
11804 (thread_db_get_tls_address): Use lwpid_of.
11805 * win32-low.c (win32_detach): Adjust to use resume_kind.
11806 (win32_wait): Add `options' argument.
11807 * spu-low.c (spu_resume): Adjust to use resume_kind.
11808 (spu_wait): Add `options' argument.
11809
5b1c542e
PA
118102009-04-01 Pedro Alves <pedro@codesourcery.com>
11811
11812 Decouple target code from remote protocol.
11813
11814 * target.h (enum target_waitkind): New.
11815 (struct target_waitstatus): New.
11816 (struct target_ops) <wait>: Return an unsigned long. Take a
11817 target_waitstatus pointer instead of a char pointer.
11818 (mywait): Likewise.
11819 * target.c (mywait): Change prototype to return an unsigned long.
11820 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11821 * server.h (thread_from_wait, old_thread_from_wait): Delete
11822 declarations.
11823 (prepare_resume_reply): Change prototype to take a
11824 target_waitstatus.
11825 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11826 (last_status, last_ptid): New.
11827 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11828 pid instead of a signal.
11829 (attach_inferior): Remove "status" and "signal" parameters.
11830 Adjust.
11831 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11832 not as an address.
11833 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11834 (handle_v_requests, myresume): Remove "status" and "signal"
11835 parameters. Adjust.
11836 (handle_status): New.
11837 (main): Delete local `status'. Adjust.
11838 * remote-utils.c: Include target.h.
11839 (prepare_resume_reply): Change prototype to take a
11840 target_waitstatus. Adjust.
11841
11842 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11843 interface.
11844 * spu-low.c (spu_wait): Adjust.
11845 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11846 Delete.
11847 (win32_wait): Adjust.
11848
2bd7c093
PA
118492009-04-01 Pedro Alves <pedro@codesourcery.com>
11850
11851 * target.h (struct thread_resume): Delete leave_stopped member.
11852 (struct target_ops): Add a `n' argument to the `resume' callback.
11853 * server.c (start_inferior): Adjust.
11854 (handle_v_cont, myresume): Adjust.
11855 * linux-low.c (check_removed_breakpoint): Adjust to resume
11856 interface change, and to removed leave_stopped field.
11857 (resume_ptr): Delete.
11858 (struct thread_resume_array): New.
11859 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11860 resume interface change.
11861 (linux_continue_one_thread, linux_queue_one_thread)
11862 (resume_status_pending_p): Check if the resume field is NULL
11863 instead of checking the leave_stopped member.
11864 (linux_resume): Adjust to the target resume interface change.
11865 * spu-low.c (spu_resume): Adjust to the target resume interface
11866 change.
11867 * win32-low.c (win32_detach, win32_resume): Ditto.
11868
c35fafde
PA
118692009-04-01 Pedro Alves <pedro@codesourcery.com>
11870
11871 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11872 flag.
11873 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11874 pending.
11875 (linux_continue_one_thread): Only preserve the stepping flag if
11876 there's a pending breakpoint.
11877
0a59d50b
PA
118782009-03-31 Pedro Alves <pedro@codesourcery.com>
11879
11880 * server.c (main): After the inferior having exited, call
11881 remote_close before exiting gdbserver.
11882
f04c6d38
TJB
118832009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11884
11885 Fix size of FPSCR in Power 7 processors.
11886 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11887 (PPC_FEATURE_HAS_DFP): New #define.
11888 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11889 size of the FPSCR.
11890
78e5cee6
PA
118912009-03-23 Pedro Alves <pedro@codesourcery.com>
11892
11893 * server.c (handle_query) Whitespace and formatting.
11894
1b3f6016
PA
118952009-03-22 Pedro Alves <pedro@codesourcery.com>
11896
11897 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11898 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11899 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11900 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11901 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11902 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11903 Makefile.in, configure.ac: Fix whitespace throughout.
11904 * configure: Regenerate.
11905
a07b2135
PA
119062009-03-22 Pedro Alves <pedro@codesourcery.com>
11907
11908 * inferiors.c (find_inferior): Make it safe for the callback
11909 function to delete the currently iterated inferior.
11910
67cc2626
PA
119112009-03-22 Pedro Alves <pedro@codesourcery.com>
11912
11913 * Makefile.in (linuw_low_h): Move higher.
11914 (thread-db.o): Depend on $(linux_low_h).
11915
54a0b537
PA
119162009-03-17 Pedro Alves <pedro@codesourcery.com>
11917
11918 Rename "process" to "lwp" throughout.
11919
11920 * linux-low.c (all_processes): Rename to...
11921 (all_lwps): ... this.
11922 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11923 (add_process): Rename to ...
11924 (add_lwp): ... this. Adjust.
11925 (linux_create_inferior): Adjust.
11926 (linux_attach_lwp): Adjust.
11927 (linux_attach): Adjust.
11928 (linux_kill_one_process): Rename to ...
11929 (linux_kill_one_lwp): ... this. Adjust.
11930 (linux_kill): Adjust.
11931 (linux_detach_one_process): Rename to ...
11932 (linux_detach_one_lwp): ... this. Adjust.
11933 (linux_detach): Adjust.
11934 (check_removed_breakpoint): Adjust.
11935 (status_pending_p): Adjust.
11936 (linux_wait_for_process): Rename to ...
11937 (linux_wait_for_lwp): ... this. Adjust.
11938 (linux_wait_for_event): Adjust.
11939 (send_sigstop): Adjust.
11940 (wait_for_sigstop): Adjust.
11941 (stop_all_processes): Rename to ...
11942 (stop_all_lwps): ... this.
11943 (linux_resume_one_process): Rename to ...
11944 (linux_resume_one_lwp): ... this. Adjust.
11945 (linux_set_resume_request, linux_continue_one_thread)
11946 (linux_queue_one_thread, resume_status_pending_p)
11947 (usr_store_inferior_registers, regsets_store_inferior_registers)
11948 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11949 Adjust.
11950 * linux-low.h (get_process): Rename to ...
11951 (get_lwp): ... this. Adjust.
11952 (get_thread_process): Rename to ...
11953 (get_thread_lwp): ... this. Adjust.
11954 (get_process_thread): Rename to ...
11955 (get_lwp_thread): ... this. Adjust.
11956 (struct process_info): Rename to ...
11957 (struct lwp_info): ... this.
11958 (all_processes): Rename to ...
11959 (all_lwps): ... this.
11960 * proc-service.c (ps_lgetregs): Adjust.
11961 * thread-db.c (thread_db_create_event, find_one_thread)
11962 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11963
0b16c5cf
PA
119642009-03-14 Pedro Alves <pedro@codesourcery.com>
11965
11966 * server.c (handle_query): Handle "qAttached".
11967
32de4b9d
NS
119682009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11969
11970 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11971 GPLv3, update license URL.
11972
2aecd87f
DE
119732009-03-01 Doug Evans <dje@google.com>
11974
93efd302 11975 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
11976 (server_h): Add gdb_signals.h.
11977 (signals.o): Update.
11978 * server.h (target_signal_from_host,target_signal_to_host_p)
11979 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11980
86b1f9c5
PM
119812009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11982
11983 * remote-utils.c (getpkt): Also generate remote-debug
11984 information if noack_mode is set.
11985
4aa995e1
PA
119862009-02-06 Pedro Alves <pedro@codesourcery.com>
11987
11988 * server.c (handle_query): Report qXfer:siginfo:read and
11989 qXfer:siginfo:write as supported and handle them.
11990 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11991 * linux-low.c (linux_xfer_siginfo): New.
11992 (linux_target_ops): Set it.
11993
62709adf
PA
119942009-01-26 Pedro Alves <pedro@codesourcery.com>
11995
11996 * server.c (gdbserver_usage): Mention --remote-debug.
11997 (main): Accept '--remote-debug' switch.
11998
aef93bd7
DE
119992009-01-18 Doug Evans <dje@google.com>
12000
12001 * regcache.c (new_register_cache): No need to check result of xcalloc.
12002 * server.c (handle_search_memory): Back out calls to xmalloc,
12003 result is checked and error is returned to user upon failure.
12004 (handle_query): Ditto. Add more checks for result of malloc.
12005 (handle_v_cont): Check result of malloc, report error back to
12006 user upon failure.
12007 (handle_v_run): Ditto. Call freeargv.
12008 * server.h (freeargv): Declare.
12009 * utils.c (freeargv): New fn.
12010
54363045
DE
120112009-01-15 Doug Evans <dje@google.com>
12012
f626972c
DE
12013 * gdbreplay.c (perror_with_name): Make arg const char *.
12014 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12015 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12016 * utils.c (perror_with_name): Make arg const char *.
54363045 12017
18aae699
PA
120182009-01-14 Pedro Alves <pedro@codesourcery.com>
12019
12020 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12021 when handling a EXIT_PROCESS_DEBUG_EVENT.
12022
ff703abe
JB
120232009-01-06 Joel Brobecker <brobecker@adacore.com>
12024
12025 * gdbreplay.c (gdbreplay_version): Update copyright year.
12026 * server.c (gdbserver_version): Likewise.
12027
f21cc1a2 120282009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12029
12030 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12031 (handle_extended_wait): Improve comment.
0e21c1ec 12032
bca929d3
DE
120332008-12-13 Doug Evans <dje@google.com>
12034
12035 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12036 * server.h (ATTR_MALLOC): New macro.
12037 (xmalloc,xcalloc,xstrdup): Declare.
12038 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12039 * inferiors.c: Ditto.
12040 * linux-low.c: Ditto.
12041 * mem-break.c: Ditto.
12042 * regcache.c: Ditto.
12043 * remote-utils.c: Ditto.
12044 * server.c: Ditto.
12045 * target.c: Ditto.
12046 * win32-low.c: Ditto.
12047
97438e3f
DE
120482008-12-12 Doug Evans <dje@google.com>
12049
896c7fbb
DE
12050 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12051 in debugging printf.
12052
97438e3f
DE
12053 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12054
e3b886f8
DE
120552008-12-09 Doug Evans <dje@google.com>
12056
12057 * linux-low.h (struct process_info): Delete member tid, unused.
12058 * thread-db.c (find_one_thread): Update.
12059 (maybe_attach_thread): Update.
12060
07e059b5
VP
120612008-12-02 Pedro Alves <pedro@codesourcery.com>
12062
889bf7c5
PA
12063 * target.h (struct target_ops): Add qxfer_osdata member.
12064 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12065 and dirent.h.
12066 (linux_qxfer_osdata): New functions.
12067 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12068 callback.
12069 * server.c (handle_query): Handle "qXfer:osdata:read:".
12070 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12071 (buffer_xml_printf): New functions.
12072 * server.h (struct buffer): New.
12073 (buffer_grow_str, buffer_grow_str0): New macros.
12074 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12075 (buffer_xml_printf): Declare.
07e059b5 12076
4cab47ab
DE
120772008-11-24 Doug Evans <dje@google.com>
12078
12079 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12080
f142445f
DJ
120812008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12082
12083 * server.c (handle_v_run): Always use the supplied argument list.
12084
d0107bb6 120852008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12086
d0107bb6
BW
12087 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12088 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12089
2c4ad781
TJB
120902008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12091
12092 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12093 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12094 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12095 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12096 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12097 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12098 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12099 XML target descriptions.
12100 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12101 when inferior is running on an ISA 2.05 or later processor. Add
12102 special case to return offset for full 64-bit slot of FPSCR when
12103 in 32-bits.
12104
dfb64f85
DJ
121052008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12106
12107 * Makefile.in (SFILES, clean): Added sparc64 files.
12108 (reg-sparc64.o, reg-sparc64.c): New.
12109 * configure.srv (sparc*-*-linux*): New configuration.
12110 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12111 syscall arguments for SPARC.
12112 (regsets_store_inferior_registers): Likewise.
12113 * linux-sparc-low.c: New file.
12114
66b6e1dd
DE
121152008-10-21 Doug Evans <dje@google.com>
12116
12117 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12118 (READLINE_DIR,READLINE_DEP): Delete.
12119 (INTERNAL_CFLAGS): Update.
12120 (LINTFLAGS): Update.
12121
9b710a42
PA
121222008-10-10 Pedro Alves <pedro@codesourcery.com>
12123
12124 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12125 whole argv from the last run, not just argv[0].
12126
5822d809
PA
121272008-09-08 Pedro Alves <pedro@codesourcery.com>
12128
12129 * regcache.c (new_register_cache): Return NULL if the register
12130 cache size isn't known yet.
12131 (free_register_cache): Avoid dereferencing a NULL regcache.
12132
74aac56f
DJ
121332008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12134
12135 * configure.srv: Merge MIPS and MIPS64.
12136
400b20f5
MR
121372008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12138
12139 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12140
677c5bb1
LM
121412008-08-18 Luis Machado <luisgpm@br.ibm.com>
12142
12143 * Makefile.in: Add required vsx dependencies.
12144
12145 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12146 Declare init_registers_powerpc_vsx32l.
12147 Declare init_registers_powerpc_vsx64l.
12148 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12149 (ppc_arch_setup): Check for VSX in hwcap.
12150 (ppc_fill_vsxregset): New function.
12151 (ppc_store_vsxregset): New function.
12152 Add new VSX entry in regset_info target_regsets.
12153
12154 * configure.srv: Add new VSX dependencies.
12155
a6f3e723
SL
121562008-08-12 Pedro Alves <pedro@codesourcery.com>
12157
12158 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12159 (remote_open): Set or clear transport_is_reliable.
12160 (putpkt_binary): Don't expect acks in noack mode.
12161 (getpkt): Don't send ack/nac in noack mode.
12162 * server.c (handle_general_set): Handle QStartNoAckMode.
12163 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12164 qSupported.
12165 (main): Reset noack_mode on every connection.
12166 * server.h (noack_mode): Declare.
12167
a417dc56
RW
121682008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12169
12170 * Makefile.in (GDBREPLAY_OBS): New variable.
12171 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12172
3221518c
UW
121732008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12174 Daniel Jacobowitz <dan@codesourcery.com>
12175
12176 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12177 (usr_store_inferior_registers): Likewise.
12178 (regsets_store_inferior_registers): Likewise.
12179
ec56be1b
PA
121802008-07-31 Rolf Jansen <rj@surtec.com>
12181 Pedro Alves <pedro@codesourcery.com>
12182
12183 * configure.ac: Check for memmem declaration.
12184 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12185 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12186 (disable_packet_qfThreadInfo): Unconditionally compile.
12187 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12188 * configure, config.in: Regenerate.
12189
2fe5e3ff
DE
121902008-07-28 Doug Kwan <dougkwan@google.com>
12191
12192 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12193 (linux_write_memory): Remove declaration of errno.
12194
836acd6d
UW
121952008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12196
12197 * linux-low.c (handle_extended_wait): Do not use "status"
12198 variable uninitialized.
12199
aeba519e
PA
122002008-07-07 Pedro Alves <pedro@codesourcery.com>
12201
12202 * server.c (handle_v_attach): Inhibit reporting dll changes.
12203
db42f210
PA
122042008-06-27 Pedro Alves <pedro@codesourcery.com>
12205
12206 * remote-utils.c (prepare_resume_reply): If requested, don't
12207 output "thread:TID" in the T stop reply.
12208
12209 * server.c (disable_packet_vCont, disable_packet_Tthread)
12210 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12211 (handle_query): If requested, disable support for qC, qfThreadInfo
12212 and qsThreadInfo.
12213 (handle_v_requests): If requested, disable support for vCont.
12214 (gdbserver_show_disableable): New.
12215 (main): Handle --disable-packet and --disable-packet=LIST.
12216
12217 * server.h (disable_packet_vCont, disable_packet_Tthread)
12218 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12219
8e4c5421
CD
122202008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12221
12222 * server.c (gdbserver_usage): Mention --version.
12223
6e23a804
DJ
122242008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12225
12226 * Makefile.in (gdbreplay.o): New rule.
12227
90aa6a40
JM
122282008-06-06 Joseph Myers <joseph@codesourcery.com>
12229
12230 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12231 message, not gdbserver.
12232
c16158bc 122332008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12234 Nathan Sidwell <nathan@codesourcery.com>
12235 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12236
12237 * acinclude.m4: Include ../../config/acx.m4.
12238 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12239 * configure, config.in: Regenerate.
12240 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12241 * server.c (gdbserver_version): Print PKGVERSION.
12242 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12243 (main): Adjust gdbserver_usage calls.
12244 * gdbreplay.c (version, host_name): Add declarations.
12245 (gdbreplay_version, gdbreplay_usage): New.
12246 (main): Accept --version and --help options.
12247
aeb75bf5
DJ
122482008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12249
12250 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12251 (arm_breakpoint_at): Handle Thumb.
12252 (the_low_target): Add comment.
12253
76b233dd
UW
122542008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12255
12256 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12257
08388c79
DE
122582008-05-09 Doug Evans <dje@google.com>
12259
a3c83fae
DE
12260 * server.h (decode_search_memory_packet): Declare.
12261 * remote-utils.c (decode_search_memory_packet): New fn.
12262 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12263 (handle_search_memory): New fn.
12264 (handle_query): Process qSearch:memory packets.
12265
bb9c3d36
UW
122662008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12267
12268 * regcache.c (registers_length): Remove.
12269 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12270 full register packet.
12271 * regcache.h (registers_length): Remove prototype.
12272 * server.h (PBUFSIZ): Define to 16384.
12273
7284e1be
UW
122742008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12275
12276 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12277 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12278 powerpc-64l.o, and powerpc-altivec64l.o.
12279 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12280 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12281 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12282 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12283 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12284 to srv_xmlfiles.
12285
12286 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12287 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12288 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12289 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12290 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12291 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12292 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12293 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12294 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12295 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12296 (clean): Update.
12297
12298 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12299 (init_registers_powerpc_32l): ... this new prototype.
12300 (init_registers_powerpc_32): Remove, replace by ...
12301 (init_registers_powerpc_altivec32l): ... this new prototype.
12302 (init_registers_powerpc_e500): Remove, replace by ...
12303 (init_registers_powerpc_e500l): ... this new prototype.
12304 (init_registers_ppc64): Remove, replace by ...
12305 (init_registers_powerpc_64l): ... this new prototype.
12306 (init_registers_powerpc_64): Remove, replace by ...
12307 (init_registers_powerpc_altivec64l): ... this new prototype.
12308 (ppc_num_regs): Set to 73.
12309 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12310 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12311 (ppc_cannot_store_register): Handle orig_r3 and trap.
12312 (ppc_arch_setup): Update init_registers_... calls.
12313 (ppc_fill_gregset): Handle orig_r3 and trap.
12314
12315 * inferiors.c (clear_inferiors): Reset current_inferior.
12316
fdc59709
PB
123172008-04-23 Paolo Bonzini <bonzini@gnu.org>
12318
889bf7c5
PA
12319 * acinclude.m4: Add override.m4.
12320 * configure: Regenerate.
fdc59709 12321
c9b2f845
UW
123222008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12323
12324 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12325 initial call to init_register_ppc64.
12326
550512b8
UW
123272008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12328
43aaf8b6
PA
12329 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12330 single powerpc*-*-linux* case.
550512b8
UW
12331 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12332
b6430ec3
UW
123332008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12334
12335 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12336 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12337 from reg_xmlfiles.
12338 * linux-ppc-low.c: Include <elf.h>.
12339 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12340 (ppc_hwcap): New global variable.
12341 (ppc_regmap): Remove __SPE__ #ifdef sections.
12342 (ppc_regmap_e500): New global variable.
12343 (ppc_cannot_store_register): Update __SPE__ special case.
12344 (ppc_get_hwcap): New function.
12345 (ppc_arch_setup): Use it to determine whether inferior supports
12346 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12347 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12348 Do not access registers if target does not support AltiVec.
12349 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12350 Do not access registers if target does not support SPE.
12351 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12352
52fa2412
UW
123532008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12354
12355 * linux-low.c (disabled_regsets, num_regsets): New.
12356 (use_regsets_p): Delete.
12357 (linux_wait_for_process): Clear disabled_regsets.
12358 (regsets_fetch_inferior_registers): Check and set it.
12359 (regsets_store_inferior_registers): Likewise.
12360 (linux_fetch_registers, linux_store_registers): Do not use
12361 use_regsets_p.
12362 (initialize_low): Allocate disabled_regsets.
12363
e28b3332
DJ
123642008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12365
12366 * Makefile.in (LIBOBJS): New.
12367 (OBS): Use LIBOBJS.
12368 (memmem.o): New rule.
12369 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12370 * configure: Regenerated.
12371
4536995d
UW
123722008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12373
12374 * server.c (handle_query): Never return "unsupported" for
12375 qXfer:features:read queries.
12376
221c031f
UW
123772008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12378
12379 * server.c (get_features_xml): Fix inverted condition.
12380 (handle_query): Always support qXfer:feature:read.
12381
ccd213ac
DJ
123822008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12383
12384 * server.c (wrapper_argv): New.
12385 (start_inferior): Handle wrapper_argv. If set, expect an extra
12386 trap.
12387 (gdbserver_usage): Document --wrapper.
12388 (main): Parse --wrapper.
12389
6fe305f7
UW
123902008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12391
12392 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12393 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12394 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12395 (ppc_set_pc): Likewise.
12396 (ppc_arch_setup): New function.
12397 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12398 of collect_register.
889bf7c5 12399 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12400
5b0a002e
UW
124012008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12402
12403 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12404 instead of linux-ppc64-low.o.
12405 * linux-ppc64-low.c: Remove file.
12406 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12407 (linux-ppc64-low.o): Remove rule.
12408
12409 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12410 (init_registers_powerpc_64): Likewise.
12411 (ppc_regmap): Conditionally define depending on __powerpc64__.
12412 (ppc_cannot_store_register): Do not special-case "fpscr" when
12413 compiled on __powerpc64__.
12414 (ppc_collect_ptrace_register): New function.
12415 (ppc_supply_ptrace_register): New function.
12416 (ppc_breakpoint): Change type to "unsigned int".
12417 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12418 (the_low_target): Conditionally provide initializers for the
889bf7c5 12419 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12420 collect_ptrace_register and supply_ptrace_register members.
12421
9b4b61c8
UW
124222008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12423
12424 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12425 * server.c (gdbserver_xmltarget): Define.
12426 (get_features_xml): Use it to replace "target.xml" and arch_string.
12427
12428 * configure.srv: Remove srv_xmltarget. Add XML files that were
12429 mentioned there to srv_xmlfiles instead. Remove conditional tests
12430 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12431 srv_xmlfiles and srv_regobj to include all possible choices.
12432 * configure.ac (srv_xmltarget): Remove.
12433 (srv_xmlfiles): Do not add "target.xml".
12434 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12435 checks for supplementary target information.
12436 * configure: Regenerate.
12437 * Makefile.in (XML_TARGET): Remove.
12438 (target.xml): Remove rule.
12439 (clean): Do not clean up target.xml.
12440 (.PRECIOUS): Do not mention target.xml.
12441
12442 * target.h (struct target_ops): Remove arch_string member.
12443 * linux-low.c (linux_arch_string): Remove.
12444 (linux_target_ops): Remove arch_string initializer.
12445 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12446 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12447 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12448 * spu-low.c (spu_arch_string): Remove.
12449 (spu_target_ops): Remove arch_string initializer.
12450 * win32-low.c (win32_arch_string): Remove.
12451 (win32_target_ops): Remove arch_string initializer.
12452 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12453 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12454 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12455
ee1a7ae4
UW
124562008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12457
12458 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12459 by collect_ptrace_register and supply_ptrace_register hooks.
12460 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12461 instead of checking for the_low_target.left_pad_xfer.
12462 (usr_store_inferior_registers): Use collect_ptrace_register callback
12463 instead of checking for the_low_target.left_pad_xfer.
12464
12465 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12466 (s390_supply_ptrace_register): Likewise.
12467 (s390_fill_gregset): Call s390_collect_ptrace_register.
12468 (the_low_target): Update.
12469
12470 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12471 (ppc_supply_ptrace_register): Likewise.
12472 (the_low_target): Update.
12473
12474 * linux-i386-low.c (the_low_target): Update.
12475 * linux-x86-64-low.c (the_low_target): Update.
12476
d61ddec4
UW
124772008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12478
12479 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12480 reg-s390.o and reg-s390x.o.
12481
12482 * linux-low.c (new_inferior): New global variable.
12483 (linux_create_inferior, linux_attach): Set it.
12484 (linux_wait_for_process): Call the_low_target.arch_setup after the
12485 target has stopped for the first time.
12486 (initialize_low): Do not call the_low_target.arch_setup.
12487
12488 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12489 (s390_set_pc): Likewise.
12490 (s390_arch_setup): New function.
12491 (the_low_target): Use s390_arch_setup as arch_setup routine.
12492
12493 * regcache.c (realloc_register_cache): New function.
12494 (set_register_cache): Call it for each existing regcache.
12495
d05b4ac3
UW
124962008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12497
12498 * server.h (init_registers): Remove prototype.
12499
12500 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12501 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12502 instead of init_registers ().
12503 * linux-arm-low.c (init_registers_arm): Add prototype.
12504 (init_registers_arm_with_iwmmxt): Likewise.
12505 (the_low_target): Add initializer for arch_setup field.
12506 * linux-cris-low.c (init_registers_cris): Add prototype.
12507 (the_low_target): Add initializer for arch_setup field.
12508 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12509 (the_low_target): Add initializer for arch_setup field.
12510 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12511 (the_low_target): Add initializer for arch_setup field.
12512 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12513 (the_low_target): Add initializer for arch_setup field.
12514 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12515 (the_low_target): Add initializer for arch_setup field.
12516 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12517 (the_low_target): Add initializer for arch_setup field.
12518 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12519 (init_registers_mips64_linux): Likewise.
12520 (the_low_target): Add initializer for arch_setup field.
12521 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12522 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12523 (the_low_target): Add initializer for arch_setup field.
12524 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12525 (init_registers_powerpc_64): Likewise.
12526 (the_low_target): Add initializer for arch_setup field.
12527 * linux-s390-low.c (init_registers_s390): Add prototype.
12528 (init_registers_s390x): Likewise.
12529 (the_low_target): Add initializer for arch_setup field.
12530 * linux-sh-low.c (init_registers_sh): Add prototype.
12531 (the_low_target): Add initializer for arch_setup field.
12532 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12533 (the_low_target): Add initializer for arch_setup field.
12534 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12535 (the_low_target): Add initializer for arch_setup field.
12536
12537 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12538 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12539 instead of init_registers ().
12540 * win32-arm-low.c (init_registers_arm): Add prototype.
12541 (the_low_target): Add initializer for arch_setup field.
12542 * win32-i386-low.c (init_registers_i386): Add prototype.
12543 (the_low_target): Add initializer for arch_setup field.
12544
12545 * spu-low.c (init_registers_spu): Add prototype.
12546 (initialize_low): Call initialie_registers_spu () instead of
12547 initialize_registers ().
12548
fd96d250
PA
125492008-02-19 Pedro Alves <pedro@codesourcery.com>
12550
12551 * server.c (handle_v_requests): When handling the vRun and vAttach
12552 packets, if already debugging a process, don't kill it. Return an
12553 error instead.
12554
d41b6bb4
DJ
125552008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12556
12557 * server.c (handle_query): Correct length check.
12558
5ac588cf
PA
125592008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12560
12561 * win32-low.c (do_initial_child_stuff): Add process handle
12562 parameter. Set current_process_handle and current_process_id from the
12563 parameters. Clear globals.
12564 (win32_create_inferior): Don't set current_process_handle and
12565 current_process_id here. Instead pass them on the call to
12566 do_initial_child_stuff.
12567 (win32_attach): Likewise.
12568 (win32_clear_inferiors): New.
12569 (win32_kill): Don't close the current process handle or the
12570 current thread handle here. Instead call win32_clear_inferiors.
12571 (win32_detach): Don't open a new handle to the process. Call
12572 win32_clear_inferiors.
12573 (win32_join): Don't rely on current_process_handle; open a new
12574 handle using the process id.
12575 (win32_wait): Call win32_clear_inferiors when the inferior process
12576 has exited.
12577
ecd7ecbc
DJ
125782008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12579
12580 * server.c (monitor_show_help): Add "exit".
12581
1525d545
MG
125822008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12583
ecd7ecbc 12584 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12585 (clean): Add reg-xtensa.c.
12586 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12587 * configure.srv (xtensa*-*-linux*) New target.
12588 * linux-xtensa-low.c: New.
12589 * xtensa-xtregs.c: New.
1525d545 12590
59a016f0
PA
125912008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12592
12593 * hostio.c: Don't include errno.h.
12594 (errno_to_fileio_errno): Move to hostio-errno.
12595 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12596 error number outputting to the target->hostio_last_error callback.
12597 (hostio_packet_error): Use FILEIO_EINVAL directly.
12598 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12599 calls to hostio_error.
12600 * hostio-errno.c: New.
12601 * server.h (hostio_last_error_from_errno): Declare.
12602 * target.h (target_ops): Add hostio_last_error member.
12603 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12604 as hostio_last_error handler.
889bf7c5 12605 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12606 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12607 (wince_hostio_last_error): New functions.
12608 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12609 as hostio_last_error handler.
12610 (win32_target_ops) [!_WIN32_WCE]: Register
12611 hostio_last_error_from_errno as hostio_last_error handler.
12612 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12613 (hostio-errno.o): New rule.
12614 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12615 * configure.srv (srv_hostio_err_objs): New variable. Default to
12616 hostio-errno.o.
12617 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12618 * configure: Regenerate.
12619
2d717e4f
DJ
126202008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12621
12622 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12623 (linux_kill, linux_detach): Clean up the process list.
12624 * remote-utils.c (remote_open): Improve port number parsing.
12625 (putpkt_binary, input_interrupt): Only send interrupts if the target
12626 is running.
12627 * server.c (extended_protocol): Make static.
12628 (attached): Define earlier.
12629 (exit_requested, response_needed, program_argv): New variables.
12630 (target_running): New.
12631 (start_inferior): Clear attached here.
12632 (attach_inferior): Set attached here.
12633 (require_running): Define.
12634 (handle_query): Use require_running and target_running. Implement
12635 "monitor exit".
12636 (handle_v_attach, handle_v_run): New.
12637 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12638 (gdbserver_usage): Update.
12639 (main): Redo argument parsing. Handle --debug and --multi. Handle
12640 --attach along with other options or after the port. Save
12641 program_argv. Support no initial program. Resynchronize
12642 communication with GDB after an error. Handle "monitor exit".
12643 Use require_running and target_running. Always allow the extended
12644 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12645 restart in extended mode.
12646 * README: Refer to the GDB manual. Update --attach usage.
12647
7407e2de
AS
126482007-12-20 Andreas Schwab <schwab@suse.de>
12649
12650 * linux-low.c (STACK_SIZE): Define.
12651 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12652 (linux_test_for_tracefork): Likewise.
12653
b65d95c5
DJ
126542007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12655
12656 * linux-low.c (linux_wait_for_event): Update messages. Do not
12657 reinsert auto-delete breakpoints.
12658 * mem-break.c (struct breakpoint): Change return type of handler to
12659 int.
12660 (set_breakpoint_at): Update handler type.
12661 (reinsert_breakpoint_handler): Return 1 instead of calling
12662 delete_breakpoint.
12663 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12664 setting a new one.
12665 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12666 * mem-break.h (set_breakpoint_at): Update handler type.
12667 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12668 * win32-low.c (auto_delete_breakpoint): New.
12669 (get_child_debug_event): Use it.
12670
4e799345
DJ
126712007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12672
12673 * configure.ac: Check for pread and pwrite.
12674 * hostio.c (handle_pread): Fall back to lseek and read.
12675 (handle_pwrite): Fall back to lseek and write.
12676 * config.in, configure: Regenerated.
12677
27524b67
DJ
126782007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12679
12680 * server.c (myresume): Add own_buf argument.
12681 (main): Update calls.
12682
a20d5e98
DJ
126832007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12684
12685 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12686 * remote-utils.c (remote_open): Do not call disable_async_io.
12687 (block_async_io): Delete.
12688 (unblock_async_io): Make static.
12689 (initialize_async_io): New.
12690 * server.c (handle_v_cont): Handle async I/O here.
12691 (myresume): Likewise. Move other common resume tasks here...
12692 (main): ... from here. Call initialize_async_io. Disable async
12693 I/O before the main loop.
12694 * server.h (initialize_async_io): Declare.
12695 (block_async_io, unblock_async_io): Delete prototypes.
12696 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12697
b79d787e
DJ
126982007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12699
12700 * remote-utils.c (readchar): Allow binary data in received messages.
12701
d97903b2
PA
127022007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12703
12704 * win32-low.c (attaching): New global.
12705 (win32_create_inferior): Clear the `attaching' global.
12706 (win32_attach): Set the `attaching' global.
12707 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12708 attaching. Only set a breakpoint at the entry point if not
12709 attaching.
12710
311de423
PA
127112007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12712
12713 * server.c (main): Don't report dll events on the initial
12714 connection on attaches.
12715
6c2d16d2
PA
127162007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12717
12718 * server.c (main): Relax numerical bases supported for the pid of
12719 the --attach command line argument.
12720
5ca906e6
PA
127212007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12722
12723 * win32-low.c (win32_attach): Call OpenProcess before
12724 DebugActiveProcess, not after. Add last error output to error
12725 call.
12726
9c6c8194
PA
127272007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12728
12729 * win32-low.c (win32_get_thread_context)
12730 (win32_set_thread_context): New functions.
12731 (thread_rec): Use win32_get_thread_context.
12732 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12733 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12734 field.
12735
4d5d1aaa
PA
127362007-12-03 Leo Zayas
12737 Pedro Alves <pedro_alves@portugalmail.pt>
12738
12739 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12740 global variables.
12741 (child_add_thread): Minor cleanup.
12742 (child_continue): Resume artificially suspended threads before
12743 calling ContinueDebugEvent.
12744 (suspend_one_thread): New.
12745 (fake_breakpoint_event): New.
12746 (get_child_debug_event): Change return type to int. Check here if
12747 gdb sent an interrupt request. If a soft interrupt was requested,
12748 fake a breakpoint event. Return 0 if there is no event to handle,
12749 and 1 otherwise.
12750 (win32_wait): Don't check here if gdb sent an interrupt request.
12751 Ensure there is a valid event to handle.
12752 (win32_request_interrupt): Add soft interruption method as last
12753 resort.
12754
c436e841
PA
127552007-12-03 Leo Zayas
12756 Pedro Alves <pedro_alves@portugalmail.pt>
12757
12758 * win32-low.h (win32_thread_info): Add descriptions to the
12759 structure members. Replace `suspend_count' counter by a
12760 `suspended' flag.
12761 * win32-low.c (thread_rec): Update condition of when to get the
12762 context from the inferior. Rely on ContextFlags being set if it
12763 has already been retrieved. Only suspend the inferior thread if
12764 we haven't already. Warn if that fails.
12765 (continue_one_thread): s/suspend_count/suspended/. Only call
12766 ResumeThread once. Warn if that fails.
12767
e7b5fa67
PA
127682007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12769
12770 * win32-low.c (win32_wait): Don't read from the inferior when it
12771 has already exited.
12772
a385171d
PA
127732007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12774
12775 * Makefile.in (win32_low_h): New variable.
12776 (win32-low.o): Add dependency on $(win32_low_h).
12777 (win32-arm-low.o, win32-i386-low.o): New rules.
12778
f80c84b3
DJ
127792007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12780
12781 * hostio.c: Correct copyright year.
12782
a6b151f1
DJ
127832007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12784
12785 * Makefile.in (OBS): Add hostio.o.
12786 (hostio.o): New rule.
12787 * server.h (handle_vFile): Declare.
12788 * hostio.c: New file.
12789 * server.c (handle_v_requests): Take packet_len and new_packet_len
12790 for binary packets. Call handle_vFile.
12791 (main): Update call to handle_v_requests.
12792
f9387fc3
DJ
127932007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12794
12795 * linux-low.c: Include <sched.h>.
12796
51c2684e
DJ
127972007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12798
12799 * linux-low.c (linux_tracefork_grandchild): New.
12800 (linux_tracefork_child): Use clone.
12801 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12802
75f83163
JB
128032007-10-31 Joel Brobecker <brobecker@adacore.com>
12804
12805 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12806
da5898ce
DJ
128072007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12808
12809 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12810
24a09b5f
DJ
128112007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12812
12813 * inferiors.c (change_inferior_id): Delete.
12814 (add_pid_to_list, pull_pid_from_list): New.
12815 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12816 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12817 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12818 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12819 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12820 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12821 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12822 (using_threads): Always set to 1.
12823 (handle_extended_wait): New.
12824 (add_process): Do not set TID.
12825 (linux_create_inferior): Set must_set_ptrace_flags.
12826 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12827 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12828 (linux_thread_alive): Rename TID argument to LWPID.
12829 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12830 (linux_wait_for_event): Do not use TID or check using_threads. Update
12831 call to dead_thread_notify. Call handle_extended_wait.
12832 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12833 (send_sigstop): Delete sigstop_sent.
12834 (wait_for_sigstop): Avoid TID.
12835 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12836 (linux_test_for_tracefork): New.
12837 (linux_lookup_signals): Use thread_db_active and
12838 linux_supports_tracefork_flag.
12839 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12840 * linux-low.h (get_process_thread): Avoid TID.
12841 (struct process_ifo): Move thread_known and tid to the end. Remove
12842 sigstop_sent.
12843 (linux_attach_lwp, thread_db_init): Update prototypes.
12844 * server.h (change_inferior_id): Delete prototype.
12845 (add_pid_to_list, pull_pid_from_list): New prototypes.
12846 * thread-db.c (thread_db_use_events): New.
12847 (find_first_thread): Rename to...
12848 (find_one_thread): ...this. Update callers and messages. Do not
12849 call fatal. Check thread_db_use_events. Do not call
12850 change_inferior_id or new_thread_notify.
12851 (maybe_attach_thread): Update. Do not call new_thread_notify.
12852 (thread_db_init): Set thread_db_use_events. Check use_events.
12853 * utils.c (fatal, warning): Correct message prefix.
12854
30ed0a8f
DJ
128552007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12856
12857 * Makefile.in (clean): Remove new files.
12858 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12859 (powerpc-64.o, powerpc-64.c): New rules.
12860 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12861 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12862 with SPE.
12863 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12864 SPE targets.
12865 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12866 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12867 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12868 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12869 (target_regsets): Add AltiVec and SPE register sets.
12870 * configure.ac: Check for AltiVec and SPE.
12871 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12872 (ppc_fill_vrregset, ppc_store_vrregset): New.
12873 (target_regsets): Add AltiVec register set.
12874 * configure: Regenerated.
12875
fd462a61
DJ
128762007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12877
12878 * linux-low.c (O_LARGEFILE): Define.
12879 (linux_read_memory): Use /proc/PID/mem.
12880 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12881 * configure, config.in: Regenerated.
12882
69f223ed
DJ
128832007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12884
12885 * linux-low.c (linux_wait_for_event): Do not pass signals while
12886 single-stepping.
12887
aec18585
PA
128882007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12889
12890 * win32-low.c (create_process): New.
12891 (win32_create_inferior): Use create_process instead of
12892 CreateProcess. If create_process failed retry appending an ".exe"
12893 suffix. Store the GetLastError result immediatelly after
12894 create_process calls and use it on the call to error.
12895
34d86ddd
PA
128962007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12897
12898 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12899
5a0e3bd0
JB
129002007-08-23 Joel Brobecker <brobecker@adacore.com>
12901
12902 * configure.ac: Switch license to GPLv3.
12903
f88c79e6
MS
129042007-08-01 Michael Snyder <msnyder@access-company.com>
12905
12906 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12907
6b3d9b83
PA
129082007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12909
12910 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12911 typedef.
12912 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12913 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12914 CloseToolhelp32Snapshot.
12915 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12916 CloseToolhelp32Snapshot.
12917
c588c53c
MS
129182007-07-27 Michael Snyder <michael.snyder@access-company.com>
12919
12920 * server.c (main): Check for inferior exit before main loop.
12921
aa0403d9
PA
129222007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12923
12924 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12925 instead of on tmp_desc.
12926
255e7678
DJ
129272007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12928 Daniel Jacobowitz <dan@codesourcery.com>
12929
12930 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12931 (add_thread): Minor cleanups.
12932 (clear_inferiors): Move lower in the file. Clear the DLL
12933 list.
12934 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12935 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12936 (xml_escape_text): New.
12937 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12938 for qSupported.
12939 (handle_v_cont): Report errors.
12940 (gdbserver_version): Update.
12941 (main): Correct size of own_buf. Do not report initial DLL events.
12942 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12943 (unloaded_dll, xml_escape_text): New.
12944 * win32-low.c (enum target_waitkind): Update comments.
12945 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12946 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12947 (win32_EnumProcessModules, win32_GetModuleInformation)
12948 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12949 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12950 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12951 (win32_Module32First, win32_Module32Next, load_toolhelp)
12952 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12953 (get_child_debug_event): Handle DLL events.
12954 (win32_wait): Likewise.
12955
0d37add9
DJ
129562007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12957
12958 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12959 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12960
45e2715e
PA
129612007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12962
12963 * win32-low.c (handle_output_debug_string): Ignore event if not
12964 waiting.
12965
c5674cf1
PA
129662007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12967
12968 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12969
2bbe3cc1
DJ
129702007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12971
12972 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12973
ae13219e
DJ
129742007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12975
12976 * inferiors.c (change_inferior_id): Add comment.
12977 * linux-low.c (check_removed_breakpoint): Add an early
12978 prototype. Improve debug output.
12979 (linux_attach): Doc update.
12980 (linux_detach_one_process, linux_detach): Clean up before releasing
12981 each process.
12982 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12983 * linux-low.h (struct process_info): Doc improvement.
12984 * mem-break.c (delete_all_breakpoints): New.
12985 * mem-break.h (delete_all_breakpoints): New prototype.
12986 * thread-db.c (find_first_thread): New.
12987 (thread_db_create_event): Call it instead of
12988 thread_db_find_new_threads. Clean up unused variables.
12989 (maybe_attach_thread): Remove first thread handling.
12990 (thread_db_find_new_threads): Use find_first_thread.
12991 (thread_db_get_tls_address): Likewise.
12992
4105de34
DJ
129932007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12994
12995 * thread-db.c (thread_db_find_new_threads): Add prototype.
12996 (thread_db_create_event): Check for the main thread before adding
12997 a new thread.
12998 (maybe_attach_thread): Only enable event reporting if TID == 0.
12999 (thread_db_get_tls_address): Check for new threads.
13000
2b876972
DJ
130012007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13002
13003 * linux-low.c (linux_create_inferior): Try execv before execvp.
13004 * spu-low.c (spu_create_inferior): Likewise.
13005
7a245884
DJ
130062007-06-13 Mike Frysinger <vapier@gentoo.org>
13007
13008 * linux-low.c (linux_create_inferior): Change execv to execvp.
13009 * spu-low.c (spu_create_inferior): Likewies.
13010
117ce543
DJ
130112007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13012
13013 * Makefile.in (clean): Clean new files instead of deleted ones.
13014 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13015 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13016 rules.
13017 * configure.srv: Specify XML files and new regformats for MIPS and
13018 MIPS64 GNU/Linux.
13019 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13020 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13021 an entry for the restart register.
13022 (mips_cannot_fetch_register, mips_cannot_store_register)
13023 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13024 register names to match the XML descriptions.
13025 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13026 restart register instead of $0.
13027
0e7f50da
UW
130282007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13029 Markus Deuling <deuling@de.ibm.com>
13030
13031 * remote-utils.c (decode_xfer_write): New function.
13032 * server.h (decode_xfer_write): Add prototype.
13033 * server.c (handle_query): Add PACKET_LEN argument. Support
13034 qXfer:spu:read and qXfer:spu:write packets.
13035 (main): Pass packet_len to handle_query.
13036 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13037 * target.h (target_ops): Add qxfer_spu.
13038
374c1d38
UW
130392007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13040
13041 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13042 accessing non-seekable spufs files.
13043
bb63802a
UW
130442007-05-16 Markus Deuling <deuling@de.ibm.com>
13045
889bf7c5 13046 * server.c (handle_query): Add reply for qC packet.
bb63802a 13047
7390519e
PA
130482007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13049 Leo Zayas <lerele@champenstudios@com>
13050
13051 * server.h (check_remote_input_interrupt_request): New function.
13052 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13053 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13054 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13055 (check_remote_input_interrupt_request): New function.
13056 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13057 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13058 winapi_GenerateConsoleCtrlEvent): New typedefs.
13059 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13060 to 250 ms.
13061 (win32_wait): Check for remote interrupt request
13062 with check_remote_input_interrupt_request.
13063 (win32_request_interrupt): New function.
13064 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13065
34b34921
PA
130662007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13067
13068 * win32-low.c (debug_registers_changed,
13069 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13070 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13071 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13072 (thread_rec): Get context using the low target.
13073 (child_add_thread): Call thread_added on the low target,
13074 which does the same thing.
13075 (regptr): Delete.
13076 (do_initial_child_stuff): Remove debug registers references.
13077 Set context using the low target. Resume threads after
13078 setting the contexts.
13079 (child_continue): Remove dead variable. Remove debug
13080 registers references.
13081 (child_fetch_inferior_registers): Go through the low target.
13082 (do_child_store_inferior_registers): Remove.
13083 (child_store_inferior_registers): Go through the low target.
13084 (win32_resume): Remove debug registers references.
13085 Set context using the low target.
13086 (handle_exception): Change return type to void. Don't record
13087 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13088 first chance exception.
889bf7c5 13089 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13090 goto loop. Always return after waiting for debug event.
13091 (win32_wait): Convert to switch statement. Handle spurious
13092 events.
13093
13094 * win32-i386-low.c (debug_registers_changed,
13095 debug_registers_used): New.
13096 (initial_stuff): Rename to ...
13097 (i386_initial_stuff): ... this. Clear debug registers
13098 state variables.
13099 (store_debug_registers): Delete.
13100 (i386_get_thread_context): New.
13101 (load_debug_registers): Delete.
13102 (i386_set_thread_context): New.
13103 (i386_thread_added): New.
13104 (single_step): Rename to ...
13105 (i386_single_step): ... this.
13106 (do_fetch_inferior_registers): Rename to ...
13107 (i386_fetch_inferior_register): ... this.
13108 (i386_store_inferior_register): New.
13109 (the_low_target): Adapt to new interface.
13110
13111 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13112 (arm_get_thread_context): New.
13113 (arm_set_thread_context): New.
13114 (regptr): New.
13115 (do_fetch_inferior_registers): Rename to ...
13116 (arm_fetch_inferior_register): ... this.
13117 (arm_store_inferior_register): New.
13118 (arm_wince_breakpoint): Reimplement as unsigned long.
13119 (arm_wince_breakpoint_len): Define.
13120 (the_low_target): Adapt to new interface.
13121
13122 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13123 load_debug_registers. Add get_thread_context, set_thread_context,
13124 thread_added and store_inferior_register. Rename
13125 fetch_inferior_registers to fetch_inferior_register.
13126 (regptr): Remove declaration.
13127
dd6953e1
PA
131282007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13129
13130 * linux-low.c (linux_detach): Change return type to int. Return 0.
13131 * spu-low.c (spu_detach): Likewise.
13132
444d6139
PA
131332007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13134
13135 * target.h (target_ops): Change return type of detach to int.
13136 Add join.
13137 (join_inferior): New.
13138 * server.c (main): Don't skip detach support on mingw32.
13139 If the inferior doesn't support detaching return error.
13140 Call join_inferior instead of using waitpid.
13141 * linux-low.c (linux_join): New.
13142 (linux_target_op): Add linux_join.
13143 * spu-low.c (spu_join): New.
13144 (spu_target_ops): Add spu_join.
13145 * win32-low.c (win32_detach): Adapt to new interface.
13146 Reopen current_process_handle before detaching. Issue a child
13147 resume before detaching.
13148 (win32_join): New.
13149 (win32_target_op): Add win32_join.
13150
1d5315fe
PA
131512007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13152
13153 * win32-low.c (win32-attach): Fix return value.
13154 * target.h (target_ops): Describe ATTACH return values.
13155
bf914831
PA
131562007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13157
13158 * win32-low.c (GETPROCADDRESS): Define.
13159 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13160 (winapi_DebugSetProcessKillOnExit): Likewise.
13161 (win32_create_inferior): Force usage of ansi CreateProcessA.
13162 (win32_attach): Use GETPROCADDRESS.
13163 (win32_detach): Likewise.
13164
f72f3e60
PA
131652007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13166
13167 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13168
ed50f18f
PA
131692007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13170
13171 * win32-low.c: Commit leftover changes from 2007-03-29.
13172
0c2ead7e
DJ
131732007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13174
13175 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13176 fields short instead of int. Add explicit padding.
13177 (i387_cache_to_fsave): Remove unnecessary casts.
13178 (i387_fsave_to_cache): Doc fix.
13179 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13180
73725ff3
DJ
131812007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13182
13183 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13184 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13185
d99f33d8
PA
131862007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13187
13188 * configure.srv (arm*-*-mingw32ce*): Move near the other
13189 arm targets.
13190
68070c10
PA
131912007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13192
2482afc6 13193 * configure.ac: Add errno checking.
68070c10
PA
13194 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13195 sys/file.h and malloc.h.
13196 (AC_CHECK_DECLS): Add perror.
13197 (srv_mingwce): Handle.
2482afc6 13198 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13199 win32-i386-low.o to srv_tgtobj.
13200 (i[34567]86-*-mingw*): Likewise.
13201 (arm*-*-mingw32ce*): Add case.
13202 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13203 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13204 [__MINGW32CE__] (strerror): New function.
13205 [__MINGW32CE__] (errno): Define to GetLastError.
13206 [__MINGW32CE__] (COUNTOF): New macro.
13207 (remote_open): Remove extra close call.
13208 * mem-break.c (delete_breakpoint_at): New function.
13209 * mem-break.h (delete_breakpoint_at): Declare.
13210 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13211 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13212 [USE_WIN32API] (read, write): Add char* casts.
13213 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13214 * server.h: Include wincecompat.h on Windows CE.
13215 [HAVE_ERRNO_H]: Check.
13216 (perror): Declare if not declared.
13217 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13218 (perror_with_name): Remove errno declaration.
13219 * wincecompat.h: New.
13220 * wincecompat.c: New.
13221 * win32-low.h: New.
13222 * win32-arm-low.c: New.
13223 * win32-i386-low.c: New.
13224 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13225 (OUTMSG2): Make it safe.
13226 (_T): New macro.
13227 (COUNTOF): New macro.
13228 (NUM_REGS): Get it from the low target.
13229 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13230 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13231 (thread_rec): Let low target handle debug registers.
13232 (child_add_thread): Likewise.
13233 (child_init_thread_list): Likewise.
13234 (continue_one_thread): Likewise.
13235 (regptr): New.
13236 (do_child_fetch_inferior_registers): Move to ...
13237 * win32-i386-low.c: ... here, and rename to ...
13238 (do_fetch_inferior_registers): ... this.
889bf7c5 13239 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13240 Go through the low target.
13241 (do_child_store_inferior_registers): Use regptr.
13242 (strwinerror): New function.
13243 (win32_create_inferior): Handle Windows CE.
13244 Use strwinerror instead of strerror on Windows error
13245 codes. Add program to the error output.
13246 Don't close the main thread handle on Windows CE.
13247 (win32_attach): Use coredll.dll on Windows CE.
13248 (win32_kill): Close current process and current
13249 thread handles.
13250 (win32_detach): Use coredll.dll on Windows CE.
13251 (win32_resume): Let low target handle debug registers, and
13252 step request.
13253 (handle_exception): Add/Remove initial breakpoint. Avoid
13254 non-existant WSTOPSIG on Windows CE.
13255 (win32_read_inferior_memory): Cast to remove warning.
13256 (win32_arch_string): Go through the low target.
13257 (initialize_low): Call set_breakpoint_data with the low
13258 target's breakpoint.
13259 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13260 FOP_REGNUM, mappings): Move to ...
13261 * win32-i386-low.c: ... here.
13262 * win32-low.c (win32_thread_info): Move to ...
13263 * win32-low.h: ... here.
13264 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13265 win32-arm-low.c and wincecompat.c.
13266 (all:): Add $EXEEXT.
13267 (install-only:): Likewise.
13268 (gdbserver:): Likewise.
13269 (gdbreplay:): Likewise.
13270 * config.in: Regenerate.
13271 * configure: Regenerate.
13272
41093d81
PA
132732007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13274
13275 * win32-low.c: Rename typedef thread_info to
13276 win32_thread_info throughout.
13277
544afa54
PA
132782007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13279
13280 * win32-i386-low.c: Rename to ...
13281 * win32-low.c: ... this.
13282 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13283 * Makefile.in: Likewise.
13284
bce7165d
PA
132852007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13286
13287 * remote-utils.c (monitor_output): Constify msg parameter.
13288 * server.h (monitor_output): Likewise.
13289 * win32-i386-low.c (handle_output_debug_string): New.
13290 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13291 handle_output_debug_string.
13292 (get_child_debug_event): Likewise.
13293
506c7aa0
DJ
132942007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13295
13296 * server.c (main): Correct strtoul check.
13297
42c81e2a
DJ
132982007-03-27 Jon Ringle <jon@ringle.org>
13299
13300 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13301
9453113a
DJ
133022007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13303
13304 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13305
64a69107
DJ
133062007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13307
13308 * terminal.h: Check HAVE_SGTTY_H.
13309
133102007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13311
13312 * remote-utils.c (remote_open): Print out the assigned port number.
13313
c74d0ad8
DJ
133142007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13315
13316 * remote-utils.c (monitor_output): New function.
13317 * server.c (debug_threads): Define here.
13318 (monitor_show_help): New function.
13319 (handle_query): Handle qRcmd.
13320 (main): Do not handle 'd' packet.
13321 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13322 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13323 of debug_threads.
13324
de7c3b4a
PA
133252007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13326
13327 * Makefile.in (EXEEXT): New.
13328 (clean): Use $(EXEEXT).
13329
ef57601b
PA
133302007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13331
13332 * target.h (target_ops): Rename send_signal to request_interrupt,
13333 and remove enum target_signal parameter.
13334 * linux-low.c (linux_request_interrupt): Rename from
13335 linux_send_signal, and always send SIGINT.
13336 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13337 and always send SIGINT.
13338 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13339 of send_signal.
13340 (input_interrupt): Likewise.
13341
820f2bda
PA
133422007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13343
13344 * server.c (get_features_xml): Check if target implemented
13345 arch_string.
13346 * win32-i386-low.c (win32_arch_string): New.
13347 (win32_target_ops): Add win32_arch_string as arch_string member.
13348
ab39bf24
UW
133492007-02-22 Markus Deuling <deuling@de.ibm.com>
13350
13351 * spu-low.c (spu_arch_string): New.
13352 (spu_target_ops): Add spu_arch_string.
13353
61ff6e04
DJ
133542007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13355
13356 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13357 * configure.ac: Do not check for terminal.h.
13358 * configure, config.in: Regenerated.
13359
fb1e4ffc
DJ
133602007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13361
13362 * Makefile.in (OBS): Add $(XML_BUILTIN).
13363 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13364 (clean): Update.
13365 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13366 (arm-with-iwmmxt.c): New.
13367 * config.in, configure: Regenerate.
13368 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13369 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13370 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13371 (arm*-*-linux*): Add iWMMXt and regset support.
13372 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13373 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13374 (arm_store_wmmxregset, target_regsets): New.
13375 * server.c (get_features_xml): Take annex argument. Check builtin
13376 XML documents.
13377 (handle_query): Handle multiple annexes.
13378
0f48aa01
DJ
133792007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13380
13381 * remote-utils.c [USE_WIN32API] (read, write): Define.
13382 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13383 write.
13384
23181151
DJ
133852007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13386
13387 * linux-i386-low.c (the_low_target): Set arch_string.
13388 * linux-x86-64-low.c (the_low_target): Likewise.
13389 * linux-low.c (linux_arch_string): New.
13390 (linux_target_ops): Add it.
13391 * linux-low.h (struct linux_target_ops): Add arch_string.
13392 * server.c (write_qxfer_response): Use const void * for DATA.
13393 (get_features_xml): New.
13394 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13395 * target.h (struct target_ops): Add arch_string method.
13396
9d606399
DJ
133972007-01-03 Denis Pilat <denis.pilat@st.com>
13398 Daniel Jacobowitz <dan@codesourcery.com>
13399
13400 * linux-low.c (linux_kill): Handle being called with no threads.
13401 * win32-i386-low.c (win32_kill): Likewise.
13402 (get_child_debug_event): Clear current_process_handle.
13403
134042006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13405 Daniel Jacobowitz <dan@codesourcery.com>
13406
13407 * remote-utils.c (remote_open): Check the type of specified
13408 serial port devices before opening them.
13409 * server.c (main): Kill the inferior if an error occurs during
13410 the first remote_open.
13411
a5e13d24
DJ
134122006-12-05 Markus Deuling <deuling@de.ibm.com>
13413
13414 * README: Update supported targets.
13415
186947f7
DJ
134162006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13417
13418 * Makefile.in (clean): Remove reg-mips64.c.
13419 (reg-mips64.c, reg-mips64.o): New rules.
13420 * configure.srv: Handle mips64. Include regset support for mips.
13421 * linux-mips-low.c (union mips_register): New.
13422 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13423 (mips_breakpoint, mips_breakpoint_at): Use int.
13424 (mips_collect_register, mips_supply_register)
13425 (mips_collect_register_32bit, mips_supply_register_32bit)
13426 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13427 (mips_store_fpregset, target_regsets): New.
13428 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13429
a13e2c95
UW
134302006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13431
13432 * configure.srv: Add target "spu*-*-*".
13433 * Makefile.in (clean): Remove reg-spu.c.
13434 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13435 * spu-low.c: New file.
13436
cb7283db
DJ
134372006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13438
13439 * configure.ac: Correct td_thr_tls_get_addr test.
13440 * configure: Regenerated.
13441
89be2091
DJ
134422006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13443
13444 * linux-low.c (linux_wait_for_event): Reformat. Use the
13445 pass_signals array.
13446 * remote-utils.c (decode_address_to_semicolon): New.
13447 * server.c (pass_signals, handle_general_set): New.
13448 (handle_query): Mention QPassSignals for qSupported.
13449 (main): Call handle_general_set.
13450 * server.h (pass_signals, decode_address_to_semicolon): New.
13451
000ef4f0
DJ
134522006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13453
13454 * server.c (handle_query): Correct error handling for read_auxv.
13455
b7149293
UW
134562005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13457
13458 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13459 and srv_linux_thread_db to yes.
13460 * linux-s390-low.c (s390_fill_gregset): New function.
13461 (target_regsets): Define data structure.
13462
dae5f5cf
DJ
134632006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13464
13465 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13466 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13467 * config.in, configure: Regenerated.
13468 * inferiors.c (gdb_id_to_thread): New function.
13469 (gdb_id_to_thread_id): Use it.
13470 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13471 * linux-low.h (struct process_info): Add th member.
13472 (thread_db_get_tls_address): New prototype.
13473 * remote-utils.c (decode_address): Make non-static.
13474 * server.c (handle_query): Handle qGetTLSAddr.
13475 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13476 * target.h (struct target_ops): Add get_tls_address.
13477 * thread-db.c (maybe_attach_thread): Save the thread handle.
13478 (thread_db_get_tls_address): New.
13479
32ca6d61
DJ
134802006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13481
13482 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13483 (linux_resume_one_process): Take a siginfo_t *. Update all
13484 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13485 (struct pending_signals): Add a siginfo_t.
13486 (linux_wait_for_process): Always set last_status.
13487 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13488 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13489 * linux-low.h (struct process_info): Add last_status.
13490
5ffff7c1
DJ
134912006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13492
13493 * remote-utils.c (try_rle): New function.
13494 (putpkt_binary): Use it.
13495
8695c747
DJ
134962006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13497
13498 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13499 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13500 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13501 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13502 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13503 point registers.
13504
290fadea
RS
135052006-08-08 Richard Sandiford <richard@codesourcery.com>
13506
13507 * server.c (terminal_fd): New variable.
13508 (old_foreground_pgrp): Likewise.
13509 (restore_old_foreground_pgrp): New function.
13510 (start_inferior): Record the terminal file descriptor in terminal_fd
13511 and its original foreground group in old_foreground_pgrp. Register
13512 restore_old_foreground_pgrp with atexit().
13513
9f2e1e63
DJ
135142006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13515
13516 * server.c (handle_query): Correct qPart to qXfer.
13517
b80864fb
DJ
135182006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13519
13520 * configure.ac: Check for more headers which are missing on
13521 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13522 * configure.srv: Add Cygwin and mingw32.
13523 * remote-utils.c: Don't include headers unconditionally which
13524 are missing on mingw32. Include <winsock.h> for mingw32.
13525 (remote_open): Adjust for mingw32 support. Flush
13526 standard error after writing to it.
13527 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13528 (unblock_async_io, enable_async_io, disable_async_io)
13529 (readchar, getpkt): Update for Winsock support.
13530 (prepare_resume_reply): Expect a protocol signal number.
13531 * server.c: Disable <sys/wait.h> on mingw32.
13532 (start_inferior): Adjust for mingw32 support. Flush
13533 standard error after writing to it.
13534 (attach_inferior): Likewise. Use protocol signal
13535 numbers.
13536 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13537 and names.
13538 * win32-i386-low.c: New file.
13539 * Makefile.in (XM_CLIBS): Set.
13540 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13541 (win32-i386-low.o): New dependency rule.
13542 * linux-low.c (linux_wait): Use target signal numbers.
13543 * target.h (struct target_ops): Doc fix.
13544 * server.h (target_signal_to_name): New prototype.
13545 * gdbreplay.c: Don't include headers unconditionally which
13546 are missing on mingw32. Include <winsock.h> for mingw32.
13547 (remote_close, remote_open): Adjust for Winsock support.
13548 * configure, config.in: Regenerated.
13549
0876f84a
DJ
135502006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13551
13552 * server.c (decode_xfer_read, write_qxfer_response): New.
13553 (handle_query): Take a packet length argument. Handle
13554 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13555 the qSupported response.
13556 (main): Update call to handle_query.
13557
01f9e8fa
DJ
135582006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13559
13560 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13561 (putpkt_binary): Renamed from putpkt and adjusted for binary
13562 data.
13563 (putpkt): New wrapper for putpkt_binary.
13564 (readchar): Don't mask off the high bit.
13565 (decode_X_packet): New function.
13566 * server.c (main): Call putpkt_binary if a handler sets the packet
13567 length. Save the length of the incoming packet. Handle 'X'.
13568 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13569
be2a5f71
DJ
135702006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13571
13572 * server.c (handle_query): Handle qSupported.
13573
ea025f5f
DJ
135742006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13575
13576 * remote-utils.c (all_symbols_looked_up): New variable.
13577 (look_up_one_symbol): Check it.
13578 * server.h (look_up_one_symbol): New declaration.
13579 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13580
9308fc88
DJ
135812006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13582
13583 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13584 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13585 (PTRACE_GET_THREAD_AREA): Define.
13586 (ps_get_thread_area): New function.
13587
52fb6437
NS
135882006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13589
13590 * configure.srv (m68k*-*-uclinux*): New target.
13591 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13592 (linux_resume_one_process): Remove extraneous cast.
13593 (linux_read_offsets): New.
13594 (linux_target_op): Add linux_read_offsets on mmuless systems.
13595 * server.c (handle_query): Add qOffsets logic.
13596 * target.h (struct target_ops): Add read_offsets.
13597
21b0f40c
DJ
135982006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13599
13600 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13601 (PTRACE_GET_THREAD_AREA): Define.
13602 (ps_get_thread_area): New function.
13603 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13604 (linux-x86-64-low.o): Update.
13605
0050a760
DJ
136062006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13607
13608 * configure.ac: Remove checks for prfpregset_t.
13609 * gdb_proc_service.h: New file.
13610 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13611 new "gdb_proc_service.h".
13612 * proc-service.c: Likewise.
13613 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13614 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13615 * Makefile.in (gdb_proc_service_h): Updated.
13616 * configure, config.in: Regenerated.
13617
b92a518e
DJ
136182006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13619
13620 * remote-utils.c (prepare_resume_reply): Move declaration
13621 of gdb_id_from_wait to the top of the block.
13622
545587ee
DJ
136232006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13624
13625 * linux-low.c (regsets_store_inferior_registers): Read the regset
13626 from the target before filling it.
13627
9db87ebd
DJ
136282006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13629
13630 * server.c (attach_inferior): Return SIGTRAP for a successful
13631 attach.
13632
dd24457d
DJ
136332006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13634
13635 * Makefile.in (OBS): Add version.o.
13636 (STAGESTUFF): Delete.
13637 (version.o): Add dependencies.
13638 (version.c): Replace rule.
13639 (clean): Remove version.c.
13640 * server.c (gdbserver_version): New.
13641 (gdbserver_usage): Use printf.
13642 (main): Handle --version and --help.
13643 * server.h (version, host_name): Add declarations.
13644
6f0f660e
EZ
136452005-12-23 Eli Zaretskii <eliz@gnu.org>
13646
889bf7c5
PA
13647 * linux-arm-low.c:
13648 * linux-arm-low.c:
13649 * inferiors.c:
13650 * i387-fp.h:
13651 * i387-fp.c:
13652 * gdbreplay.c:
13653 * regcache.c:
13654 * proc-service.c:
13655 * mem-break.h:
13656 * mem-break.c:
13657 * linux-x86-64-low.c:
13658 * linux-sh-low.c:
13659 * linux-s390-low.c:
13660 * linux-ppc64-low.c:
13661 * linux-ppc-low.c:
13662 * linux-mips-low.c:
13663 * linux-m68k-low.c:
13664 * linux-m32r-low.c:
13665 * linux-low.h:
13666 * linux-low.c:
13667 * linux-ia64-low.c:
13668 * linux-i386-low.c:
13669 * linux-crisv32-low.c:
13670 * thread-db.c:
13671 * terminal.h:
13672 * target.h:
13673 * target.c:
13674 * server.h:
13675 * server.c:
13676 * remote-utils.c:
13677 * regcache.h:
13678 * utils.c:
13679 * Makefile.in:
13680 * configure.ac:
6f0f660e
EZ
13681 * gdbserver.1: Add (C) after Copyright. Update the FSF
13682 address.
13683
9d1fb177
DJ
136842005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13685
13686 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13687 (arm_breakpoint_at): Recognize both breakpoints.
13688 (the_low_target): Use the correct breakpoint instruction.
13689
011a70c2
DJ
136902005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13691
13692 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13693 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13694 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13695 (the_low_target): Update.
13696
7fb85e41
AS
136972005-10-25 Andreas Schwab <schwab@suse.de>
13698
13699 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13700
13701 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13702 (ia64_num_regs): Reduce to 462.
13703
3db0444b
DJ
137042005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13705
13706 * acinclude.m4: Correct quoting.
13707 * aclocal.m4: Regenerated.
13708
13709 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13710 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13711 (thread_db_init): Call thread_db_err_str.
13712 * configure.ac: Check for TD_VERSION.
13713 * config.in, configure: Regenerated.
13714
bee0189a
DJ
137152005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13716
13717 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13718
e9d25b98
DJ
137192005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13720
13721 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13722 is not available. Define HAVE_PTRACE_GETREGS if it is.
13723 * config.in, configure: Regenerated.
13724 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13725 * linux-i386-low.c, linux-m68k-low.c: Update to use
13726 HAVE_PTRACE_GETREGS.
13727 * linux-low.c (regsets_fetch_inferior_registers)
13728 (regsets_store_inferior_registers): Only return 0 if we processed
13729 GENERAL_REGS.
13730 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13731 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13732
a06660f7
DJ
137332005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13734
13735 * inferiors.c (struct thread_info): Add gdb_id.
13736 (add_thread): Add gdb_id argument.
13737 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13738 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13739 calls to add_thread.
13740 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13741 * server.c (handle_query): Use thread_to_gdb_id.
13742 (handle_v_cont, main): Use gdb_id_to_thread_id.
13743 * server.h (add_thread): Update prototype.
13744 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13745 prototypes.
13746
5a1f5858
DJ
137472005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13748
13749 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13750 left-padded registers.
13751 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13752 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13753
e122f1f5
SE
137542005-07-01 Steve Ellcey <sje@cup.hp.com>
13755
13756 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13757 * configure: Regenerate.
13758 * config.in: Regenerate.
13759 * server.h (NEED_DECLARATION_STRERROR):
13760 Replace with !HAVE_DECL_STRERROR.
13761
d592fa2f
DJ
137622005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13763
13764 * linux-low.c (linux_wait, linux_send_signal): Don't test
13765 an unsigned long variable for > 0 if it could be MAX_ULONG.
13766 * server.c (myresume): Likewise.
13767 * target.c (set_desired_inferior): Likewise.
13768
ccbd4912
MK
137692005-06-13 Mark Kettenis <kettenis@gnu.org>
13770
13771 * configure.ac: Simplify and improve check for socklen_t.
13772 * configure, config.in: Regenerate.
13773
f450004a
DJ
137742005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13775
13776 * acconfig.h: Remove.
13777 * configure.ac: Add a test for socklen_t. Use three-argument
13778 AC_DEFINE throughout.
13779 * config.in: Regenerated using autoheader 2.59.
13780 * configure: Regenerated.
13781
13782 * gdbreplay.c (socklen_t): Provide a default.
13783 (remote_open): Use socklen_t.
13784 * remote-utils.c (socklen_t): Provide a default.
13785 (remote_open): Use socklen_t.
13786 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13787 unsigned char.
13788
13789 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13790 char for buffers.
13791 * linux-low.c (linux_read_memory, linux_write_memory)
13792 (linux_read_auxv): Likewise.
13793 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13794 (check_mem_write): Likewise.
13795 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13796 Likewise.
13797 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13798 (registers_from_string, register_data): Likewise.
13799 * server.c (handle_query, main): Likewise.
13800 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13801 (decode_M_packet): Likewise.
13802 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13803 * target.h (struct target_ops): Update read_memory, write_memory,
13804 and read_auxv.
13805 (read_inferior_memory, write_inferior_memory): Update.
13806 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13807 to unsigned char *.
13808 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13809 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13810 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13811 linux-s390-low.c, linux-sh-low.c: Update for changes in
13812 read_inferior_memory and the_low_target->breakpoint.
13813
eee84df1
DJ
138142005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13815
13816 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13817 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13818 * configure.srv: Add powerpc64-*-linux*.
13819 * linux-ppc64-low.c: New file.
13820
45b134e5
OF
138212005-05-23 Orjan Friberg <orjanf@axis.com>
13822
13823 * linux-cris-low.c: New file with support for CRIS.
13824 * linux-crisv32-low.c: Ditto for CRISv32.
13825 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13826 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 13827 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
13828 reg-crisv32.o, and reg-crisv32.c to make rules.
13829 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13830 recognized targets.
13831
48d93c75
UW
138322005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13833
13834 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13835 of sizeof (PTRACE_XFER_TYPE).
13836 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13837
e013ee27
OF
138382005-05-12 Orjan Friberg <orjanf@axis.com>
13839
889bf7c5 13840 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
13841 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13842 pointers for hardware watchpoint support.
13843 * linux-low.h (struct linux_target_ops): Ditto.
13844 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13845 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13846 to linux_target_ops.
13847 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13848 reply packet.
13849 * server.c (main): Recognize 'Z' and 'z' packets.
13850
b0ded00b
UW
138512005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13852
13853 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13854 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13855 (the_low_target): Add new members.
13856
8643e2ad
DJ
138572005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13858
13859 * proc-service.c (ps_lgetregs): Search all_processes instead of
13860 all_threads.
13861
fc620387
DJ
138622005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13863
13864 * server.c (start_inferior): Change return type to int.
13865 (attach_inferior): Change sigptr to int *.
13866 (handle_v_cont, handle_v_requests): Change signal to int *.
13867 (main): Change signal to int.
13868
138692005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
13870
13871 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13872 * configure.srv: Add m32r*-*-linux*.
13873 * linux-m32r-low.c: New file.
13874
e0e76420
DJ
138752005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13876
13877 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13878
a1928bad
DJ
138792005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13880
13881 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13882 Take unsigned long arguments for PIDs.
13883 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13884 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13885 (wait_for_sigstop, linux_resume_one_process)
13886 (regsets_fetch_inferior_registers, linux_send_signal)
13887 (linux_read_auxv): Likewise. Update the types of variables holding
13888 PIDs. Update format string specifiers.
13889 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13890 * remote-utils.c (prepare_resume_reply): Likewise.
13891 * server.c (cont_thread, general_thread, step_thread)
13892 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13893 unsigned long.
13894 (handle_query): Update format specifiers.
13895 (handle_v_cont, main): Use strtoul for thread IDs.
13896 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13897 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13898 (general_thread, step_thread, thread_from_wait)
13899 (old_thread_from_wait): Update.
13900 * target.h (struct thread_resume): Use unsigned long for THREAD.
13901 (struct target_ops): Use unsigned long for arguments to attach and
13902 thread_alive.
13903
dcdb98d2
DJ
139042005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13905
13906 * acinclude.m4: Include bfd/bfd.m4 directly.
13907 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13908 <agriffis@toolchain.org>.
13909 * aclocal.m4, configure: Regenerated.
13910
bec39cab
AC
139112005-01-07 Andrew Cagney <cagney@gnu.org>
13912
13913 * configure.ac: Rename configure.in, require autoconf 2.59.
13914 * configure: Re-generate.
13915
434c4c77
DJ
139162004-12-08 Daniel Jacobowitz <dan@debian.org>
13917
13918 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13919 LIBS when finished.
13920 * aclocal.m4: Regenerated.
13921 * configure: Regenerated.
13922
db1d3e1b
AS
139232004-11-21 Andreas Schwab <schwab@suse.de>
13924
13925 * linux-m68k-low.c (m68k_num_gregs): Define.
13926 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13927 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13928 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13929 (m68k_breakpoint_at): New. Add to the_low_target.
13930
13931 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13932 srv_linux_thread_db to yes.
13933
43360365
JB
139342004-10-20 Joel Brobecker <brobecker@gnat.com>
13935
13936 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13937 (ARCH_SET_FS): Likewise.
13938 (ARCH_GET_FS): Likewise.
13939 (ARCH_GET_GS): Likewise.
13940
fd500816
DJ
139412004-10-16 Daniel Jacobowitz <dan@debian.org>
13942
13943 * linux-i386-low.c (ps_get_thread_area): New.
13944 * linux-x86-64-low.c (ps_get_thread_area): New.
13945 * linux-low.c: Include <sys/syscall.h>.
13946 (linux_kill_one_process): Don't kill the first thread here.
13947 (linux_kill): Kill the first thread here.
13948 (kill_lwp): New function.
13949 (send_sigstop, linux_send_signal): Use it.
13950 * proc-service.c: Clean up #ifdefs.
13951 (fpregset_info): Delete.
13952 (ps_lgetregs): Update and enable implementation.
13953 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13954 implementations.
13955 * remote-utils.c (struct sym_cache, symbol_cache): New.
13956 (input_interrupt): Print a clearer message.
13957 (async_io_enabled): New variable.
13958 (enable_async_io, disable_async_io): Use it. Update comments.
13959 (look_up_one_symbol): Use the symbol cache.
13960 * thread-db.c (thread_db_look_up_symbols): New function.
13961 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13962
f6de3c42
DJ
139632004-10-16 Daniel Jacobowitz <dan@debian.org>
13964
13965 * configure.in: Test for -rdynamic.
13966 * configure: Regenerated.
13967 * Makefile (INTERNAL_LDFLAGS): New.
13968 (gdbserver, gdbreplay): Use it.
13969
2c0fc042
AC
139702004-09-02 Andrew Cagney <cagney@gnu.org>
13971
13972 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13973
075b3282
DJ
139742004-03-23 Daniel Jacobowitz <drow@mvista.com>
13975
13976 * linux-low.c (linux_wait): Clear all_processes list also.
13977
fa6a77dc
DJ
139782004-03-12 Daniel Jacobowitz <drow@mvista.com>
13979
13980 * linux-low.c: Include <errno.h>. Remove extern declaration of
13981 errno.
13982
6d782a97
DJ
139832004-03-12 Daniel Jacobowitz <drow@mvista.com>
13984
13985 * gdbreplay.c, server.h, utils.c: Update copyright years.
13986
3a7fb99b
DJ
139872004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13988
13989 * server.c (main): Print child status or termination signal from
13990 variable 'signal', not 'sig'.
13991
c3e735a6
DJ
139922004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13993
13994 * linux-low.c (linux_read_memory): Change return type to
13995 int. Check for and return error from ptrace().
13996 * target.c (read_inferior_memory): Change return type to int. Pass
13997 back return status from the_target->read_memory().
13998 * target.h (struct target_ops): Adapt *read_memory() prototype.
13999 Update comment.
14000 (read_inferior_memory): Adapt prototype.
14001 * server.c (main): Return an error packet if
14002 read_inferior_memory() returns an error.
14003
a59d1c82
DJ
140042004-03-04 Daniel Jacobowitz <drow@mvista.com>
14005
14006 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14007 Unify with other clean targets.
14008
dc3f8883
DJ
140092004-02-29 Daniel Jacobowitz <drow@mvista.com>
14010
14011 * server.c (handle_v_cont): Call set_desired_inferior.
14012
89a208da
DJ
140132004-02-29 Daniel Jacobowitz <drow@mvista.com>
14014
14015 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14016
62ea82f5
DJ
140172004-02-29 Daniel Jacobowitz <drow@mvista.com>
14018
14019 * linux-low.c (linux_wait): Unblock async I/O.
14020 (linux_resume): Block and enable async I/O.
14021 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14022 * server.h (block_async_io, unblock_async_io): Add prototypes.
14023
6910d122
DJ
140242004-02-29 Daniel Jacobowitz <drow@mvista.com>
14025
14026 * remote-utils.c (remote_open): Print a status notice after
14027 opening a TCP port.
14028 * server.c (attach_inferior): Print a status notice after
14029 attaching.
14030
140312004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14032
14033 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14034
c89dc5d4
DJ
140352004-02-26 Daniel Jacobowitz <drow@mvista.com>
14036
14037 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14038 error packet.
14039 * server.c, target.h: Update copyright years.
14040
4b8dad4a
RM
140412004-02-25 Roland McGrath <roland@redhat.com>
14042
14043 * target.h (struct target_ops): New member `read_auxv'.
14044 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14045 * linux-low.c (linux_read_auxv): New function.
14046 (linux_target_ops): Initialize `read_auxv' member to that.
14047
d7446758
JB
140482004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14049
14050 Committed by Jim Blandy <jimb@redhat.com>.
14051
14052 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14053 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14054 instead of GPR_SIZE to distiguish s390 and s390x targets.
14055
5544ad89
DJ
140562004-01-31 Daniel Jacobowitz <drow@mvista.com>
14057
14058 * linux-low.c: Update copyright year.
14059 (check_removed_breakpoint): Clear pending_is_breakpoint.
14060 (linux_set_resume_request, linux_queue_one_thread)
14061 (resume_status_pending_p): New functions.
14062 (linux_continue_one_thread): Use process->resume.
14063 (linux_resume): Only resume threads if there are no pending events.
14064 * linux-low.h (struct process_info): Add resume request
14065 pointer.
14066
2a68b70e
DJ
140672004-01-30 Daniel Jacobowitz <drow@mvista.com>
14068
14069 * regcache.c (new_register_cache): Clear the allocated register
14070 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14071
64386c31
DJ
140722003-10-13 Daniel Jacobowitz <drow@mvista.com>
14073
14074 * linux-low.c (linux_resume): Take a struct thread_resume *
14075 argument.
14076 (linux_wait): Update call.
14077 (resume_ptr): New static variable.
14078 (linux_continue_one_thread): Renamed from
14079 linux_continue_one_process. Use resume_ptr.
14080 (linux_resume): Use linux_continue_one_thread.
14081 * server.c (handle_v_cont, handle_v_requests): New functions.
14082 (myresume): New function.
14083 (main): Handle 'v' case.
14084 * target.h (struct thread_resume): New type.
14085 (struct target_ops): Change argument of "resume" to struct
14086 thread_resume *.
14087 (myresume): Delete macro.
14088
c938e9b0
L
140892003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14090
14091 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14092 (uninstall): Support DESTDIR.
14093
7f313d07
BC
14094Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14095
14096 * configure.srv: Add xscale*linux copy of arm*linux entry.
14097
3b2fc2ea
DJ
140982003-07-24 Daniel Jacobowitz <drow@mvista.com>
14099
14100 * linux-arm-low.c (arm_reinsert_addr): New function.
14101 (the_low_target): Add arm_reinsert_addr.
14102
1c0a559e
MK
141032003-07-08 Mark Kettenis <kettenis@gnu.org>
14104
14105 * mem-break.c: Remove whitespace at end of file.
14106
43d5792c
DJ
141072003-06-28 Daniel Jacobowitz <drow@mvista.com>
14108
14109 * configure.in: Check whether we need to prototype strerror.
14110 * server.h: Optionally prototype strerror.
14111 * gdbreplay.c (perror_with_name): Use strerror.
14112 * linux-low.c (linux_attach_lwp): Use strerror.
14113 * utils.c (perror_with_name): Use strerror.
14114 * config.in, configure: Regenerated.
14115
c8a86edf
DJ
141162003-06-28 Daniel Jacobowitz <drow@mvista.com>
14117
14118 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14119 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14120
73d37363
DJ
141212003-06-20 Daniel Jacobowitz <drow@mvista.com>
14122
14123 * Makefile.in (SFILES): Update.
14124 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14125 low-sun3.c: Remove files.
14126
6ad8ae5c
DJ
141272003-06-17 Daniel Jacobowitz <drow@mvista.com>
14128
14129 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14130 (linux_detach_one_process, linux_detach): New functions.
14131 (linux_target_ops): Add linux_detach.
14132 * server.c (main): Handle 'D' packet.
14133 * target.h (struct target_ops): Add "detach" member.
14134 (detach_inferior): Define.
14135
1581182a
MK
141362003-06-13 Mark Kettenis <kettenis@gnu.org>
14137
14138 From Kelley Cook <kelleycook@wideopenwest.com>:
14139 * configure.srv: Accept i[34567]86 variants.
14140
e5379b03
DJ
141412003-06-05 Daniel Jacobowitz <drow@mvista.com>
14142
14143 * linux-low.c (linux_wait_for_event): Correct comment typos.
14144 (linux_resume_one_process): Call check_removed_breakpoint.
14145 (linux_send_signal): New function.
14146 (linux_target_ops): Add linux_send_signal.
14147 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14148 of kill.
14149 * target.h (struct target_ops): Add send_signal.
14150
2ff29de4
JB
141512003-05-29 Jim Blandy <jimb@redhat.com>
14152
14153 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14154 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14155 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14156 away part of the register's value.
14157
254787d4
DJ
141582003-03-26 Daniel Jacobowitz <drow@mvista.com>
14159
14160 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14161 (linux_wait_for_event, linux_init_signals): Likewise.
14162
94e10508
DJ
141632003-03-17 Daniel Jacobowitz <drow@mvista.com>
14164
14165 * configure.in: Check for stdlib.h.
14166 * configure: Regenerated.
14167 * config.in: Regenerated.
14168
4c0711e0
DJ
141692003-01-04 Andreas Schwab <schwab@suse.de>
14170
14171 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14172
ef66e766
AC
141732003-01-02 Andrew Cagney <ac131313@redhat.com>
14174
14175 * Makefile.in: Remove obsolete code.
14176
a1358604
DJ
141772002-11-20 Daniel Jacobowitz <drow@mvista.com>
14178
14179 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14180 defined(PT_FPR0_HI).
14181
23ce3b1c
DJ
141822002-11-17 Stuart Hughes <seh@zee2.com>
14183
14184 * linux-arm-low.c (arm_num_regs): Increase.
14185 (arm_regmap): Include status register.
14186
141872002-11-17 Daniel Jacobowitz <drow@mvista.com>
14188
14189 * linux-low.c (register_addr): Remove incorrect -1 check.
14190
a9fa9f7d
DJ
141912002-08-29 Daniel Jacobowitz <drow@mvista.com>
14192
14193 * linux-low.c (linux_create_inferior): Call setpgid. Return
14194 the new PID.
14195 (unstopped_p, linux_signal_pid): Remove.
14196 (linux_target_ops): Remove linux_signal_pid.
14197 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14198 global instead of target method.
14199 * target.h (struct target_ops): Remove signal_pid. Update comment
14200 for create_inferior.
14201 * server.c (signal_pid): New variable.
14202 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14203 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14204 (attach_inferior): Set signal_pid.
14205
17574093
DJ
142062002-08-23 Daniel Jacobowitz <drow@mvista.com>
14207
14208 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14209
142102002-08-20 Jim Blandy <jimb@redhat.com>
14211
14212 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14213 default for this.
14214
142152002-08-01 Andrew Cagney <cagney@redhat.com>
14216
14217 * Makefile.in: Make chill references obsolete.
14218
142192002-07-24 Kevin Buettner <kevinb@redhat.com>
14220
14221 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14222 * configure: Regenerate.
14223 * config.in: Regenerate.
14224
142252002-07-09 David O'Brien <obrien@FreeBSD.org>
14226
14227 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14228 (perror_with_name, remote_close, remote_open, expect, play): Static.
14229
142302002-07-04 Michal Ludvig <mludvig@suse.cz>
14231
4b8dad4a 14232 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14233 byte offsets instead of an array of indexes.
14234 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14235
142362002-06-13 Daniel Jacobowitz <drow@mvista.com>
14237
14238 * regcache.c: Add comment.
14239
142402002-06-11 Daniel Jacobowitz <drow@mvista.com>
14241
14242 * thread-db.c: New file.
14243 * proc-service.c: New file.
14244 * acinclude.m4: New file.
14245 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14246 proc-service.o, and thread-db.o.
14247 (linux-low.o): Add USE_THREAD_DB.
14248 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14249 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14250 * aclocal.m4: Regenerated.
14251 * config.in: Regenerated.
14252 * configure: Regenerated.
14253 * configure.in: Check for proc_service.h, sys/procfs.h,
14254 thread_db.h, and linux/elf.h headrs.
14255 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14256 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14257 Check for -lthread_db and thread support.
14258 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14259 PowerPC, and SuperH.
14260 * i387-fp.c: Constify arguments.
14261 * i387-fp.h: Likewise.
14262 * inferiors.c: (struct thread_info): Renamed from
14263 `struct inferior_info'. Remove PID member. Use generic inferior
14264 list header. All uses updated.
14265 (inferiors, signal_pid): Removed.
14266 (all_threads): New variable.
14267 (get_thread): Define.
14268 (add_inferior_to_list): New function.
14269 (for_each_inferior): New function.
14270 (change_inferior_id): New function.
14271 (add_inferior): Removed.
14272 (remove_inferior): New function.
14273 (add_thread): New function.
14274 (free_one_thread): New function.
14275 (remove_thread): New function.
14276 (clear_inferiors): Use for_each_inferior and free_one_thread.
14277 (find_inferior): New function.
14278 (find_inferior_id): New function.
14279 (inferior_target_data): Update argument type.
14280 (set_inferior_target_data): Likewise.
14281 (inferior_regcache_data): Likewise.
14282 (set_inferior_regcache_data): Likewise.
14283 * linux-low.c (linux_bp_reinsert): Remove.
14284 (all_processes, stopping_threads, using_thrads)
14285 (struct pending_signals, debug_threads, pid_of): New.
14286 (inferior_pid): Replace with macro.
14287 (struct inferior_linux_data): Remove.
14288 (get_stop_pc, add_process): New functions.
14289 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14290 Use add_process and add_thread.
14291 (linux_attach_lwp): New function, based on old linux_attach. Use
14292 add_process and add_thread. Set stop_expected for new threads.
14293 (linux_attach): New function.
14294 (linux_kill_one_process): New function.
14295 (linux_kill): Kill all LWPs.
14296 (linux_thread_alive): Use find_inferior_id.
14297 (check_removed_breakpoints, status_pending_p): New functions.
14298 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14299 Update. Use WNOHANG. Wait for cloned processes also. Update process
14300 struct for the found process.
14301 (linux_wait_for_event): New function.
14302 (linux_wait): Use it. Support LWPs.
14303 (send_sigstop, wait_for_sigstop, stop_all_processes)
14304 (linux_resume_one_process, linux_continue_one_process): New functions.
14305 (linux_resume): Support LWPs.
14306 (REGISTER_RAW_SIZE): Remove.
14307 (fetch_register): Use register_size instead. Call supply_register.
14308 (usr_store_inferior_registers): Likewise. Call collect_register.
14309 Fix recursive case.
14310 (regsets_fetch_inferior_registers): Improve error message.
14311 (regsets_store_inferior_registers): Add debugging.
14312 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14313 (unstopped_p, linux_signal_pid): New functions.
14314 (linux_target_ops): Add linux_signal_pid.
14315 (linux_init_signals): New function.
14316 (initialize_low): Call it. Initialize using_threads.
14317 * regcache.c (inferior_regcache_data): Add valid
14318 flag.
14319 (get_regcache): Fetch registers lazily. Add fetch argument
14320 and update all callers.
14321 (regcache_invalidate_one, regcache_invalidate): New
14322 functions.
14323 (new_register_cache): Renamed from create_register_cache.
14324 Return the new regcache.
14325 (free_register_cache): Change argument to a void *.
14326 (registers_to_string, registers_from_string): Call get_regcache
14327 with fetch flag set.
14328 (register_data): Make static. Pass fetch flag to get_regcache.
14329 (supply_register): Call get_regcache with fetch flag clear.
14330 (collect_register): Call get_regcache with fetch flag set.
14331 (collect_register_as_string): New function.
14332 * regcache.h: Update.
14333 * remote-utils.c (putpkt): Flush after debug output and use
14334 stderr.
14335 Handle input interrupts while waiting for an ACK.
14336 (input_interrupt): Use signal_pid method.
14337 (getpkt): Flush after debug output and use stderr.
14338 (outreg): Use collect_register_as_string.
14339 (new_thread_notify, dead_thread_notify): New functions.
14340 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14341 and general_thread.
14342 (look_up_one_symbol): Flush after debug output.
14343 * server.c (step_thread, server_waiting): New variables.
14344 (start_inferior): Don't use signal_pid. Update call to mywait.
14345 (attach_inferior): Update call to mywait.
14346 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14347 (main): Don't fetch/store registers explicitly. Use
14348 set_desired_inferior. Support proposed ``Hs'' packet. Update
14349 calls to mywait.
14350 * server.h: Update.
14351 (struct inferior_list, struct_inferior_list_entry): New.
14352 * target.c (set_desired_inferior): New.
14353 (write_inferior_memory): Constify.
14354 (mywait): New function.
14355 * target.h: Update.
14356 (struct target_ops): New signal_pid method.
14357 (mywait): Removed macro, added prototype.
14358
14359 * linux-low.h (regset_func): Removed.
14360 (regset_fill_func, regset_store_func): New.
14361 (enum regset_type): New.
14362 (struct regset_info): Add type field. Use new operation types.
14363 (struct linux_target_ops): stop_pc renamed to get_pc.
14364 Add decr_pc_after_break and breakpoint_at.
14365 (get_process, get_thread_proess, get_process_thread)
14366 (strut process_info, all_processes, linux_attach_lwp)
14367 (thread_db_init): New.
14368
14369 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14370 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14371 (the_low_target): Add new members.
14372 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14373 (i386_store_fpxregset): Constify.
14374 (target_regsets): Add new kind identifier.
14375 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14376 (i386_set_pc): Add debugging.
14377 (i386_breakpoint_at): New function.
14378 (the_low_target): Add new members.
14379 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14380 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14381 (mips_breakpoint_at): New.
14382 (the_low_target): Add new members.
14383 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14384 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14385 (the_low_target): Add new members.
14386 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14387 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14388 (the_low_target): Add new members.
14389 * linux-x86-64-low.c (target_regsets): Add new kind
14390 identifier.
14391
143922002-05-15 Daniel Jacobowitz <drow@mvista.com>
14393
14394 From Martin Pool <mbp@samba.org>:
14395 * server.c (gdbserver_usage): New function.
14396 (main): Call it.
14397
143982002-05-14 Daniel Jacobowitz <drow@mvista.com>
14399
14400 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14401 stop_at -> stop_pc.
14402
144032002-05-04 Andrew Cagney <ac131313@redhat.com>
14404
14405 * Makefile.in: Remove obsolete code.
14406
144072002-04-24 Michal Ludvig <mludvig@suse.cz>
14408
14409 * linux-low.c (regsets_fetch_inferior_registers),
14410 (regsets_store_inferior_registers): Removed cast to int from
14411 ptrace() calls.
14412 * regcache.h: Added declaration of struct inferior_info.
14413
144142002-04-20 Daniel Jacobowitz <drow@mvista.com>
14415
14416 * inferiors.c (struct inferior_info): Add regcache_data.
14417 (add_inferior): Call create_register_cache.
14418 (clear_inferiors): Call free_register_cache.
14419 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14420 * regcache.c (struct inferior_regcache_data): New.
14421 (registers): Remove.
14422 (get_regcache): New function.
14423 (create_register_cache, free_register_cache): New functions.
14424 (set_register_cache): Don't initialize the register cache here.
14425 (registers_to_string, registers_from_string, register_data): Call
14426 get_regcache.
14427 * regcache.h: Add prototypes.
14428 * server.h: Likewise.
14429
144302002-04-20 Daniel Jacobowitz <drow@mvista.com>
14431
14432 * mem-break.c: New file.
14433 * mem-break.h: New file.
14434 * Makefile.in: Add mem-break.o rule; update server.h
14435 dependencies.
14436 * inferiors.c (struct inferior_info): Add target_data
14437 member.
14438 (clear_inferiors): Free target_data member if set.
14439 (inferior_target_data, set_inferior_target_data): New functions.
14440 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14441 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14442 * linux-low.c (linux_bp_reinsert): New variable.
14443 (struct inferior_linux_data): New.
14444 (linux_create_inferior): Use set_inferior_target_data.
14445 (linux_attach): Likewise. Call add_inferior.
14446 (linux_wait_for_one_inferior): New function.
14447 (linux_wait): Call it.
14448 (linux_write_memory): Add const.
14449 (initialize_low): Call set_breakpoint_data.
14450 * linux-low.h (struct linux_target_ops): Add breakpoint
14451 handling members.
14452 * server.c (attach_inferior): Remove extra add_inferior
14453 call.
14454 * server.h: Include mem-break.h. Update inferior.c
14455 prototypes.
14456 * target.c (read_inferior_memory)
14457 (write_inferior_memory): New functions.
14458 * target.h (read_inferior_memory)
14459 (write_inferior_memory): Change macros to prototypes.
14460 (struct target_ops): Update comments. Add const to write_memory
14461 definition.
14462
144632002-04-11 Daniel Jacobowitz <drow@mvista.com>
14464
14465 * linux-low.c (usr_store_inferior_registers): Support
14466 registers which are allowed to fail to store.
14467 * linux-low.h (linux_target_ops): Likewise.
14468 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14469 (ppc_cannot_store_register): FPSCR may not be storable.
14470
144712002-04-09 Daniel Jacobowitz <drow@mvista.com>
14472
14473 * server.h: Include <string.h> if HAVE_STRING_H.
14474 * ChangeLog: Correct paths in last ChangeLog entry.
14475
144762002-04-09 Daniel Jacobowitz <drow@mvista.com>
14477
14478 * linux-low.h: Remove obsolete prototypes.
14479 (struct linux_target_ops): New.
14480 (extern the_low_target): New.
14481 * linux-low.c (num_regs, regmap): Remove declarations.
14482 (register_addr): Use the_low_target explicitly.
14483 (fetch_register): Likewise.
14484 (usr_fetch_inferior_registers): Likewise.
14485 (usr_store_inferior_registers): Likewise.
14486 * linux-arm-low.c (num_regs): Remove.
14487 (arm_num_regs): Define.
14488 (arm_regmap): Renamed from regmap, made static.
14489 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14490 made static.
14491 (arm_cannot_store_register): Renamed from cannot_store_register,
14492 made static.
14493 (the_low_target): New.
14494 * linux-i386-low.c (num_regs): Remove.
14495 (i386_num_regs): Define.
14496 (i386_regmap): Renamed from regmap, made static.
14497 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14498 made static.
14499 (i386_cannot_store_register): Renamed from cannot_store_register,
14500 made static.
14501 (the_low_target): New.
14502 * linux-ia64-low.c (num_regs): Remove.
14503 (ia64_num_regs): Define.
14504 (ia64_regmap): Renamed from regmap, made static.
14505 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14506 made static.
14507 (ia64_cannot_store_register): Renamed from cannot_store_register,
14508 made static.
14509 (the_low_target): New.
14510 * linux-m68k-low.c (num_regs): Remove.
14511 (m68k_num_regs): Define.
14512 (m68k_regmap): Renamed from regmap, made static.
14513 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14514 made static.
14515 (m68k_cannot_store_register): Renamed from cannot_store_register,
14516 made static.
14517 (the_low_target): New.
14518 * linux-mips-low.c (num_regs): Remove.
14519 (mips_num_regs): Define.
14520 (mips_regmap): Renamed from regmap, made static.
14521 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14522 made static.
14523 (mips_cannot_store_register): Renamed from cannot_store_register,
14524 made static.
14525 (the_low_target): New.
14526 * linux-ppc-low.c (num_regs): Remove.
14527 (ppc_num_regs): Define.
14528 (ppc_regmap): Renamed from regmap, made static.
14529 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14530 made static.
14531 (ppc_cannot_store_register): Renamed from cannot_store_register,
14532 made static.
14533 (the_low_target): New.
14534 * linux-s390-low.c (num_regs): Remove.
14535 (s390_num_regs): Define.
14536 (s390_regmap): Renamed from regmap, made static.
14537 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14538 made static.
14539 (s390_cannot_store_register): Renamed from cannot_store_register,
14540 made static.
14541 (the_low_target): New.
14542 * linux-sh-low.c (num_regs): Remove.
14543 (sh_num_regs): Define.
14544 (sh_regmap): Renamed from regmap, made static.
14545 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14546 made static.
14547 (sh_cannot_store_register): Renamed from cannot_store_register,
14548 made static.
14549 (the_low_target): New.
14550 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14551 (the_low_target): New.
14552
145532002-04-09 Daniel Jacobowitz <drow@mvista.com>
14554
14555 * Makefile.in: Add stamp-h target.
14556 * configure.in: Create stamp-h.
14557 * configure: Regenerated.
14558
145592002-04-09 Daniel Jacobowitz <drow@mvista.com>
14560
14561 * inferiors.c: New file.
14562 * target.c: New file.
14563 * target.h: New file.
14564 * Makefile.in: Add target.o and inferiors.o. Update
14565 dependencies.
14566 * linux-low.c (inferior_pid): New static variable,
14567 moved from server.c.
14568 (linux_create_inferior): Renamed from create_inferior.
14569 Call add_inferior. Return 0 on success instead of a PID.
14570 (linux_attach): Renamed from myattach.
14571 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14572 (linux_thread_alive): Renamed from mythread_alive.
14573 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14574 child dies.
14575 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14576 (regsets_store_inferior_registers): Correct error message.
14577 Add missing ``return 0''.
14578 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14579 (linux_store_registers): Renamed from store_inferior_registers.
14580 (linux_read_memory): Renamed from read_inferior_memory.
14581 (linux_write_memory): Renamed from write_inferior_memory.
14582 (linux_target_ops): New structure.
14583 (initialize_low): Call set_target_ops ().
14584 * remote-utils.c (unhexify): New function.
14585 (hexify): New function.
14586 (input_interrupt): Send signals to ``signal_pid''.
14587 * server.c (inferior_pid): Remove.
14588 (start_inferior): Update create_inferior call.
14589 (attach_inferior): Call add_inferior.
14590 (handle_query): New function.
14591 (main): Call handle_query for `q' packets.
14592 * server.h: Include "target.h". Remove obsolete prototypes.
14593 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14594
145952002-04-09 Daniel Jacobowitz <drow@mvista.com>
14596
14597 * Makefile.in: Add WARN_CFLAGS. Update configury
14598 dependencies.
14599 * configure.in: Check for <string.h>
14600 * configure: Regenerate.
14601 * config.in: Regenerate.
14602 * gdbreplay.c: Include needed system headers.
14603 (remote_open): Remove strchr prototype.
14604 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14605 * regcache.c (supply_register): Change buf argument to const void *.
14606 (supply_register_by_name): Likewise.
14607 (collect_register): Change buf argument to void *.
14608 (collect_register_by_name): Likewise.
14609 * regcache.h: Add missing prototypes.
14610 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14611 * server.c (handle_query): New function.
14612 (attached): New static variable, moved out of main.
14613 (main): Quiet longjmp clobber warnings.
14614 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14615 * utils.c (error): Remove NORETURN.
14616 (fatal): Likewise.