]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
[ARM] Read memory as unsigned integer
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
dcb07cfa
PA
12016-11-23 Pedro Alves <palves@redhat.com>
2
3 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
4 (debug_vprintf): Use std::chrono::steady_clock instead of
5 gettimeofday. Use '.' instead of ':'.
6 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
7 (get_timestamp): Use std::chrono::steady_clock instead of
8 gettimeofday.
9
8629c02c
SM
102016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
11
12 * Makefile.in: Fix whitespace formatting.
13
b593ecca
SM
142016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
15
16 * Makefile.in (SFILES, OBS): Flatten list and order
17 alphabetically.
18
9986ba08
PA
192016-11-23 Pedro Alves <palves@redhat.com>
20
21 * event-loop.c (handle_file_event): Use warning.
22 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
23 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
24 Use warning.
25
4eefa7bc
PA
262016-11-23 Pedro Alves <palves@redhat.com>
27
28 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
29 output.
30 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
31 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
32 debug_printf and debug_flush for debug output.
33 * server.c (handle_general_set): Likewise.
34 * thread-db.c (try_thread_db_load): Use debug_printf for debug
35 output.
36
5443506e
SM
372016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
38
39 * Makefile.in (.c.o): Replace rule with ...
40 (%.o: %.c): ... this one.
41
3b165252
SM
422016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
43
44 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
45 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
46 make.
47 * configure.ac: Remove checks for the make program.
48 * configure: Re-generate.
49
0bcda685
PA
502016-10-28 Pedro Alves <palves@redhat.com>
51
52 * Makefile.in (CXX_DIALECT): Get from configure.
53 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
54 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
55 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
56 * config.in: Regenerate.
57 * configure: Regenerate.
58
c3805894
YQ
592016-10-27 Yao Qi <yao.qi@linaro.org>
60
61 * linux-low.c (linux_supports_range_stepping): Return true if
62 can_software_single_step return true.
63
89342618
YQ
642016-10-27 Yao Qi <yao.qi@linaro.org>
65
66 * inferiors.c (find_inferior_in_random): New function.
67 * inferiors.h (find_inferior_in_random): Declare.
68 * linux-low.c (linux_wait_for_event_filtered): Call
69 find_inferior_in_random instead of find_inferior.
70
e3652c84
YQ
712016-10-27 Yao Qi <yao.qi@linaro.org>
72
73 * linux-low.c (linux_wait_1): If single-step breakpoints are
74 inserted, remove them.
75
5a04c4cf
PA
762016-10-26 Pedro Alves <palves@redhat.com>
77
78 * linux-low.c (handle_extended_wait): Link parent/child fork
79 threads.
80 (linux_wait_1): Unlink them.
81 (linux_set_resume_request): Ignore resume requests for
82 already-resumed and unhandled fork child threads.
83 * linux-low.h (struct lwp_info) <fork_relative>: New field.
84 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
85 New functions.
86 (handle_v_requests) <vCont>: Don't call require_running.
87 * server.h (in_queued_stop_replies): New declaration.
88
cb93dc7f
YQ
892016-10-24 Yao Qi <yao.qi@linaro.org>
90
91 PR server/20733
92 * linux-aarch64-low.c (append_insns): Cast the return value to
93 'uint32_t *'.
94
a1078bea
YQ
952016-10-10 Yao Qi <yao.qi@linaro.org>
96
97 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
98
1fb77080
SDJ
992016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
100
101 * target.c (target_supports_multi_process): New function, moved
102 from...
103 * target.h (target_supports_multi_process): ... here. Remove
104 macro.
105
39b5a3b9
TT
1062016-10-05 Tom Tromey <tom@tromey.com>
107
108 PR remote/20655:
109 * tracepoint.c (handle_tracepoint_bkpts): Check
110 ipa_error_tracepoint, not ipa_stopping_tracepoint.
111
c1d0b70a
YQ
1122016-10-05 Yao Qi <yao.qi@linaro.org>
113
114 * configure.srv: Update the path of arm-*.xml files.
115
0a69eedb
YQ
1162016-10-05 Terry Guo <terry.guo@arm.com>
117 Yao Qi <yao.qi@linaro.org>
118
119 * Makefile.in: Adjust the path of rules.
120 * configure.srv: Update the path of xml files.
121 * regformats/arm-with-iwmmxt.dat: Regenerated.
122 * regformats/arm-with-neon.dat: Likewise.
123 * regformats/arm-with-vfpv2.dat: Likewise.
124 * regformats/arm-with-vfpv3.dat Likewise.
125
17e16485
YQ
1262016-09-30 Yao Qi <yao.qi@linaro.org>
127
128 PR gdbserver/20627
129 * target.c (target_stop_and_wait): Don't call
130 target_continue_no_signal, use resume_stop instead.
131
edeeb602
YQ
1322016-09-26 Yao Qi <yao.qi@linaro.org>
133
134 * linux-low.c (linux_wait_1): Call debug_exit.
135
503b1c39
PA
1362016-09-23 Pedro Alves <palves@redhat.com>
137
138 * Makefile.in (SFILES): Add common/new-op.c.
139 (OBS): Add common/new-op.o.
140 (new-op.o): New rule.
141
74172ecf
SM
1422016-09-21 Simon Marchi <simon.marchi@ericsson.com>
143
144 * .gitinore: Ignore more files.
145
fc6cda2e
YQ
1462016-09-21 Yao Qi <yao.qi@linaro.org>
147
148 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
149 23.
150
bc1e6c81
SDJ
1512016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
152
153 * server.c (start_inferior): Call target_mourn_inferior instead of
154 mourn_inferior; pass ptid_t argument to it.
155 (resume): Likewise.
156 (handle_target_event): Likewise.
157 * target.c (target_mourn_inferior): New function.
158 * target.h (mourn_inferior): Delete macro.
159
0e00e962
AA
1602016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
161
162 * linux-low.c (lwp_is_stepping): New function.
163
1d8cb77d
CL
1642016-09-06 Carl Love <cel@us.ibm.com>
165
166 * server.c (start_inferior): Fixed comment, requested comment change
167 didn't get updated correctly. Removed reference to ptrace () call as
168 it is only true on Linux systems.
169
7313bced
CL
1702016-09-06 Carl Love <cel@us.ibm.com>
171
172 * server.c (start_inferior): Do not call
173 function target_post_create_inferior () if the
174 inferior process has already exited.
175
cf6de44d
PA
1762016-09-05 Pedro Alves <palves@redhat.com>
177
178 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
179 (COMPILE.pre, CC_LD): Use CXX directly.
180 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
181 * acinclude.m4: Don't include build-with-cxx.m4.
182 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
183 * configure: Regenerate.
184
c1da6748
AT
1852016-09-02 Akash Trehan <akash.trehan123@gmail.com>
186
187 PR gdb/19495
188 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
189 call writing data to own_buf.
190
f2b9e3df
SDJ
1912016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
192
193 * target.c (mywait): Call target_wait instead of
194 the_target->wait.
195 (target_wait): New function.
196
049a8570
SDJ
1972016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
198
199 * server.c (start_inferior): New variable 'ptid'. Replace calls
200 to the_target->resume by target_continue{,_no_signal}, depending
201 on the case.
202 * target.c (target_stop_and_wait): Call target_continue_no_signal
203 instead of the_target->resume.
204 (target_continue): New function.
205
3aa5cfa0
AT
2062016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
207
208 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
209
754653a7
AZ
2102016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
211
212 PR server/20491
213 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
214 ps_prochandle.
215 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
216 * linux-arm-low.c (ps_get_thread_area): Likewise.
217 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
218 * linux-m68k-low.c (ps_get_thread_area): Likewise.
219 * linux-mips-low.c (ps_get_thread_area): Likewise.
220 * linux-nios2-low.c (ps_get_thread_area): Likewise.
221 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
222 * linux-x86-low.c (ps_get_thread_area): Likewise.
223 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
224
ed036b40
PA
2252016-08-19 Pedro Alves <palves@redhat.com>
226
227 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
228
c8ef42ee
PA
2292016-08-19 Pedro Alves <palves@redhat.com>
230
231 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
232 comment. Use memcpy instead of casting through unsigned long.
233
9c235a72
PA
2342016-08-19 Pedro Alves <palves@redhat.com>
235
236 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
237 allocating around 0x80000000.
238
201506da
PA
2392016-08-19 Pedro Alves <palves@redhat.com>
240
241 PR gdb/20415
242 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
243 (x32-avx512-linux-ipa.o): New rules.
244 * configure.ac (x86_64-*-linux*): New x32 check.
245 * configure.srv (ipa_x32_linux_regobj): New.
246 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
247 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
248 descriptions.
249 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
250 descriptions.
251 * configure: Regenerate.
252
f348d89a
PA
2532016-08-09 Pedro Alves <palves@redhat.com>
254
255 PR gdb/18653
256 * Makefile.in (OBS): Add signals-state-save-restore.o.
257 (signals-state-save-restore.o): New rule.
258 * config.in: Regenerate.
259 * configure: Regenerate.
260 * linux-low.c: Include "signals-state-save-restore.h".
261 (linux_create_inferior): Call
262 restore_original_signals_state.
263 * server.c: Include "dispositions-save-restore.h".
264 (captured_main): Call save_original_signals_state.
265
1baf5149
PA
2662016-08-05 Pedro Alves <palves@redhat.com>
267
268 * configure: Regenerate.
269
fcd4a73d
YQ
2702016-08-04 Yao Qi <yao.qi@linaro.org>
271
272 * linux-low.c (regsets_fetch_inferior_registers): Check
273 errno is ESRCH or not.
274
979659d0
YQ
2752016-08-02 Yao Qi <yao.qi@linaro.org>
276
277 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
278 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
279 (thread_db_load_search): Update.
280 (try_thread_db_load_1): Don't look for td_ta_event_addr,
281 td_ta_set_event and td_ta_event_getmsg.
282
6598661d
PA
2832016-07-26 Pedro Alves <palves@redhat.com>
284
285 PR server/20414
286 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
287 of unsigned long for 64-bit registers and use uint32_t instead of
288 unsigned int for 32-bit registers.
289
9cf12d57
PA
2902016-07-26 Pedro Alves <palves@redhat.com>
291
292 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
293 to 'ptrace'.
294
305450ed
TT
2952016-07-21 Tom Tromey <tom@tromey.com>
296
297 * configure: Rebuild.
298
2583da7c
YQ
2992016-07-21 Yao Qi <yao.qi@linaro.org>
300
301 * mem-break.c (find_gdb_breakpoint): Cast bp to
302 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
303
21536b36
YQ
3042016-07-21 Yao Qi <yao.qi@linaro.org>
305
306 * server.c (handle_v_requests): Support s and S actions
307 if target_supports_software_single_step return true.
308
8901d193
YQ
3092016-07-21 Yao Qi <yao.qi@linaro.org>
310
311 * linux-low.c (resume_stopped_resumed_lwps): If resume request
312 is resume_step, call maybe_hw_step.
313 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
314 and unstop them.
315 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
316 breakpoints or not.
317 (proceed_one_lwp): If resume request is resume_step, install
318 reinsert breakpoints and call maybe_hw_step.
319
0e9a339e
YQ
3202016-07-21 Yao Qi <yao.qi@linaro.org>
321
322 * linux-low.c (proceed_one_lwp): Declare.
323 (linux_resume_one_thread): Remove local variable 'step'.
324 Lift code enqueue signal. Call proceed_one_lwp instead of
325 linux_resume_one_lwp.
326
4281b351
YQ
3272016-07-21 Yao Qi <yao.qi@linaro.org>
328
329 * linux-low.c (linux_resume_one_thread): Call
330 enqueue_pending_signal.
331
984a2c04
YQ
3322016-07-21 Yao Qi <yao.qi@linaro.org>
333
334 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
335 * inferiors.c (do_restore_current_thread_cleanup): New function.
336 (make_cleanup_restore_current_thread): Likewise.
337 * linux-low.c (install_software_single_step_breakpoints): Call
338 make_cleanup_restore_current_thread. Switch current_thread to
339 thread.
340
bec903c9
YQ
3412016-07-21 Yao Qi <yao.qi@linaro.org>
342
343 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
344 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
345 (clone_one_breakpoint): Likewise.
346 (delete_reinsert_breakpoints): Change parameter to thread.
347 Callers updated.
348 (has_reinsert_breakpoints): Likewise.
349 (uninsert_reinsert_breakpoints): Likewise.
350 (reinsert_reinsert_breakpoints): Likewise.
351 * mem-break.h (set_reinsert_breakpoint): Update declaration.
352 (delete_reinsert_breakpoints): Likewise.
353 (reinsert_reinsert_breakpoints): Likewise.
354 (uninsert_reinsert_breakpoints): Likewise.
355 (has_reinsert_breakpoints): Likewise.
356
63c40ec7
YQ
3572016-07-21 Yao Qi <yao.qi@linaro.org>
358
359 * inferiors.c (get_thread_process): Make parameter const.
360 * inferiors.h (get_thread_process): Update declaration.
361 * mem-break.c (clone_all_breakpoints): Remove all parameters.
362 Add new parameters child_thread and parent_thread. Callers
363 updated.
364 * mem-break.h (clone_all_breakpoints): Update declaration.
365
9aa76cd0
YQ
3662016-07-21 Yao Qi <yao.qi@linaro.org>
367
368 * mem-break.c (struct breakpoint) <cond_list>: Remove.
369 <command_list, handler>: Remove.
370 (struct gdb_breakpoint): New.
371 (struct other_breakpoint): New.
372 (struct reinsert_breakpoint): New.
373 (is_gdb_breakpoint): New function.
374 (any_persistent_commands): Update command_list if
375 is_gdb_breakpoint returns true.
376 (set_breakpoint): Create breakpoints according to their types.
377 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
378 (set_gdb_breakpoint_1): Likewise.
379 (set_gdb_breakpoint): Likewise.
380 (clear_breakpoint_conditions): Change parameter type to
381 'struct gdb_breakpoint *'.
382 (clear_breakpoint_commands): Likewise.
383 (clear_breakpoint_conditions_and_commands): Likewise.
384 (add_condition_to_breakpoint): Likewise.
385 (add_breakpoint_condition): Likewise.
386 (add_commands_to_breakpoint): Likewise.
387 (check_breakpoints): Check other_breakpoint.
388 (clone_one_breakpoint): Clone breakpopint according to its type.
389 * mem-break.h (struct gdb_breakpoint): Declare.
390 (set_gdb_breakpoint): Update declaration.
391 (clear_breakpoint_conditions_and_commands): Likewise.
392 (add_breakpoint_condition): Likewise.
393 (add_breakpoint_commands): Likewise.
394 * server.c (process_point_options): Change parameter type to
395 'struct gdb_breakpoint *'.
396
811f8301
YQ
3972016-07-21 Yao Qi <yao.qi@linaro.org>
398
399 * mem-break.c (set_breakpoint_at): Rename it to ...
400 (set_breakpoint_type_at): ... it.
401 (set_breakpoint_at): Call set_breakpoint_type_at.
402 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
403 * mem-break.h (set_breakpoint_at): Update comments.
404
b1c51e36
CLT
4052016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
406
407 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
408 to buf parameter.
409 (nios2_store_gregset): Likewise.
410
ced2dffb
PA
4112016-07-01 Pedro Alves <palves@redhat.com>
412 Antoine Tremblay <antoine.tremblay@ericsson.com>
413
414 * linux-low.c: Change interface to take the target lwp_info
415 pointer directly and return void. Handle detaching from a zombie
416 thread.
417 (linux_detach_lwp_callback): New function.
418 (linux_detach): Detach from the leader thread after detaching from
419 the clone threads.
420
2ac09a5b
YQ
4212016-06-28 Yao Qi <yao.qi@linaro.org>
422
423 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
424 for variable new_offset.
425 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
426 (aarch64_ftrace_insn_reloc_cb): Likewise.
427 (aarch64_ftrace_insn_reloc_tb): Likewise.
428 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
429 PRIx64 instead of PRIx32.
430
79e7fd4f
YQ
4312016-06-28 Yao Qi <yao.qi@linaro.org>
432
433 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
434 (the_low_target): Install arm_get_syscall_trapinfo.
435
061fc021
YQ
4362016-06-28 Yao Qi <yao.qi@linaro.org>
437
438 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
439 function.
440 (the_low_target): Install aarch64_get_syscall_trapinfo.
441
4cc32bec
YQ
4422016-06-28 Yao Qi <yao.qi@linaro.org>
443
444 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
445 Callers updated.
446 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
447 Remove parameter sysno.
448 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
449 sysret.
450
782c1122
AA
4512016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
452
453 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
454 (s390_emit_ne_goto): Likewise.
455 (s390_emit_lt_goto): Likewise.
456 (s390_emit_le_goto): Likewise.
457 (s390_emit_gt_goto): Likewise.
458 (s390_emit_ge_goto): Likewise.
459 (s390x_emit_eq_goto): Likewise.
460 (s390x_emit_ne_goto): Likewise.
461 (s390x_emit_lt_goto): Likewise.
462 (s390x_emit_le_goto): Likewise.
463 (s390x_emit_gt_goto): Likewise.
464 (s390x_emit_ge_goto): Likewise.
465 (s390_emit_ops_impl): Mark variable static.
466 (s390x_emit_ops): Likewise.
467
2e7b624b
YQ
4682016-06-17 Yao Qi <yao.qi@linaro.org>
469
470 * linux-low.c (handle_extended_wait): Call
471 uninsert_reinsert_breakpoints for the parent process. Remove
472 reinsert breakpoints from the child process. Reinsert them to
473 the parent process when vfork is done.
474 * mem-break.c (uninsert_reinsert_breakpoints): New function.
475 (reinsert_reinsert_breakpoints): New function.
476 * mem-break.h (uninsert_reinsert_breakpoints): Declare
477 (reinsert_reinsert_breakpoints): Declare.
478
8a81c5d7
YQ
4792016-06-17 Yao Qi <yao.qi@linaro.org>
480
481 * linux-low.c (handle_extended_wait): If the parent is doing
482 step-over, remove the reinsert breakpoints from the forked child.
483
f50bf8e5
YQ
4842016-06-17 Yao Qi <yao.qi@linaro.org>
485
486 * linux-low.c (unsuspend_all_lwps): Declare.
487 (linux_low_filter_event): If thread exited, call finish_step_over.
488 If step-over is finished, unsuspend other threads.
489
8376a3cb
YQ
4902016-06-17 Yao Qi <yao.qi@linaro.org>
491
492 * linux-low.c (linux_resume_one_lwp_throw): Assert
493 has_reinsert_breakpoints returns false.
494 * mem-break.c (delete_disabled_breakpoints): Assert
495 bp type isn't reinsert_breakpoint.
496
f79b145d
YQ
4972016-06-17 Yao Qi <yao.qi@linaro.org>
498
499 * linux-low.c (maybe_hw_step): New function.
500 (linux_resume_one_lwp_throw): Call maybe_hw_step.
501 (finish_step_over): Switch current_thread to lwp temporarily,
502 and assert has_reinsert_breakpoints returns true.
503 (proceed_one_lwp): Call maybe_hw_step.
504 * mem-break.c (has_reinsert_breakpoints): New function.
505 * mem-break.h (has_reinsert_breakpoints): Declare.
506
0ae534d2
JT
5072016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
508
509 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
510
fcdad592
YQ
5112016-05-17 Yao Qi <yao.qi@linaro.org>
512
513 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
514 instead of find_inferior.
515
9e784964
YQ
5162016-05-05 Yao Qi <yao.qi@linaro.org>
517
518 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
519 Initialize res to zero.
520
cf2ebb6e
YQ
5212016-05-05 Yao Qi <yao.qi@linaro.org>
522
523 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
524 to uint32_t.
525
c1aebf87
UW
5262016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
527
528 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
529 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
530 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
531
35fd2deb 5322016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 533 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
534
535 * tracepoint.c (write_inferior_int8): New function.
536 (cmd_qtenable_disable): Write enable flag using
537 write_inferior_int8.
538
484b3c32
YQ
5392016-04-25 Yao Qi <yao.qi@linaro.org>
540
541 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
542 (need_step_over_p): Return zero if the LWP has pending signals
543 can be delivered on software single step target.
544
85ba7d86
YQ
5452016-04-25 Yao Qi <yao.qi@linaro.org>
546
547 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
548 return instead of error.
549
3539aa13
YQ
5502016-04-22 Yao Qi <yao.qi@linaro.org>
551
552 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
553 to 23.
554
5b061e98
YQ
5552016-04-22 Yao Qi <yao.qi@linaro.org>
556
557 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
558 signal when stepping over breakpoint with software single
559 step.
560
3451269c
PA
5612016-04-21 Pedro Alves <palves@redhat.com>
562
563 * linux-s390-low.c (s390_collect_ptrace_register)
564 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
565 add casts.
566 (s390_check_regset): Use void * instead of gdb_byte *.
567
a2358508
PA
5682016-04-20 Pedro Alves <palves@redhat.com>
569
570 * configure: Renegerate.
571
6885166d
YQ
5722016-04-20 Yao Qi <yao.qi@linaro.org>
573
574 * linux-aarch32-low.c: Include "arch/arm-linux.h".
575 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
576 number 16.
577 (arm_store_gregset): Likewise.
578
2b863f51
WT
5792016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
580
581 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
582 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
583 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
584 (amd64-avx-mpx-linux.c): New rules.
585 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
586 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
587 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
588 (srv_amd64_regobj): Add amd64-avx-mpx.o.
589 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
590 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
591 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
592 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
593 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
594 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
595 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
596 * linux-x86-low.c (x86_linux_read_description): Add case for
597 X86_XSTATE_AVX_MPX_MASK.
598 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
599 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
600 init_registers_i386_avx_mpx_linux.
601 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
602 (initialize_low_tracepoint): Call
603 init_registers_i386_avx_mpx_linux.
604 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
605 (initialize_low_tracepoint): Call
606 init_registers_amd64_avx_mpx_linux.
607 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
608 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
609 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
610 declarations.
611
9b30624b
PA
6122016-04-18 Pedro Alves <palves@redhat.com>
613
614 * configure: Regenerate.
615
45e3745e
AT
6162016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
617
618 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
619 (aarch64_emit_sub): Likewise.
620
2afc13ff
PA
6212016-04-12 Pedro Alves <palves@redhat.com>
622
623 * utils.c (prepare_to_throw_exception): Delete.
624
6e774b13
SM
6252016-04-05 Simon Marchi <simon.marchi@ericsson.com>
626
627 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
628
4dca19f8
MK
6292016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
630
631 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
632
d0a9981f
MK
6332016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
634
635 * linux-aarch64-ipa.c: Add <elf.h> include.
636 * linux-ppc-ipa.c: Add <elf.h> include.
637 * linux-s390-ipa.c: Add <elf.h> include.
638
252db07e
MK
6392016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
640
641 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
642 (get_raw_reg_ptr): Likewise.
643 (get_trace_state_variable_value_ptr): Likewise.
644 (set_trace_state_variable_value_ptr): Likewise.
645 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
646 char *.
647
14e2b6d9
MK
6482016-03-31 Wei-cheng Wang <cole945@gmail.com>
649 Marcin Kościelnicki <koriakin@0x04.net>
650
651 PR/17221
652 * linux-ppc-low.c (emit_insns): New function.
653 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
654 (ppc_emit_prologue): New function.
655 (ppc_emit_epilogue): New function.
656 (ppc_emit_add): New function.
657 (ppc_emit_sub): New function.
658 (ppc_emit_mul): New function.
659 (ppc_emit_lsh): New function.
660 (ppc_emit_rsh_signed): New function.
661 (ppc_emit_rsh_unsigned): New function.
662 (ppc_emit_ext): New function.
663 (ppc_emit_zero_ext): New function.
664 (ppc_emit_log_not): New function.
665 (ppc_emit_bit_and): New function.
666 (ppc_emit_bit_or): New function.
667 (ppc_emit_bit_xor): New function.
668 (ppc_emit_bit_not): New function.
669 (ppc_emit_equal): New function.
670 (ppc_emit_less_signed): New function.
671 (ppc_emit_less_unsigned): New function.
672 (ppc_emit_ref): New function.
673 (ppc_emit_const): New function.
674 (ppc_emit_reg): New function.
675 (ppc_emit_pop): New function.
676 (ppc_emit_stack_flush): New function.
677 (ppc_emit_swap): New function.
678 (ppc_emit_stack_adjust): New function.
679 (ppc_emit_call): New function.
680 (ppc_emit_int_call_1): New function.
681 (ppc_emit_void_call_2): New function.
682 (ppc_emit_if_goto): New function.
683 (ppc_emit_goto): New function.
684 (ppc_emit_eq_goto): New function.
685 (ppc_emit_ne_goto): New function.
686 (ppc_emit_lt_goto): New function.
687 (ppc_emit_le_goto): New function.
688 (ppc_emit_gt_goto): New function.
689 (ppc_emit_ge_goto): New function.
690 (ppc_write_goto_address): New function.
691 (ppc_emit_ops_impl): New static variable.
692 (ppc64v1_emit_prologue): New function.
693 (ppc64v2_emit_prologue): New function.
694 (ppc64_emit_epilogue): New function.
695 (ppc64_emit_add): New function.
696 (ppc64_emit_sub): New function.
697 (ppc64_emit_mul): New function.
698 (ppc64_emit_lsh): New function.
699 (ppc64_emit_rsh_signed): New function.
700 (ppc64_emit_rsh_unsigned): New function.
701 (ppc64_emit_ext): New function.
702 (ppc64_emit_zero_ext): New function.
703 (ppc64_emit_log_not): New function.
704 (ppc64_emit_bit_and): New function.
705 (ppc64_emit_bit_or): New function.
706 (ppc64_emit_bit_xor): New function.
707 (ppc64_emit_bit_not): New function.
708 (ppc64_emit_equal): New function.
709 (ppc64_emit_less_signed): New function.
710 (ppc64_emit_less_unsigned): New function.
711 (ppc64_emit_ref): New function.
712 (ppc64_emit_const): New function.
713 (ppc64v1_emit_reg): New function.
714 (ppc64v2_emit_reg): New function.
715 (ppc64_emit_pop): New function.
716 (ppc64_emit_stack_flush): New function.
717 (ppc64_emit_swap): New function.
718 (ppc64v1_emit_call): New function.
719 (ppc64v2_emit_call): New function.
720 (ppc64v1_emit_int_call_1): New function.
721 (ppc64v2_emit_int_call_1): New function.
722 (ppc64v1_emit_void_call_2): New function.
723 (ppc64v2_emit_void_call_2): New function.
724 (ppc64_emit_if_goto): New function.
725 (ppc64_emit_eq_goto): New function.
726 (ppc64_emit_ne_goto): New function.
727 (ppc64_emit_lt_goto): New function.
728 (ppc64_emit_le_goto): New function.
729 (ppc64_emit_gt_goto): New function.
730 (ppc64_emit_ge_goto): New function.
731 (ppc64v1_emit_ops_impl): New static variable.
732 (ppc64v2_emit_ops_impl): New static variable.
733 (ppc_emit_ops): New function.
734 (linux_low_target): Wire in ppc_emit_ops.
735
a2174ba4
MK
7362016-03-31 Wei-cheng Wang <cole945@gmail.com>
737 Marcin Kościelnicki <koriakin@0x04.net>
738
739 PR/17221
740 * Makefile.in: Add powerpc-*-ipa.o
741 * configure.srv: Add ipa_obj for powerpc*-linux.
742 * linux-ppc-ipa.c: New file.
743 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
744 includes.
745 (PPC_FIELD): New macro.
746 (PPC_SEXT): New macro.
747 (PPC_OP6): New macro.
748 (PPC_BO): New macro.
749 (PPC_LI): New macro.
750 (PPC_BD): New macro.
751 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
752 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
753 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
754 (ppc_get_thread_area): New function.
755 (is_elfv2_inferior): New function.
756 (gen_ds_form): New function.
757 (GEN_STD): New macro.
758 (GEN_STDU): New macro.
759 (GEN_LD): New macro.
760 (GEN_LDU): New macro.
761 (gen_d_form): New function.
762 (GEN_ADDI): New macro.
763 (GEN_ADDIS): New macro.
764 (GEN_LI): New macro.
765 (GEN_LIS): New macro.
766 (GEN_ORI): New macro.
767 (GEN_ORIS): New macro.
768 (GEN_LWZ): New macro.
769 (GEN_STW): New macro.
770 (GEN_STWU): New macro.
771 (gen_xfx_form): New function.
772 (GEN_MFSPR): New macro.
773 (GEN_MTSPR): New macro.
774 (GEN_MFCR): New macro.
775 (GEN_MTCR): New macro.
776 (GEN_SYNC): New macro.
777 (GEN_LWSYNC): New macro.
778 (gen_x_form): New function.
779 (GEN_OR): New macro.
780 (GEN_MR): New macro.
781 (GEN_LWARX): New macro.
782 (GEN_STWCX): New macro.
783 (GEN_CMPW): New macro.
784 (gen_md_form): New function.
785 (GEN_RLDICL): New macro.
786 (GEN_RLDICR): New macro.
787 (gen_i_form): New function.
788 (GEN_B): New macro.
789 (GEN_BL): New macro.
790 (gen_b_form): New function.
791 (GEN_BNE): New macro.
792 (GEN_LOAD): New macro.
793 (GEN_STORE): New macro.
794 (gen_limm): New function.
795 (gen_atomic_xchg): New function.
796 (gen_call): New function.
797 (ppc_relocate_instruction): New function.
798 (ppc_install_fast_tracepoint_jump_pad): New function.
799 (ppc_get_min_fast_tracepoint_insn_len): New function.
800 (ppc_get_ipa_tdesc_idx): New function.
801 (the_low_target): Wire in the new functions.
802 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
803 tdescs.
804 * linux-ppc-tdesc.h: New file.
805
a13c4696
MK
8062016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
807
808 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
809 (alloc_jump_pad_buffer): New function.
810 * linux-amd64-ipa.c: Add <sys/mman.h> include.
811 (alloc_jump_pad_buffer): New function.
812 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
813 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
814 (alloc_jump_pad_buffer): New function.
815 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
816 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
817 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
818 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
819
1cda1512
MK
8202016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
821
822 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
823 * linux-amd64-ipa.c: Likewise.
824 * linux-i386-ipa.c: Likewise.
825 * linux-s390-ipa.c: Likewise.
826 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
827 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
828 set_trace_state_variable_value_ptr.
829 (struct ipa_sym_addresses): Likewise.
830 (symbol_list): Likewise.
831 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
832 accessing gdb_collect directly.
833 (gdb_collect_ptr_type): New typedef.
834 (get_raw_reg_ptr_type): New typedef.
835 (get_trace_state_variable_value_ptr_type): New typedef.
836 (set_trace_state_variable_value_ptr_type): New typedef.
837 (gdb_collect_ptr): New global.
838 (get_raw_reg_ptr): New global.
839 (get_trace_state_variable_value_ptr): New global.
840 (set_trace_state_variable_value_ptr): New global.
841 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
842 accessing get_raw_reg directly.
843 (get_get_tsv_func_addr): Likewise for
844 get_trace_state_variable_value_ptr.
845 (get_set_tsv_func_addr): Likewise for
846 set_trace_state_variable_value_ptr.
847 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
848
72fb5488
SM
8492016-03-30 Simon Marchi <simon.marchi@ericsson.com>
850
851 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
852
28170b88
MK
8532016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
854
855 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
856 packets.
857 (relocate_instruction): Remove own_buf.
858 * server.c (own_buf): Make global.
859 (handle_v_requests): Make global.
860 * server.h (own_buf): New declaration.
861 (handle_v_requests): New prototype.
862
f39e8743
MK
8632016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
864
865 PR 18377
866 * linux-s390-low.c (add_insns): New function.
867 (s390_emit_prologue): New function.
868 (s390_emit_epilogue): New function.
869 (s390_emit_add): New function.
870 (s390_emit_sub): New function.
871 (s390_emit_mul): New function.
872 (s390_emit_lsh): New function.
873 (s390_emit_rsh_signed): New function.
874 (s390_emit_rsh_unsigned): New function.
875 (s390_emit_ext): New function.
876 (s390_emit_log_not): New function.
877 (s390_emit_bit_and): New function.
878 (s390_emit_bit_or): New function.
879 (s390_emit_bit_xor): New function.
880 (s390_emit_bit_not): New function.
881 (s390_emit_equal): New function.
882 (s390_emit_less_signed): New function.
883 (s390_emit_less_unsigned): New function.
884 (s390_emit_ref): New function.
885 (s390_emit_if_goto): New function.
886 (s390_emit_goto): New function.
887 (s390_write_goto_address): New function.
888 (s390_emit_litpool): New function.
889 (s390_emit_const): New function.
890 (s390_emit_call): New function.
891 (s390_emit_reg): New function.
892 (s390_emit_pop): New function.
893 (s390_emit_stack_flush): New function.
894 (s390_emit_zero_ext): New function.
895 (s390_emit_swap): New function.
896 (s390_emit_stack_adjust): New function.
897 (s390_emit_set_r2): New function.
898 (s390_emit_int_call_1): New function.
899 (s390_emit_void_call_2): New function.
900 (s390_emit_eq_goto): New function.
901 (s390_emit_ne_goto): New function.
902 (s390_emit_lt_goto): New function.
903 (s390_emit_le_goto): New function.
904 (s390_emit_gt_goto): New function.
905 (s390_emit_ge_goto): New function.
906 (s390x_emit_prologue): New function.
907 (s390x_emit_epilogue): New function.
908 (s390x_emit_add): New function.
909 (s390x_emit_sub): New function.
910 (s390x_emit_mul): New function.
911 (s390x_emit_lsh): New function.
912 (s390x_emit_rsh_signed): New function.
913 (s390x_emit_rsh_unsigned): New function.
914 (s390x_emit_ext): New function.
915 (s390x_emit_log_not): New function.
916 (s390x_emit_bit_and): New function.
917 (s390x_emit_bit_or): New function.
918 (s390x_emit_bit_xor): New function.
919 (s390x_emit_bit_not): New function.
920 (s390x_emit_equal): New function.
921 (s390x_emit_less_signed): New function.
922 (s390x_emit_less_unsigned): New function.
923 (s390x_emit_ref): New function.
924 (s390x_emit_if_goto): New function.
925 (s390x_emit_const): New function.
926 (s390x_emit_call): New function.
927 (s390x_emit_reg): New function.
928 (s390x_emit_pop): New function.
929 (s390x_emit_stack_flush): New function.
930 (s390x_emit_zero_ext): New function.
931 (s390x_emit_swap): New function.
932 (s390x_emit_stack_adjust): New function.
933 (s390x_emit_int_call_1): New function.
934 (s390x_emit_void_call_2): New function.
935 (s390x_emit_eq_goto): New function.
936 (s390x_emit_ne_goto): New function.
937 (s390x_emit_lt_goto): New function.
938 (s390x_emit_le_goto): New function.
939 (s390x_emit_gt_goto): New function.
940 (s390x_emit_ge_goto): New function.
941 (s390_emit_ops): New function.
942 (struct linux_target_ops): Fill in emit_ops hook.
943
abd9baf9
MK
9442016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
945
946 PR 18377
947 * Makefile.in: Add s390 IPA files.
948 * configure.srv: Build IPA for s390.
949 * linux-s390-ipa.c: New file.
950 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
951 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
952 (tdesc_s390_linux32): Likewise.
953 (init_registers_s390_linux32v1): Likewise.
954 (tdesc_s390_linux32v1): Likewise.
955 (init_registers_s390_linux32v2): Likewise.
956 (tdesc_s390_linux32v2): Likewise.
957 (init_registers_s390_linux64): Likewise.
958 (tdesc_s390_linux64): Likewise.
959 (init_registers_s390_linux64v1): Likewise.
960 (tdesc_s390_linux64v1): Likewise.
961 (init_registers_s390_linux64v2): Likewise.
962 (tdesc_s390_linux64v2): Likewise.
963 (init_registers_s390_te_linux64): Likewise.
964 (tdesc_s390_te_linux64): Likewise.
965 (init_registers_s390_vx_linux64): Likewise.
966 (tdesc_s390_vx_linux64): Likewise.
967 (init_registers_s390_tevx_linux64): Likewise.
968 (tdesc_s390_tevx_linux64): Likewise.
969 (init_registers_s390x_linux64): Likewise.
970 (tdesc_s390x_linux64): Likewise.
971 (init_registers_s390x_linux64v1): Likewise.
972 (tdesc_s390x_linux64v1): Likewise.
973 (init_registers_s390x_linux64v2): Likewise.
974 (tdesc_s390x_linux64v2): Likewise.
975 (init_registers_s390x_te_linux64): Likewise.
976 (tdesc_s390x_te_linux64): Likewise.
977 (init_registers_s390x_vx_linux64): Likewise.
978 (tdesc_s390x_vx_linux64): Likewise.
979 (init_registers_s390x_tevx_linux64): Likewise.
980 (tdesc_s390x_tevx_linux64): Likewise.
981 (have_hwcap_s390_vx): New static variable.
982 (s390_arch_setup): Fill have_hwcap_s390_vx.
983 (s390_get_thread_area): New function.
984 (s390_ft_entry_gpr_esa): New const.
985 (s390_ft_entry_gpr_zarch): New const.
986 (s390_ft_entry_misc): New const.
987 (s390_ft_entry_fr): New const.
988 (s390_ft_entry_vr): New const.
989 (s390_ft_main_31): New const.
990 (s390_ft_main_64): New const.
991 (s390_ft_exit_fr): New const.
992 (s390_ft_exit_vr): New const.
993 (s390_ft_exit_misc): New const.
994 (s390_ft_exit_gpr_esa): New const.
995 (s390_ft_exit_gpr_zarch): New const.
996 (append_insns): New function.
997 (s390_relocate_instruction): New function.
998 (s390_install_fast_tracepoint_jump_pad): New function.
999 (s390_get_min_fast_tracepoint_insn_len): New function.
1000 (s390_get_ipa_tdesc_idx): New function.
1001 (struct linux_target_ops): Wire in the above functions.
1002 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1003 * linux-s390-tdesc.h: New file.
1004
a4105d04
MK
10052016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1006
1007 * linux-s390-low.c (s390_supports_tracepoints): New function.
1008 (struct linux_target_ops): Fill supports_tracepoints hook.
1009
35ac8b3e
YQ
10102016-03-18 Yao Qi <yao.qi@linaro.org>
1011
1012 * linux-low.c (lwp_signal_can_be_delivered): New function.
1013 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1014
94610ec4
YQ
10152016-03-18 Yao Qi <yao.qi@linaro.org>
1016
1017 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1018 0 if signal is enqueued. Remove 'signal' from one debugging
1019 message. Move one debugging message to some lines below.
1020 Remove code setting 'signal' to 0.
1021
80aea927
YQ
10222016-03-18 Yao Qi <yao.qi@linaro.org>
1023
1024 * linux-low.c (linux_low_filter_event): Remove redundant
1025 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1026
b04fd3be
MK
10272016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1028
1029 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1030 (struct linux_target_ops): Wire in the above.
1031
c40c8d4b
YQ
10322016-03-03 Yao Qi <yao.qi@linaro.org>
1033
1034 * linux-low.c: Update comments to start_step_over.
1035
0f8288ae
YQ
10362016-03-03 Yao Qi <yao.qi@linaro.org>
1037
1038 PR server/19736
1039 * linux-low.c (handle_extended_wait): Set child suspended
1040 if event_lwp->bp_reinsert isn't zero.
1041
fdbd04a8
YQ
10422016-03-02 Yao Qi <yao.qi@linaro.org>
1043
1044 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1045 enqueue_pending_signal.
1046
6896a8fa
MK
10472016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1048
1049 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1050 is actually loaded.
1051
ab503087
MK
10522016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1053
1054 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1055 (s390_regmap_3264) [!__s390x__]: New global.
1056 (s390_collect_ptrace_register): Skip map entries containing -1.
1057 (s390_supply_ptrace_register): Ditto.
1058 (s390_fill_gprs_high): New function.
1059 (s390_store_gprs_high): New function.
1060 (s390_regsets): Add NT_S390_HIGH_GPRS.
1061 (s390_get_hwcap): Enable on 31-bit.
1062 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1063 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1064 Detect NT_S390_HIGH_GPRS.
1065 (s390_usrregs_info_3264): Enable on 31-bit.
1066 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1067 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1068
ae91f625
MK
10692016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1070
1071 PR gdb/13808
1072 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1073 * configure.srv: Ditto.
1074 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1075 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1076 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1077 (init_registers_amd64_linux): Remove prototype.
1078 (tdesc_amd64_linux): Remove declaration.
1079 (get_ipa_tdesc): New function.
1080 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1081 initialize remaining tdescs.
1082 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1083 (init_registers_i386_linux): Remove prototype.
1084 (tdesc_i386_linux): Remove declaration.
1085 (get_ipa_tdesc): New function.
1086 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1087 initialize remaining tdescs.
1088 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1089 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1090 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1091 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1092 (x86_get_ipa_tdesc_idx): New function.
1093 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1094 * linux-x86-tdesc.h: New file.
1095 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1096 (target_get_ipa_tdesc_idx): New macro.
1097 * tracepoint.c (ipa_tdesc_idx): New macro.
1098 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1099 (symbol_list): Add ipa_tdesc_idx.
1100 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1101 (ipa_tdesc): Remove.
1102 (ipa_tdesc_idx): New variable.
1103 (get_context_regcache): Use get_ipa_tdesc.
1104 (gdb_collect): Ditto.
1105 (gdb_probe): Ditto.
1106 * tracepoint.h (get_ipa_tdesc): New prototype.
1107 (ipa_tdesc): Remove.
1108
e7ad2f14
PA
11092016-02-24 Pedro Alves <palves@redhat.com>
1110
1111 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1112 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1113 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1114 Factor out common code between the USE_SIGTRAP_SIGINFO and
1115 !USE_SIGTRAP_SIGINFO blocks.
1116 (linux_low_filter_event): Call save_stop_reason instead of
1117 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1118 Update comments.
1119 (linux_wait_1): Update comments.
1120
657f9cde
WW
11212016-02-24 Wei-cheng Wang <cole945@gmail.com>
1122
1123 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1124 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1125 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1126 ppc_insert_point, ppc_remove_point.
1127
b00b61e1
MK
11282016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1129
1130 * linux-s390-low.c (s390_supports_z_point_type): New function.
1131 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1132
553cb527
YQ
11332016-02-16 Yao Qi <yao.qi@linaro.org>
1134
1135 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1136 PC. Get pc from regcache_read_pc.
1137
a5652c21
YQ
11382016-02-12 Yao Qi <yao.qi@linaro.org>
1139
1140 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1141 or linux_get_pc_32bit.
1142 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1143
ed443b61
YQ
11442016-02-12 Yao Qi <yao.qi@linaro.org>
1145
1146 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1147 arm_linux_get_next_pcs_fixup.
1148
020ecd38
MK
11492016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1150
1151 * tracepoint.c (x_tracepoint_action_download): Change
1152 write_inferior_data_ptr to write_inferior_data_pointer.
1153 (cmd_qtstart): Likewise.
1154 (write_inferior_data_ptr): Remove.
1155 (download_agent_expr): Change write_inferior_data_ptr to
1156 write_inferior_data_pointer.
1157 (download_tracepoint_1): Likewise.
1158 (download_tracepoint): Likewise.
1159 (download_trace_state_variables): Likewise.
1160
7cae9051
WW
11612016-02-11 Wei-cheng Wang <cole945@gmail.com>
1162 Marcin Kościelnicki <koriakin@0x04.net>
1163
1164 * tracepoint.c (struct tracepoint_action_ops): Remove.
1165 (struct tracepoint_action): Remove ops.
1166 (m_tracepoint_action_download, r_tracepoint_action_download)
1167 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1168 size and offset accordingly.
1169 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1170 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1171 (tracepoint_action_send, tracepoint_action_download): New functions.
1172 Helpers for trace action handlers.
1173 (add_tracepoint_action): Remove setup actions ops.
1174 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1175
9f6a71b4
YQ
11762016-02-10 Yao Qi <yao.qi@linaro.org>
1177
1178 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1179
1e94266c
SM
11802016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1181
1182 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1183 to AC_OUTPUT.
1184 * configure: Regenerate.
1185
8adce034
SM
11862016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1187
1188 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1189 void * to gdb_byte *.
1190 * linux-low.c (siginfo_fixup): Likewise.
1191 (linux_xfer_siginfo): Likewise.
1192 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1193 Likewise.
1194 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1195
93813b37
WT
11962016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1197
1198 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1199 to srv_tgtobj.
1200 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1201 to srv_tgtobj.
1202 * linux-x86-low.c [__x86_64__]: Include
1203 "nat/amd64-linux-siginfo.h".
1204 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1205 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1206 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1207 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1208 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1209 (cpt_si_fd, si_timerid, si_overrun): Move from
1210 nat/amd64-linux-siginfo.c.
1211 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1212
8424cc97
SM
12132016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1214
1215 * server.c (skip_to_semicolon): Remove.
1216 (process_point_options): Use strchrnul instead of
1217 skip_to_semicolon.
1218
4d18591b
YQ
12192016-01-26 Yao Qi <yao.qi@linaro.org>
1220
1221 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1222 * linux-low.c (install_software_single_step_breakpoints): Don't
1223 call regcache_read_pc.
1224 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1225 argument pc.
1226
d8020970
YQ
12272016-01-26 Yao Qi <yao.qi@linaro.org>
1228
1229 * linux-low.c (install_software_single_step_breakpoints): Call
1230 regcache_read_pc instead of get_pc.
1231
8b207339
YQ
12322016-01-26 Yao Qi <yao.qi@linaro.org>
1233
1234 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1235 (unblock_async_io): Rename to ...
1236 (block_unblock_async_io): ... it. New function.
1237 (enable_async_io): Don't install SIGIO handler. Unblock it
1238 instead.
1239 (disable_async_io): Don't ignore SIGIO. Block it instead.
1240 (initialize_async_io): Install SIGIO handler. Don't call
1241 unblock_async_io.
1242
18879fef
YQ
12432016-01-26 Yao Qi <yao.qi@linaro.org>
1244
1245 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1246 first character is '\003', call *the_target->request_interrupt.
1247
a0f8e08a
YQ
12482016-01-25 Yao Qi <yao.qi@linaro.org>
1249
1250 * remote-utils.c (new_thread_notify): Remove.
1251 (dead_thread_notify): Likewise.
1252 * remote-utils.h (new_thread_notify): Remove declaration.
1253 (dead_thread_notify): Likewise.
1254
cc5fd9ab
MK
12552016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1256
1257 * gdb.trace/pending.exp: Fix expected message on continue.
1258
99e8eb11
MK
12592016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1260
1261 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1262 it works properly on big-endian machines where sizeof (CORE_ADDR)
1263 != sizeof (void *).
1264
a994041d
PA
12652016-01-21 Pedro Alves <palves@redhat.com>
1266
1267 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1268 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1269 * configure: Regenerate.
1270
f7a6a40d
YQ
12712016-01-21 Yao Qi <yao.qi@linaro.org>
1272
1273 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1274 is_thumb and set it according to CPSR saved on the stack.
1275 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1276 arm_sigreturn_next_pc.
1277
6f69e520
YQ
12782016-01-18 Yao Qi <yao.qi@linaro.org>
1279
1280 * linux-low.c (linux_set_pc_64bit): New function.
1281 (linux_get_pc_64bit): New function.
1282 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1283 Declare.
1284 * linux-sparc-low.c (debug_threads): Remove declaration.
1285 (sparc_get_pc): Remove.
1286 (the_low_target): Use linux_get_pc_64bit instead of
1287 sparc_get_pc.
1288 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1289 (the_low_target): Use linux_get_pc_64bit and
1290 linux_set_pc_64bit.
1291
276d4552
YQ
12922016-01-18 Yao Qi <yao.qi@linaro.org>
1293
1294 * linux-arm-low.c (debug_threads): Remove declaration.
1295 (arm_get_pc, arm_set_pc): Remove.
1296 (the_low_target): Use linux_get_pc_32bit and
1297 linux_set_pc_32bit.
1298 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1299 (the_low_target): Use linux_get_pc_32bit and
1300 linux_set_pc_32bit.
1301 * linux-cris-low.c (debug_threads): Remove declaration.
1302 (cris_get_pc, cris_set_pc,): Remove.
1303 (the_low_target): Use linux_get_pc_32bit and
1304 linux_set_pc_32bit.
1305 * linux-crisv32-low.c (debug_threads): Remove declaration.
1306 (cris_get_pc, cris_set_pc): Remove.
1307 (the_low_target): Use linux_get_pc_32bit and
1308 linux_set_pc_32bit.
1309 * linux-low.c: Include inttypes.h.
1310 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1311 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1312 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1313 (the_low_target): Use linux_get_pc_32bit and
1314 linux_set_pc_32bit.
1315 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1316 (the_low_target): Use linux_get_pc_32bit and
1317 linux_set_pc_32bit.
1318 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1319 (the_low_target): Use linux_get_pc_32bit and
1320 linux_set_pc_32bit.
1321 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1322 (the_low_target): Use linux_get_pc_32bit and
1323 linux_set_pc_32bit.
1324 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1325 (the_low_target): Use linux_get_pc_32bit and
1326 linux_set_pc_32bit.
1327
eb0edac8
GB
13282016-01-18 Gary Benson <gbenson@redhat.com>
1329
1330 * configure.ac (AC_FUNC_FORK): New check.
1331 * config.in: Regenerate.
1332 * configure: Likewise.
1333
1b451dda
YQ
13342016-01-14 Yao Qi <yao.qi@linaro.org>
1335
1336 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1337 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1338 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1339 arm_get_next_pcs_ctor.
1340
82075af2
JS
13412016-01-12 Josh Stone <jistone@redhat.com>
1342 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1343
1344 * inferiors.h: Include "gdb_vecs.h".
1345 (struct process_info): Add syscalls_to_catch.
1346 * inferiors.c (remove_process): Free syscalls_to_catch.
1347 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1348 syscall_return stops.
1349 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1350 * server.c (handle_general_set): Handle QCatchSyscalls.
1351 (handle_query): Report support for QCatchSyscalls.
1352 * target.h (struct target_ops): Add supports_catch_syscall.
1353 (target_supports_catch_syscall): New macro.
1354 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1355 (struct lwp_info): Add syscall_state.
1356 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1357 Maintain syscall_state and syscalls_to_catch across exec.
1358 (get_syscall_trapinfo): New function, proxy to the_low_target.
1359 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1360 (linux_low_filter_event): Toggle syscall_state entry/return for
1361 syscall traps, and set it ignored for all others.
1362 (gdb_catching_syscalls_p): New function.
1363 (gdb_catch_this_syscall_p): New function.
1364 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1365 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1366 (linux_supports_catch_syscall): New function.
1367 (linux_target_ops): Install it.
1368 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1369 (the_low_target): Install it.
1370
8f13a3ce
MF
13712016-01-12 Mike Frysinger <vapier@gentoo.org>
1372
1373 * acinclude.m4: Include new ../warning.m4 file.
1374 * configure: Regenerated.
1375 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1376
5b3da067
MF
13772016-01-12 Mike Frysinger <vapier@gentoo.org>
1378
1379 * ax.c (is_goto_target): Mark static.
1380 * linux-low.c (register_addr): Likewise.
1381 (linux_fetch_registers, linux_store_registers): Likewise.
1382 * mem-break.c (any_persistent_commands): Fix old prototype.
1383 (add_commands_to_breakpoint): Mark static.
1384 * regcache.c (find_register_by_name): Delete unused func.
1385 * remote-utils.c (hex_or_minus_one): Mark static.
1386 * server.c (monitor_show_help): Mark static.
1387 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1388 handle_v_requests): Likewise.
1389
bc504a31
PA
13902016-01-12 Pedro Alves <palves@redhat.com>
1391
1392 Remove use of the registered trademark symbol throughout.
1393
5a0dd67a
YQ
13942016-01-08 Yao Qi <yao.qi@linaro.org>
1395
1396 * remote-utils.c (getpkt): If c is '\003', call target hook
1397 request_interrupt.
1398
b2ca446f
YQ
13992016-01-06 Yao Qi <yao.qi@linaro.org>
1400
1401 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1402 linux-aarch32-low.c.
1403 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1404 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1405 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1406 (thumb2_breakpoint): Declare.
1407 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1408 linux-aarch32-low.h.
1409 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1410 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1411 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1412
edd88788
JB
14132016-01-01 Joel Brobecker <brobecker@adacore.com>
1414
1415 * gdbreplay.c (gdbreplay_version): Change copyright year in
1416 version message.
1417 * server.c (gdbserver_version): Likewise.
1418
65da7f14
PP
14192015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1420
1421 * server.c (crc32_table): Delete.
1422 (crc32): Use libiberty's xcrc32 function.
1423
4abd5ed2
JB
14242015-12-22 Joel Brobecker <brobecker@adacore.com>
1425
1426 * lynx-low.c (lynx_delete_thread_callback): New function.
1427 (lynx_mourn): Properly delete our process and all of its
1428 threads. Remove call to clear_inferiors.
1429
0e50fe5c
JB
14302015-12-22 Joel Brobecker <brobecker@adacore.com>
1431
1432 * target.c (thread_search_callback): Add check that
1433 the thread_stopped target callback is not NULL before
1434 calling it.
1435
35adc03f
YQ
14362015-12-21 Yao Qi <yao.qi@linaro.org>
1437
1438 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1439 arm breakpoint.
1440
bd2b2909
AT
14412015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1442
1443 * server.c (handle_query): Call target_supports_software_single_step.
1444
7fe5e27e
AT
14452015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1446
1447 * linux-low.c (single_step): New function.
1448 (linux_resume_one_lwp_throw): Call single_step.
1449 (start_step_over): Likewise.
1450
d9311bfa
AT
14512015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1452
1453 * Makefile.in (SFILES): Append arch/arm-linux.c,
1454 arch/arm-get-next-pcs.c.
1455 (arm-linux.o): New rule.
1456 (arm-get-next-pcs.o): New rule.
1457 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1458 arm-linux.o.
1459 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1460 to linux-aarch32-low.c.
1461 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1462 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1463 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1464 (thumb2_breakpoint_len): Likewise.
1465 (arm_is_thumb_mode): Make non-static.
1466 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1467 from linux-aarch32-low.c.
1468 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1469 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1470 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1471 (thumb2_breakpoint_len): Likewise.
1472 (arm_is_thumb_mode): New declaration.
1473 * linux-arm-low.c: Include arch/arm-linux.h
1474 aarch/arm-get-next-pcs.h, sys/syscall.h.
1475 (get_next_pcs_ops): New struct.
1476 (get_next_pcs_addr_bits_remove): New function.
1477 (get_next_pcs_is_thumb): New function.
1478 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1479 (arm_sigreturn_next_pc): Likewise.
1480 (get_next_pcs_syscall_next_pc): Likewise.
1481 (arm_gdbserver_get_next_pcs): Likewise.
1482 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1483 Initialize.
1484 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1485 * server.h: Include gdb_vecs.h.
1486
68ce2059
AT
14872015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1488
1489 * Makefile.in (SFILES): Append common/common-regcache.c.
1490 (OBS): Append common-regcache.o.
1491 (common-regcache.o): New rule.
1492 * regcache.c (init_register_cache): Initialize cache to
1493 REG_UNAVAILABLE.
1494 (regcache_raw_read_unsigned): New function.
1495 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1496 register_status enum.
1497
fa5308bd
AT
14982015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1499
1500 * linux-aarch64-low.c (the_low_targets): Rename
1501 breakpoint_reinsert_addr to get_next_pcs.
1502 * linux-arm-low.c (the_low_targets): Likewise.
1503 * linux-bfin-low.c (the_low_targets): Likewise.
1504 * linux-cris-low.c (the_low_targets): Likewise.
1505 * linux-crisv32-low.c (the_low_targets): Likewise.
1506 * linux-low.c (can_software_single_step): Likewise.
1507 (install_software_single_step_breakpoints): New function.
1508 (start_step_over): Use install_software_single_step_breakpoints.
1509 * linux-low.h: New CORE_ADDR vector.
1510 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1511 get_next_pcs.
1512 * linux-mips-low.c (the_low_targets): Likewise.
1513 * linux-nios2-low.c (the_low_targets): Likewise.
1514 * linux-sparc-low.c (the_low_targets): Likewise.
1515
4a6ed09b
PA
15162015-12-17 Pedro Alves <palves@redhat.com>
1517
1518 * linux-low.c (linux_kill_one_lwp): Remove references to
1519 LinuxThreads.
1520 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1521 to 'kill'.
1522 (linux_init_signals): Delete.
1523 (initialize_low): Adjust.
1524 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1525
7544db95
PA
15262015-12-16 Pedro Alves <palves@redhat.com>
1527
1528 * configure.ac (compiler warning flags): When testing a
1529 -Wno-foo option, check whether -Wfoo works instead.
1530 * configure: Regenerate.
1531
8020350c
DB
15322015-12-11 Don Breazeal <donb@codesourcery.com>
1533
1534 * server.c (process_serial_event): Don't exit from gdbserver
1535 in remote mode if there are still active inferiors.
1536
db91f502
YQ
15372015-12-11 Yao Qi <yao.qi@linaro.org>
1538
1539 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1540 arm_breakpoint_at if the process is 32-bit.
1541
b37a6290
YQ
15422015-12-11 Yao Qi <yao.qi@linaro.org>
1543
1544 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1545 arm breakpoint.
1546
17b1509a
YQ
15472015-12-07 Yao Qi <yao.qi@linaro.org>
1548
1549 * configure.srv: Append arm.o to srv_tgtobj for
1550 aarch64*-*-linux* target.
1551 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1552 from linux-arm-low.c.
1553 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1554 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1555 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1556 (thumb2_breakpoint_len): Likewise.
1557 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1558 (arm_breakpoint_kinds): Likewise.
1559 (arm_breakpoint_kind_from_pc): Likewise.
1560 (arm_sw_breakpoint_from_kind): Likewise.
1561 (arm_breakpoint_kind_from_current_state): Likewise.
1562 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1563 (arm_sw_breakpoint_from_kind): Declare.
1564 (arm_breakpoint_kind_from_current_state): Declare.
1565 (arm_breakpoint_at): Declare.
1566 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1567 arm_sw_breakpoint_from_kind if process is 32-bit.
1568 (aarch64_breakpoint_kind_from_pc): New function.
1569 (aarch64_breakpoint_kind_from_current_state): New function.
1570 (the_low_target): Initialize fields breakpoint_kind_from_pc
1571 and breakpoint_kind_from_current_state.
1572 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1573 linux-aarch32-low.c.
1574 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1575 (arm_breakpoint, arm_breakpoint_len): Likewise.
1576 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1577 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1578 (arm_is_thumb_mode): Likewise.
1579 (arm_breakpoint_at): Likewise.
1580 (arm_breakpoint_kind_from_pc): Likewise.
1581 (arm_sw_breakpoint_from_kind): Likewise.
1582 (arm_breakpoint_kind_from_current_state): Likewise.
1583
1584 Revert:
1585 2015-08-04 Yao Qi <yao.qi@linaro.org>
1586
1587 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1588 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1589 * server.c (extended_protocol): Remove "static".
1590 * server.h (extended_protocol): Declare it.
1591
ece66d65
JS
15922015-12-04 Josh Stone <jistone@redhat.com>
1593
1594 * target.h (struct target_ops) <arch_setup>: Rename to ...
1595 (struct target_ops) <post_create_inferior>: ... this.
1596 (target_arch_setup): Rename to ...
1597 (target_post_create_inferior): ... this, calling post_create_inferior.
1598 * server.c (start_inferior): Update target_arch_setup calls to
1599 target_post_create_inferior.
1600 * linux-low.c (linux_low_ptrace_options): Forward declare.
1601 (linux_arch_setup): Update its comment for general use.
1602 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1603 (struct linux_target_ops): Use linux_post_create_inferior.
1604 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1605 to post_create_inferior.
1606 * nto-low.c (struct nto_target_ops): Likewise.
1607 * spu-low.c (struct spu_target_ops): Likewise.
1608 * win32-low.c (struct win32_target_ops): Likewise.
1609
e58c48b4
AT
16102015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1611
1612 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1613
fbec8956
AT
16142015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1615
1616 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1617 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1618 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1619 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1620 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1621 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1622 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1623 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1624 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1625 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1626 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1627 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1628
9b4c5f87
AT
16292015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1630
1631 * linux-low.c (linux_look_up_symbols): Don't call
1632 linux_supports_traceclone.
1633 * linux-low.h (thread_db_init): Remove use_events argument.
1634 * thread-db.c (thread_db_use_event): Remove global variable.
1635 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1636 (struct thread_db) <td_create_bp>: Remove field.
1637 (thread_db_create_event): Remove function.
1638 (thread_db_enable_reporting): Likewise.
1639 (find_one_thread): Don't check for thread_db_use_events.
1640 (attach_thread): Likewise.
1641 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1642 (try_thread_db_load_1): Don't check for thread_db_use_events.
1643 (thread_db_init): Remove use_events argument and thread events
1644 handling.
1645 (remove_thread_event_breakpoints): Remove function.
1646 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1647
7d00775e
AT
16482015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1649
1650 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1651 New function.
1652 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1653 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1654 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1655 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1656 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1657 Initialize.
1658 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1659 New function.
1660 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1661 * linux-low.c (can_hardware_single_step): Use
1662 supports_hardware_single_step.
1663 (can_software_single_step): New function.
1664 (start_step_over): Call can_software_single_step.
1665 (linux_supports_hardware_single_step): New function.
1666 (struct target_ops) <supports_software_single_step>: Initialize.
1667 * linux-low.h (struct linux_target_ops)
1668 <supports_hardware_single_step>: Initialize.
1669 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1670 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1671 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1672 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1673 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1674 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1675 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1676 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1677 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1678 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1679 Initialize.
1680 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1681 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1682 Initialize.
1683 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1684 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1685 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1686 New function.
1687 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1688 * target.h (struct target_ops): <supports_software_single_step>:
1689 New field.
1690 (target_supports_software_single_step): New macro.
1691
2d97cd35
AT
16922015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1693
1694 * linux-low.c (linux_wait_1): Fix pc advance condition.
1695 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1696 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1697
769ef81f
AT
16982015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1699
1700 * linux-arm-low.c (arm_is_thumb_mode): New function.
1701 (arm_breakpoint_at): Use arm_is_thumb_mode.
1702 (arm_breakpoint_kind_from_current_state): New function.
1703 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1704 Initialize.
1705 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1706 (linux_breakpoint_kind_from_current_state): New function.
1707 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1708 * linux-low.h (struct linux_target_ops)
1709 <breakpoint_kind_from_current_state>: New field.
1710 * target.h (struct target_ops): Likewise.
1711 (target_breakpoint_kind_from_current_state): New macro.
1712
1bebeeca
PA
17132015-11-30 Pedro Alves <palves@redhat.com>
1714
1715 * linux-low.c (linux_resume): Wake up the event loop before
1716 returning.
1717
a67a9fae
PA
17182015-11-30 Pedro Alves <palves@redhat.com>
1719
1720 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1721 check.
1722 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1723 to -1.
1724 * target.c (struct thread_search): New structure.
1725 (thread_search_callback): New function.
1726 (prev_general_thread): New global.
1727 (prepare_to_access_memory, done_accessing_memory): New functions.
1728 * target.h (prepare_to_access_memory, done_accessing_memory):
1729 Replace macros with function declarations.
1730
f2faf941
PA
17312015-11-30 Pedro Alves <palves@redhat.com>
1732
1733 PR 14618
1734 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1735 report TARGET_WAITKIND_NO_RESUMED.
1736 * remote-utils.c (prepare_resume_reply): Handle
1737 TARGET_WAITKIND_NO_RESUMED.
1738 * server.c (report_no_resumed): New global.
1739 (handle_query) <qSupported>: Handle "no-resumed+". Report
1740 "no-resumed+" support.
1741 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1742 return error if the client doesn't support no-resumed events.
1743 (push_stop_notification): New function.
1744 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1745 events if the client supports them.
1746
a681f9c9
PA
17472015-11-30 Pedro Alves <palves@redhat.com>
1748
1749 * linux-low.c (thread_still_has_status_pending_p): Don't check
1750 vCont;t here.
1751 (lwp_resumed): New function.
1752 (status_pending_p_callback): Return early if the LWP is not
1753 supposed to be resumed.
1754
65706a29
PA
17552015-11-30 Pedro Alves <palves@redhat.com>
1756
1757 * linux-low.c (handle_extended_wait): Assert that the LWP's
1758 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1759 thread create events, leave the new child's status pending.
1760 (linux_low_filter_event): If GDB wants to hear about thread exit
1761 events, leave the LWP marked dead and don't delete it.
1762 (linux_wait_for_event_filtered): Don't check for thread exit.
1763 (filter_exit_event): New function.
1764 (linux_wait_1): Use it, when returning an exit event.
1765 (linux_resume_one_lwp_throw): Assert that the LWP's
1766 waitstatus is TARGET_WAITKIND_IGNORE.
1767 * remote-utils.c (prepare_resume_reply): Handle
1768 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1769 * server.c (report_thread_events): New global.
1770 (handle_general_set): Handle QThreadEvents.
1771 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1772 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1773 TARGET_WAITKIND_THREAD_EXITED.
1774 * server.h (report_thread_events): Declare.
1775
56cf4bed
PA
17762015-11-30 Pedro Alves <palves@redhat.com>
1777
1778 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1779 the thread's last_resume_kind was resume_stop.
1780
500c1d85
PA
17812015-11-30 Pedro Alves <palves@redhat.com>
1782
1783 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1784 before returning.
1785
de979965
PA
17862015-11-30 Pedro Alves <palves@redhat.com>
1787
1788 * server.c (handle_v_requests): Handle vCtrlC.
1789
34c65914
PA
17902015-11-30 Pedro Alves <palves@redhat.com>
1791
1792 * gdbthread.h (find_any_thread_of_pid): Declare.
1793 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1794 functions.
1795 * server.c (handle_query): If current_thread is NULL, look for
1796 another thread of the selected process.
1797
79efa585 17982015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 1799 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
1800
1801 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1802 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1803 name in reply.
1804 * target.h (struct target_ops) <thread_name>: New field.
1805 (target_thread_name): New macro.
1806
80d82c19
JB
18072015-11-23 Joel Brobecker <brobecker@adacore.com>
1808
1809 * regcache.h (regcache_invalidate_pid): Add declaration.
1810 * regcache.c (regcache_invalidate_pid): New function, extracted
1811 from regcache_invalidate.
1812 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1813 Add trivial documentation comment.
1814 * lynx-low.c: Use regcache_invalidate_pid instead of
1815 regcache_invalidate.
1816
64da5dd5
JB
18172015-11-23 Joel Brobecker <brobecker@adacore.com>
1818
1819 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1820 and Elf64_auxv_t if the target is Android.
1821
37ce4055
DE
18222015-11-22 Doug Evans <xdje42@gmail.com>
1823
1824 * target.h: #include <sys/types.h>.
1825
06e03fff
PA
18262015-11-19 Pedro Alves <palves@redhat.com>
1827
1828 * linux-low.c (linux_process_qsupported): Change prototype.
1829 Adjust.
1830 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1831 Change prototype.
1832 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1833 and adjust to loop over all features.
1834 * server.c (handle_query) <qSupported>: Adjust to call
1835 target_process_qsupported once, passing it a vector of unprocessed
1836 features.
1837 * target.h (struct target_ops) <process_qsupported>: Change
1838 prototype.
1839 (target_process_qsupported): Adjust.
1840
9a084706
PA
18412015-11-19 Pedro Alves <palves@redhat.com>
1842
1843 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1844 mode.
1845 * configure: Regenerate.
1846
dad44a1f
PA
18472015-11-19 Pedro Alves <palves@redhat.com>
1848
1849 * configure: Regenerate.
1850
231c0592
YQ
18512015-11-19 Yao Qi <yao.qi@linaro.org>
1852
1853 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1854 type to uint32_t.
1855
6c1c9a8b
YQ
18562015-11-19 Yao Qi <yao.qi@linaro.org>
1857
1858 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1859 (struct aarch64_operand): Move enum out.
1860
9caa3311
YQ
18612015-11-19 Yao Qi <yao.qi@linaro.org>
1862
1863 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1864 struct user_fpsimd_state *.
1865 (aarch64_store_fpregset): Likewise.
1866
6a69a054
YQ
18672015-11-19 Yao Qi <yao.qi@linaro.org>
1868
1869 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1870 struct user_pt_regs *.
1871 (aarch64_store_gregset): Likewise.
1872
1798301e
PA
18732015-11-18 Pedro Alves <palves@redhat.com>
1874
1875 * Makefile.in (all_object_files): Add $IPA_OBJS.
1876
ce7715e2
PA
18772015-11-17 Pedro Alves <palves@redhat.com>
1878
1879 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1880 GDB_SIGNAL_0 and gdb_signal_to_string.
1881
c0879059
PA
18822015-11-17 Pedro Alves <palves@redhat.com>
1883
1884 * win32-low.c (handle_output_debug_string): Remove parameter.
1885 (win32_kill): Remove our_status local and adjust call to
1886 handle_output_debug_string.
1887 (get_child_debug_event): Adjust call to
1888 handle_output_debug_string.
1889
1996e237
SM
18902015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1891
1892 * linux-mips-low.c (mips_fill_gregset): Add cast.
1893 (mips_store_gregset): Likewise.
1894 (mips_fill_fpregset): Likewise.
1895 (mips_store_fpregset): Likewise.
1896
cbec665b
SM
18972015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1898
1899 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1900 priv.
1901
eb3e3c67
SM
19022015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1903
1904 * linux-mips-low.c (mips_linux_new_thread): Change type of
1905 watch_type to enum target_hw_bp_type.
1906
171de4b8
SM
19072015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1908
1909 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1910 Change return type to arm_hwbp_type.
1911
04248ead
SM
19122015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1913
1914 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1915 (arm_store_gregset): Likewise.
1916 * linux-arm-low.c (arm_get_hwcap): Likewise.
1917 (arm_read_description): Likewise.
1918
04b3479c
SM
19192015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1920
1921 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1922
2bc84e8a
SM
19232015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1924
1925 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1926 (ppc_fill_vsxregset): Likewise.
1927 (ppc_store_vsxregset): Likewise.
1928 (ppc_fill_vrregset): Likewise.
1929 (ppc_store_vrregset): Likewise.
1930 (ppc_fill_evrregset): Likewise.
1931 (ppc_store_evrregset): Likewise.
1932
e6c5bb05
SM
19332015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1934
1935 * linux-ppc-low.c (ppc_usrregs_info): Remove
1936 forward-declaration.
1937 (ppc_arch_setup): Move lower in file.
1938
7ea45d72
SM
19392015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1940
1941 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1942 (ps_pdwrite): Likewise.
1943
69291610
HW
19442015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1945
1946 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1947 to after assert checks.
1948
b42945fd
SM
19492015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1950
1951 * proc-service.c (ps_pdread): Add/adjust casts.
1952 (ps_pdwrite): Add/adjust casts.
1953
d6f85c84
SM
19542015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1955
1956 * server.c (handle_search_memory_1): Cast return value of
1957 memmem.
1958
f98cd059
SM
19592015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1960
1961 * server.c (write_qxfer_response): Change type of data to
1962 gdb_byte *.
1963
d2412fa5
PA
19642015-10-29 Pedro Alves <palves@redhat.com>
1965
1966 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1967
c17414a2
PA
19682015-10-29 Pedro Alves <palves@redhat.com>
1969
1970 * tracepoint.c (clear_installed_tracepoints): Add casts.
1971
e053fbc4
PA
19722015-10-29 Pedro Alves <palves@redhat.com>
1973
1974 * server.c (handle_v_cont, process_serial_event): Add enum
1975 gdb_signal casts to signal parsing code.
1976
add67df8
PA
19772015-10-29 Pedro Alves <palves@redhat.com>
1978
1979 * linux-low.h (NULL_REGSET): Define.
1980 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1981 * linux-arm-low.c (arm_regsets): Likewise.
1982 * linux-crisv32-low.c (cris_regsets): Likewise.
1983 * linux-m68k-low.c (m68k_regsets): Likewise.
1984 * linux-mips-low.c (mips_regsets): Likewise.
1985 * linux-nios2-low.c (nios2_regsets): Likewise.
1986 * linux-ppc-low.c (ppc_regsets): Likewise.
1987 * linux-s390-low.c (s390_regsets): Likewise.
1988 * linux-sh-low.c (sh_regsets): Likewise.
1989 * linux-sparc-low.c (sparc_regsets): Likewise.
1990 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1991 * linux-tile-low.c (tile_regsets): Likewise.
1992 * linux-x86-low.c (x86_regsets): Likewise.
1993 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1994
50bc912a
PA
19952015-10-29 Pedro Alves <palves@redhat.com>
1996
1997 * linux-low.h (NULL_REGSET): Define.
1998 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1999 * linux-arm-low.c (arm_regsets): Likewise.
2000 * linux-crisv32-low.c (cris_regsets): Likewise.
2001 * linux-m68k-low.c (m68k_regsets): Likewise.
2002 * linux-mips-low.c (mips_regsets): Likewise.
2003 * linux-nios2-low.c (nios2_regsets): Likewise.
2004 * linux-ppc-low.c (ppc_regsets): Likewise.
2005 * linux-s390-low.c (s390_regsets): Likewise.
2006 * linux-sh-low.c (sh_regsets): Likewise.
2007 * linux-sparc-low.c (sparc_regsets): Likewise.
2008 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2009 * linux-tile-low.c (tile_regsets): Likewise.
2010 * linux-x86-low.c (x86_regsets): Likewise.
2011 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2012
682b2546
DE
20132015-10-26 Doug Evans <dje@google.com>
2014
2015 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2016
963843d4
DE
20172015-10-26 Doug Evans <dje@google.com>
2018
2019 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2020
d41401ac
DE
20212015-10-26 Doug Evans <dje@google.com>
2022
2023 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2024 for debug_printf.
2025 (attach_thread, find_new_threads_callback): Ditto.
2026
3db28855
AT
20272015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2028
2029 * mem-break.h (set_breakpoint_data): Remove.
2030
fb78e89c
AT
20312015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2032
2033 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2034 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2035 (initialize_low): Remove set_breakpoint_data call.
2036 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2037 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2038 (initialize_low): Remove set_breakpoint_data call.
2039 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2040 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2041 (initialize_low): Remove set_breakpoint_data call.
2042
2e6ee069
AT
20432015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2044
2045 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2046 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2047 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2048 * target.h (target_breakpoint_kind_from_pc): New macro.
2049
1652a986
AT
20502015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2051
2052 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2053 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2054 the default breakpoint kind.
2055
abeead09
AT
20562015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2057
2058 * linux-arm-low.c (arm_supports_z_point_type): Add software
2059 breakpoint support.
2060
b0b4b501
AT
20612015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2062
2063 * linux-arm-low.c: Refactor breakpoint definitions.
2064 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2065 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2066
8689682c
AT
20672015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2068
2069 * Makefile.in: Add arm.c/o.
2070 * configure.srv: Likewise.
2071 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2072 (arm_breakpoint_kind_from_pc): New function.
2073 (arm_sw_breakpoint_from_kind): Return proper kind.
2074 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2075
27165294
AT
20762015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2077
2078 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2079 removal.
2080 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2081 (struct raw_breakpoint) <size>: Remove.
2082 (struct raw_breakpoint) <kind>: Add.
2083 (bp_size): New function.
2084 (bp_opcode): Likewise.
2085 (find_raw_breakpoint_at): Adjust for kind.
2086 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2087 (remove_memory_breakpoint): Adjust for kind call bp_size.
2088 (set_raw_breakpoint_at): Adjust for kind.
2089 (set_breakpoint): Likewise.
2090 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2091 (delete_raw_breakpoint): Adjust for kind.
2092 (delete_breakpoint): Likewise.
2093 (find_gdb_breakpoint): Likewise.
2094 (set_gdb_breakpoint_1): Likewise.
2095 (set_gdb_breakpoint): Likewise.
2096 (delete_gdb_breakpoint_1): Likewise.
2097 (delete_gdb_breakpoint): Likewise.
2098 (uninsert_raw_breakpoint): Likewise.
2099 (reinsert_raw_breakpoint): Likewise.
2100 (set_breakpoint_data): Remove.
2101 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2102 (check_mem_read): Adjust for kind call bp_size.
2103 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2104 (clone_one_breakpoint): Adjust for kind.
2105 * mem-break.h (set_gdb_breakpoint): Likewise.
2106 (delete_gdb_breakpoint): Likewise.
2107 * server.c (process_serial_event): Likewise.
2108
dd373349
AT
21092015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2110
2111 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2112 (struct linux_target_ops) <breakpoint>: Remove.
2113 (struct linux_target_ops) <breakpoint_len>: Remove.
2114 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2115 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2116 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2117 (arm_sw_breakpoint_from_kind): New function.
2118 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2119 (struct linux_target_ops) <breakpoint>: Remove.
2120 (struct linux_target_ops) <breakpoint_len>: Remove.
2121 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2122 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2123 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2124 (struct linux_target_ops) <breakpoint>: Remove.
2125 (struct linux_target_ops) <breakpoint_len>: Remove.
2126 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2127 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2128 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2129 (struct linux_target_ops) <breakpoint>: Remove.
2130 (struct linux_target_ops) <breakpoint_len>: Remove.
2131 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2132 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2133 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2134 and sw_breakpoint_from_kind to increment the pc.
2135 (linux_breakpoint_kind_from_pc): New function.
2136 (linux_sw_breakpoint_from_kind): New function.
2137 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2138 (initialize_low): Call breakpoint_kind_from_pc and
2139 sw_breakpoint_from_kind to replace breakpoint_data/len.
2140 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2141 New field.
2142 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2143 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2144 (struct linux_target_ops) <breakpoint>: Remove.
2145 (struct linux_target_ops) <breakpoint_len>: Remove.
2146 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2147 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2148 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2149 (struct linux_target_ops) <breakpoint>: Remove.
2150 (struct linux_target_ops) <breakpoint_len>: Remove.
2151 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2152 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2153 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2154 (struct linux_target_ops) <breakpoint>: Remove.
2155 (struct linux_target_ops) <breakpoint_len>: Remove.
2156 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2157 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2158 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2159 (struct linux_target_ops) <breakpoint>: Remove.
2160 (struct linux_target_ops) <breakpoint_len>: Remove.
2161 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2162 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2163 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2164 (struct linux_target_ops) <breakpoint>: Remove.
2165 (struct linux_target_ops) <breakpoint_len>: Remove.
2166 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2167 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2168 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2169 (struct linux_target_ops) <breakpoint>: Remove.
2170 (struct linux_target_ops) <breakpoint_len>: Remove.
2171 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2172 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2173 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2174 (struct linux_target_ops) <breakpoint>: Remove.
2175 (struct linux_target_ops) <breakpoint_len>: Remove.
2176 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2177 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2178 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2179 (struct linux_target_ops) <breakpoint>: Remove.
2180 (struct linux_target_ops) <breakpoint_len>: Remove.
2181 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2182 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2183 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2184 (struct linux_target_ops) <breakpoint>: Remove.
2185 (struct linux_target_ops) <breakpoint_len>: Remove.
2186 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2187 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2188 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2189 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2190 (struct linux_target_ops) <breakpoint>: Remove.
2191 (struct linux_target_ops) <breakpoint_len>: Remove.
2192 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2193 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2194 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2195 (struct linux_target_ops) <breakpoint>: Remove.
2196 (struct linux_target_ops) <breakpoint_len>: Remove.
2197 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2198 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2199
4cd98a19
AT
22002015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2201
2202 * linux-cris-low.c (cris_get_pc): Remove void arg.
2203
774ee6d2
AR
22042015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2205
2206 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2207 variable name.
2208
833dcd29
AR
22092015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2210
2211 * inferiors.c (thread_pid_matches_callback): New function.
2212 (find_thread_process): New function.
2213 (remove_thread): Reset current_thread.
2214 (remove_process): Assert threads have been removed first.
2215
8d689ee5
YQ
22162015-10-15 Yao Qi <yao.qi@linaro.org>
2217
2218 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2219 if it is 3.
2220 (aarch64_remove_point): Likewise.
2221 * regcache.c (regcache_register_size): New function.
2222
1c2e1515
YQ
22232015-10-12 Yao Qi <yao.qi@linaro.org>
2224
2225 * linux-aarch64-low.c: Update all callers as emit_load_store
2226 is renamed to aarch64_emit_load_store.
2227
e1c587c3
YQ
22282015-10-12 Yao Qi <yao.qi@linaro.org>
2229
2230 * linux-aarch64-low.c: Update all callers of function renaming
2231 from emit_insn to aarch64_emit_insn.
2232
b6542f81
YQ
22332015-10-12 Yao Qi <yao.qi@linaro.org>
2234
2235 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2236 arch/aarch64-insn.h.
2237 (struct aarch64_memory_operand): Likewise.
2238 (ENCODE): Likewise.
2239 (emit_insn): Move to arch/aarch64-insn.c.
2240 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2241 (emit_load_store): Move to arch/aarch64-insn.c.
2242 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2243 (can_encode_int32): Remove.
2244
246994ce
YQ
22452015-10-12 Yao Qi <yao.qi@linaro.org>
2246
2247 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2248 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2249 (aarch64_relocate_instruction): Likewise.
2250 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2251 (struct aarch64_insn_visitor): Likewise.
2252
0badd99f
YQ
22532015-10-12 Yao Qi <yao.qi@linaro.org>
2254
2255 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2256 (struct aarch64_insn_visitor): New.
2257 (struct aarch64_insn_relocation_data): New.
2258 (aarch64_ftrace_insn_reloc_b): New function.
2259 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2260 (aarch64_ftrace_insn_reloc_cb): Likewise.
2261 (aarch64_ftrace_insn_reloc_tb): Likewise.
2262 (aarch64_ftrace_insn_reloc_adr): Likewise.
2263 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2264 (aarch64_ftrace_insn_reloc_others): Likewise.
2265 (visitor): New.
2266 (aarch64_relocate_instruction): Use visitor.
2267
dfaffe9d
YQ
22682015-10-12 Yao Qi <yao.qi@linaro.org>
2269
2270 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2271 int. Add argument buf.
2272 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2273 aarch64_relocate_instruction.
2274
70b439f0
YQ
22752015-10-12 Yao Qi <yao.qi@linaro.org>
2276
2277 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2278 argument insn. Remove local variable insn. Don't call
2279 target_read_uint32.
2280 (aarch64_install_fast_tracepoint_jump_pad): Call
2281 target_read_uint32.
2282
7781c06f
YQ
22832015-09-30 Yao Qi <yao.qi@linaro.org>
2284
2285 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2286 (emit_load_store_pair): Likewise.
2287
9a3c8263
SM
22882015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2289
2290 * dll.c (match_dll): Add cast(s).
2291 (unloaded_dll): Likewise.
2292 * linux-low.c (second_thread_of_pid_p): Likewise.
2293 (delete_lwp_callback): Likewise.
2294 (count_events_callback): Likewise.
2295 (select_event_lwp_callback): Likewise.
2296 (linux_set_resume_request): Likewise.
2297 * server.c (accumulate_file_name_length): Likewise.
2298 (emit_dll_description): Likewise.
2299 (handle_qxfer_threads_worker): Likewise.
2300 (visit_actioned_threads): Likewise.
2301 * thread-db.c (any_thread_of): Likewise.
2302 * tracepoint.c (same_process_p): Likewise.
2303 (match_blocktype): Likewise.
2304 (build_traceframe_info_xml): Likewise.
2305
224c3ddb
SM
23062015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2307
2308 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2309 assignment.
2310 (gdb_unparse_agent_expr): Likewise.
2311 * hostio.c (require_data): Likewise.
2312 (handle_pread): Likewise.
2313 * linux-low.c (disable_regset): Likewise.
2314 (fetch_register): Likewise.
2315 (store_register): Likewise.
2316 (get_dynamic): Likewise.
2317 (linux_qxfer_libraries_svr4): Likewise.
2318 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2319 (set_fast_tracepoint_jump): Likewise.
2320 (uninsert_fast_tracepoint_jumps_at): Likewise.
2321 (reinsert_fast_tracepoint_jumps_at): Likewise.
2322 (validate_inserted_breakpoint): Likewise.
2323 (clone_agent_expr): Likewise.
2324 * regcache.c (init_register_cache): Likewise.
2325 * remote-utils.c (putpkt_binary_1): Likewise.
2326 (decode_M_packet): Likewise.
2327 (decode_X_packet): Likewise.
2328 (look_up_one_symbol): Likewise.
2329 (relocate_instruction): Likewise.
2330 (monitor_output): Likewise.
2331 * server.c (handle_search_memory): Likewise.
2332 (handle_qxfer_exec_file): Likewise.
2333 (handle_qxfer_libraries): Likewise.
2334 (handle_qxfer): Likewise.
2335 (handle_query): Likewise.
2336 (handle_v_cont): Likewise.
2337 (handle_v_run): Likewise.
2338 (captured_main): Likewise.
2339 * target.c (write_inferior_memory): Likewise.
2340 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2341 * tracepoint.c (init_trace_buffer): Likewise.
2342 (add_tracepoint_action): Likewise.
2343 (add_traceframe): Likewise.
2344 (add_traceframe_block): Likewise.
2345 (cmd_qtdpsrc): Likewise.
2346 (cmd_qtdv): Likewise.
2347 (cmd_qtstatus): Likewise.
2348 (response_source): Likewise.
2349 (response_tsv): Likewise.
2350 (cmd_qtnotes): Likewise.
2351 (gdb_collect): Likewise.
2352 (initialize_tracepoint): Likewise.
2353
afbe19f8
PL
23542015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2355
2356 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2357 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2358 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2359 <NOP>: New.
2360 (enum aarch64_condition_codes): New enum.
2361 (w0): New static global.
2362 (fp): Likewise.
2363 (lr): Likewise.
2364 (struct aarch64_memory_operand) <type>: New
2365 MEMORY_OPERAND_POSTINDEX type.
2366 (postindex_memory_operand): New helper function.
2367 (emit_ret): New function.
2368 (emit_load_store_pair): New function, factored out of emit_stp
2369 with support for MEMORY_OPERAND_POSTINDEX.
2370 (emit_stp): Rewrite using emit_load_store_pair.
2371 (emit_ldp): New function.
2372 (emit_load_store): Likewise.
2373 (emit_ldr): Mention post-index instruction in comment.
2374 (emit_ldrh): New function.
2375 (emit_ldrb): New function.
2376 (emit_ldrsw): Mention post-index instruction in comment.
2377 (emit_str): Likewise.
2378 (emit_subs): New function.
2379 (emit_cmp): Likewise.
2380 (emit_and): Likewise.
2381 (emit_orr): Likewise.
2382 (emit_orn): Likewise.
2383 (emit_eor): Likewise.
2384 (emit_mvn): Likewise.
2385 (emit_lslv): Likewise.
2386 (emit_lsrv): Likewise.
2387 (emit_asrv): Likewise.
2388 (emit_mul): Likewise.
2389 (emit_sbfm): Likewise.
2390 (emit_sbfx): Likewise.
2391 (emit_ubfm): Likewise.
2392 (emit_ubfx): Likewise.
2393 (emit_csinc): Likewise.
2394 (emit_cset): Likewise.
2395 (emit_nop): Likewise.
2396 (emit_ops_insns): New helper function.
2397 (emit_pop): Likewise.
2398 (emit_push): Likewise.
2399 (aarch64_emit_prologue): New function.
2400 (aarch64_emit_epilogue): Likewise.
2401 (aarch64_emit_add): Likewise.
2402 (aarch64_emit_sub): Likewise.
2403 (aarch64_emit_mul): Likewise.
2404 (aarch64_emit_lsh): Likewise.
2405 (aarch64_emit_rsh_signed): Likewise.
2406 (aarch64_emit_rsh_unsigned): Likewise.
2407 (aarch64_emit_ext): Likewise.
2408 (aarch64_emit_log_not): Likewise.
2409 (aarch64_emit_bit_and): Likewise.
2410 (aarch64_emit_bit_or): Likewise.
2411 (aarch64_emit_bit_xor): Likewise.
2412 (aarch64_emit_bit_not): Likewise.
2413 (aarch64_emit_equal): Likewise.
2414 (aarch64_emit_less_signed): Likewise.
2415 (aarch64_emit_less_unsigned): Likewise.
2416 (aarch64_emit_ref): Likewise.
2417 (aarch64_emit_if_goto): Likewise.
2418 (aarch64_emit_goto): Likewise.
2419 (aarch64_write_goto_address): Likewise.
2420 (aarch64_emit_const): Likewise.
2421 (aarch64_emit_call): Likewise.
2422 (aarch64_emit_reg): Likewise.
2423 (aarch64_emit_pop): Likewise.
2424 (aarch64_emit_stack_flush): Likewise.
2425 (aarch64_emit_zero_ext): Likewise.
2426 (aarch64_emit_swap): Likewise.
2427 (aarch64_emit_stack_adjust): Likewise.
2428 (aarch64_emit_int_call_1): Likewise.
2429 (aarch64_emit_void_call_2): Likewise.
2430 (aarch64_emit_eq_goto): Likewise.
2431 (aarch64_emit_ne_goto): Likewise.
2432 (aarch64_emit_lt_goto): Likewise.
2433 (aarch64_emit_le_goto): Likewise.
2434 (aarch64_emit_gt_goto): Likewise.
2435 (aarch64_emit_ge_got): Likewise.
2436 (aarch64_emit_ops_impl): New static global variable.
2437 (aarch64_emit_ops): New target function, return
2438 &aarch64_emit_ops_impl.
2439 (struct linux_target_ops): Install it.
2440
bb903df0
PL
24412015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2442
2443 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2444 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2445 aarch64-ipa.o.
2446 * linux-aarch64-ipa.c: New file.
2447 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2448 and endian.h.
2449 (aarch64_get_thread_area): New target method.
2450 (extract_signed_bitfield): New helper function.
2451 (aarch64_decode_ldr_literal): New function.
2452 (enum aarch64_opcodes): New enum.
2453 (struct aarch64_register): New struct.
2454 (struct aarch64_operand): New struct.
2455 (x0): New static global.
2456 (x1): Likewise.
2457 (x2): Likewise.
2458 (x3): Likewise.
2459 (x4): Likewise.
2460 (w2): Likewise.
2461 (ip0): Likewise.
2462 (sp): Likewise.
2463 (xzr): Likewise.
2464 (aarch64_register): New helper function.
2465 (register_operand): Likewise.
2466 (immediate_operand): Likewise.
2467 (struct aarch64_memory_operand): New struct.
2468 (offset_memory_operand): New helper function.
2469 (preindex_memory_operand): Likewise.
2470 (enum aarch64_system_control_registers): New enum.
2471 (ENCODE): New macro.
2472 (emit_insn): New helper function.
2473 (emit_b): New function.
2474 (emit_bcond): Likewise.
2475 (emit_cb): Likewise.
2476 (emit_tb): Likewise.
2477 (emit_blr): Likewise.
2478 (emit_stp): Likewise.
2479 (emit_ldp_q_offset): Likewise.
2480 (emit_stp_q_offset): Likewise.
2481 (emit_load_store): Likewise.
2482 (emit_ldr): Likewise.
2483 (emit_ldrsw): Likewise.
2484 (emit_str): Likewise.
2485 (emit_ldaxr): Likewise.
2486 (emit_stxr): Likewise.
2487 (emit_stlr): Likewise.
2488 (emit_data_processing_reg): Likewise.
2489 (emit_data_processing): Likewise.
2490 (emit_add): Likewise.
2491 (emit_sub): Likewise.
2492 (emit_mov): Likewise.
2493 (emit_movk): Likewise.
2494 (emit_mov_addr): Likewise.
2495 (emit_mrs): Likewise.
2496 (emit_msr): Likewise.
2497 (emit_sevl): Likewise.
2498 (emit_wfe): Likewise.
2499 (append_insns): Likewise.
2500 (can_encode_int32_in): New helper function.
2501 (aarch64_relocate_instruction): New function.
2502 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2503 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2504 (struct linux_target_ops): Install aarch64_get_thread_area,
2505 aarch64_install_fast_tracepoint_jump_pad and
2506 aarch64_get_min_fast_tracepoint_insn_len.
2507
787749ea
PL
25082015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2509
2510 * Makefile.in (aarch64-insn.o): New rule.
2511 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2512
9812b2e6
YQ
25132015-09-21 Yao Qi <yao.qi@linaro.org>
2514
2515 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2516
18fe412b
YQ
25172015-09-21 Yao Qi <yao.qi@linaro.org>
2518
2519 * tracepoint.c (max_jump_pad_size): Remove.
2520
a0cc84cd
YQ
25212015-09-18 Yao Qi <yao.qi@linaro.org>
2522
2523 * linux-aarch64-low.c: Don't include sys/uio.h.
2524 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2525
d78908cf
WW
25262015-09-16 Wei-cheng Wang <cole945@gmail.com>
2527
2528 * tracepoint.c (eval_result_type): Change prototype.
2529 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2530
d57e0d50
PA
25312015-09-15 Pedro Alves <palves@redhat.com>
2532
2533 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2534 Check whether to report exec events instead of checking whether
2535 multiprocess is enabled.
2536
5a676acc
PA
25372015-09-15 Pedro Alves <palves@redhat.com>
2538
2539 PR remote/18965
2540 * remote-utils.c (prepare_resume_reply): Merge
2541 TARGET_WAITKIND_VFORK_DONE switch case with the
2542 TARGET_WAITKIND_FORKED case.
2543
7c5d0fad
YQ
25442015-09-15 Yao Qi <yao.qi@linaro.org>
2545
2546 * server.c (handle_query): Check string comparison using
2547 "else if" instead of "if".
2548
750ce8d1
YQ
25492015-09-15 Yao Qi <yao.qi@linaro.org>
2550
2551 * server.c (vCont_supported): New global variable.
2552 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2553 matches. Append ";vContSupported+" to own_buf.
2554 (handle_v_requests): Append ";s;S" to own_buf if target supports
2555 hardware single step or vCont_supported is false.
2556 (capture_main): Set vCont_supported to zero.
2557
70b90b91
YQ
25582015-09-15 Yao Qi <yao.qi@linaro.org>
2559
2560 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2561 it to ...
2562 (linux_supports_hardware_single_step): ... New function.
2563 (linux_target_ops): Update.
2564 * lynx-low.c (lynx_target_ops): Set field
2565 supports_hardware_single_step to target_can_do_hardware_single_step.
2566 * nto-low.c (nto_target_ops): Likewise.
2567 * spu-low.c (spu_target_ops): Likewise.
2568 * win32-low.c (win32_target_ops): Likewise.
2569 * target.c (target_can_do_hardware_single_step): New function.
2570 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2571 Remove. <supports_hardware_single_step>: New field.
2572 (target_supports_conditional_breakpoints): Remove.
2573 (target_supports_hardware_single_step): New macro.
2574 (target_can_do_hardware_single_step): Declare.
2575 * server.c (handle_query): Use target_supports_hardware_single_step
2576 instead of target_supports_conditional_breakpoints.
2577
ade90bde
YQ
25782015-09-15 Yao Qi <yao.qi@linaro.org>
2579
2580 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2581 function.
2582 (struct linux_target_ops the_low_target): Install
2583 aarch64_linux_siginfo_fixup.
2584
94585166
DB
25852015-09-11 Don Breazeal <donb@codesourcery.com>
2586 Luis Machado <lgustavo@codesourcery.com>
2587
2588 * linux-low.c (linux_mourn): Static declaration.
2589 (linux_arch_setup): Move in front of
2590 handle_extended_wait.
2591 (linux_arch_setup_thread): New function.
2592 (handle_extended_wait): Handle exec events. Call
2593 linux_arch_setup_thread. Make event_lwp argument a
2594 pointer-to-a-pointer.
2595 (check_zombie_leaders): Do not check stopped threads.
2596 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2597 (linux_low_filter_event): Add lwp and thread for exec'ing
2598 non-leader thread if leader thread has been deleted.
2599 Refactor code into linux_arch_setup_thread and call it.
2600 Pass child lwp pointer by reference to handle_extended_wait.
2601 (linux_wait_for_event_filtered): Update comment.
2602 (linux_wait_1): Prevent clobbering exec event status.
2603 (linux_supports_exec_events): New function.
2604 (linux_target_ops) <supports_exec_events>: Initialize new member.
2605 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2606 new member.
2607 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2608 * server.c (report_exec_events): New global variable.
2609 (handle_query): Handle qSupported query for exec-events feature.
2610 (captured_main): Initialize report_exec_events.
2611 * server.h (report_exec_events): Declare new global variable.
2612 * target.h (struct target_ops) <supports_exec_events>: New
2613 member.
2614 (target_supports_exec_events): New macro.
2615 * win32-low.c (win32_target_ops) <supports_exec_events>:
2616 Initialize new member.
2617
0568462b
MM
26182015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2619
2620 * linux-low.c (linux_low_enable_btrace): Remove.
2621 (linux_target_ops): Replace linux_low_enable_btrace with
2622 linux_enable_btrace.
2623
39edd165
YQ
26242015-09-03 Yao Qi <yao.qi@linaro.org>
2625
2626 * linux-aarch64-low.c (aarch64_insert_point): Call
2627 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2628 returns true.
2629
1db33b5a
UW
26302015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2631
2632 * linux-low.c (check_stopped_by_breakpoint): Use
2633 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2634
ab290430
PA
26352015-08-27 Pedro Alves <palves@redhat.com>
2636
2637 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2638
8d749320
SM
26392015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2640
6711b7f8
SM
2641 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2642 the XNEW-family equivalent.
8d749320
SM
2643 (compile_bytecodes): Likewise.
2644 * dll.c (loaded_dll): Likewise.
2645 * event-loop.c (append_callback_event): Likewise.
2646 (create_file_handler): Likewise.
2647 (create_file_event): Likewise.
2648 * hostio.c (handle_open): Likewise.
2649 * inferiors.c (add_thread): Likewise.
2650 (add_process): Likewise.
2651 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2652 * linux-arm-low.c (arm_new_process): Likewise.
2653 (arm_new_thread): Likewise.
2654 * linux-low.c (add_to_pid_list): Likewise.
2655 (linux_add_process): Likewise.
2656 (handle_extended_wait): Likewise.
2657 (add_lwp): Likewise.
2658 (enqueue_one_deferred_signal): Likewise.
2659 (enqueue_pending_signal): Likewise.
2660 (linux_resume_one_lwp_throw): Likewise.
2661 (linux_resume_one_thread): Likewise.
2662 (linux_read_memory): Likewise.
2663 (linux_write_memory): Likewise.
2664 * linux-mips-low.c (mips_linux_new_process): Likewise.
2665 (mips_linux_new_thread): Likewise.
2666 (mips_add_watchpoint): Likewise.
2667 * linux-x86-low.c (initialize_low_arch): Likewise.
2668 * lynx-low.c (lynx_add_process): Likewise.
2669 * mem-break.c (set_raw_breakpoint_at): Likewise.
2670 (set_breakpoint): Likewise.
2671 (add_condition_to_breakpoint): Likewise.
2672 (add_commands_to_breakpoint): Likewise.
2673 (clone_agent_expr): Likewise.
2674 (clone_one_breakpoint): Likewise.
2675 * regcache.c (new_register_cache): Likewise.
2676 * remote-utils.c (look_up_one_symbol): Likewise.
2677 * server.c (queue_stop_reply): Likewise.
2678 (start_inferior): Likewise.
2679 (queue_stop_reply_callback): Likewise.
2680 (handle_target_event): Likewise.
2681 * spu-low.c (fetch_ppc_memory): Likewise.
2682 (store_ppc_memory): Likewise.
2683 * target.c (set_target_ops): Likewise.
2684 * thread-db.c (thread_db_load_search): Likewise.
2685 (try_thread_db_load_1): Likewise.
2686 * tracepoint.c (add_tracepoint): Likewise.
2687 (add_tracepoint_action): Likewise.
2688 (create_trace_state_variable): Likewise.
2689 (cmd_qtdpsrc): Likewise.
2690 (cmd_qtro): Likewise.
2691 (add_while_stepping_state): Likewise.
2692 * win32-low.c (child_add_thread): Likewise.
2693 (get_image_name): Likewise.
2694
ed8b7b42
YQ
26952015-08-25 Yao Qi <yao.qi@linaro.org>
2696
2697 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2698
db3cb7cb
YQ
26992015-08-25 Yao Qi <yao.qi@linaro.org>
2700
2701 * Makefile.in (aarch64-linux.o): New rule.
2702 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2703 srv_tgtobj.
2704 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2705 (aarch64_init_debug_reg_state): Make it extern.
2706 (aarch64_linux_prepare_to_resume): Remove.
2707
f6011a1c
YQ
27082015-08-25 Yao Qi <yao.qi@linaro.org>
2709
2710 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2711 lwp_arch_private_info and ptid_of_lwp.
2712
88e2cf7e
YQ
27132015-08-25 Yao Qi <yao.qi@linaro.org>
2714
2715 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2716 Find proc_info by find_process_pid. All callers updated.
2717
5e35436e
YQ
27182015-08-25 Yao Qi <yao.qi@linaro.org>
2719
2720 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2721 Remove.
2722 (debug_reg_change_callback): Remove.
2723 (aarch64_notify_debug_reg_change): Remove.
2724
4a8a7965
YQ
27252015-08-25 Yao Qi <yao.qi@linaro.org>
2726
2727 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2728 Call current_lwp_ptid.
2729
32a271ee
YQ
27302015-08-25 Yao Qi <yao.qi@linaro.org>
2731
2732 * linux-aarch64-low.c (debug_reg_change_callback): Use
2733 debug_printf.
2734
0d51c8d7
YQ
27352015-08-25 Yao Qi <yao.qi@linaro.org>
2736
2737 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2738
31a43dd5
YQ
27392015-08-25 Yao Qi <yao.qi@linaro.org>
2740
2741 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2742
8ee52567
YQ
27432015-08-25 Yao Qi <yao.qi@linaro.org>
2744
2745 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2746 the code.
2747
ff3f0f45
YQ
27482015-08-25 Yao Qi <yao.qi@linaro.org>
2749
2750 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2751 Remove.
2752 (debug_reg_change_callback): Remove argument entry and add argument
2753 lwp. Remove local variable thread. Don't print thread id in the
2754 debugging output. Don't check whether pid of thread equals to pid.
2755 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2756 iterate_over_lwps instead find_inferior.
2757
3d40fbb5
PA
27582015-08-24 Pedro Alves <palves@redhat.com>
2759
2760 * inferiors.c (get_first_process): New function.
2761 * inferiors.h (get_first_process): New declaration.
2762 * remote-utils.c (read_ptid): Default to the first process in the
2763 list, instead of to the current thread's process.
2764
438e1e42
PA
27652015-08-24 Pedro Alves <palves@redhat.com>
2766
2767 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2768 * event-loop.c: Likewise.
2769 * remote-utils.c: Likewise.
2770 * tracepoint.c: Likewise.
2771
a8c6d4fc
PA
27722015-08-24 Pedro Alves <palves@redhat.com>
2773
2774 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2775 ptid_get_lwp.
2776
99b0bb12
PA
27772015-08-21 Pedro Alves <palves@redhat.com>
2778
2779 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2780 instead of literal 1.
2781
f8904751
PA
27822015-08-21 Pedro Alves <palves@redhat.com>
2783
2784 * tdesc.c (default_description): Explicitly zero-initialize.
2785
465a859e
PA
27862015-08-21 Pedro Alves <palves@redhat.com>
2787
2788 PR gdb/18749
2789 * inferiors.c (remove_thread): Discard any pending stop reply for
2790 this thread.
2791 * server.c (remove_all_on_match_pid): Rename to ...
2792 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2793 instead of a pid.
2794 (discard_queued_stop_replies): Change parameter to a ptid. Now
2795 extern.
2796 (handle_v_kill, kill_inferior_callback, captured_main)
2797 (process_serial_event): Adjust.
2798 * server.h (discard_queued_stop_replies): Declare.
2799
f0db101d
PA
28002015-08-21 Pedro Alves <palves@redhat.com>
2801
2802 * linux-low.c (wait_for_sigstop): Always switch to no thread
2803 selected if the previously current thread dies.
2804 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2805 process instead of the current thread's.
2806 * remote-utils.c (input_interrupt): Don't check if there's no
2807 current thread.
2808 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2809 current thread to the general thread fails, error out.
2810 (handle_qxfer_auxv, handle_qxfer_libraries)
2811 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2812 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2813 (handle_query): Check if there's a thread selected instead of
2814 checking whether there's any thread in the thread list.
2815 (handle_qxfer_threads, handle_qxfer_btrace)
2816 (handle_qxfer_btrace_conf): Don't error out early if there's no
2817 thread in the thread list.
2818 (handle_v_cont, myresume): Don't set the current thread to the
2819 continue thread.
2820 (process_serial_event) <Hg handling>: Also set thread_id if the
2821 previous general thread is still alive.
2822 (process_serial_event) <g/G handling>: If setting the current
2823 thread to the general thread fails, error out.
2824 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2825 thread's lwp instead of the current thread's.
2826 * target.c (set_desired_thread): If the desired thread was not
2827 found, leave the current thread pointing to NULL. Return an int
2828 (boolean) indicating success.
2829 * target.h (set_desired_thread): Change return type to int.
2830
40045d91
MF
28312015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2832
2833 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2834 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2835 #includes.
2836 (ps_get_thread_area): New function.
2837
45face3b
GB
28382015-08-19 Gary Benson <gbenson@redhat.com>
2839
2840 * hostio.c (handle_pread): Do not attempt to read more data
2841 than hostio_reply_with_data can fit in a packet.
2842
16d5f642
JB
28432015-08-18 Joel Brobecker <brobecker@adacore.com>
2844
2845 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2846
a738da3a
MF
28472015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2848
2849 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2850
33ebda9d
PA
28512015-08-06 Pedro Alves <palves@redhat.com>
2852
2853 * tracepoint.c (expr_eval_result): Now an int.
2854
a44892be
PA
28552015-08-06 Pedro Alves <palves@redhat.com>
2856
2857 * gdbthread.h (struct regcache): Forward declare.
2858 (struct thread_info) <regcache_data>: Now a struct regcache
2859 pointer.
2860 * inferiors.c (inferior_regcache_data)
2861 (set_inferior_regcache_data): Now work with struct regcache
2862 pointers.
2863 * inferiors.h (struct regcache): Forward declare.
2864 (inferior_regcache_data, set_inferior_regcache_data): Now work
2865 with struct regcache pointers.
2866 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2867 (free_register_cache_thread): Remove struct regcache pointer
2868 casts.
2869
608a1e46
PA
28702015-08-06 Pedro Alves <palves@redhat.com>
2871
2872 * server.c (captured_main): On error, print the exception message
2873 to stderr, and if run_once is set, throw a quit.
2874
f0ce0d3a
PA
28752015-08-06 Pedro Alves <palves@redhat.com>
2876
2877 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2878 the current thread.
2879
bf47e248
PA
28802015-08-06 Pedro Alves <palves@redhat.com>
2881
2882 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2883 reading beyond the passed in buffer length.
2884
b6b9ffcc
PL
28852015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2886
2887 * tracepoint.c (symbol_list) <required>: Remove.
2888
863d01bd
PA
28892015-08-06 Pedro Alves <palves@redhat.com>
2890
2891 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2892 count if stopping and suspending threads.
2893 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2894 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2895 (linux_detach): Complete an ongoing step-over.
2896 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2897 throughout.
2898 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2899 (linux_wait_1): If passing a signal to the inferior after
2900 finishing a step-over, unsuspend and re-resume all lwps. If we
2901 see a single-step event but the thread should be continuing, don't
2902 pass the trap to gdb.
2903 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2904 internal_error instead of gdb_assert.
2905 (enqueue_pending_signal): New function.
2906 (check_ptrace_stopped_lwp_gone): Add debug output.
2907 (start_step_over): Use internal_error instead of gdb_assert.
2908 (complete_ongoing_step_over): New function.
2909 (linux_resume_one_thread): Don't resume a suspended thread.
2910 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2911 it stepping.
2912
00db26fa
PA
29132015-08-06 Pedro Alves <palves@redhat.com>
2914
2915 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2916 (linux_thread_alive): Use lwp_is_marked_dead.
2917 (extended_event_reported): Delete.
2918 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2919 instead of extended_event_reported.
2920 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2921 as well.
2922 (lwp_is_marked_dead): New function.
2923 (lwp_running): Use lwp_is_marked_dead.
2924 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2925 comment.
2926
ad071a30
PA
29272015-08-06 Pedro Alves <palves@redhat.com>
2928
2929 * linux-low.c (linux_wait_1): Move fork event output out of the
2930 !report_to_gdb check. Pass event_child->waitstatus to
2931 target_waitstatus_to_string instead of ourstatus.
2932
524b57e6
YQ
29332015-08-04 Yao Qi <yao.qi@linaro.org>
2934
2935 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2936 if current_thread is 32 bit.
2937
6085d6f6
YQ
29382015-08-04 Yao Qi <yao.qi@linaro.org>
2939
2940 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2941 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2942 * server.c (extended_protocol): Remove "static".
2943 * server.h (extended_protocol): Declare it.
2944
8a7e4587
YQ
29452015-08-04 Yao Qi <yao.qi@linaro.org>
2946
2947 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2948 both aarch64 and aarch32.
2949 (aarch64_set_pc): Likewise.
2950
3b53ae99
YQ
29512015-08-04 Yao Qi <yao.qi@linaro.org>
2952
2953 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2954 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2955 arm-with-neon.xml to srv_xmlfiles.
2956 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2957 (is_64bit_tdesc): New function.
2958 (aarch64_linux_read_description): New function.
2959 (aarch64_arch_setup): Call aarch64_linux_read_description.
2960 (regs_info): Rename to regs_info_aarch64.
2961 (aarch64_regs_info): Return right regs_info.
2962 (initialize_low_arch): Call initialize_low_arch_aarch32.
2963
bd9e6534
YQ
29642015-08-04 Yao Qi <yao.qi@linaro.org>
2965
2966 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2967 * linux-aarch32-low.c: New file.
2968 * linux-aarch32-low.h: New file.
2969 * linux-arm-low.c (arm_fill_gregset): Move it to
2970 linux-aarch32-low.c.
2971 (arm_store_gregset): Likewise.
2972 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2973 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2974 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2975 (regs_info): Rename to regs_info_arm.
2976 (arm_regs_info): Return regs_info_aarch32 if
2977 have_ptrace_getregset is 1 and target description is
2978 arm_with_neon or arm_with_vfpv3.
2979 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2980 Call initialize_low_arch_aarch32 instead.
2981
ded48a5e
YQ
29822015-08-04 Yao Qi <yao.qi@linaro.org>
2983
2984 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2985 * linux-low.c: ... here.
2986 * linux-low.h (have_ptrace_getregset): Declare it.
2987
96e9210f
PA
29882015-08-04 Pedro Alves <palves@redhat.com>
2989
2990 * thread-db.c (struct thread_db): Use new typedefs.
2991 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2992 CHK calls.
2993 (disable_thread_event_reporting): Cast result of dlsym to
2994 destination function pointer type.
2995 (thread_db_mourn): Use td_ta_delete_ftype.
2996
af60a1ef
SL
29972015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2998
2999 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3000 arch variant.
3001 (CDX_BREAKPOINT): Define for R2.
3002 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3003 (the_low_target): Add comments.
3004
e8b41681
YQ
30052015-07-30 Yao Qi <yao.qi@linaro.org>
3006
3007 * linux-arm-low.c (arm_hwcap): Remove it.
3008 (arm_read_description): New local variable arm_hwcap. Don't
3009 set arm_hwcap to zero.
3010
89abb039
YQ
30112015-07-30 Yao Qi <yao.qi@linaro.org>
3012
3013 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3014 Use regcache->tdesc instead.
3015 (arm_store_wmmxregset): Likewise.
3016 (arm_fill_vfpregset): Likewise.
3017 (arm_store_vfpregset): Likewise.
3018
deca266c
YQ
30192015-07-30 Yao Qi <yao.qi@linaro.org>
3020
3021 * linux-arm-low.c: Include arch/arm.h.
3022 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3023 (arm_store_gregset): Likewise.
3024
aa58a496
SM
30252015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3026
3027 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3028 ptrace's 4th parameter.
3029
50904b25
YQ
30302015-07-27 Yao Qi <yao.qi@linaro.org>
3031
3032 * configure.srv (case aarch64*-*-linux*): Don't set
3033 srv_linux_usrregs.
3034
5826e159
PA
30352015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3036
3037 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3038 sys/ptrace.h.
3039 * linux-arm-low.c: Likewise.
3040 * linux-cris-low.c: Likewise.
3041 * linux-crisv32-low.c: Likewise.
3042 * linux-low.c: Likewise.
3043 * linux-m68k-low.c: Likewise.
3044 * linux-mips-low.c: Likewise.
3045 * linux-nios2-low.c: Likewise.
3046 * linux-s390-low.c: Likewise.
3047 * linux-sparc-low.c: Likewise.
3048 * linux-tic6x-low.c: Likewise.
3049 * linux-tile-low.c: Likewise.
3050 * linux-x86-low.c: Likewise.
3051
54019719
PA
30522015-07-24 Pedro Alves <palves@redhat.com>
3053
3054 * config.in: Regenerate.
3055 * configure: Regenerate.
3056
eb7aa561
PA
30572015-07-24 Pedro Alves <palves@redhat.com>
3058
3059 * acinclude.m4: Include ../ptrace.m4.
3060 * configure.ac: Call GDB_AC_PTRACE.
3061 * config.in, configure: Regenerate.
3062
55d7b841
YQ
30632015-07-24 Yao Qi <yao.qi@linaro.org>
3064
3065 * linux-low.c (linux_create_inferior): Remove setting to
3066 proc->priv->new_inferior.
3067 (linux_attach): Likewise.
3068 (linux_low_filter_event): Likewise.
3069 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3070
c06cbd92
YQ
30712015-07-24 Yao Qi <yao.qi@linaro.org>
3072
3073 * linux-low.c (linux_arch_setup): New function.
3074 (linux_low_filter_event): If proc->tdesc is NULL and
3075 proc->attached is true, call the_low_target.arch_setup.
3076 Otherwise, keep status pending, and return.
3077 (linux_resume_one_lwp_throw): Don't call get_pc if
3078 thread->while_stepping isn't NULL. Don't call
3079 get_thread_regcache if proc->tdesc is NULL.
3080 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3081 (linux_target_ops): Install arch_setup.
3082 * server.c (start_inferior): Call the_target->arch_setup.
3083 * target.h (struct target_ops) <arch_setup>: New field.
3084 (target_arch_setup): New marco.
3085 * lynx-low.c (lynx_target_ops): Update.
3086 * nto-low.c (nto_target_ops): Update.
3087 * spu-low.c (spu_target_ops): Update.
3088 * win32-low.c (win32_target_ops): Update.
3089
5ae3ebba
YQ
30902015-07-24 Yao Qi <yao.qi@linaro.org>
3091
3092 * linux-low.c (linux_add_process): Don't set
3093 proc->priv->new_inferior.
3094 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3095 (linux_attach): Likewise.
3096
eb97750b
YQ
30972015-07-24 Yao Qi <yao.qi@linaro.org>
3098
3099 * server.c (start_inferior): Code refactor.
3100
51aee833
YQ
31012015-07-24 Yao Qi <yao.qi@linaro.org>
3102
3103 * server.c (process_serial_event): Set general_thread.
3104
af1b22f3
YQ
31052015-07-21 Yao Qi <yao.qi@linaro.org>
3106
3107 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3108 aarch64_linux_get_debug_reg_capacity.
3109
554717a3
YQ
31102015-07-17 Yao Qi <yao.qi@linaro.org>
3111
3112 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3113 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3114 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3115 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3116 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3117 (AARCH64_HWP_ALIGNMENT): Likewise.
3118 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3119 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3120 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3121 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3122 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3123 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3124 (struct aarch64_debug_reg_state): Likewise.
3125 (struct arch_lwp_info): Likewise.
3126 (aarch64_align_watchpoint): Likewise.
3127 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3128 (aarch64_watchpoint_length): Likewise.
3129 (aarch64_point_encode_ctrl_reg): Likewise
3130 (aarch64_point_is_aligned): Likewise.
3131 (aarch64_align_watchpoint): Likewise.
3132 (aarch64_linux_set_debug_regs):
3133 (aarch64_dr_state_insert_one_point): Likewise.
3134 (aarch64_dr_state_remove_one_point): Likewise.
3135 (aarch64_handle_breakpoint): Likewise.
3136 (aarch64_handle_aligned_watchpoint): Likewise.
3137 (aarch64_handle_unaligned_watchpoint): Likewise.
3138 (aarch64_handle_watchpoint): Likewise.
3139
c67ca4de
YQ
31402015-07-17 Yao Qi <yao.qi@linaro.org>
3141
3142 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3143 and don't aarch64_get_debug_reg_state. All callers update.
3144 (aarch64_handle_aligned_watchpoint): Likewise.
3145 (aarch64_handle_unaligned_watchpoint): Likewise.
3146 (aarch64_handle_watchpoint): Likewise.
3147 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3148 (aarch64_remove_point): Likewise.
3149
25abf979
YQ
31502015-07-17 Yao Qi <yao.qi@linaro.org>
3151
3152 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3153 debug_printf.
3154 (aarch64_handle_unaligned_watchpoint): Likewise.
3155
db1ff28b
JK
31562015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3157
3158 Revert the previous 3 commits:
3159 Move gdb_regex* to common/
3160 Move linux_find_memory_regions_full & co.
3161 gdbserver build-id attribute generator
3162
700ca40f
JK
31632015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3164 Jan Kratochvil <jan.kratochvil@redhat.com>
3165
3166 gdbserver build-id attribute generator.
3167 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3168 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3169 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3170 (find_phdr): New.
3171 (get_dynamic): Use find_pdhr to traverse program headers.
3172 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3173 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3174 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3175 (get_hex_build_id): New.
3176 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3177 to reply XML document.
3178
9904185c
JK
31792015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3180 Jan Kratochvil <jan.kratochvil@redhat.com>
3181
3182 * target.c: Include target/target-utils.h and fcntl.h.
3183 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3184 (target_fileio_read_stralloc): New functions.
3185
6e5b4429
JK
31862015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3187
3188 * Makefile.in (OBS): Add gdb_regex.o.
3189 (gdb_regex.o): New.
3190 * config.in: Rebuilt.
3191 * configure: Rebuilt.
3192
ddc98fbf
JK
31932015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3194 Jan Kratochvil <jan.kratochvil@redhat.com>
3195
3196 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3197 * Makefile.in (OBS): Add target-utils.o.
3198 (linux-maps.o, target-utils.o): New.
3199 * configure.srv (srv_linux_obj): Add linux-maps.o.
3200
e57bb7a0
PL
32012015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3202
3203 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3204 function, return 1.
3205 (the_low_target): Install it.
3206
586b02a9
PA
32072015-07-14 Pedro Alves <palves@redhat.com>
3208
3209 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3210 Instead, ignore ECHILD, and throw an error for other errnos.
3211
58c1b36c
PA
32122015-07-10 Pedro Alves <palves@redhat.com>
3213
3214 * event-loop.c (struct callback_event) <data>: Change type to
3215 gdb_client_data instance instead of gdb_client_data pointer.
3216 (append_callback_event): Adjust.
3217
421530db
PL
32182015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3219
3220 * linux-aarch64-low.c: Add comments for each linux_target_ops
3221 method. Remove comments already covered in target_ops and
3222 linux_target_ops definitions.
3223 (the_low_target): Add comments for each unimplemented method.
3224
c2d65f38
YQ
32252015-07-09 Yao Qi <yao.qi@linaro.org>
3226
3227 * linux-aarch64-low.c (aarch64_regmap): Remove.
3228 (aarch64_usrregs_info): Remove.
3229 (regs_info): Set field usrregs to NULL.
3230
b20a6524
MM
32312015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3232
3233 * linux-low.c: Include "rsp-low.h"
3234 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3235 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3236 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3237 (handle_btrace_enable_pt): New.
3238 (handle_btrace_general_set): Support "pt".
3239 (handle_btrace_conf_general_set): Support "pt:size".
3240
96c97461
PL
32412015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3242
3243 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3244 Z_PACKET_SW_BP.
3245
37d66942
PL
32462015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3247
3248 * linux-aarch64-low.c: Remove comment about endianness.
3249 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3250 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3251 memcmp.
3252
dc06243f
GB
32532015-06-24 Gary Benson <gbenson@redhat.com>
3254
3255 * linux-i386-ipa.c (stdint.h): Do not include.
3256 * lynx-i386-low.c (stdint.h): Likewise.
3257 * lynx-ppc-low.c (stdint.h): Likewise.
3258 * mem-break.c (stdint.h): Likewise.
3259 * thread-db.c (stdint.h): Likewise.
3260 * tracepoint.c (stdint.h): Likewise.
3261 * win32-low.c (stdint.h): Likewise.
3262
124e13d9
SM
32632015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3264
3265 * server.c (write_qxfer_response): Update call to
3266 remote_escape_output.
3267
909c2cda
JK
32682015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3269 Jan Kratochvil <jan.kratochvil@redhat.com>
3270
3271 Merge multiple hex conversions.
3272 * gdbreplay.c (tohex): Rename to 'fromhex'.
3273 (logchar): Use fromhex.
3274
24c05f46
JK
32752015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3276
3277 * server.c (handle_qxfer_libraries): Set `version' attribute for
3278 <library-list>.
3279
14d2069a
GB
32802015-06-10 Gary Benson <gbenson@redhat.com>
3281
3282 * target.h (struct target_ops) <multifs_open>: New field.
3283 <multifs_unlink>: Likewise.
3284 <multifs_readlink>: Likewise.
3285 * linux-low.c (nat/linux-namespaces.h): New include.
3286 (linux_target_ops): Initialize the_target->multifs_open,
3287 the_target->multifs_unlink and the_target->multifs_readlink.
3288 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3289 * hostio.c (hostio_fs_pid): New static variable.
3290 (hostio_handle_new_gdb_connection): New function.
3291 (handle_setfs): Likewise.
3292 (handle_open): Use the_target->multifs_open as appropriate.
3293 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3294 (handle_readlink): Use the_target->multifs_readlink as
3295 appropriate.
3296 (handle_vFile): Handle vFile:setfs packets.
3297 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3298 after target_handle_new_gdb_connection.
3299
4b8b5e72
GB
33002015-06-10 Gary Benson <gbenson@redhat.com>
3301
3302 * configure.ac (AC_CHECK_FUNCS): Add setns.
3303 * config.in: Regenerate.
3304 * configure: Likewise.
3305 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3306 (linux-namespaces.o): New rule.
3307 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3308
3ac2e371
GB
33092015-06-09 Gary Benson <gbenson@redhat.com>
3310
3311 * hostio.c (handle_open): Process mode argument with
3312 fileio_to_host_mode.
3313
ca9b78ce
YQ
33142015-06-01 Yao Qi <yao.qi@linaro.org>
3315
3316 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3317 * linux-x86-low.c: Likewise.
3318
bfacd19d
DB
33192015-05-28 Don Breazeal <donb@codesourcery.com>
3320
3321 * linux-low.c (handle_extended_wait): Initialize
3322 thread_info.last_resume_kind for new fork children.
3323
452003ef
PA
33242015-05-15 Pedro Alves <palves@redhat.com>
3325
3326 * target.h (target_handle_new_gdb_connection): Rewrite using if
3327 wrapped in do/while.
3328
1041a03c
JB
33292015-05-14 Joel Brobecker <brobecker@adacore.com>
3330
3331 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3332 * configure, config.in: Regenerate.
3333 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3334 Declare typedef.
3335
c269dbdb
DB
33362015-05-12 Don Breazeal <donb@codesourcery.com>
3337
3338 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3339 PTRACE_EVENT_VFORK_DONE.
3340 (linux_low_ptrace_options, extended_event_reported): Add vfork
3341 events.
3342 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3343 and "vforkdone" for RSP 'T' Stop Reply Packet.
3344 * server.h (report_vfork_events): Declare
3345 global variable.
3346
3a8a0396
DB
33472015-05-12 Don Breazeal <donb@codesourcery.com>
3348
3349 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3350 (the_low_target) <new_fork>: Initialize new member.
3351 * linux-arm-low.c (arm_new_fork): New function.
3352 (the_low_target) <new_fork>: Initialize new member.
3353 * linux-low.c (handle_extended_wait): Call new target function
3354 new_fork.
3355 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3356 * linux-mips-low.c (mips_add_watchpoint): New function
3357 extracted from mips_insert_point.
3358 (the_low_target) <new_fork>: Initialize new member.
3359 (mips_linux_new_fork): New function.
3360 (mips_insert_point): Call mips_add_watchpoint.
3361 * linux-x86-low.c (x86_linux_new_fork): New function.
3362 (the_low_target) <new_fork>: Initialize new member.
3363
de0d863e
DB
33642015-05-12 Don Breazeal <donb@codesourcery.com>
3365
3366 * linux-low.c (handle_extended_wait): Implement return value,
3367 rename argument 'event_child' to 'event_lwp', handle
3368 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3369 (linux_low_ptrace_options): New function.
3370 (linux_low_filter_event): Call linux_low_ptrace_options,
3371 use different argument fo linux_enable_event_reporting,
3372 use return value from handle_extended_wait.
3373 (extended_event_reported): New function.
3374 (linux_wait_1): Call extended_event_reported and set
3375 status to report fork events.
3376 (linux_write_memory): Add pid to debug message.
3377 (reset_lwp_ptrace_options_callback): New function.
3378 (linux_handle_new_gdb_connection): New function.
3379 (linux_target_ops): Initialize new structure member.
3380 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3381 * lynx-low.c: Initialize new structure member.
3382 * remote-utils.c (prepare_resume_reply): Implement stop reason
3383 "fork" for "T" stop message.
3384 * server.c (handle_query): Call handle_new_gdb_connection.
3385 * server.h (report_fork_events): Declare global flag.
3386 * target.h (struct target_ops) <handle_new_gdb_connection>:
3387 New member.
3388 (target_handle_new_gdb_connection): New macro.
3389 * win32-low.c: Initialize new structure member.
3390
ddcbc397
DB
33912015-05-12 Don Breazeal <donb@codesourcery.com>
3392
3393 * mem-break.c (APPEND_TO_LIST): Define macro.
3394 (clone_agent_expr): New function.
3395 (clone_one_breakpoint): New function.
3396 (clone_all_breakpoints): New function.
3397 * mem-break.h: Declare new functions.
3398
89245bc0
DB
33992015-05-12 Don Breazeal <donb@codesourcery.com>
3400
3401 * linux-low.c (linux_supports_fork_events): New function.
3402 (linux_supports_vfork_events): New function.
3403 (linux_target_ops): Initialize new structure members.
3404 (initialize_low): Call linux_check_ptrace_features.
3405 * lynx-low.c (lynx_target_ops): Initialize new structure
3406 members.
3407 * server.c (report_fork_events, report_vfork_events):
3408 New global flags.
3409 (handle_query): Add new features to qSupported packet and
3410 response.
3411 (captured_main): Initialize new global variables.
3412 * target.h (struct target_ops) <supports_fork_events>:
3413 New member.
3414 <supports_vfork_events>: New member.
3415 (target_supports_fork_events): New macro.
3416 (target_supports_vfork_events): New macro.
3417 * win32-low.c (win32_target_ops): Initialize new structure
3418 members.
3419
835205d0
GB
34202015-05-12 Gary Benson <gbenson@redhat.com>
3421
3422 * server.c (handle_qxfer_exec_file): Use current process
3423 if annex is empty.
3424
21e94bd9
SL
34252015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3426
3427 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3428 Remove HAVE_PTRACE_GETREGS conditionals.
3429 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3430 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3431
45614f15
YQ
34322015-05-08 Yao Qi <yao.qi@linaro.org>
3433
3434 * linux-low.c (linux_supports_conditional_breakpoints): New
3435 function.
3436 (linux_target_ops): Install new target method.
3437 * lynx-low.c (lynx_target_ops): Install NULL hook for
3438 supports_conditional_breakpoints.
3439 * nto-low.c (nto_target_ops): Likewise.
3440 * spu-low.c (spu_target_ops): Likewise.
3441 * win32-low.c (win32_target_ops): Likewise.
3442 * server.c (handle_query): Check
3443 target_supports_conditional_breakpoints.
3444 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3445 New field.
3446 (target_supports_conditional_breakpoints): New macro.
3447
80ad801e
PA
34482015-05-06 Pedro Alves <palves@redhat.com>
3449
3450 PR server/18081
3451 * server.c (start_inferior): If the process exits, mourn it.
3452
819843c7
GB
34532015-04-21 Gary Benson <gbenson@redhat.com>
3454
3455 * hostio.c (fileio_open_flags_to_host): Factored out to
3456 fileio_to_host_openflags in common/fileio.c. Single use
3457 updated.
3458
a2d5a9d7
MF
34592015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3460
3461 * linux-xtensa-low.c (xtensa_fill_gregset)
3462 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3463 XCHAL_HAVE_LOOP.
3464
deb44829
MF
34652015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3466
3467 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3468 (regs_info): Replace usrregs pointer with NULL.
3469
e57f1de3
GB
34702015-04-17 Gary Benson <gbenson@redhat.com>
3471
3472 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3473 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3474 * server.c (handle_qxfer_exec_file): New function.
3475 (qxfer_packets): Add exec-file entry.
3476 (handle_query): Report qXfer:exec-file:read as supported packet.
3477
62828379
RN
34782015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3479
3480 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3481
b88bb450
GB
34822015-04-09 Gary Benson <gbenson@redhat.com>
3483
3484 * hostio-errno.c (errno_to_fileio_error): Remove function.
3485 Update caller to use remote_fileio_to_fio_error.
3486
c8f4bfdd
YQ
34872015-04-09 Yao Qi <yao.qi@linaro.org>
3488
3489 * linux-low.c (linux_insert_point): Call
3490 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3491 (linux_remove_point): Call remove_memory_breakpoint if type is
3492 raw_bkpt_type_sw.
3493 * linux-x86-low.c (x86_insert_point): Don't call
3494 insert_memory_breakpoint.
3495 (x86_remove_point): Don't call remove_memory_breakpoint.
3496
41f98f02
PA
34972015-04-01 Pedro Alves <palves@redhat.com>
3498 Cleber Rosa <crosa@redhat.com>
3499
3500 * server.c (gdbserver_usage): Reorganize and extend the usage
3501 message.
3502
2bf6fb9d
PA
35032015-03-24 Pedro Alves <palves@redhat.com>
3504
3505 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3506 output. Also dump TRAP_TRACE.
3507 (linux_low_filter_event): In debug output, distinguish a
3508 resume_stop SIGSTOP from a delayed SIGSTOP.
3509
369f6daa
GB
35102015-03-24 Gary Benson <gbenson@redhat.com>
3511
3512 * linux-x86-low.c (x86_linux_new_thread): Moved to
3513 nat/x86-linux.c.
3514 (x86_linux_prepare_to_resume): Likewise.
3515
8e5d4070
GB
35162015-03-24 Gary Benson <gbenson@redhat.com>
3517
3518 * Makefile.in (x86-linux-dregs.o): New rule.
3519 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3520 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3521 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3522 (x86_linux_dr_get): Likewise.
3523 (x86_linux_dr_set): Likewise.
3524 (update_debug_registers_callback): Likewise.
3525 (x86_linux_dr_set_addr): Likewise.
3526 (x86_linux_dr_get_addr): Likewise.
3527 (x86_linux_dr_set_control): Likewise.
3528 (x86_linux_dr_get_control): Likewise.
3529 (x86_linux_dr_get_status): Likewise.
3530 (x86_linux_update_debug_registers): Likewise.
3531
2b95d440
GB
35322015-03-24 Gary Benson <gbenson@redhat.com>
3533
3534 * linux-x86-low.c (x86_linux_update_debug_registers):
3535 New function, factored out from...
3536 (x86_linux_prepare_to_resume): ...this.
3537
14b0bc68
GB
35382015-03-24 Gary Benson <gbenson@redhat.com>
3539
3540 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3541 (x86_linux_dr_set): Likewise.
3542 (update_debug_registers_callback): Likewise.
3543 (x86_linux_dr_set_addr): Likewise.
3544 (x86_linux_dr_get_addr): Likewise.
3545 (x86_linux_dr_set_control): Likewise.
3546 (x86_linux_dr_get_control): Likewise.
3547 (x86_linux_dr_get_status): Likewise.
3548 (x86_linux_prepare_to_resume): Likewise.
3549
5dfe6ca8
GB
35502015-03-24 Gary Benson <gbenson@redhat.com>
3551
3552 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3553 Use perror_with_name. Pass string through gettext.
3554 (x86_linux_dr_set): Likewise.
3555
d33472ad
GB
35562015-03-24 Gary Benson <gbenson@redhat.com>
3557
3558 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3559 (x86_linux_dr_set_addr): ...this.
3560 (x86_dr_low_get_addr): Rename to...
3561 (x86_linux_dr_get_addr): ...this.
3562 (x86_dr_low_set_control): Rename to...
3563 (x86_linux_dr_set_control): ...this.
3564 (x86_dr_low_get_control): Rename to...
3565 (x86_linux_dr_get_control): ...this.
3566 (x86_dr_low_get_status): Rename to...
3567 (x86_linux_dr_get_status): ...this.
3568 (x86_dr_low): Update with new function names.
3569
4b134ca1
GB
35702015-03-24 Gary Benson <gbenson@redhat.com>
3571
3572 * Makefile.in (x86-linux.o): New rule.
3573 * configure.srv: Add x86-linux.o to relevant targets.
3574 * linux-low.c (lwp_set_arch_private_info): New function.
3575 (lwp_arch_private_info): Likewise.
3576 * linux-x86-low.c: Include nat/x86-linux.h.
3577 (arch_lwp_info): Removed structure.
3578 (update_debug_registers_callback):
3579 Use lwp_set_debug_registers_changed.
3580 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3581 and lwp_set_debug_registers_changed.
3582 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3583
34c703da
GB
35842015-03-24 Gary Benson <gbenson@redhat.com>
3585
3586 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3587 * linux-arm-low.c (arm_new_thread): Likewise.
3588 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3589 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3590 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3591 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3592
cff068da
GB
35932015-03-24 Gary Benson <gbenson@redhat.com>
3594
3595 * linux-low.c (ptid_of_lwp): New function.
3596 (lwp_is_stopped): Likewise.
3597 (lwp_stop_reason): Likewise.
3598 * linux-x86-low.c (update_debug_registers_callback):
3599 Use lwp_is_stopped.
3600 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3601 lwp_stop_reason.
3602
b2f7c7e8
GB
36032015-03-24 Gary Benson <gbenson@redhat.com>
3604
3605 * linux-low.h (linux_stop_lwp): Remove declaration.
3606
6d4ee8c6
GB
36072015-03-24 Gary Benson <gbenson@redhat.com>
3608
3609 * linux-low.h: Include nat/linux-nat.h.
3610 * linux-low.c (iterate_over_lwps_args): New structure.
3611 (iterate_over_lwps_filter): New function.
3612 (iterate_over_lwps): Likewise.
3613 * linux-x86-low.c (update_debug_registers_callback):
3614 Update signature to what iterate_over_lwps expects.
3615 Remove PID check that iterate_over_lwps now performs.
3616 (x86_dr_low_set_addr): Use iterate_over_lwps.
3617 (x86_dr_low_set_control): Likewise.
3618
70a0bb6b
GB
36192015-03-24 Gary Benson <gbenson@redhat.com>
3620
3621 * linux-x86-low.c (x86_debug_reg_state): New function.
3622 (x86_linux_prepare_to_resume): Use the above.
3623
7b669087
GB
36242015-03-24 Gary Benson <gbenson@redhat.com>
3625
3626 * linux-low.c (current_lwp_ptid): New function.
3627 * linux-x86-low.c: Include nat/linux-nat.h.
3628 (x86_dr_low_get_addr): Use current_lwp_ptid.
3629 (x86_dr_low_get_control): Likewise.
3630 (x86_dr_low_get_status): Likewise.
3631
eef49a3d
PA
36322015-03-20 Pedro Alves <palves@redhat.com>
3633
3634 * tracepoint.c (cmd_qtstatus): Make "str" const.
3635
b2333d22
PA
36362015-03-20 Pedro Alves <palves@redhat.com>
3637
3638 * server.c (handle_general_set): Make "req_str" const.
3639
23f238d3
PA
36402015-03-19 Pedro Alves <palves@redhat.com>
3641
3642 * linux-low.c (linux_resume_one_lwp): Rename to ...
3643 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3644 instead call perror_with_name.
3645 (check_ptrace_stopped_lwp_gone): New function.
3646 (linux_resume_one_lwp): Reimplement as wrapper around
3647 linux_resume_one_lwp_throw that swallows errors if the LWP is
3648 gone.
3649
91baf43f
PA
36502015-03-19 Pedro Alves <palves@redhat.com>
3651
3652 * linux-low.c (count_events_callback, select_event_lwp_callback):
3653 No longer check whether the thread has resume_stop as last resume
3654 kind.
3655
8bf3b159
PA
36562015-03-19 Pedro Alves <palves@redhat.com>
3657
3658 * linux-low.c (count_events_callback, select_event_lwp_callback):
3659 Use the lwp's status_pending_p field, not the thread's.
3660
b90fc188
PA
36612015-03-19 Pedro Alves <palves@redhat.com>
3662
3663 * linux-low.c (select_event_lwp_callback): Update comments to
3664 no longer mention SIGTRAP.
3665
464b0089
GB
36662015-03-18 Gary Benson <gbenson@redhat.com>
3667
3668 * server.c (handle_query): Do not report vFile:fstat as supported.
3669
aa9e327f
GB
36702015-03-11 Gary Benson <gbenson@redhat.com>
3671
3672 * hostio.c (sys/types.h): New include.
3673 (sys/stat.h): Likewise.
3674 (common-remote-fileio.h): Likewise.
3675 (handle_fstat): New function.
3676 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 3677
791c0056
GB
36782015-03-11 Gary Benson <gbenson@redhat.com>
3679
3680 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3681 struct stat.st_blocks and struct stat.st_blksize.
3682 * configure: Regenerate.
3683 * config.in: Likewise.
3684 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3685 (OBS): Add common-remote-fileio.o.
3686 (common-remote-fileio.o): New rule.
3687
9a9df970
PA
36882015-03-09 Pedro Alves <palves@redhat.com>
3689
3690 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3691 'struct sockaddr' pointer in 'accept' call.
3692
9eb1356e
PA
36932015-03-09 Pedro Alves <palves@redhat.com>
3694
3695 Revert:
3696 2015-03-07 Pedro Alves <palves@redhat.com>
3697 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3698 or <winsock2.h> here. Instead include "gdb_socket.h".
3699 (remote_open): Use union gdb_sockaddr_u.
3700 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3701 or <winsock2.h> here. Instead include "gdb_socket.h".
3702 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3703 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3704 or <sys/un.h>.
3705 (init_named_socket, gdb_agent_helper_thread): Use union
3706 gdb_sockaddr_u.
3707
aac331e4
PA
37082015-03-07 Pedro Alves <palves@redhat.com>
3709
3710 * configure.ac (build_warnings): Move
3711 -Wdeclaration-after-statement to the C-specific set.
3712 * configure: Regenerate.
3713
366c75fc
PA
37142015-03-07 Pedro Alves <palves@redhat.com>
3715
3716 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3717 or <winsock2.h> here. Instead include "gdb_socket.h".
3718 (remote_open): Use union gdb_sockaddr_u.
3719 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3720 or <winsock2.h> here. Instead include "gdb_socket.h".
3721 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3722 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3723 or <sys/un.h>.
3724 (init_named_socket, gdb_agent_helper_thread): Use union
3725 gdb_sockaddr_u.
3726
492d29ea
PA
37272015-03-07 Pedro Alves <palves@redhat.com>
3728
3729 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3730 instead.
3731
60a191ed
YQ
37322015-03-06 Yao Qi <yao.qi@linaro.org>
3733
3734 * linux-aarch64-low.c (aarch64_insert_point): Use
3735 show_debug_regs as a boolean.
3736 (aarch64_remove_point): Likewise.
3737
f5771b1d
PA
37382015-03-05 Pedro Alves <palves@redhat.com>
3739
3740 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3741 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3742 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3743 * nto-low.c (nto_target_ops): Likewise.
3744 * spu-low.c (spu_target_ops): Likewise.
3745 * win32-low.c (win32_target_ops): Likewise.
3746
3e572f71
PA
37472015-03-04 Pedro Alves <palves@redhat.com>
3748
72f4393d 3749 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
3750 Decide whether a breakpoint triggered based on the SIGTRAP's
3751 siginfo.si_code.
72f4393d
L
3752 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3753 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
3754 (linux_low_filter_event): Check for breakpoints before checking
3755 watchpoints.
3756 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3757 siginfo.si_code.
72f4393d
L
3758 (linux_stopped_by_sw_breakpoint)
3759 (linux_supports_stopped_by_sw_breakpoint)
3760 (linux_stopped_by_hw_breakpoint)
3761 (linux_supports_stopped_by_hw_breakpoint): New functions.
3762 (linux_target_ops): Install new target methods.
3e572f71 3763
1ec68e26
PA
37642015-03-04 Pedro Alves <palves@redhat.com>
3765
3766 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3767 * server.c (swbreak_feature, hwbreak_feature): New globals.
3768 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3769 (captured_main): Clear swbreak_feature and hwbreak_feature.
3770 * server.h (swbreak_feature, hwbreak_feature): Declare.
3771 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3772 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3773 supports_stopped_by_hw_breakpoint>: New fields.
3774 (target_supports_stopped_by_sw_breakpoint)
3775 (target_stopped_by_sw_breakpoint)
3776 (target_supports_stopped_by_hw_breakpoint)
3777 (target_stopped_by_hw_breakpoint): Declare.
3778
15c66dd6
PA
37792015-03-04 Pedro Alves <palves@redhat.com>
3780
3781 enum lwp_stop_reason -> enum target_stop_reason
3782 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3783 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3784 (linux_wait_1, stuck_in_jump_pad_callback)
3785 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3786 (linux_stopped_by_watchpoint):
3787 * linux-low.h (enum lwp_stop_reason): Delete.
3788 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3789 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3790
98fc70d6
YQ
37912015-03-04 Yao Qi <yao.qi@linaro.org>
3792
3793 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3794
dd2ac174
GB
37952015-03-03 Gary Benson <gbenson@redhat.com>
3796
3797 * hostio.c (handle_vFile): Fix prefix lengths.
3798
d68e53f4
MM
37992015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3800
3801 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3802 ptr_bits.
3803
bf2d68ab
AA
38042015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3805
3806 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3807 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3808 (clean): Add "rm -f" for above C files.
3809 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3810 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3811 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3812 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3813 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3814 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3815 (init_registers_s390x_vx_linux64)
3816 (init_registers_s390x_tevx_linux64)
3817 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3818 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3819 declarations.
3820 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3821 (s390_store_vxrs_high): New functions.
3822 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3823 NT_S390_VXRS_HIGH.
3824 (s390_arch_setup): Add logic for selecting one of the new target
3825 descriptions. Activate the new vector regsets if applicable.
3826 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3827 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3828 and init_registers_s390x_tevx_linux64.
3829
c966a859
PA
38302015-03-01 Pedro Alves <palves@redhat.com>
3831
3832 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3833 parameter.
3834
4180215b
PA
38352015-02-27 Pedro Alves <palves@redhat.com>
3836
3837 * linux-x86-low.c (u_debugreg_offset): New function.
3838 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3839
749bab01
PA
38402015-02-27 Pedro Alves <palves@redhat.com>
3841
3842 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3843 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3844 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3845 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3846 (ps_lsetfpregs, ps_getpid)
3847 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3848 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3849 (ps_lsetxregs, ps_plog): Declare.
3850
3c14e5a3
PA
38512015-02-27 Pedro Alves <palves@redhat.com>
3852
3853 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3854 IP_AGENT_EXPORT_FUNC.
3855 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3856 IP_AGENT_EXPORT_FUNC.
3857 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3858 (IP_AGENT_EXPORT): Delete.
3859 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3860 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3861 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3862 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3863 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3864 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3865 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3866 (traceframe_read_count, traceframe_write_count)
3867 (traceframes_created, trace_state_variables, get_raw_reg)
3868 (get_trace_state_variable_value, set_trace_state_variable_value)
3869 (ust_loaded, helper_thread_id, cmd_buf): Use
3870 IPA_SYM_EXPORTED_NAME.
3871 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3872 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3873 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3874 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3875 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3876 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3877 EXTERN_C_PUSH/EXTERN_C_POP.
3878 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3879 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3880 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3881 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3882 (traceframe_write_count, traceframe_read_count)
3883 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3884 (about_to_request_buffer_space, get_trace_state_variable_value)
3885 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3886 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3887 EXTERN_C_PUSH/EXTERN_C_POP.
3888 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3889 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3890 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3891 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3892 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3893 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3894 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3895 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3896 Define.
3897 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3898 (IP_AGENT_EXPORT_VAR_DECL): Define.
3899 (tracing): Declare.
3900 (gdb_agent_get_raw_reg): Declare.
3901
fe978cb0
PA
39022015-02-27 Tom Tromey <tromey@redhat.com>
3903 Pedro Alves <palves@redhat.com>
3904
3905 Rename symbols whose names are reserved C++ keywords throughout.
3906
3bc3d82a
PA
39072015-02-27 Pedro Alves <palves@redhat.com>
3908
3909 * Makefile.in (COMPILER): New, get it from autoconf.
3910 (CXX): Get from autoconf instead.
3911 (COMPILE.pre): Use COMPILER.
3912 (CC-LD): Rename to ...
3913 (CC_LD): ... this. Use COMPILER.
3914 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3915 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3916 * acinclude.m4: Include build-with-cxx.m4.
3917 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3918 Disable -Werror by default if building in C++ mode.
3919 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3920 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3921 the C++ compiler. Save/restore CXXFLAGS too.
3922 * configure: Regenerate.
3923
07697489
PA
39242015-02-27 Pedro Alves <palves@redhat.com>
3925
3926 * acinclude.m4: Include libiberty.m4.
3927 * configure.ac: Call libiberty_INIT.
3928 * config.in, configure: Regenerate.
3929
9beb7c4e
PA
39302015-02-26 Pedro Alves <palves@redhat.com>
3931
3932 * linux-low.c (linux_wait_1): When incrementing the PC past a
3933 program breakpoint always use the_low_target.breakpoint_len as
3934 increment, rather than the maximum between that and
3935 the_low_target.decr_pc_after_break.
3936
8090aef2
PA
39372015-02-23 Pedro Alves <palves@redhat.com>
3938
3939 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3940 thread was doing a step-over; always adjust the PC if
3941 we stepped over a permanent breakpoint.
3942 (linux_wait_1): If we stepped over breakpoint that was on top of a
3943 permanent breakpoint, manually advance the PC past it.
3944
bc9540e8
PA
39452015-02-23 Pedro Alves <palves@redhat.com>
3946
3947 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3948 modes.
3949 (x86_fill_gregset, x86_store_gregset): Use it when handling
3950 $orig_eax.
3951
2db9a427
PA
39522015-02-20 Pedro Alves <palves@redhat.com>
3953
3954 * thread-db.c: Include "nat/linux-procfs.h".
3955 (thread_db_init): Skip listing new threads if the kernel supports
3956 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3957
afa8d396
PA
39582015-02-20 Pedro Alves <palves@redhat.com>
3959
3960 * linux-low.c (status_pending_p_callback): Use ptid_match.
3961
c9587f88
AT
39622015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3963
3964 PR breakpoints/16812
3965 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3966 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3967 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3968
b05ec7a5
AT
39692015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3970
3971 PR breakpoints/15956
3972 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3973
d33501a5
MM
39742015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3975
3976 * linux-low.c (linux_low_btrace_conf): Print size.
3977 * server.c (handle_btrace_conf_general_set): New.
3978 (hanle_general_set): Call handle_btrace_conf_general_set.
3979 (handle_query): Report Qbtrace-conf:bts:size as supported.
3980
f4abbc16
MM
39812015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3982
3983 * linux-low.c (linux_low_enable_btrace): Update parameters.
3984 (linux_low_btrace_conf): New.
3985 (linux_target_ops)<to_btrace_conf>: Initialize.
3986 * server.c (current_btrace_conf): New.
3987 (handle_btrace_enable): Rename to ...
3988 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3989 to target_enable_btrace. Update comment. Update users.
3990 (handle_qxfer_btrace_conf): New.
3991 (qxfer_packets): Add btrace-conf entry.
3992 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3993 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3994 (target_ops)<read_btrace_conf>: New.
3995 (target_enable_btrace): Update parameters.
3996 (target_read_btrace_conf): New.
3997
043c3577
MM
39982015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3999
4000 * server.c (handle_btrace_general_set): Remove call to
4001 target_supports_btrace.
4002 (supported_btrace_packets): New.
4003 (handle_query): Call supported_btrace_packets.
4004 * target.h: include btrace-common.h.
4005 (btrace_target_info): Removed.
4006 (supports_btrace, target_supports_btrace): Update parameters.
4007
734b0e4b
MM
40082015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4009
4010 * Makefile.in (SFILES): Add common/btrace-common.c.
4011 (OBS): Add common/btrace-common.o.
4012 (btrace-common.o): Add build rules.
4013 * linux-low: Include btrace-common.h.
4014 (linux_low_read_btrace): Use struct btrace_data. Call
4015 btrace_data_init and btrace_data_fini.
4016
d6c146e9
PA
40172015-02-06 Pedro Alves <palves@redhat.com>
4018
4019 * thread-db.c (find_new_threads_callback): Add debug output.
4020
20ba1ce6
PA
40212015-02-04 Pedro Alves <palves@redhat.com>
4022
4023 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4024 (resume_stopped_resumed_lwps): New function.
4025 (linux_wait_for_event_filtered): Use it.
4026
8cc73a39
SDJ
40272015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4028
4029 * Makefile.in (SFILES): Add linux-personality.c.
4030 (linux-personality.o): New rule.
4031 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4032 list of objects to be built.
4033 * linux-low.c: Include nat/linux-personality.h.
4034 (linux_create_inferior): Remove code to disable address space
4035 randomization (moved to ../nat/linux-personality.c). Create
4036 cleanup to disable address space randomization.
4037
fb23d554
SDJ
40382015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4039
4040 * Makefile.in (posix-strerror.o): New rule.
4041 (mingw-strerror.o): Likewise.
4042 * configure: Regenerated.
4043 * configure.ac: Source file ../common/common.host. Initialize new
4044 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4045
cdf43629
YQ
40462015-01-14 Yao Qi <yao@codesourcery.com>
4047
4048 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4049 (ppc-linux.o): New rule.
4050 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4051 * configure.ac: AC_CHECK_FUNCS(getauxval).
4052 * config.in: Re-generated.
4053 * configure: Re-generated.
4054 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4055 ppc64_64bit_inferior_p
4056
514c5338
YQ
40572015-01-14 Yao Qi <yao@codesourcery.com>
4058
4059 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4060 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4061 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4062 (PT_ORIG_R3, PT_TRAP): Likewise.
4063 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4064 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4065 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4066
3368c1e5
JB
40672015-01-10 Joel Brobecker <brobecker@adacore.com>
4068
4069 * i387-fp.c (i387_cache_to_xsave): In look over
4070 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4071 zmmh_low_space field by use of zmmh_high_space.
4072
582511be
PA
40732015-01-09 Pedro Alves <palves@redhat.com>
4074
4075 * linux-low.c (step_over_bkpt): Move higher up in the file.
4076 (handle_extended_wait): Don't store the stop_pc here.
4077 (get_stop_pc): Adjust comments and rename to ...
4078 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4079 stopped for a software breakpoint or hardware breakpoint.
4080 (thread_still_has_status_pending_p): New function.
4081 (status_pending_p_callback): Use
4082 thread_still_has_status_pending_p. If the event is no longer
4083 interesting, resume the LWP.
4084 (handle_tracepoints): Add assert.
4085 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4086 (wstatus_maybe_breakpoint): New function.
4087 (cancel_breakpoint): Delete function.
4088 (check_stopped_by_watchpoint): New function, factored out from
4089 linux_low_filter_event.
4090 (lp_status_maybe_breakpoint): Delete function.
4091 (linux_low_filter_event): Remove filter_ptid argument.
4092 Leave thread group exits pending here. Store the LWP's stop PC.
4093 Always leave events pending.
4094 (linux_wait_for_event_filtered): Pull all events out of the
4095 kernel, and leave them all pending.
4096 (count_events_callback, select_event_lwp_callback): Consider all
4097 events.
4098 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4099 (select_event_lwp): Only give preference to the stepping LWP in
4100 all-stop mode. Adjust comments.
4101 (ignore_event): New function.
4102 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4103 references to cancel_breakpoints. Adjust to renames. Also give
4104 equal priority to all LWPs that have had events in non-stop mode.
4105 If reporting a software breakpoint event, unadjust the LWP's PC.
4106 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4107 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4108 Adjust.
4109 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4110 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4111 (linux_stopped_by_watchpoint): Adjust.
4112 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4113 * linux-low.h (enum lwp_stop_reason): New.
4114 (struct lwp_info) <stop_pc>: Adjust comment.
4115 <stopped_by_watchpoint>: Delete field.
4116 <stop_reason>: New field.
4117 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4118 * mem-break.c (software_breakpoint_inserted_here)
4119 (hardware_breakpoint_inserted_here): New function.
4120 * mem-break.h (software_breakpoint_inserted_here)
4121 (hardware_breakpoint_inserted_here): Declare.
4122 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4123 (cancel_breakpoints): Delete.
4124 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4125 (upload_fast_traceframes): Remove references to
4126 cancel_breakpoints.
4127
a33e3959
PA
41282015-01-09 Pedro Alves <palves@redhat.com>
4129
4130 * thread-db.c (find_new_threads_callback): Ignore thread if the
4131 kernel thread ID is -1.
4132
8784d563
PA
41332015-01-09 Pedro Alves <palves@redhat.com>
4134
4135 * linux-low.c (linux_attach_fail_reason_string): Move to
4136 nat/linux-ptrace.c, and rename.
4137 (linux_attach_lwp): Update comment.
4138 (attach_proc_task_lwp_callback): New function.
4139 (linux_attach): Adjust to rename and use
4140 linux_proc_attach_tgid_threads.
4141 (linux_attach_fail_reason_string): Delete declaration.
4142
76f2b779
JB
41432015-01-01 Joel Brobecker <brobecker@adacore.com>
4144
4145 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4146 * server.c (gdbserver_version): Likewise.
4147
fafcc06a
SDJ
41482014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4149
4150 * remote-utils.c: Include ctype.h.
4151 (input_interrupt): Explicitly handle the case when the char
4152 received is the NUL byte. Improve the printing of non-ASCII
4153 characters.
4154
beed38b8
JB
41552014-12-16 Joel Brobecker <brobecker@adacore.com>
4156
4157 * linux-low.c (linux_low_filter_event): Update call to
4158 linux_enable_event_reporting following the addition of
4159 a new parameter to that function.
4160
bf330350
CU
41612014-12-16 Catalin Udma <catalin.udma@freescale.com>
4162
4163 PR server/17457
4164 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4165 (AARCH64_FPCR_REGNO): Likewise.
4166 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4167 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4168 (aarch64_store_fpregset): Likewise.
4169
5227d625
JB
41702014-12-15 Joel Brobecker <brobecker@adacore.com>
4171
4172 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4173 Remove FIXME comment about assumption about N.
4174
f93b65a0
JB
41752014-12-13 Joel Brobecker <brobecker@adacore.com>
4176
4177 * configure.ac: If large-file support is disabled in GDBserver,
4178 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4179 * configure: Regenerate.
4180
e5a9158d
AA
41812014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4182
4183 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4184 warning upon ENODATA from ptrace.
4185 * linux-s390-low.c (s390_store_tdb): New.
4186 (s390_regsets): Add regset for NT_S390_TDB.
4187
feea5f36
AA
41882014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4189
4190 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4191 without a fill_function.
4192 * linux-s390-low.c (s390_fill_last_break): Remove.
4193 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4194 (s390_arch_setup): Use regset's size instead of fill_function for
4195 loop end condition.
4196
098dbe61
AA
41972014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4198
4199 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4200 the regset's store function when ptrace returned an error.
4201 * regcache.c (get_thread_regcache): Invalidate register cache
4202 before fetching inferior's registers.
4203
28eef672
AA
42042014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4205
4206 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4207 while-loop as for-loop.
4208 (regsets_store_inferior_registers): Likewise.
4209
bdca27a2
YQ
42102014-11-28 Yao Qi <yao@codesourcery.com>
4211
4212 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4213 * config.in, configure: Re-generate.
4214 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4215 is defined.
4216
9c232dda
YQ
42172014-11-21 Yao Qi <yao@codesourcery.com>
4218
4219 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4220 (AC_CHECK_HEADERS): Remove malloc.h.
4221 * configure: Re-generated.
4222 * config.in: Re-generated.
4223 * server.h: Don't include alloca.h and malloc.h.
4224 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4225 Don't include malloc.h.
4226
43968415
JB
42272014-11-17 Joel Brobecker <brobecker@adacore.com>
4228
4229 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4230 corresponding ERRNO check in same block.
4231
40e91bc7
PA
42322014-11-12 Pedro Alves <palves@redhat.com>
4233
4234 * server.c (cont_thread): Update comment.
4235 (start_inferior, attach_inferior): No longer clear cont_thread.
4236 (handle_v_cont): No longer set cont_thread.
4237 (captured_main): Clear cont_thread each time a GDB connects.
4238
c2c118cf
PA
42392014-11-12 Pedro Alves <palves@redhat.com>
4240
4241 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4242 thread, and don't resume all threads if the Hc thread has exited.
4243
78708b7c
PA
42442014-11-12 Pedro Alves <palves@redhat.com>
4245
4246 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4247 the process group instead of to a specific LWP.
4248
a2abc7de
PA
42492014-10-15 Pedro Alves <palves@redhat.com>
4250
4251 PR server/17487
4252 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4253 parameter.
4254 (arm_set_thread_context): Delete.
4255 (the_low_target): Adjust.
4256 * win32-i386-low.c (debug_registers_changed)
4257 (debug_registers_used): Delete.
4258 (update_debug_registers_callback): New function.
4259 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4260 needing to update their debug registers.
4261 (win32_get_current_dr): New function.
4262 (x86_dr_low_get_addr, x86_dr_low_get_control)
4263 (x86_dr_low_get_status): Fetch the debug register from the thread
4264 record's context.
4265 (i386_initial_stuff): Adjust.
4266 (i386_get_thread_context): Remove current_event parameter. Don't
4267 clear debug_registers_changed nor copy DR values to
4268 debug_reg_state.
4269 (i386_set_thread_context): Delete.
4270 (i386_prepare_to_resume): New function.
4271 (i386_thread_added): Mark the thread as needing to update irs
4272 debug registers.
4273 (the_low_target): Remove i386_set_thread_context and install
4274 i386_prepare_to_resume.
4275 * win32-low.c (win32_get_thread_context): Adjust.
4276 (win32_set_thread_context): Use SetThreadContext
4277 directly.
4278 (win32_prepare_to_resume): New function.
4279 (win32_require_context): New function, factored out from ...
4280 (thread_rec): ... this.
4281 (continue_one_thread): Call win32_prepare_to_resume on each thread
4282 we're about to continue.
4283 (win32_resume): Call win32_prepare_to_resume on the event thread.
4284 * win32-low.h (struct win32_thread_info)
4285 <debug_registers_changed>: New field.
4286 (struct win32_target_ops): Change prototype of set_thread_context,
4287 delete set_thread_context and add prepare_to_resume.
4288 (win32_require_context): New declaration.
4289
a442d071
GB
42902014-10-08 Gary Benson <gbenson@redhat.com>
4291
4292 * server.h: Do not include common-exceptions.h.
4293
6f1947e8
GB
42942014-10-08 Gary Benson <gbenson@redhat.com>
4295
4296 * server.h: Do not include cleanups.h.
4297
63b434a4
JH
42982014-09-30 James Hogan <james.hogan@imgtec.com>
4299
4300 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4301 mips64-dsp-linux.c.
4302
c4d9ceb6
YQ
43032014-09-23 Yao Qi <yao@codesourcery.com>
4304
4305 * linux-low.c (lp_status_maybe_breakpoint): New function.
4306 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4307 (count_events_callback): Likewise.
4308 (select_event_lwp_callback): Likewise.
4309 (cancel_breakpoints_callback): Likewise.
4310
89a5711c
DB
43112014-09-19 Don Breazeal <donb@codesourcery.com>
4312
4313 * linux-low.c (handle_extended_wait): Call
4314 linux_ptrace_get_extended_event.
4315 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4316 linux_is_extended_waitstatus.
4317
bffc0964
JB
43182014-09-16 Joel Brobecker <brobecker@adacore.com>
4319
4320 * Makefile.in (CPPFLAGS): Define.
4321 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4322 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4323
0bfdf32f
GB
43242014-09-16 Gary Benson <gbenson@redhat.com>
4325
4326 * inferiors.h (current_inferior): Renamed as...
4327 (current_thread): New variable. All uses updated.
4328 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4329 (maybe_move_out_of_jump_pad): Likewise.
4330 (cancel_breakpoint): Likewise.
4331 (linux_low_filter_event): Likewise.
4332 (wait_for_sigstop): Likewise.
4333 (linux_resume_one_lwp): Likewise.
4334 (need_step_over_p): Likewise.
4335 (start_step_over): Likewise.
4336 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4337 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4338 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4339 and save_inferior as saved_thread.
4340 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4341 saved_thread.
4342 (regcache_invalidate_thread): Likewise.
4343 * remote-utils.c (prepare_resume_reply): Likewise.
4344 * thread-db.c (thread_db_get_tls_address): Likewise.
4345 (disable_thread_event_reporting): Likewise.
4346 (remove_thread_event_breakpoints): Likewise.
4347 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4348 as saved_thread.
4349 * target.h (set_desired_inferior): Renamed as...
4350 (set_desired_thread): New declaration. All uses updated.
4351 * server.c (myresume): Updated comment to reference thread instead
4352 of inferior.
4353 (handle_serial_event): Likewise.
4354 (handle_target_event): Likewise.
4355
361c8ade
GB
43562014-09-12 Tom Tromey <tromey@redhat.com>
4357 Gary Benson <gbenson@redhat.com>
4358
4359 * regcache.h: Include common-regcache.h.
4360 (regcache_read_pc): Don't declare.
4361 * regcache.c (get_thread_regcache_for_ptid): New function.
4362
bd9269f7
GB
43632014-09-11 Tom Tromey <tromey@redhat.com>
4364 Gary Benson <gbenson@redhat.com>
4365
4366 * symbol.c: New file.
4367 * Makefile.in (SFILES): Add symbol.c.
4368 (OBS): Add symbol.o.
4369
f8c1d06b
GB
43702014-09-11 Gary Benson <gbenson@redhat.com>
4371
4372 * target.c (target_stop_ptid, target_continue_ptid): New
4373 functions.
4374
721ec300
GB
43752014-09-11 Tom Tromey <tromey@redhat.com>
4376 Gary Benson <gbenson@redhat.com>
4377
4378 * target.h: Include target/target.h.
4379 * target.c (target_read_memory, target_read_uint32)
4380 (target_write_memory): New functions.
4381
c5e92cca
GB
43822014-09-11 Gary Benson <gbenson@redhat.com>
4383
4384 * server.h (debug_hw_points): Don't declare.
4385 * server.c (debug_hw_points): Don't define. Replace all uses
4386 with show_debug_regs.
4387 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4388 all uses with show_debug_regs.
4389
2e4bb98a
EBM
43902014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4391
4392 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4393 endianness into account.
4394 (ppc_supply_ptrace_register): Likewise.
4395
ac740bc7
JH
43962014-09-03 James Hogan <james.hogan@imgtec.com>
4397
4398 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4399 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4400
97ea6506
GB
44012014-09-03 Gary Benson <gbenson@redhat.com>
4402
4403 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4404 ALL_DEBUG_ADDRESS_REGISTERS.
4405
df7e5265
GB
44062014-09-02 Gary Benson <gbenson@redhat.com>
4407
4408 * i386-low.h: Renamed as...
4409 * x86-low.h: New file. All type, function and variable name
4410 prefixes changed from "i386_" to "x86_". All references updated.
4411 * i386-low.c: Renamed as...
4412 * x86-low.c: New file. All type, function and variable name
4413 prefixes changed from "i386_" to "x86_". All references updated.
4414
ed859da7
GB
44152014-09-02 Gary Benson <gbenson@redhat.com>
4416
4417 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4418 (x86_linux_new_thread): Likewise.
4419
860789c7
GB
44202014-08-29 Gary Benson <gbenson@redhat.com>
4421
4422 * server.h (setjmp.h): Do not include.
4423 (toplevel): Do not declare.
4424 (common-exceptions.h): Include.
4425 (cleanups.h): Likewise.
4426 * server.c (toplevel): Do not define.
4427 (exit_code): New static global.
4428 (detach_or_kill_for_exit_cleanup): New function.
4429 (main): New function. Original main renamed to...
4430 (captured_main): New function.
4431 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4432
ff55e1b5
GB
44332014-08-29 Gary Benson <gbenson@redhat.com>
4434
4435 * Makefile.in (SFILES): Add common/common-exceptions.c.
4436 (OBS): Add common-exceptions.o.
4437 (common-exceptions.o): New rule.
4438 * utils.c (prepare_to_throw_exception): New function.
4439
e9bcb658
GB
44402014-08-29 Gary Benson <gbenson@redhat.com>
4441
4442 * config.in: Regenerate.
4443 * configure: Likewise.
4444
e3180625
GB
44452014-08-29 Gary Benson <gbenson@redhat.com>
4446
4447 * Makefile.in (SFILES): Add common/cleanups.c.
4448 (OBS): cleanups.o.
4449 (cleanups.o): New rule.
4450
e3d6ba5d
GB
44512014-08-29 Gary Benson <gbenson@redhat.com>
4452
4453 * utils.c (internal_vwarning): New function.
4454
7096e886
GB
44552014-08-28 Gary Benson <gbenson@redhat.com>
4456
4457 * utils.h (fatal): Remove declaration.
4458 * utils.c (fatal): Remove function.
4459
14ce3192
GB
44602014-08-28 Gary Benson <gbenson@redhat.com>
4461
4462 * tracepoint.c (gdb_agent_init): Replace fatal with
4463 perror_with_name.
4464 (initialize_tracepoint): Likewise.
4465
50278d59
GB
44662014-08-28 Gary Benson <gbenson@redhat.com>
4467
4468 * remote-utils.c (remote_prepare): Replace fatal with error.
4469
aa96c426
GB
44702014-08-28 Gary Benson <gbenson@redhat.com>
4471
4472 * linux-low.c (linux_async): Replace fatal with warning.
4473 Tidy up and return.
4474 (linux_start_non_stop): Return -1 if linux_async failed.
4475
f7160e97
GB
44762014-08-28 Gary Benson <gbenson@redhat.com>
4477
4478 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4479 gdb_assert.
4480 (i386_dr_low_get_addr): Remove vague comment.
4481 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4482 gdb_assert.
4483
38e08fca
GB
44842014-08-28 Gary Benson <gbenson@redhat.com>
4485
4486 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4487 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4488 internal_error.
4489 (linux_resume_one_lwp): Likewise.
4490 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4491 gdb_assert.
4492 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4493 with internal_error.
4494 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4495 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4496 (find_register_by_name): Replace fatal with internal_error.
4497 (find_regno): Likewise.
4498 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4499 * thread-db.c (thread_db_create_event): Likewise.
4500 (thread_db_load_search): Likewise.
4501 (try_thread_db_load_1): Likewise.
4502 * tracepoint.c (get_jump_space_head): Replace fatal with
4503 internal_error.
4504 (claim_trampoline_space): Likewise.
4505 (have_fast_tracepoint_trampoline_buffer): Likewise.
4506 (cmd_qtstart): Likewise.
4507 (stop_tracing): Likewise.
4508 (fast_tracepoint_collecting): Likewise.
4509 (target_malloc): Likewise.
4510 (download_tracepoint): Likewise.
4511 (download_trace_state_variables): Replace check with gdb_assert.
4512 (upload_fast_traceframes): Replace fatal with internal_error.
4513
34abf635
GB
45142014-08-19 Tom Tromey <tromey@redhat.com>
4515 Gary Benson <gbenson@redhat.com>
4516
4517 * Makefile.in (SFILES): Add common/common-debug.c.
4518 (OBS): Add common-debug.o.
4519 (common-debug.o): New rule.
4520 * debug.h (debug_printf): Don't declare.
4521 * debug.c (debug_printf): Renamed and rewritten as...
4522 (debug_vprintf): New function.
4523
f6e94d78
GB
45242014-08-19 Gary Benson <gbenson@redhat.com>
4525
4526 * utils.h: Do not include print-utils.h.
4527
9239eeab
GB
45282014-08-19 Tom Tromey <tromey@redhat.com>
4529 Gary Benson <gbenson@redhat.com>
4530
4531 * server.h: Add static assertion.
4532 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4533
ef87c8bb
GB
45342014-08-19 Tom Tromey <tromey@redhat.com>
4535 Gary Benson <gbenson@redhat.com>
4536
4537 * Makefile.in (SFILES): Add common/errors.c.
4538 (OBS): Add errors.o.
4539 (IPA_OBS): Add errors-ipa.o.
4540 (errors.o): New rule.
4541 (errors-ipa.o): Likewise.
4542 * utils.h (perror_with_name, error, warning): Don't declare.
4543 * utils.c (warning): Renamed and rewritten as...
4544 (vwarning): New function.
4545 (error): Renamed and rewritten as...
4546 (verror): New function.
4547 (internal_error): Renamed and rewritten as...
4548 (internal_verror): New function.
4549
bb974a24
GB
45502014-08-07 Gary Benson <gbenson@redhat.com>
4551
4552 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4553 * configure: Regenerate.
4554 * config.in: Likewise.
4555 * server.h: Do not include errno.h.
4556 * event-loop.c: Likewise.
4557 * hostio-errno.c: Likewise.
4558 * linux-low.c: Likewise.
4559 * remote-utils.c: Likewise.
4560 * spu-low.c: Likewise.
4561 * utils.c: Likewise.
4562 * gdbreplay.c: Unconditionally include errno.h.
4563
6d3d12eb
GB
45642014-08-07 Gary Benson <gbenson@redhat.com>
4565
4566 * server.h: Do not include string.h.
4567 * event-loop.c: Likewise.
4568 * linux-low.c: Likewise.
4569 * regcache.c: Likewise.
4570 * remote-utils.c: Likewise.
4571 * spu-low.c: Likewise.
4572 * utils.c: Likewise.
4573
dccbb609
GB
45742014-08-07 Gary Benson <gbenson@redhat.com>
4575
4576 * server.h: Do not include gdb_assert.h.
4577
e76df0d0
GB
45782014-08-07 Gary Benson <gbenson@redhat.com>
4579
4580 * server.h: Do not include common-utils.h.
4581
4cb9c816
GB
45822014-08-07 Gary Benson <gbenson@redhat.com>
4583
4584 * server.h: Do not include ptid.h.
4585 * notif.h: Likewise.
4586
3995eeee
GB
45872014-08-07 Gary Benson <gbenson@redhat.com>
4588
4589 * server.h: Do not include gdb_locale.h.
4590
cb9f1a9b
GB
45912014-08-07 Gary Benson <gbenson@redhat.com>
4592
4593 * server.h: Do not include gdb/signals.h.
4594 * win32-low.c: Likewise.
4595
a5fceff8
GB
45962014-08-07 Gary Benson <gbenson@redhat.com>
4597
4598 * server.h: Do not include pathmax.h.
4599
b9391142
GB
46002014-08-07 Gary Benson <gbenson@redhat.com>
4601
4602 * server.h: Do not include libiberty.h.
4603 * linux-bfin-low.c: Likewise.
4604
0e443c87
GB
46052014-08-07 Gary Benson <gbenson@redhat.com>
4606
4607 * server.h: Do not include ansidecl.h.
4608
8ebb3f56
GB
46092014-08-07 Gary Benson <gbenson@redhat.com>
4610
4611 * linux-x86-low.c: Do not include stddef.h.
4612 * lynx-ppc-low.c: Likewise.
4613 * tracepoint.c: Likewise.
4614
8980bdf6
GB
46152014-08-07 Gary Benson <gbenson@redhat.com>
4616
4617 * server.h: Do not include stdarg.h.
4618 * nto-low.c: Likewise.
4619
d7096f71
GB
46202014-08-07 Gary Benson <gbenson@redhat.com>
4621
4622 * server.h: Do not include stdlib.h.
4623 * inferiors.c: Likewise.
4624 * linux-low.c: Likewise.
4625 * regcache.c: Likewise.
4626 * spu-low.c: Likewise.
4627 * tracepoint.c: Likewise.
4628 * utils.c: Likewise.
4629
d02f550d
GB
46302014-08-07 Gary Benson <gbenson@redhat.com>
4631
4632 * server.h: Do not include stdio.h.
4633 * linux-low.c: Likewise.
4634 * remote-utils.c: Likewise.
4635 * spu-low.c: Likewise.
4636 * utils.c: Likewise.
4637 * wincecompat.c: Likewise.
4638
87f6c4e3
GB
46392014-08-06 Gary Benson <gbenson@redhat.com>
4640
4641 * regcache.c (init_register_cache): Move conditionals inside if.
4642
7089dca4
GB
46432014-08-06 Gary Benson <gbenson@redhat.com>
4644
4645 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4646
462f517e
GB
46472014-07-31 Gary Benson <gbenson@redhat.com>
4648
4649 * ax.h: Do not include server.h.
4650 * gdbthread.h: Likewise.
4651 * lynx-low.h: Likewise.
4652 * notif.h: Likewise.
4653
976411d6
GB
46542014-07-30 Gary Benson <gbenson@redhat.com>
4655
4656 * server.h: Include common-defs.h.
4657 Do not include config.h or build-gnulib-gdbserver/config.h.
4658
d41f6d8e
GB
46592014-07-30 Gary Benson <gbenson@redhat.com>
4660
4661 * hostio-errno.c: Move server.h to top of includes list.
4662 * inferiors.c: Likewise.
4663 * linux-x86-low.c: Likewise.
4664 * notif.c: Include server.h.
4665
314c6a35
TT
46662014-07-24 Tom Tromey <tromey@redhat.com>
4667 Gary Benson <gbenson@redhat.com>
4668
4669 * server.h (CORE_ADDR): Now unsigned.
4670
69ff6be5
PA
46712014-07-16 Pedro Alves <palves@redhat.com>
4672
4673 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4674
ce9e3fe7
PA
46752014-07-15 Pedro Alves <palves@redhat.com>
4676
4677 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4678 copy.
4679
e76126e8
PA
46802014-07-11 Pedro Alves <palves@redhat.com>
4681
4682 * linux-low.c (kill_wait_lwp): New function, based on
4683 kill_one_lwp_callback, but use my_waitpid directly.
4684 (kill_one_lwp_callback, linux_kill): Use it.
4685
8e9db26e
PA
46862014-06-23 Pedro Alves <palves@redhat.com>
4687
4688 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4689 before setting DR0..DR3.
4690
698b3e08
GB
46912014-06-20 Gary Benson <gbenson@redhat.com>
4692
4693 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4694 * configure: Regenerated.
4695 * config.in: Likewise.
4696
125f8a3d
GB
46972014-06-20 Gary Benson <gbenson@redhat.com>
4698
4699 * Makefile.in (SFILES): Update locations for files moved
4700 from common to nat.
4701 (object file files): Reordered.
4702
42995dbd
GB
47032014-06-20 Gary Benson <gbenson@redhat.com>
4704
4705 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4706 (i386_dr_low_set_addr): Likewise.
4707 (i386_dr_low_get_addr): Likewise.
4708 (i386_dr_low_can_set_control): Likewise.
4709 (i386_dr_low_set_control): Likewise.
4710 (i386_dr_low_get_control): Likewise.
4711 (i386_dr_low_get_status): Likewise.
4712 (i386_get_debug_register_length): Likewise.
4713 * linux-x86-low.c (i386_dr_low_set_addr):
4714 Changed signature. Made static.
4715 (i386_dr_low_get_addr): Likewise.
4716 (i386_dr_low_set_control): Likewise.
4717 (i386_dr_low_get_control): Likewise.
4718 (i386_dr_low_get_status): Likewise.
4719 (i386_dr_low): New global variable.
4720 * win32-i386-low.c (i386_dr_low_set_addr):
4721 Changed signature. Made static.
4722 (i386_dr_low_get_addr): Likewise.
4723 (i386_dr_low_set_control): Likewise.
4724 (i386_dr_low_get_control): Likewise.
4725 (i386_dr_low_get_status): Likewise.
4726 (i386_dr_low): New global variable.
4727
e1d2394b
MS
47282014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4729
4730 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4731 * Makefile.in (AR, AR_FLAGS): Define.
4732 * configure: Regenerate.
4733
3a8ee006
GB
47342014-06-19 Gary Benson <gbenson@redhat.com>
4735
4736 * Makefile.in (i386-dregs.o): New rule.
4737 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4738 * i386-low.c (target.h): Remove include.
4739 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4740 (DR_CONTROL_SHIFT): Likewise.
4741 (DR_CONTROL_SIZE): Likewise.
4742 (DR_RW_EXECUTE): Likewise.
4743 (DR_RW_WRITE): Likewise.
4744 (DR_RW_READ): Likewise.
4745 (DR_RW_IORW): Likewise.
4746 (DR_LEN_1): Likewise.
4747 (DR_LEN_2): Likewise.
4748 (DR_LEN_4): Likewise.
4749 (DR_LEN_8): Likewise.
4750 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4751 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4752 (DR_ENABLE_SIZE): Likewise.
4753 (DR_LOCAL_SLOWDOWN): Likewise.
4754 (DR_GLOBAL_SLOWDOWN): Likewise.
4755 (DR_CONTROL_RESERVED): Likewise.
4756 (I386_DR_CONTROL_MASK): Likewise.
4757 (I386_DR_VACANT): Likewise.
4758 (I386_DR_LOCAL_ENABLE): Likewise.
4759 (I386_DR_GLOBAL_ENABLE): Likewise.
4760 (I386_DR_DISABLE): Likewise.
4761 (I386_DR_SET_RW_LEN): Likewise.
4762 (I386_DR_GET_RW_LEN): Likewise.
4763 (I386_DR_WATCH_HIT): Likewise.
4764 (i386_wp_op_t): Likewise.
4765 (i386_show_dr): Likewise.
4766 (i386_length_and_rw_bits): Likewise.
4767 (i386_insert_aligned_watchpoint): Likewise.
4768 (i386_remove_aligned_watchpoint): Likewise.
4769 (i386_handle_nonaligned_watchpoint): Likewise.
4770 i386_update_inferior_debug_regs(): Likewise.
4771 (i386_dr_insert_watchpoint): Likewise.
4772 (i386_dr_remove_watchpoint): Likewise.
4773 (i386_dr_region_ok_for_watchpoint): Likewise.
4774 (i386_dr_stopped_data_address): Likewise.
4775 (i386_dr_stopped_by_watchpoint): Likewise.
4776
8f26655c
GB
47772014-06-19 Gary Benson <gbenson@redhat.com>
4778
4779 * i386-low.c (i386_dr_show): Renamed to
4780 i386_show_dr and made static. All uses updated.
4781 (i386_dr_length_and_rw_bits): Renamed to
4782 i386_length_and_rw_bits and made static.
4783 All uses updated.
4784 (i386_dr_insert_aligned_watchpoint): Renamed to
4785 i386_insert_aligned_watchpoint and made static.
4786 All uses updated.
4787 (i386_dr_remove_aligned_watchpoint): Renamed to
4788 i386_remove_aligned_watchpoint and made static.
4789 All uses updated.
4790 (i386_dr_update_inferior_debug_regs): Renamed to
4791 i386_update_inferior_debug_regs and made static.
4792 All uses updated.
4793
b9228891
GB
47942014-06-18 Gary Benson <gbenson@redhat.com>
4795
5171def3
GB
4796 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4797 (i386_dr_low_can_set_control): Likewise.
4798 (i386_get_debug_register_length): Likewise.
4799 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4800 (i386_dr_low_can_set_control): Likewise.
4801 (i386_get_debug_register_length): Likewise.
4802
48032014-06-17 Gary Benson <gbenson@redhat.com>
4804
b9228891
GB
4805 * i386-low.h (i386-dregs.h): New include.
4806 (DR_FIRSTADDR): Now in i386-dregs.h.
4807 (DR_LASTADDR): Likewise.
4808 (DR_NADDR): Likewise.
4809 (DR_STATUS): Likewise.
4810 (DR_CONTROL): Likewise.
4811 (i386_debug_reg_state): Likewise.
4812 (i386_dr_insert_watchpoint): Likewise.
4813 (i386_dr_remove_watchpoint): Likewise.
4814 (i386_dr_region_ok_for_watchpoint): Likewise.
4815 (i386_dr_stopped_data_address): Likewise.
4816 (i386_dr_stopped_by_watchpoint): Likewise.
4817 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4818
4be83cc2
GB
48192014-06-18 Gary Benson <gbenson@redhat.com>
4820
4821 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4822 i386_dr_insert_watchpoint.
4823 (i386_low_remove_watchpoint): Renamed to
4824 i386_dr_remove_watchpoint.
4825 (i386_low_region_ok_for_watchpoint): Renamed to
4826 i386_dr_region_ok_for_watchpoint.
4827 (i386_low_stopped_data_address): Renamed to
4828 i386_dr_stopped_data_address.
4829 (i386_low_stopped_by_watchpoint): Renamed to
4830 i386_dr_stopped_by_watchpoint.
4831 * i386-low.c (i386_show_dr): Renamed to
4832 i386_dr_show and made nonstatic. All uses updated.
4833 (i386_length_and_rw_bits): Renamed to
4834 i386_dr_length_and_rw_bits and made nonstatic.
4835 All uses updated.
4836 (i386_insert_aligned_watchpoint): Renamed to
4837 i386_dr_insert_aligned_watchpoint and made nonstatic.
4838 All uses updated.
4839 (i386_remove_aligned_watchpoint): Renamed to
4840 i386_dr_remove_aligned_watchpoint and made nonstatic.
4841 All uses updated.
4842 (i386_update_inferior_debug_regs): Renamed to
4843 i386_dr_update_inferior_debug_regs and made nonstatic.
4844 All uses updated.
4845 (i386_low_insert_watchpoint): Renamed to
4846 i386_dr_insert_watchpoint. All uses updated.
4847 (i386_low_remove_watchpoint): Renamed to
4848 i386_dr_remove_watchpoint. All uses updated.
4849 (i386_low_region_ok_for_watchpoint): Renamed to
4850 i386_dr_region_ok_for_watchpoint. All uses updated.
4851 (i386_low_stopped_data_address): Renamed to
4852 i386_dr_stopped_data_address. All uses updated.
4853 (i386_low_stopped_by_watchpoint): Renamed to
4854 i386_dr_stopped_by_watchpoint. All uses updated.
4855
131aa0d4
GB
48562014-06-18 Gary Benson <gbenson@redhat.com>
4857
4858 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4859 (i386_dr_low_can_set_control): Likewise.
4860 (i386_insert_aligned_watchpoint): New check.
4861
d9305f7f
GB
48622014-06-18 Gary Benson <gbenson@redhat.com>
4863
4864 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4865 Renamed to state.
4866
e927c9fc
GB
48672014-06-18 Gary Benson <gbenson@redhat.com>
4868
4869 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4870 instead of fatal and error.
4871 (i386_handle_nonaligned_watchpoint): Likewise.
4872
1b6d4134
GB
48732014-06-18 Gary Benson <gbenson@redhat.com>
4874
4875 * i386-low.c (i386_get_debug_register_length): New macro.
4876 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4877 (i386_show_dr): Use debug_printf instead of fprintf. Use
4878 phex to format values.
4879
6e62758f
GB
48802014-06-18 Gary Benson <gbenson@redhat.com>
4881
4882 * i386-low.h: Comment changes.
4883 * i386-low.c: Likewise.
4884
fc6e2f03
GB
48852014-06-18 Gary Benson <gbenson@redhat.com>
4886
4887 * i386-low.c: Whitespace changes.
4888
f9d1eeed
TT
48892014-06-12 Tom Tromey <tromey@redhat.com>
4890
4891 * utils.c (freeargv): Remove.
4892
0b04e523
TT
48932014-06-12 Tom Tromey <tromey@redhat.com>
4894
4895 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4896 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4897 (parse_debug_format_options): Likewise.
4898 (gdbserver_usage): Likewise.
4899 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4900 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4901 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4902 against libiberty.
4903 ($(LIBGNU)): Depend on libiberty.
4904 (all-lib): Recurse into all subdirs.
4905 (install-only): Invoke "install" target in subdirs.
4906 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4907 targets.
4908 * configure: Rebuild.
4909 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4910 for vasprintf, vsnprintf, or gettimeofday.
4911 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4912 srv_tgtobj.
4913
270c9937
JB
49142014-06-05 Joel Brobecker <brobecker@adacore.com>
4915
4916 * development.sh: Delete.
4917 * Makefile.in (config.status): Adjust dependency on development.sh.
4918 * configure.ac: Adjust development.sh source call.
4919 * configure: Regenerate.
4920
0a261ed8
PA
49212014-06-02 Pedro Alves <palves@redhat.com>
4922
4923 * ax.c (gdb_free_agent_expr): New function.
4924 * ax.h (gdb_free_agent_expr): New declaration.
4925 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4926 list.
4927 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4928 static.
4929 (clear_breakpoint_conditions_and_commands): New function.
4930 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4931 (clear_breakpoint_conditions_and_commands): New declaration.
4932
e9dae05e
RR
49332014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4934
4935 * linux-aarch64-low.c (asm/ptrace.h): Include.
4936
5876f503
JK
49372014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4938
4939 Fix TLS access for -static -pthread.
4940 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4941 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4942 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4943
802e8e6d
PA
49442014-05-20 Pedro Alves <palves@redhat.com>
4945
4946 * linux-aarch64-low.c (aarch64_insert_point)
4947 (aarch64_remove_point): No longer check whether the type is
4948 supported here. Adjust to new interface.
4949 (the_low_target): Install aarch64_supports_z_point_type as
4950 supports_z_point_type method.
4951 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4952 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4953 instead of a Z packet char. Adjust.
4954 (arm_supports_z_point_type): New function.
4955 (arm_insert_point, arm_remove_point): Adjust to new interface.
4956 (the_low_target): Install arm_supports_z_point_type.
4957 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4958 (cris_insert_point, cris_remove_point): Adjust to new interface.
4959 Don't check whether the type is supported here.
4960 (the_low_target): Install cris_supports_z_point_type.
4961 * linux-low.c (linux_supports_z_point_type): New function.
4962 (linux_insert_point, linux_remove_point): Adjust to new interface.
4963 * linux-low.h (struct linux_target_ops) <insert_point,
4964 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4965 raw_breakpoint pointer parameter.
4966 <supports_z_point_type>: New method.
4967 * linux-mips-low.c (mips_supports_z_point_type): New function.
4968 (mips_insert_point, mips_remove_point): Adjust to new interface.
4969 Use mips_supports_z_point_type.
4970 (the_low_target): Install mips_supports_z_point_type.
4971 * linux-ppc-low.c (the_low_target): Install NULL as
4972 supports_z_point_type method.
4973 * linux-s390-low.c (the_low_target): Install NULL as
4974 supports_z_point_type method.
4975 * linux-sparc-low.c (the_low_target): Install NULL as
4976 supports_z_point_type method.
4977 * linux-x86-low.c (x86_supports_z_point_type): New function.
4978 (x86_insert_point): Adjust to new insert_point interface. Use
4979 insert_memory_breakpoint. Adjust to new
4980 i386_low_insert_watchpoint interface.
4981 (x86_remove_point): Adjust to remove_point interface. Use
4982 remove_memory_breakpoint. Adjust to new
4983 i386_low_remove_watchpoint interface.
4984 (the_low_target): Install x86_supports_z_point_type.
4985 * lynx-low.c (lynx_target_ops): Install NULL as
4986 supports_z_point_type callback.
4987 * nto-low.c (nto_supports_z_point_type): New.
4988 (nto_insert_point, nto_remove_point): Adjust to new interface.
4989 (nto_target_ops): Install nto_supports_z_point_type.
4990 * mem-break.c: Adjust intro comment.
4991 (struct raw_breakpoint) <raw_type, size>: New fields.
4992 <inserted>: Update comment.
4993 <shlib_disabled>: Delete field.
4994 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4995 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4996 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4997 (raw_bkpt_type_to_target_hw_bp_type): New function.
4998 (find_enabled_raw_code_breakpoint_at): New function.
4999 (find_raw_breakpoint_at): New type and size parameters. Use them.
5000 (insert_memory_breakpoint): New function, based off
5001 set_raw_breakpoint_at.
5002 (remove_memory_breakpoint): New function.
5003 (set_raw_breakpoint_at): Reimplement.
5004 (set_breakpoint): New, based on set_breakpoint_at.
5005 (set_breakpoint_at): Reimplement.
5006 (delete_raw_breakpoint): Go through the_target->remove_point
5007 instead of assuming memory breakpoints.
5008 (find_gdb_breakpoint_at): Delete.
5009 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5010 (find_gdb_breakpoint): New function.
5011 (set_gdb_breakpoint_at): Delete.
5012 (z_type_supported): New function.
5013 (set_gdb_breakpoint_1): New function, loosely based off
5014 set_gdb_breakpoint_at.
5015 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5016 (delete_gdb_breakpoint_at): Delete.
5017 (delete_gdb_breakpoint_1): New function, loosely based off
5018 delete_gdb_breakpoint_at.
5019 (delete_gdb_breakpoint): New function.
5020 (clear_gdb_breakpoint_conditions): Rename to ...
5021 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5022 breakpoint.
5023 (add_condition_to_breakpoint): Make static.
5024 (add_breakpoint_condition): Take a struct breakpoint pointer
5025 instead of an address. Adjust.
5026 (gdb_condition_true_at_breakpoint): Rename to ...
5027 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5028 z_type parameter.
5029 (gdb_condition_true_at_breakpoint): Reimplement.
5030 (add_breakpoint_commands): Take a struct breakpoint pointer
5031 instead of an address. Adjust.
5032 (gdb_no_commands_at_breakpoint): Rename to ...
5033 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5034 parameter. Return true if no breakpoint was found. Change debug
5035 output.
5036 (gdb_no_commands_at_breakpoint): Reimplement.
5037 (run_breakpoint_commands): Rename to ...
5038 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5039 and change return type to boolean.
5040 (run_breakpoint_commands): New function.
5041 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5042 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5043 breakpoint. Go through the_target->remove_point instead of
5044 assuming memory breakpoint.
5045 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5046 software and hardware breakpoints.
5047 (reinsert_raw_breakpoint): Go through the_target->insert_point
5048 instead of assuming memory breakpoint.
5049 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5050 software and hardware breakpoints.
5051 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5052 Check both software and hardware breakpoints.
5053 (validate_inserted_breakpoint): Assert the breakpoint is a
5054 software breakpoint. Set the inserted flag to -1 instead of
5055 setting shlib_disabled.
5056 (delete_disabled_breakpoints): Adjust.
5057 (validate_breakpoints): Only validate software breakpoints.
5058 Adjust to inserted flag change.
5059 (check_mem_read, check_mem_write): Skip breakpoint types other
5060 than software breakpoints. Adjust to inserted flag change.
5061 * mem-break.h (enum raw_bkpt_type): New enum.
5062 (raw_breakpoint, struct process_info): Forward declare.
5063 (Z_packet_to_target_hw_bp_type): Delete declaration.
5064 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5065 (set_gdb_breakpoint, delete_gdb_breakpoint)
5066 (clear_breakpoint_conditions): New declarations.
5067 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5068 (breakpoint_inserted_here): Update comment.
5069 (add_breakpoint_condition, add_breakpoint_commands): Replace
5070 address parameter with a breakpoint pointer parameter.
5071 (gdb_breakpoint_here): Update comment.
5072 (delete_gdb_breakpoint_at): Delete.
5073 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5074 * server.c (process_point_options): Take a struct breakpoint
5075 pointer instead of an address. Adjust.
5076 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5077 delete_gdb_breakpoint.
5078 * spu-low.c (spu_target_ops): Install NULL as
5079 supports_z_point_type method.
5080 * target.h: Include mem-break.h.
5081 (struct target_ops) <prepare_to_access_memory>: Update comment.
5082 <supports_z_point_type>: New field.
5083 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5084 instead of a char. Also take a raw breakpoint pointer.
5085 * win32-arm-low.c (the_low_target): Install NULL as
5086 supports_z_point_type.
5087 * win32-i386-low.c (i386_supports_z_point_type): New function.
5088 (i386_insert_point, i386_remove_point): Adjust to new interface.
5089 (the_low_target): Install i386_supports_z_point_type.
5090 * win32-low.c (win32_supports_z_point_type): New function.
5091 (win32_insert_point, win32_remove_point): Adjust to new interface.
5092 (win32_target_ops): Install win32_supports_z_point_type.
5093 * win32-low.h (struct win32_target_ops):
5094 <supports_z_point_type>: New method.
5095 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5096 instead of a char. Also take a raw breakpoint pointer.
5097
932539e3
PA
50982014-05-20 Pedro Alves <palves@redhat.com>
5099
5100 * mem-break.h: Include break-common.h.
5101 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5102 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5103 (Z_packet_to_target_hw_bp_type): New declaration.
5104 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5105 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5106 (Z_PACKET_ACCESS_WP): Delete macros.
5107 (Z_packet_to_hw_type): Delete function.
5108 * i386-low.h: Don't include break-common.h here.
5109 (Z_packet_to_hw_type): Delete declaration.
5110 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5111 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5112 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5113 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5114 * linux-aarch64-low.c: Don't include break-common.h here.
5115 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5116 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5117 (Z_packet_to_target_hw_bp_type): Delete function.
5118 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5119 function.
5120 (mips_insert_point, mips_remove_point): Use
5121 Z_packet_to_target_hw_bp_type.
5122
4ff0d3d8
PA
51232014-05-20 Pedro Alves <palves@redhat.com>
5124
5125 * linux-aarch64-low.c: Include break-common.h.
5126 (enum target_point_type): Delete.
5127 (Z_packet_to_point_type): Rename to ...
5128 (Z_packet_to_target_hw_bp_type): ... this, and return a
5129 target_hw_bp_type instead.
5130 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5131 instead of an enum target_point_type.
5132 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5133 breakpoint type.
5134 (aarch64_dr_state_insert_one_point)
5135 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5136 (aarch64_handle_aligned_watchpoint)
5137 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5138 Take an enum target_hw_bp_type instead of an enum
5139 target_point_type.
5140 (aarch64_supports_z_point_type): New function.
5141 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5142 use Z_packet_to_target_hw_bp_type.
5143
786dc519
JB
51442014-05-20 Joel Brobecker <brobecker@adacore.com>
5145
5146 * configure.ac: Only use -Werror by default when DEVELOPMENT
5147 is true.
5148 * configure: Regenerate.
5149
9e0aa64f
JK
51502014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5151
5152 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5153 * linux-x86-low.c (X86_64_USER_REGS): New.
5154 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5155
2b577b92
YQ
51562014-04-28 Yao Qi <yao@codesourcery.com>
5157
5158 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5159 name.
5160
94611da2
PA
51612014-04-25 Pedro Alves <palves@redhat.com>
5162
5163 PR server/16255
5164 * linux-low.c (linux_attach_fail_reason_string): New function.
5165 (linux_attach_lwp): Delete.
5166 (linux_attach_lwp_1): Rename to ...
5167 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5168 argument. Remove "initial" parameter. Return int instead of
5169 void. Don't error or warn here.
5170 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5171 failure to attach to the tgid. Call warning when failing to
5172 attach to an lwp.
5173 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5174 argument. Remove "initial" parameter. Return int instead of
5175 void. Don't error or warn here.
5176 (linux_attach_fail_reason_string): New declaration.
5177 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5178 interface change. Use linux_attach_fail_reason_string.
5179
01f9f808
MS
51802014-04-24 Michael Sturm <michael.sturm@mintel.com>
5181 Walfred Tedeschi <walfred.tedeschi@intel.com>
5182
5183 * Makefile.in: Added rules to handle new files
5184 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5185 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5186 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5187 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5188 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5189 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5190 x32-avx512-linux.o.
5191 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5192 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5193 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5194 i386/x32-avx512.xml.
5195 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5196 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5197 i386/x32-avx512-linux.xml.
5198 * i387-fp.c (num_avx512_k_registers): New constant for number
5199 of K registers.
5200 (num_avx512_zmmh_low_registers): New constant for number of
5201 lower ZMM registers (0-15).
5202 (num_avx512_zmmh_high_registers): New constant for number of
5203 higher ZMM registers (16-31).
5204 (num_avx512_ymmh_registers): New contant for number of higher
5205 YMM registers (ymm16-31 added by avx521 on x86_64).
5206 (num_avx512_xmm_registers): New constant for number of higher
5207 XMM registers (xmm16-31 added by AVX512 on x86_64).
5208 (struct i387_xsave): Add space for AVX512 registers.
5209 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5210 Add code to handle AVX512 registers.
5211 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5212 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5213 prototypei from generated file.
5214 (tdesc_amd64_avx512_linux): Likewise.
5215 (init_registers_x32_avx512_linux): Likewise.
5216 (tdesc_x32_avx512_linux): Likewise.
5217 (init_registers_i386_avx512_linux): Likewise.
5218 (tdesc_i386_avx512_linux): Likewise.
5219 (x86_64_regmap): Add AVX512 registers.
5220 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5221 mask.
5222 (initialize_low_arch): Add code to initialize AVX512 registers.
5223
51aa91f9
PA
52242014-04-23 Pedro Alves <palves@redhat.com>
5225
5226 * mem-break.c (find_gdb_breakpoint_at): Make static.
5227 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5228
a4165e94
PA
52292014-04-23 Pedro Alves <palves@redhat.com>
5230
5231 * i386-low.c: Don't include break-common.h here.
5232 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5233 prototype to take target_hw_bp_type as argument instead of a Z
5234 packet char.
5235 * i386-low.h: Include break-common.h here.
5236 (Z_packet_to_hw_type): Declare.
5237 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5238 prototypes.
5239 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5240 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5241 (x86_remove_point): Convert the packet number to a
5242 target_hw_bp_type before calling i386_low_remove_watchpoint.
5243 * win32-i386-low.c (i386_insert_point): Convert the packet number
5244 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5245 (i386_remove_point): Convert the packet number to a
5246 target_hw_bp_type before calling i386_low_remove_watchpoint.
5247
b8acf843
PA
52482014-04-23 Pedro Alves <palves@redhat.com>
5249
5250 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5251
d708bcd1
PA
52522014-04-10 Pedro Alves <palves@redhat.com>
5253
5254 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5255 Check if the condition or command is NULL before checking if the
5256 breakpoint is known. On success, return true.
5257 * mem-break.h (add_breakpoint_condition): Document return.
5258 (add_breakpoint_commands): Add describing comment.
5259 * server.c (skip_to_semicolon): New function.
5260 (process_point_options): Use it.
5261
2eec7d5b
PA
52622014-04-09 Pedro Alves <palves@redhat.com>
5263
5264 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5265 to lwpid_of.
5266
fa96cb38
PA
52672014-02-27 Pedro Alves <palves@redhat.com>
5268
5269 PR 12702
5270 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5271 macros.
5272 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5273 output.
5274 (last_thread_of_process_p): Take a PID argument instead of a
5275 thread pointer.
5276 (linux_wait_for_lwp): Delete.
5277 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5278 functions.
5279 (linux_low_filter_event): New function, party factored out from
5280 linux_wait_for_event.
5281 (linux_wait_for_event): Rename to ...
5282 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5283 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5284 sigsuspend. Check for zombie leaders.
5285 (linux_wait_for_event): Reimplement as wrapper around
5286 linux_wait_for_event_filtered.
5287 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5288 a normal or signal exit is seen, it's the whole process exiting.
5289 (wait_for_sigstop): No longer a for_each_inferior callback.
5290 Rewrite on top of linux_wait_for_event_filtered.
5291 (stop_all_lwps): Call wait_for_sigstop directly.
5292 * server.c (resume, handle_target_event): Handle
5293 TARGET_WAITKIND_NO_RESUMED.
5294
d763de10
JB
52952014-02-26 Joel Brobecker <brobecker@adacore.com>
5296
5297 * win32-low.c (psapi_get_dll_name,
5298 * win32_CreateToolhelp32Snapshot): Delete.
5299 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5300 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5301 Delete.
5302 (handle_load_dll): Add function description.
5303 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5304
850a0f76
JB
53052014-02-26 Joel Brobecker <brobecker@adacore.com>
5306
5307 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5308 Add comment.
5309 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5310 base address when calling win32_add_one_solib.
5311 (handle_load_dll): Delete local variable load_addr.
5312 Remove 0x1000 offset applied to DLL base address when calling
5313 win32_add_one_solib.
5314 (handle_unload_dll): Add comment.
5315
f25b3fc3
JB
53162014-02-26 Joel Brobecker <brobecker@adacore.com>
5317
5318 * win32-low.c (win32_add_all_dlls): Renames
5319 win32_ensure_ntdll_loaded. Rewrite function documentation.
5320 Adjust implementation to always load all DLLs.
5321 Add 0x1000 offset to DLL base address when calling
5322 win32_add_one_solib.
5323 (child_initialization_done): New static global.
5324 (do_initial_child_stuff): Set child_initialization_done to
5325 zero during child initialization, and 1 after. Replace call
5326 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5327 Add comment.
5328 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5329 (handle_unload_dll): Add function documentation.
5330 (get_child_debug_event): Ignore load and unload DLL events
5331 during child initialization.
5332
d86d4aaf
DE
53332014-02-20 Doug Evans <dje@google.com>
5334
3bc32da3 5335 Remove global all_lwps.
d86d4aaf
DE
5336 * inferiors.h (ptid_of): Move here from linux-low.h.
5337 (pid_of, lwpid_of): Ditto.
5338 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5339 parameter is a struct thread_info * now.
5340 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5341 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5342 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5343 directly.
5344 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5345 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5346 * linux-arm-low.c (update_registers_callback): Update, "entry"
5347 parameter is a struct thread_info * now.
5348 Fetch lwpid from current_inferior directly.
5349 (arm_insert_point): Pass &all_threads to find_inferior instead of
5350 &all_lwps.
5351 (arm_remove_point): Ditto.
5352 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5353 (arm_prepare_to_resume): Fetch pid from thread.
5354 (arm_read_description): Fetch lwpid from current_inferior directly.
5355 * linux-low.c (all_lwps): Delete.
5356 (delete_lwp): Delete call to remove_inferior.
5357 (handle_extended_wait): Fetch lwpid from thread.
5358 (add_lwp): Don't set lwp->entry.id. Remove call to
5359 add_inferior_to_list.
5360 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5361 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5362 (kill_one_lwp_callback): Ditto.
5363 (linux_kill): Don't dereference NULL pointer.
5364 Fetch ptid,lwpid from thread.
5365 (get_detach_signal): Fetch ptid from thread.
5366 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5367 Simplify call to regcache_invalidate_thread.
5368 (delete_lwp_callback): Update, "entry" parameter is a
5369 struct thread_info * now. Fetch pid from thread.
5370 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5371 (status_pending_p_callback): Update, "entry" parameter is a
5372 struct thread_info * now. Fetch ptid from thread.
5373 (find_lwp_pid): Update, "entry" parameter is a
5374 struct thread_info * now.
5375 (linux_wait_for_lwp): Fetch pid from thread.
5376 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5377 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5378 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5379 (dequeue_one_deferred_signal): Ditto.
5380 (cancel_breakpoint): Fetch ptid from current_inferior.
5381 (linux_wait_for_event): Pass &all_threads to find_inferior,
5382 not &all_lwps. Fetch ptid, lwpid from thread.
5383 (count_events_callback): Update, "entry" parameter is a
5384 struct thread_info * now.
5385 (select_singlestep_lwp_callback): Ditto.
5386 (select_event_lwp_callback): Ditto.
5387 (cancel_breakpoints_callback): Ditto.
5388 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5389 not &all_lwps.
5390 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5391 (unsuspend_one_lwp): Update, "entry" parameter is a
5392 struct thread_info * now.
5393 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5394 not &all_lwps.
5395 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5396 Fetch lwpid from thread, not lwp.
5397 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5398 Pass &all_threads to find_inferior, not &all_lwps.
5399 (send_sigstop): Fetch lwpid from thread, not lwp.
5400 (send_sigstop_callback): Update, "entry" parameter is a
5401 struct thread_info * now.
5402 (suspend_and_send_sigstop_callback): Ditto.
5403 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5404 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5405 struct thread_info * now.
5406 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5407 from thread, lwp.
5408 (lwp_running): Update, "entry" parameter is a
5409 struct thread_info * now.
5410 (stop_all_lwps): Fetch ptid from thread.
5411 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5412 (linux_resume_one_lwp): Fetch lwpid from thread.
5413 (linux_set_resume_request): Update, "entry" parameter is a
5414 struct thread_info * now. Fetch pid, lwpid from thread.
5415 (resume_status_pending_p): Update, "entry" parameter is a
5416 struct thread_info * now.
5417 (need_step_over_p): Ditto. Fetch lwpid from thread.
5418 (start_step_over): Fetch lwpid from thread.
5419 (linux_resume_one_thread): Update, "entry" parameter is a
5420 struct thread_info * now. Fetch lwpid from thread.
5421 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5422 (proceed_one_lwp): Update, "entry" parameter is a
5423 struct thread_info * now. Fetch lwpid from thread.
5424 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5425 struct thread_info * now.
5426 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5427 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5428 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5429 directly.
5430 (regsets_store_inferior_registers): Ditto.
5431 (fetch_register, store_register): Ditto.
5432 (linux_read_memory, linux_write_memory): Ditto.
5433 (linux_request_interrupt): Ditto.
5434 (linux_read_auxv): Ditto.
5435 (linux_xfer_siginfo): Ditto.
5436 (linux_qxfer_spu): Ditto.
5437 (linux_qxfer_libraries_svr4): Ditto.
5438 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5439 moved to inferiors.h.
5440 (get_lwp): Delete.
5441 (get_thread_lwp): Update.
5442 (struct lwp_info): Delete member "entry". Simplify comment for
5443 member "thread".
5444 (all_lwps): Delete.
5445 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5446 current_inferior directly.
5447 (update_watch_registers_callback): Update, "entry" parameter is a
5448 struct thread_info * now. Fetch pid from thread.
5449 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5450 (mips_insert_point): Fetch lwpid from current_inferior.
5451 Pass &all_threads to find_inferior, not &all_lwps.
5452 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5453 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5454 directly.
5455 (mips_stopped_data_address): Ditto.
5456 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5457 directly.
5458 * linux-tile-low.c (tile_arch_setup): Ditto.
5459 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5460 (update_debug_registers_callback): Update, "entry" parameter is a
5461 struct thread_info * now. Fetch pid from thread.
5462 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5463 Pass &all_threads to find_inferior, not &all_lwps.
5464 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5465 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5466 Pass &all_threads to find_inferior, not &all_lwps.
5467 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5468 (i386_dr_low_get_status): Ditto.
5469 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5470 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5471 (x86_linux_read_description): Ditto.
5472 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5473
3b8361aa
DE
54742014-02-20 Doug Evans <dje@google.com>
5475
5476 * inferiors.c (get_first_inferior): Fix buglet.
5477
f7667f0d
DE
54782014-02-19 Doug Evans <dje@google.com>
5479
5480 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5481 * inferiors.c (add_thread): Change result type to struct thread_info *.
5482 All callers updated.
5483 (add_lwp): Call add_thread here instead of in callers.
5484 All callers updated.
5485 * linux-low.h (get_lwp_thread): Rewrite.
5486 (struct lwp_info): New member "thread".
5487
b3312d80
DE
54882014-02-19 Doug Evans <dje@google.com>
5489
5490 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5491 All callers updated.
5492
ecc6f45c
DE
54932014-02-19 Doug Evans <dje@google.com>
5494
5495 * inferiors.c (add_thread): Fix whitespace.
5496
649ebbca
DE
54972014-02-19 Doug Evans <dje@google.com>
5498
5499 * dll.c (clear_dlls): Replace accessing list implemention details
5500 with API function.
5501 * gdbthread.h (get_first_thread): Declare.
5502 * inferiors.c (for_each_inferior_with_data): New function.
5503 (get_first_thread): New function.
5504 (find_thread_ptid): Simplify.
5505 (get_first_inferior): New function.
5506 (clear_list): Delete.
5507 (one_inferior_p): New function.
5508 (clear_inferior_list): New function.
5509 (clear_inferiors): Update.
5510 * inferiors.h (for_each_inferior_with_data): Declare.
5511 (clear_inferior_list): Declare.
5512 (one_inferior_p): Declare.
5513 (get_first_inferior): Declare.
5514 * linux-low.c (linux_wait_for_event): Replace accessing list
5515 implemention details with API function.
5516 * server.c (target_running): Ditto.
5517 (accumulate_file_name_length): New function.
5518 (emit_dll_description): New function.
5519 (handle_qxfer_libraries): Replace accessing list implemention
5520 details with API function.
5521 (handle_qxfer_threads_worker): New function.
5522 (handle_qxfer_threads_proper): Replace accessing list implemention
5523 details with API function.
5524 (handle_query): Ditto.
5525 (visit_actioned_threads_callback_ftype): New typedef.
5526 (visit_actioned_threads_data): New struct.
5527 (visit_actioned_threads): Rewrite to be find_inferior callback.
5528 (resume): Call find_inferior.
5529 (handle_status): Replace accessing list implemention
5530 details with API function.
5531 (process_serial_event): Replace accessing list implemention details
5532 with API function.
5533 * target.c (set_desired_inferior): Replace accessing list implemention
5534 details with API function.
5535 * tracepoint.c (same_process_p): New function.
5536 (gdb_agent_about_to_close): Replace accessing list implemention
5537 details with API function.
5538 * win32-low.c (child_delete_thread): Replace accessing list
5539 implemention details with API function.
5540 (match_dll_by_basename): New function.
5541 (dll_is_loaded_by_basename): New function.
5542 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5543 details call to dll_is_loaded_by_basename.
5544
80894984
DE
55452014-02-19 Doug Evans <dje@google.com>
5546
5547 * dll.h (struct dll_info): Add comment.
5548 * gdbthread.h (struct thread_info): Add comment.
5549 (current_ptid): Simplify.
5550 * inferiors.c (add_process): Update.
5551 (remove_process): Update.
5552 * inferiors.h (struct process_info): Rename member "head" to "entry".
5553 * linux-low.c (delete_lwp): Update.
5554 (add_lwp): Update.
5555 (last_thread_of_process_p): Update.
5556 (kill_one_lwp_callback, linux_kill): Update.
5557 (status_pending_p_callback): Update.
5558 (wait_for_sigstop): Update. Simplify read of ptid.
5559 (start_step_over): Update.
5560 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5561 (get_lwp_thread): Update.
5562 (struct lwp_info): Rename member "head" to "entry".
5563 * regcache.h (inferior_list_entry): Delete.
5564 * server.c (kill_inferior_callback): Update.
5565 (detach_or_kill_inferior_callback): Update.
5566 (print_started_pid): Update.
5567 (print_attached_pid): Update.
5568 (process_serial_event): Simplify read of ptid.
5569 * thread-db.c (thread_db_create_event): Update.
5570 (thread_db_get_tls_address): Update.
5571 * win32-low.c (current_inferior_ptid): Simplify.
5572
46917d26
TT
55732014-02-19 Tom Tromey <tromey@redhat.com>
5574
5575 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5576 argument.
5577 (target_supports_btrace): Update.
5578
0759a81e
YQ
55792014-02-14 Yao Qi <yao@codesourcery.com>
5580
5581 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5582 (rsp-low-ipa.o): New target.
5583
a7191e8b
TT
55842014-02-12 Tom Tromey <tromey@redhat.com>
5585
5586 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5587 convert_ascii_to_int.
5588 * regcache.c (registers_to_string): Likewise.
5589 * remote-utils.c (decode_M_packet): Likewise.
5590 * server.c (process_serial_event): Likewise.
5591
ff0e980e
TT
55922014-02-12 Tom Tromey <tromey@redhat.com>
5593
5594 * server.c (handle_query, handle_v_run): Use hex2bin, not
5595 unhexify.
5596 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5597
e9371aff
TT
55982014-02-12 Tom Tromey <tromey@redhat.com>
5599
5600 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5601 convert_int_to_ascii.
5602 * regcache.c (registers_to_string, collect_register_as_string):
5603 Likewise.
5604 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5605 Likewise.
5606 * server.c (process_serial_event): Likewise.
5607 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5608 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5609
971dc0b8
TT
56102014-02-12 Tom Tromey <tromey@redhat.com>
5611
5612 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5613 bin2hex, not hexify.
5614 * tracepoint.c (cmd_qtstatus): Likewise.
5615
0a822afb
TT
56162014-02-12 Tom Tromey <tromey@redhat.com>
5617
5618 * remote-utils.c (monitor_output): Pass explicit length to
5619 hexify.
5620
9c3d6531
TT
56212014-02-12 Tom Tromey <tromey@redhat.com>
5622
5623 * tracepoint.c: Include rsp-low.h.
5624 * server.c: Include rsp-low.h.
5625 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5626 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5627 declare.
5628 * remote-utils.c: Include rsp-low.h.
5629 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5630 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5631 (convert_int_to_ascii, convert_ascii_to_int): Move to
5632 common/rsp-low.c.
5633 * regcache.c: Include rsp-low.h.
5634 * ax.c: Include rsp-low.h.
5635 * Makefile.in (SFILES): Add common/rsp-low.c.
5636 (OBS): Add rsp-low.o.
5637 (rsp-low.o): New target.
5638
01fd3ea5
TT
56392014-02-12 Tom Tromey <tromey@redhat.com>
5640
5641 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5642 Include print-utils.h.
5643 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5644 (plongest, thirty_two, phex_nz): Remove.
5645 * Makefile.in (SFILES): Add common/print-utils.c.
5646 (OBS): Add print-utils.o.
5647 (print-utils-ipa.o): New target.
5648 (print-utils.o): New target.
5649 (IPA_OBJS): Add print-utils-ipa.o.
5650
e99dc820
TT
56512014-02-06 Tom Tromey <tromey@redhat.com>
5652
5653 * Makefile.in (SFILES): Fix indentation.
5654
ee1e2d4f
DE
56552014-02-05 Doug Evans <dje@google.com>
5656
5657 * linux-low.c (linux_wait_for_event): Improve comment.
5658 (linux_wait_1): Keep current_inferior in sync with event_child.
5659
f5a02773
DE
56602014-01-22 Doug Evans <dje@google.com>
5661
5662 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5663
87ce2a04
DE
56642014-01-22 Doug Evans <dje@google.com>
5665
5666 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5667 * configure: Regenerate.
5668 * config.in: Regenerate.
5669 * Makefile.in (SFILES): Add debug.c.
5670 (OBS): Add debug.o.
5671 * debug.c: New file.
5672 * debug.h: New file.
5673 * linux-aarch64-low.c (*): Update all debugging printfs to use
5674 debug_printf instead of fprintf.
5675 * linux-arm-low.c (*): Ditto.
5676 * linux-cris-low.c (*): Ditto.
5677 * linux-crisv32-low.c (*): Ditto.
5678 * linux-m32r-low.c (*): Ditto.
5679 * linux-sparc-low.c (*): Ditto.
5680 * linux-x86.c (*): Ditto.
5681 * linux-low.c (*): Ditto.
5682 (linux_wait_1): Add calls to debug_enter, debug_exit.
5683 (linux_wait): Remove redundant debugging printf.
5684 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5685 (linux_resume, unstop_all_lwps): Ditto.
5686 * mem-break.c (*): Update all debugging printfs to use
5687 debug_printf instead of fprintf.
5688 * remote-utils.c (*): Ditto.
5689 * thread-db.c (*): Ditto.
5690 * server.c #include <ctype.h>, "gdb_vecs.h".
5691 (debug_threads): Moved to debug.c.
5692 (*): Update all debugging printfs to use debug_printf instead of
5693 fprintf.
5694 (start_inferior): Replace call to fflush with call to debug_flush.
5695 (monitor_show_help): Mention set debug-format.
5696 (parse_debug_format_options): New function.
5697 (handle_monitor_command): Handle "monitor set debug-format".
5698 (gdbserver_usage): Mention --debug-format.
5699 (main): Parse --debug-format.
5700 * server.h (debug_threads): Declaration moved to debug.h.
5701 #include "debug.h".
5702 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5703 trace_debug_1 that uses debug_printf.
5704 (tracepoint_look_up_symbols): Update all debugging printfs to use
5705 debug_printf instead of fprintf.
5706
e671835b
BS
57072014-01-20 Baruch Siach <baruch@tkos.co.il>
5708
5709 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5710 sys/ptrace.h.
5711
b5737fa9
PA
57122014-01-17 Pedro Alves <palves@redhat.com>
5713
ea38d2a9 5714 PR build/16445
c7faa97a
PA
5715 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5716 defined after including gdb_proc_service.h.
b5737fa9 5717
40ed484e
DE
57182014-01-16 Doug Evans <dje@google.com>
5719
5720 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5721 (match_dll): Use it.
5722
969c39fb
MM
57232014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5724
5725 * target.h (target_ops) <read_btrace>: Change parameters and
5726 return type to allow error reporting.
5727 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5728 trace reading errors on.
5729 * linux-low.c (linux_low_read_btrace): Pass trace reading
5730 errors on.
5731 (linux_low_disable_btrace): New.
5732
ab7f45ba
DE
57332014-01-15 Doug Evans <dje@google.com>
5734
5735 * inferiors.c (thread_id_to_gdb_id): Delete.
5736 * inferiors.h (thread_id_to_gdb_id): Delete.
5737
66af0f44
EZ
57382014-01-13 Eli Zaretskii <eliz@gnu.org>
5739
5740 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5741 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5742 versions.
5743
9939e131
PA
57442014-01-08 Pedro Alves <palves@redhat.com>
5745
5746 * server.c (handle_status): Don't discard previous queued stop
5747 replies or thread's pending status here.
5748 (main) <disconnection>: Do it here instead.
5749
b7ea362b
PA
57502014-01-08 Pedro Alves <palves@redhat.com>
5751
5752 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5753 * server.c (visit_actioned_threads, handle_pending_status): New
5754 function.
5755 (handle_v_cont): Factor out parts to ...
5756 (resume): ... this new function. If in all-stop, and a thread
5757 being resumed has a pending status, report it without actually
5758 resuming.
5759 (myresume): Adjust to use the new 'resume' function.
5760 (clear_pending_status_callback, set_pending_status_callback)
5761 (find_status_pending_thread_callback): New functions.
5762 (handle_status): Handle the case of multiple threads having
5763 interesting statuses to report. Report threads' real last signal
5764 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5765 with an interesting thread to report the status for, instead of
5766 always reporting the status of the first thread.
5767
28498c42
JB
57682014-01-01 Joel Brobecker <brobecker@adacore.com>
5769
5770 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5771 * gdbreplay.c (gdbreplay_version): Likewise.
5772
f45c82da
YZ
57732013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5774
5775 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5776 iov.iov_len with the real length in use.
5777
379a5e2d
JB
57782013-12-13 Joel Brobecker <brobecker@adacore.com>
5779
5780 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5781 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5782 for all targets that use win32-low.c.
5783 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5784 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5785
4210d83e
PA
57862013-12-13 Pedro Alves <palves@redhat.com>
5787
5788 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5789 if equal to TARGET_WAITKIND_LOADED.
5790 * win32-low.c (cached_status): New static global.
5791 (win32_wait): Add declaration.
5792 (do_initial_child_stuff): Flush all initial pending debug events
5793 up to the initial breakpoint.
5794 (win32_wait): If CACHED_STATUS was set, return that instead
5795 of doing a real wait. Remove the code resuming the execution
5796 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5797 during the initial phase. Also remove the code changing
5798 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5799 TARGET_WAITKIND_STOPPED.
5800
e7f0d979
YQ
58012013-12-11 Yao Qi <yao@codesourcery.com>
5802
5803 * notif.c (handle_notif_ack): Return 0 if no notification
5804 matches.
5805
ebcf782c
DE
58062013-11-20 Doug Evans <dje@google.com>
5807
5808 * linux-low.c (linux_set_resume_request): Fix comment.
5809
20ad9378
DE
58102013-11-20 Doug Evans <dje@google.com>
5811
5812 * linux-low.c (resume_status_pending_p): Tweak comment.
5813
a196ebeb
WT
58142013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5815
5816 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5817 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5818 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5819 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5820 (srv_amd64_regobj): Add amd64-mpx.o.
5821 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5822 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5823 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5824 * i387-fp.c (num_pl_bnd_register) Added constant.
5825 (num_pl_bnd_cfg_registers) Added constant.
5826 (struct i387_xsave) Added reserved area and MPX fields.
5827 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5828 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5829 function.
5830 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5831 (init_registers_amd64_mpx_linux): Declare new function.
5832 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5833 (x86_64_regmap): Add MPX registers.
5834 (x86_linux_read_description): Add MPX case.
5835 (initialize_low_arch): Initialize MPX targets.
5836
0080a2f6
TT
58372013-11-18 Tom Tromey <tromey@redhat.com>
5838
5839 * configure: Rebuild.
5840 * configure.ac: Don't check for stdlib.h.
5841 * gdbreplay.c: Unconditionally include stdlib.h.
5842
2978b111
TT
58432013-11-18 Tom Tromey <tromey@redhat.com>
5844
5845 * config.in: Rebuild.
5846 * configure: Rebuild.
5847 * configure.ac: Don't use AC_HEADER_DIRENT.
5848
a3d08894
TT
58492013-11-18 Tom Tromey <tromey@redhat.com>
5850
5851 * server.h: Don't check HAVE_STRING_H.
5852 * gdbreplay.c: Don't check HAVE_STRING_H.
5853 * configure: Rebuild.
5854
0a5dd17d
TT
58552013-11-18 Tom Tromey <tromey@redhat.com>
5856
5857 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5858 LIBGNU.
5859
1bd2f0ba
TT
58602013-11-08 Tom Tromey <tromey@redhat.com>
5861
5862 * configure, config.in: Rebuild.
5863 * configure.ac: Remove unused configury.
5864
3266f10b
TT
58652013-11-08 Tom Tromey <tromey@redhat.com>
5866
5867 * acinclude.m4: Include common.m4, codeset.m4.
5868 * configure, config.in: Rebuild.
5869 * configure.ac: Use GDB_AC_COMMON.
5870
6682d959
AA
58712013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5872
5873 * linux-s390-low.c (HWCAP_S390_TE): New define.
5874 (s390_arch_setup): Consider the TE field in the HWCAP for
5875 determining 'have_regset_tdb'.
5876
fd0a4d76
SDJ
58772013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5878
5879 PR gdb/16014
5880 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5881 call to sizeof.
5882
1a3d890b
PA
58832013-10-02 Pedro Alves <palves@redhat.com>
5884
5885 * server.c (process_serial_event): Don't output "GDBserver
5886 exiting" if GDB is connected through stdio.
5887 * target.c (mywait): Likewise, be silent if GDB is connected
5888 through stdio.
5889
97ad4581
JB
58902013-10-01 Joel Brobecker <brobecker@adacore.com>
5891
5892 * lynx-low.c (lynx_add_threads_after_attach): New function.
5893 (lynx_attach): Remove call to add_thread. Add call to
5894 lynx_add_threads_after_attach instead.
5895
5b4e221c
MF
58962013-09-28 Mike Frysinger <vapier@gentoo.org>
5897
5898 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5899 * config.in, configure: Regenerated.
5900
ee47b2f8
YQ
59012013-09-18 Yao Qi <yao@codesourcery.com>
5902
5903 PR server/15959
5904 * server.c (start_inferior): Clear 'resume_info'.
5905
d6707650 59062013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5907
d6707650
JW
5908 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5909 for each register.
5910
9243dd0e 59112013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5912
9243dd0e
JW
5913 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5914 linux-tile-low.o to srv_tgtobj.
5915
c623a6ef
WN
59162013-09-16 Will Newton <will.newton@linaro.org>
5917
5918 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5919 out regs.
5920
fb71d39e
PA
59212013-09-06 Pedro Alves <palves@redhat.com>
5922
5923 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5924 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5925 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5926 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5927 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5928 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5929
8e7e9910
PA
59302013-09-06 Pedro Alves <palves@redhat.com>
5931
5932 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5933 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5934
7c3a12ca
PA
59352013-09-06 Pedro Alves <palves@redhat.com>
5936
5937 * linux-amd64-ipa.c: Include tracepoint.h.
5938 * linux-i386-ipa.c: Include tracepoint.h.
5939
8eb3d7b6
RW
59402013-09-06 Ricard Wanderlof <ricardw@axis.com>
5941
5942 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5943 (ps_get_thread_area): New function.
5944
eddddb9d
RW
59452013-09-06 Ricard Wanderlof <ricardw@axis.com>
5946
5947 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5948 (initialize_low_arch): Call init_registers_crisv32 rather than
5949 init_register_crisv32.
5950
533b0600
PA
59512013-09-05 Pedro Alves <palves@redhat.com>
5952
5953 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5954 to ...
5955 * hostio.h: ... this new file.
5956 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5957 win32-low.c: Include hostio.h.
5958
0ce3d3b5
PA
59592013-09-05 Pedro Alves <palves@redhat.com>
5960
5961 * server.h (gdb_client_data, handler_func, callback_handler_func)
5962 (delete_file_handler, add_file_handler, append_callback_event)
5963 (delete_callback_event, start_event_loop, initialize_event_loop):
5964 Move to event-loop.h and include it.
5965 * event-loop.h: New file.
5966
799cdc37
PA
59672013-09-05 Pedro Alves <palves@redhat.com>
5968
5969 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5970 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5971 (loaded_dll, unloaded_dll): Move to ...
5972 * dll.h: ... this new file.
5973 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5974
6a6bbd9d
PA
59752013-09-05 Pedro Alves <palves@redhat.com>
5976
5977 * server.h (current_process, get_thread_process, all_processes)
5978 (add_inferior_to_list, for_each_inferior, current_inferior)
5979 (remove_inferior, add_process, remove_process, find_process_pid)
5980 (have_started_inferiors_p, have_attached_inferiors_p)
5981 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5982 (clear_inferiors, find_inferior, find_inferior_id)
5983 (inferior_target_data, set_inferior_target_data)
5984 (inferior_regcache_data, set_inferior_regcache_data): Move to
5985 inferiors.h, and include it.
5986 * inferiors.h: New file.
5987
f699aaba
PA
59882013-09-05 Pedro Alves <palves@redhat.com>
5989
5990 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5991 Move ...
72f4393d 5992 * ax.h: ... here.
f699aaba 5993
c144c7a0
PA
59942013-09-05 Pedro Alves <palves@redhat.com>
5995
5996 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5997 tracepoint.h.
5998 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5999 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6000 (handle_tracepoint_general_set, handle_tracepoint_query)
6001 (tracepoint_finished_step, tracepoint_was_hit)
6002 (release_while_stepping_state_list, current_traceframe)
6003 (in_readonly_region, traceframe_read_mem)
6004 (fetch_traceframe_registers, traceframe_read_sdata)
6005 (traceframe_read_info, struct fast_tpoint_collect_status)
6006 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6007 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6008 (supply_fast_tracepoint_registers)
6009 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6010 (ipa_tdesc, claim_trampoline_space)
6011 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6012 (agent_mem_read, agent_get_trace_state_variable_value)
6013 (agent_set_trace_state_variable_value, agent_tsv_read)
6014 (agent_mem_read_string, get_raw_reg_func_addr)
6015 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6016 * tracepoint.h: ... this new file.
6017
ff42e6ab
PA
60182013-09-05 Pedro Alves <palves@redhat.com>
6019
6020 * server.h (perror_with_name, error, fatal, warning, paddress)
6021 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6022 include it.
6023 * utils.h: New file.
6024
541af0f4
PA
60252013-09-05 Pedro Alves <palves@redhat.com>
6026
6027 * server.h (remote_debug, noack_mode, transport_is_reliable)
6028 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6029 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6030 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6031 (write_enn, initialize_async_io, enable_async_io)
6032 (disable_async_io, check_remote_input_interrupt_request)
6033 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6034 (dead_thread_notify, prepare_resume_reply)
6035 (decode_address_to_semicolon, decode_address, decode_m_packet)
6036 (decode_M_packet, decode_X_packet, decode_xfer_write)
6037 (decode_search_memory_packet, unhexify, hexify)
6038 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6039 (look_up_one_symbol, relocate_instruction)
6040 (monitor_output): Move to remote-utils.h, and include it.
6041 * remote-utils.h: New file.
6042
eebdf26b
PA
60432013-09-05 Pedro Alves <palves@redhat.com>
6044
6045 * server.h (_): Delete.
6046
3aafd2ff
PA
60472013-09-02 Pedro Alves <palves@redhat.com>
6048
6049 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6050 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6051 allocated.
6052 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6053
cee83bcb
PM
60542013-09-02 Pierre Muller <muller@sourceware.org>
6055
6056 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6057 or WriteProcessMemory complete successfully and handle
6058 ERROR_PARTIAL_COPY error.
6059
9a13b2fa
PA
60602013-09-02 Pedro Alves <palves@redhat.com>
6061
6062 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6063 error instead of EIO.
6064
602e3198
JK
60652013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6066
6067 PR server/15604
6068 * linux-low.c: Include filestuff.h.
6069 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6070 * lynx-low.c: Include filestuff.h.
6071 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6072 * server.c: Include filestuff.h.
6073 (main): Call notice_open_fds.
6074 * spu-low.c: Include filestuff.h.
6075 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6076
96d7229d
LM
60772013-08-22 Luis Machado <lgustavo@codesourcery.com>
6078
6079 * Makefile.in: Explain why ../target and ../nat are not
6080 listed as include file search paths.
6081 (linux-waitpid.o): New object file rule.
6082 * configure.srv (srv_native_linux_obj): New variable.
6083 Replace all occurrences of linux native object files with
6084 $srv_native_linux_obj.
6085 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6086 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6087 (linux_enable_event_reporting): Remove declaration.
6088 (my_waitpid): Moved to common/linux-waitpid.c.
6089 (linux_wait_for_event): Pass ptid when calling
6090 linux_enable_event_reporting.
6091 (linux_supports_tracefork_flag): Remove.
6092 (linux_enable_event_reporting): Likewise.
6093 (linux_tracefork_grandchild): Remove.
6094 (STACK_SIZE): Moved to common/linux-ptrace.c.
6095 (linux_tracefork_child): Remove.
6096 (linux_test_for_tracefork): Remove.
6097 (linux_look_up_symbols): Call linux_supports_traceclone.
6098 (initialize_low): Remove call to linux_test_for_tracefork.
6099 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6100 common/linux-ptrace.h.
6101 (PTRACE_TYPE_ARG4): Likewise.
6102 Include linux-ptrace.h.
6103
32940073
PA
61042013-08-21 Pedro Alves <palves@redhat.com>
6105
6106 * config.in: Renegerate.
6107
33b60d58 61082013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6109
33b60d58
LM
6110 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6111 (SFILES): Remove $(srcdir)/common/target-common.c and
6112 add $(srcdir)/target/waitstatus.c.
6113 (OBS): Remove target-common.o and add waitstatus.o.
6114 (server_h): Remove $(srcdir)/../common/target-common.h and
6115 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6116 and $(srcdir)/../target/waitstatus.h.
6117 (target-common.o): Remove.
6118 (waitstatus.o): New target object file.
6119 * target.h: Do not include target-common.h and
6120 include target/resume.h, target/wait.h and
6121 target/waitstatus.h.
6122
b8e1b30e
LM
61232013-08-13 Luis Machado <lgustavo@codesourcery.com>
6124
6125 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6126 to PTRACE_TYPE_ARG3.
6127 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6128 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6129 PTRACE_TYPE_ARG4.
6130 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6131 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6132
7a60ad40
YQ
61332013-07-27 Jie Zhang <jie@codesourcery.com>
6134 Daniel Jacobowitz <dan@codesourcery.com>
6135 Yao Qi <yao@codesourcery.com>
6136
6137 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6138 (mips-linux-watch.o): New rule.
6139 (mips_linux_watch_h): New variable.
6140 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6141 srv_tgtobj.
6142 * linux-mips-low.c: Include mips-linux-watch.h.
6143 (struct arch_process_info, struct arch_lwp_info): New.
6144 (update_watch_registers_callback): New function.
6145 (mips_linux_new_process, mips_linux_new_thread) New functions.
6146 (mips_linux_prepare_to_resume, mips_insert_point): New
6147 functions.
6148 (mips_remove_point, mips_stopped_by_watchpoint): New
6149 functions.
6150 (rsp_bp_type_to_target_hw_bp_type): New function.
6151 (mips_stopped_data_address): New function.
6152 (the_low_target): Add watchpoint support functions.
6153
de6f69ad
YQ
61542013-07-27 Yao Qi <yao@codesourcery.com>
6155
6156 * i386-low.c: Include break-common.h.
6157 (enum target_hw_bp_type): Remove.
6158
3360c0bf
LM
61592013-07-24 Luis Machado <lgustavo@codesourcery.com>
6160
6161 * Makefile.in (SFILES): /common/target-common.c.
6162 (OBS): Add target-common.o.
6163 (server_h): Add $(srcdir)/../common/target-common.h.
6164 (target-common.o): New target.
6165 * server.c (queue_stop_reply_callback): Free
6166 status string after use.
6167 * target.c (target_waitstatus_to_string): Remove.
6168 * target.h: Include target-common.h.
6169 (resume_kind): Likewise.
6170 (target_waitkind): Likewise.
6171 (target_waitstatus): Likewise.
6172 (TARGET_WNOHANG): Likewise.
6173
bd885420
YQ
61742013-07-04 Yao Qi <yao@codesourcery.com>
6175
6176 * Makefile.in (host_alias): Use @host_noncanonical@.
6177 (target_alias): Use @target_noncanonical@.
6178 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6179 ACX_NONCANONICAL_HOST.
6180 * configure: Regenerated.
6181
6182 Revert:
6183 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6184
6185 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6186 * configure: Rebuild.
6187 * Makefile.in (version_host, version_target): Get from configure.
6188 (version.c): Use $(version_host) and $(version_target).
6189
17ef446e
PA
61902013-07-03 Pedro Alves <palves@redhat.com>
6191
6192 * Makefile.in (config.status): Depend on development.sh.
6193 * acinclude.m4: Include libmcheck.m4.
6194 * configure: Regenerate.
6195
7a9a7487
MG
61962013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6197
6198 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6199 attribute inside the parentheses.
6200 (winapi_DebugSetProcessKillOnExit): Ditto.
6201 (winapi_DebugBreakProcess): Ditto.
6202 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6203
49b64de6
MG
62042013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6205
6206 * notif.h (notif_event): Add a dummy member to avoid compiler
6207 errors.
6208
d5749ee7
PA
62092013-07-01 Pedro Alves <palves@redhat.com>
6210
6211 * hostio.c (HOSTIO_PATH_MAX): Define.
6212 (require_filename, handle_open, handle_unlink, handle_readlink):
6213 Use it.
6214
d8d2a3ee
PA
62152013-07-01 Pedro Alves <palves@redhat.com>
6216
6217 * server.h: Include "pathmax.h".
6218 * linux-low.c: Don't include sys/param.h.
6219 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6220 MAXPATHLEN.
6221 * win32-low.c: Don't include sys/param.h.
6222 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6223
bc7dea8d
PA
62242013-07-01 Pedro Alves <palves@redhat.com>
6225
6226 * event-loop.c: Don't check HAVE_UNISTD_H before including
6227 <unistd.h>.
6228 * gdbreplay.c: Likewise.
6229 * remote-utils.c: Likewise.
6230 * server.c: Likewise.
6231 * configure.ac: Don't check for unistd.h.
6232 * configure: Regenerate.
6233
d6c2da54
TT
62342013-06-28 Tom Tromey <tromey@redhat.com>
6235
6236 * Makefile.in (version.c): Use version.in, not
6237 common/version.in.
6238
257b6bec
MG
62392013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6240
6241 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6242 * configure: Rebuild.
6243 * Makefile.in (version_host, version_target): Get from configure.
6244 (version.c): Use $(version_host) and $(version_target).
6245
86ebe149
DK
62462013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6247
6248 Fix trace-status to output user name without trailing colon.
6249 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6250
f30aa5af
DK
62512013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6252
6253 Fix trace-status to output proper start-time and stop-time.
6254 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6255 output start time and stop time in hex as gdb expects.
6256
28a93511
YQ
62572013-06-26 Pedro Alves <pedro@codesourcery.com>
6258
6259 * tracepoint.c (build_traceframe_info_xml): Output trace state
6260 variables present in the trace buffer.
6261
01208463
TT
62622013-06-24 Tom Tromey <tromey@redhat.com>
6263
6264 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6265 create-version.sh.
6266 (version.o): Remove.
6267 * gdbreplay.c: Include version.h.
6268 (version, host_name): Don't declare.
6269 * server.h: Include version.h.
6270 (version, host_name): Don't declare.
6271
760256f9
PA
62722013-06-12 Pedro Alves <palves@redhat.com>
6273
6274 * linux-x86-low.c (linux_is_elf64): Delete global.
6275 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6276 with local linux_pid_exe_is_elf_64_file use.
6277
030031ee
PA
62782013-06-11 Pedro Alves <palves@redhat.com>
6279
6280 * linux-low.c (regset_disabled, disable_regset): New functions.
6281 (regsets_fetch_inferior_registers)
6282 (regsets_store_inferior_registers): Use them.
6283 (initialize_regsets_info); Don't allocate the disabled_regsets
6284 array here.
6285 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6286 comment.
6287
5da6eb0a
PA
62882013-06-11 Pedro Alves <palves@redhat.com>
6289
6290 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6291 xmalloc.
6292
7e5aaa09
PA
62932013-06-11 Pedro Alves <palves@redhat.com>
6294
6295 * linux-x86-low.c (initialize_low_arch): Call
6296 init_registers_x32_avx_linux.
6297
d878444c
JK
62982013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6299
6300 Fix compatibility with Android Bionic.
6301 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6302 it is not empty.
6303
3aee8918
PA
63042013-06-07 Pedro Alves <palves@redhat.com>
6305
5f2b57b5 6306 PR server/14823
3aee8918
PA
6307 * Makefile.in (OBS): Add tdesc.o.
6308 (IPA_OBJS): Add tdesc-ipa.o.
6309 (tdesc-ipa.o): New rule.
6310 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6311 interface.
6312 * linux-low.c (new_inferior): Delete.
6313 (disabled_regsets, num_regsets): Delete.
6314 (linux_add_process): Adjust to set the new per-process
6315 new_inferior flag.
6316 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6317 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6318 was a stop. When calling arch_setup, switch the current inferior
6319 to the thread that got an event.
6320 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6321 (regsets_fetch_inferior_registers)
6322 (regsets_store_inferior_registers): New regsets_info parameter.
6323 Adjust to use it.
6324 (linux_register_in_regsets): New regs_info parameter. Adjust to
6325 use it.
6326 (register_addr, fetch_register, store_register): New usrregs_info
6327 parameter. Adjust to use it.
6328 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6329 parameter regs_info. Adjust to use it.
6330 (linux_fetch_registers): Get the current inferior's regs_info, and
6331 adjust to use it.
6332 (linux_store_registers): Ditto.
6333 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6334 (initialize_low): Don't initialize the target_regsets here. Call
6335 initialize_low_arch.
6336 * linux-low.h (target_regsets): Delete declaration.
6337 (struct regsets_info): New.
6338 (struct usrregs_info): New.
6339 (struct regs_info): New.
6340 (struct process_info_private) <new_inferior>: New field.
6341 (struct linux_target_ops): Delete the num_regs, regmap, and
6342 regset_bitmap fields. New field regs_info.
6343 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6344 * i387-fp.c (num_xmm_registers): Delete.
6345 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6346 calls to new interface.
6347 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6348 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6349 Infer the number of xmm registers from the regcache's target
6350 description.
6351 * i387-fp.h (num_xmm_registers): Delete.
6352 * inferiors.c (add_thread): Don't install the thread's regcache
6353 here.
6354 * proc-service.c (gregset_info): Fetch the current inferior's
6355 regs_info. Adjust to use it.
6356 * regcache.c: Include tdesc.h.
6357 (register_bytes, reg_defs, num_registers)
6358 (gdbserver_expedite_regs): Delete.
6359 (get_thread_regcache): If the thread doesn't have a regcache yet,
6360 create one, instead of aborting gdbserver.
6361 (regcache_invalidate_one): Rename to ...
6362 (regcache_invalidate_thread): ... this.
6363 (regcache_invalidate_one): New.
6364 (regcache_invalidate): Only invalidate registers of the current
6365 process.
6366 (init_register_cache): Add target_desc parameter, and use it.
6367 (new_register_cache): Ditto. Assert the target description has a
6368 non zero registers_size.
6369 (regcache_cpy): Add assertions. Adjust.
6370 (realloc_register_cache, set_register_cache): Delete.
6371 (registers_to_string, registers_from_string): Adjust.
6372 (find_register_by_name, find_regno, find_register_by_number)
6373 (register_cache_size): Add target_desc parameter, and use it.
6374 (free_register_cache_thread, free_register_cache_thread_one)
6375 (regcache_release, register_cache_size): New.
6376 (register_size): Add target_desc parameter, and use it.
6377 (register_data, supply_register, supply_register_zeroed)
6378 (supply_regblock, supply_register_by_name, collect_register)
6379 (collect_register_as_string, collect_register_by_name): Adjust.
6380 * regcache.h (struct target_desc): Forward declare.
6381 (struct regcache) <tdesc>: New field.
6382 (init_register_cache, new_register_cache): Add target_desc
6383 parameter.
6384 (regcache_invalidate_thread): Declare.
6385 (regcache_invalidate_one): Delete declaration.
6386 (regcache_release): Declare.
6387 (find_register_by_number, register_cache_size, register_size)
6388 (find_regno): Add target_desc parameter.
6389 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6390 declarations.
6391 * remote-utils.c: Include tdesc.h.
6392 (outreg, prepare_resume_reply): Adjust.
6393 * server.c: Include tdesc.h.
6394 (gdbserver_xmltarget): Delete declaration.
6395 (get_features_xml, process_serial_event): Adjust.
6396 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6397 declare.
6398 (struct process_info) <tdesc>: New field.
6399 (ipa_tdesc): Declare.
6400 * tdesc.c: New file.
6401 * tdesc.h: New file.
6402 * tracepoint.c: Include tdesc.h.
6403 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6404 (get_context_regcache): Adjust to pass ipa_tdesc down.
6405 (do_action_at_tracepoint): Adjust to get the register cache size
6406 from the context regcache's description.
6407 (traceframe_walk_blocks): Adjust to get the register cache size
6408 from the current trace frame's description.
6409 (traceframe_get_pc): Adjust to get current trace frame's
6410 description and pass it down.
6411 (gdb_collect): Adjust to get the register cache size from the
6412 IPA's description.
6413 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6414 (gdbserver_xmltarget): Delete.
6415 (initialize_low_tracepoint): Set the ipa's target description.
6416 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6417 (initialize_low_tracepoint): Set the ipa's target description.
6418 * linux-x86-low.c: Include tdesc.h.
6419 [__x86_64__] (is_64bit_tdesc): New.
6420 (ps_get_thread_area, x86_get_thread_area): Use it.
6421 (i386_cannot_store_register): Rename to ...
6422 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6423 (i386_cannot_fetch_register): Rename to ...
6424 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6425 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6426 to new interface.
6427 (target_regsets): Rename to ...
6428 (x86_regsets): ... this.
6429 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6430 interface.
6431 (x86_siginfo_fixup): Use is_64bit_tdesc.
6432 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6433 (tdesc_x32_avx_linux, tdesc_x32_linux)
6434 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6435 Declare.
6436 (x86_linux_update_xmltarget): Delete.
6437 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6438 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6439 (AMD64_LINUX_USER64_CS): New.
6440 (x86_linux_read_description): New, based on
6441 x86_linux_update_xmltarget.
6442 (same_process_callback): New.
6443 (x86_arch_setup_process_callback): New.
6444 (x86_linux_update_xmltarget): New.
6445 (x86_regsets_info): New.
6446 (amd64_linux_regs_info): New.
6447 (i386_linux_usrregs_info): New.
6448 (i386_linux_regs_info): New.
6449 (x86_linux_regs_info): New.
6450 (x86_arch_setup): Reimplement.
6451 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6452 (x86_emit_ops): Ditto.
6453 (the_low_target): Adjust. Install x86_linux_regs_info,
6454 x86_cannot_fetch_register, and x86_cannot_store_register.
6455 (initialize_low_arch): New.
6456 * linux-ia64-low.c (tdesc_ia64): Declare.
6457 (ia64_fetch_register): Adjust.
6458 (ia64_usrregs_info, regs_info): New globals.
6459 (ia64_regs_info): New function.
6460 (the_low_target): Adjust.
6461 (initialize_low_arch): New function.
6462 * linux-sparc-low.c (tdesc_sparc64): Declare.
6463 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6464 Adjust.
6465 (sparc_arch_setup): New function.
6466 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6467 (the_low_target): Adjust.
6468 (initialize_low_arch): New function.
6469 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6470 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6471 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6472 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6473 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6474 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6475 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6476 (tdesc_powerpc_isa205_vsx64l): Declare.
6477 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6478 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6479 (ppc_set_pc, ppc_get_hwcap): Adjust.
6480 (ppc_usrregs_info): Forward declare.
6481 (!__powerpc64__) ppc_regmap_adjusted: New global.
6482 (ppc_arch_setup): Adjust to the current process'es target
6483 description.
6484 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6485 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6486 (ppc_store_evrregset): Adjust.
6487 (target_regsets): Rename to ...
6488 (ppc_regsets): ... this, and make static.
6489 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6490 (ppc_regs_info): New function.
6491 (the_low_target): Adjust.
6492 (initialize_low_arch): New function.
6493 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6494 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6495 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6496 (tdesc_s390x_linux64v2): Declare.
6497 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6498 (s390_fill_gregset, s390_store_last_break): Adjust.
6499 (target_regsets): Rename to ...
6500 (s390_regsets): ... this, and make static.
6501 (s390_get_pc, s390_set_pc): Adjust.
6502 (s390_get_hwcap): New target_desc parameter, and use it.
6503 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6504 (s390_arch_setup): Adjust to set the current process'es target
6505 description. Don't adjust the regmap.
6506 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6507 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6508 (regs_info_3264): New globals.
6509 (s390_regs_info): New function.
6510 (the_low_target): Adjust.
6511 (initialize_low_arch): New function.
6512 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6513 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6514 [__mips64] (init_registers_mips_linux)
6515 (init_registers_mips_dsp_linux): Delete defines.
6516 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6517 (have_dsp): New global.
6518 (mips_read_description): New, based on mips_arch_setup.
6519 (mips_arch_setup): Reimplement.
6520 (get_usrregs_info): New function.
6521 (mips_cannot_fetch_register, mips_cannot_store_register)
6522 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6523 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6524 (target_regsets): Rename to ...
6525 (mips_regsets): ... this, and make static.
6526 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6527 (dsp_regs_info, regs_info): New globals.
6528 (mips_regs_info): New function.
6529 (the_low_target): Adjust.
6530 (initialize_low_arch): New function.
6531 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6532 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6533 Declare.
6534 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6535 (arm_read_description): New, with bits factored from
6536 arm_arch_setup.
6537 (arm_arch_setup): Reimplement.
6538 (target_regsets): Rename to ...
6539 (arm_regsets): ... this, and make static.
6540 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6541 (arm_regs_info): New function.
6542 (the_low_target): Adjust.
6543 (initialize_low_arch): New function.
6544 * linux-m68k-low.c (tdesc_m68k): Declare.
6545 (target_regsets): Rename to ...
6546 (m68k_regsets): ... this, and make static.
6547 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6548 (m68k_regs_info): New function.
6549 (m68k_arch_setup): New function.
6550 (the_low_target): Adjust.
6551 (initialize_low_arch): New function.
6552 * linux-sh-low.c (tdesc_sharch): Declare.
6553 (target_regsets): Rename to ...
6554 (sh_regsets): ... this, and make static.
6555 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6556 (sh_regs_info, sh_arch_setup): New functions.
6557 (the_low_target): Adjust.
6558 (initialize_low_arch): New function.
6559 * linux-bfin-low.c (tdesc_bfin): Declare.
6560 (bfin_arch_setup): New function.
6561 (bfin_usrregs_info, regs_info): New globals.
6562 (bfin_regs_info): New function.
6563 (the_low_target): Adjust.
6564 (initialize_low_arch): New function.
6565 * linux-cris-low.c (tdesc_cris): Declare.
6566 (cris_arch_setup): New function.
6567 (cris_usrregs_info, regs_info): New globals.
6568 (cris_regs_info): New function.
6569 (the_low_target): Adjust.
6570 (initialize_low_arch): New function.
6571 * linux-cris-low.c (tdesc_crisv32): Declare.
6572 (cris_arch_setup): New function.
6573 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6574 (cris_regs_info): New function.
6575 (the_low_target): Adjust.
6576 (initialize_low_arch): New function.
6577 * linux-m32r-low.c (tdesc_m32r): Declare.
6578 (m32r_arch_setup): New function.
6579 (m32r_usrregs_info, regs_info): New globals.
6580 (m32r_regs_info): Adjust.
6581 (initialize_low_arch): New function.
6582 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6583 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6584 (tic6x_usrregs_info): Forward declare.
6585 (tic6x_read_description): New function, based on ...
6586 (tic6x_arch_setup): ... this. Reimplement.
6587 (target_regsets): Rename to ...
6588 (tic6x_regsets): ... this, and make static.
6589 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6590 (tic6x_regs_info): New function.
6591 (the_low_target): Adjust.
6592 (initialize_low_arch): New function.
6593 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6594 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6595 (target_regsets): Rename to ...
6596 (xtensa_regsets): ... this, and make static.
6597 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6598 globals.
6599 (xtensa_arch_setup, xtensa_regs_info): New functions.
6600 (the_low_target): Adjust.
6601 (initialize_low_arch): New function.
6602 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6603 (nios2_arch_setup): Set the current process'es tdesc.
6604 (target_regsets): Rename to ...
6605 (nios2_regsets): ... this.
6606 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6607 (nios2_regs_info): New function.
6608 (the_low_target): Adjust.
6609 (initialize_low_arch): New function.
a261b8f5
PA
6610 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6611 (aarch64_arch_setup): Set the current process'es tdesc.
6612 (target_regsets): Rename to ...
6613 (aarch64_regsets): ... this.
6614 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6615 (aarch64_regs_info): New function.
6616 (the_low_target): Adjust.
6617 (initialize_low_arch): New function.
3aee8918
PA
6618 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6619 globals.
6620 (target_regsets): Rename to ...
6621 (tile_regsets): ... this.
6622 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6623 (tile_regs_info): New function.
6624 (tile_arch_setup): Set the current process'es tdesc.
6625 (the_low_target): Adjust.
6626 (initialize_low_arch): New function.
6627 * spu-low.c (tdesc_spu): Declare.
6628 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6629 * win32-arm-low.c (tdesc_arm): Declare.
6630 (arm_arch_setup): New function.
6631 (the_low_target): Install arm_arch_setup instead of
6632 init_registers_arm.
6633 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6634 (init_windows_x86): Rename to ...
6635 (i386_arch_setup): ... this. Set `win32_tdesc'.
6636 (the_low_target): Adjust.
6637 * win32-low.c (win32_tdesc): New global.
6638 (child_add_thread): Don't create the thread cache here.
6639 (do_initial_child_stuff): Set the new process'es tdesc.
6640 * win32-low.h (struct target_desc): Forward declare.
6641 (win32_tdesc): Declare.
6642 * lynx-i386-low.c (tdesc_i386): Declare global.
6643 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6644 * lynx-low.c (lynx_tdesc): New global.
6645 (lynx_add_process): Set the new process'es tdesc.
6646 * lynx-low.h (struct target_desc): Forward declare.
6647 (lynx_tdesc): Declare global.
6648 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6649 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6650 * nto-low.c (nto_tdesc): New global.
6651 (do_attach): Set the new process'es tdesc.
6652 * nto-low.h (struct target_desc): Forward declare.
6653 (nto_tdesc): Declare.
6654 * nto-x86-low.c (tdesc_i386): Declare.
6655 (nto_x86_arch_setup): Set `nto_tdesc'.
6656
b1fbec62
GB
66572013-06-04 Gary Benson <gbenson@redhat.com>
6658
6659 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6660 to qSupported response when appropriate.
6661 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6662 with nonzero-length annex.
6663 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6664 arguments supplied in annex.
6665
d1ec4ce7
DE
66662013-05-31 Doug Evans <dje@google.com>
6667
ac44adcb 6668 PR server/15594
d1ec4ce7
DE
6669 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6670 64 bits in 64-cross-32 environment.
6671
9b25f2d3
PA
66722013-05-28 Pedro Alves <palves@redhat.com>
6673
6674 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6675 (aarch64-without-fpu.c): Delete rule.
6676 * configure.srv (aarch64*-*-linux*): Remove references to
6677 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6678 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6679 declaration.
6680
6740dc9c
PA
66812013-05-24 Pedro Alves <palves@redhat.com>
6682
6683 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6684 instead of strchr/decode_address. Error if the range isn't split
6685 with a ','. Don't assume there's be a ':' in the action.
6686
c2d6af84
PA
66872013-05-23 Yao Qi <yao@codesourcery.com>
6688 Pedro Alves <palves@redhat.com>
6689
6690 * linux-low.c (lwp_in_step_range): New function.
6691 (linux_wait_1): If the thread was range stepping and stopped
6692 outside the stepping range, report the stop to GDB. Otherwise,
6693 continue stepping. Add range stepping debug output.
6694 (linux_set_resume_request): Copy the step range from the resume
6695 request to the lwp.
6696 (linux_supports_range_stepping): New.
6697 (linux_target_ops) <supports_range_stepping>: Set to
6698 linux_supports_range_stepping.
6699 * linux-low.h (struct linux_target_ops)
6700 <supports_range_stepping>: New field.
6701 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6702 * linux-x86-low.c (x86_supports_range_stepping): New.
6703 (the_low_target) <supports_range_stepping>: Set to
6704 x86_supports_range_stepping.
6705 * server.c (handle_v_cont): Handle 'r' action.
6706 (handle_v_requests): Append ";r" if the target supports range
6707 stepping.
6708 * target.h (struct thread_resume) <step_range_start,
6709 step_range_end>: New fields.
6710 (struct target_ops) <supports_range_stepping>:
6711 New field.
6712 (target_supports_range_stepping): New macro.
6713
58794e1a
JB
67142013-05-17 Joel Brobecker <brobecker@adacore.com>
6715
6716 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6717 confusion in comment.
6718
d631c5a7
JB
67192013-05-17 Joel Brobecker <brobecker@adacore.com>
6720
6721 * lynx-low.c (struct process_info_private): New type.
6722 (lynx_add_process): New function.
6723 (lynx_create_inferior, lynx_attach): Replace calls to
6724 add_process by calls to lynx_add_process.
6725 (lynx_resume): If PTID is null, then try using
6726 current_process()->private->last_wait_event_ptid.
6727 Add comments.
6728 (lynx_clear_inferiors): Delete. The contents of that function
6729 has been inlined in lynx_mourn;
6730 (lynx_wait_1): Save the ptid in the process's private data.
6731 (lynx_mourn): Free the process' private data. Replace call
6732 to lynx_clear_inferiors by call to clear_inferiors.
6733
96f7a20f
YQ
67342013-05-17 Yao Qi <yao@codesourcery.com>
6735
6736 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6737 the right place.
6738
db0dfaa0
LM
67392013-05-16 Luis Machado <lgustavo@codesourcery.com>
6740
6741 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6742 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6743 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6744 PT_TEXT_END_ADDR guards. Update comments.
6745 (linux_target_op) <read_offsets>: Conditionally define to
6746 linux_read_offsets if the target is UCLIBC and if it defines
6747 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6748
68f5f838
SL
67492013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6750 Andrew Jenner <andrew@codesourcery.com>
6751
6752 * Makefile.in (SFILES): Add linux-nios2-low.c.
6753 (clean): Add action to delete nios2-linux.c.
6754 (nios2-linux.c): New rule.
6755 * configure.srv: Add nios2*-*-linux*.
6756 * linux-nios2-low.c: New.
6757
1ebff1fd
HAQ
67582013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6759
6760 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6761
f6150862
HZ
67622013-04-25 Hui Zhu <hui@codesourcery.com>
6763
6764 PR gdb/15186
f6150862
HZ
6765 * ax.c (ax_printf): Add fflush.
6766
614c279d
TT
67672013-04-22 Tom Tromey <tromey@redhat.com>
6768
6769 * Makefile.in (SFILES): Add filestuff.c.
6770 (OBS): Add filestuff.o.
6771 (filestuff.o): New target.
6772 * config.in, configure: Rebuild.
6773 * configure.ac: Check for fdwalk, pipe2.
6774
7d4e5717
PA
67752013-04-17 Pedro Alves <palves@redhat.com>
6776
6777 * configure.ac (USE_THREAD_DB): Delete variable.
6778 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6779 Don't AC_SUBST USE_THREAD_DB.
6780 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6781 * config.in, configure: Regenerate.
6782
d5c93e41
PA
67832013-04-16 Pedro Alves <palves@redhat.com>
6784
6785 * linux-low.h (struct lwp_info) <thread_known>: Move under
6786 the USE_THREAD_DB #ifdef.
6787
04f5fe89
PA
67882013-04-16 Pedro Alves <palves@redhat.com>
6789
6790 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6791 (linux-low.o): Delete rule.
6792 * linux-low.h: Always include "gdb_thread_db.h" instead of
6793 conditionally including thread_db.h.
6794 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6795 HAVE_THREAD_DB_H.
6796
480b27bf
JK
67972013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6798
6799 * Makefile.in (install-only): Fix make install regression.
6800
43662968
JK
68012013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6802
6803 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6804 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6805 installation.
6806 * gdbserver.1: Remove.
6807
3e74e146
PA
68082013-03-22 Pedro Alves <palves@redhat.com>
6809
6810 * linux-low.c (handle_extended_wait): Don't call
6811 linux_enable_event_reporting.
6812
a8347a2a
TT
68132013-03-15 Tony Theodore <tonyt@logyst.com>
6814
6815 PR build/9098:
6816 * Makefile.in (SHELL): Use @SHELL@.
6817
eeb56fa7
SDJ
68182013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6819
6820 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6821 compiler warning.
6822
4fa7e2ff
JB
68232013-03-13 Joel Brobecker <brobecker@adacore.com>
6824
6825 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6826 Remove extraneous NULL element.
6827
8ddb1965
YQ
68282013-03-13 Yao Qi <yao@codesourcery.com>
6829
6830 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6831 'V' block in trace frame.
6832
9accd112
MM
68332013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6834
6835 * target.h (struct target_ops): Add btrace ops.
6836 (target_supports_btrace): New macro.
6837 (target_enable_btrace): New macro.
6838 (target_disable_btrace): New macro.
6839 (target_read_btrace): New macro.
6840 * gdbthread.h (struct thread_info): Add btrace field.
6841 * server.c: Include btrace-common.h.
6842 (handle_btrace_general_set): New function.
6843 (handle_btrace_enable): New function.
6844 (handle_btrace_disable): New function.
6845 (handle_general_set): Call handle_btrace_general_set.
6846 (handle_qxfer_btrace): New function.
6847 (struct qxfer qxfer_packets[]): Add btrace entry.
6848 * inferiors.c (remove_thread): Disable btrace.
6849 * linux-low: Include linux-btrace.h.
6850 (linux_low_enable_btrace): New function.
6851 (linux_low_read_btrace): New function.
6852 (linux_target_ops): Add btrace ops.
6853 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6854 Add srv_linux_btrace=yes.
6855 (x86_64-*-linux*): Add linux-btrace.o.
6856 Add srv_linux_btrace=yes.
6857 * configure.ac: Define HAVE_LINUX_BTRACE.
6858 * config.in: Regenerated.
6859 * configure: Regenerated.
6860
5cc22e4c
MM
68612013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6862
6863 * server.c (handle_qxfer): Preserve error message if -3 is
6864 returned.
6865 (qxfer): Document the -3 return value.
6866
7c97f91e
MM
68672013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6868
6869 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6870 (linux_btrace_h): New variable.
6871 (linux-btrace.o): New rule.
6872
be9a119c 68732013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
6874 Hafiz Abid Qadeer <abidh@codesourcery.com>
6875
6876 * tracepoint.c (trace_buffer_size): New global.
6877 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6878 (init_trace_buffer): Change to one-argument function. Allocate
6879 trace buffer memory.
6880 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6881 handle QTBuffer:size packet.
6882 (cmd_bigqtbuffer_size): New function.
6883 (initialize_tracepoint): Call init_trace_buffer with
6884 DEFAULT_TRACE_BUFFER_SIZE.
6885 * server.c (handle_query): Add QTBuffer:size in the
6886 supported packets.
6887
e64f7499
YQ
68882013-03-07 Yao Qi <yao@codesourcery.com>
6889
6890 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6891 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6892 of -1.
6893 (cmd_qtsp): Adjust condition. Do post increment.
6894 Set cur_action and cur_step_action back to 0.
6895
f0ae6fc3
PA
68962013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6897
6898 PR server/15236
6899 * linux-low.c (linux_write_memory): Return early success if LEN is
6900 zero.
6901
b5b0b0af
CV
69022013-03-05 Corinna Vinschen <vinschen@redhat.de>
6903
334ad4a8 6904 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 6905
589bc927
TT
69062013-02-28 Tom Tromey <tromey@redhat.com>
6907
6908 * configure.ac: Invoke AC_SYS_LARGEFILE.
6909 * configure, config.in: Rebuild.
6910
dfe07582
CV
69112013-02-28 Corinna Vinschen <vinschen@redhat.com>
6912
6913 * win32-low.c: Throughout, fix format strings and casts of
6914 printf-like functions to avoid type related warnings on all
6915 platforms.
6916 (get_child_debug_event): Print dwDebugEventCode as hex since
6917 that's how it's usually documented.
6918
736cd585
YQ
69192013-02-28 Yao Qi <yao@codesourcery.com>
6920
6921 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6922 pulongest.
6923
e1f58301
JW
69242013-02-27 Jiong Wang <jiwang@tilera.com>
6925
6926 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6927 (reg-tilegx32.c): New rule.
6928 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6929 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6930 different register info initializer according to elf class.
6931 (init_registers_tilgx32): New function. The tilegx32 register info
6932 initializer.
6933 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6934 (tile_store_gregset): Likewise.
6935
d171ca78
YQ
69362013-02-27 Yao Qi <yao@codesourcery.com>
6937
6938 * server.c (process_point_options): Print debug message when
6939 debug_threads is true.
6940
282bbdf3
YQ
69412013-02-26 Yao Qi <yao@codesourcery.com>
6942
6943 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6944
aca22551
PA
69452013-02-19 Pedro Alves <palves@redhat.com>
6946 Kai Tietz <ktietz@redhat.com>
6947
6948 PR gdb/15161
6949
6950 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6951 instead of strtoul to extract address from packet.
6952 (process_serial_event) <'z'>: Likewise.
6953
4f3cee1c
YQ
69542013-02-18 Yao Qi <yao@codesourcery.com>
6955
6956 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6957
8e1d55a3
PA
69582013-02-14 Pedro Alves <palves@redhat.com>
6959
6960 Plug memory leak.
6961
6962 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6963 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6964
458820da
PA
69652013-02-14 Pedro Alves <palves@redhat.com>
6966
6967 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6968
baea0dae
PA
69692013-02-14 Pedro Alves <palves@redhat.com>
6970
6971 * tracepoint.c (save_string): Delete.
6972 (add_tracepoint_action): Use savestring instead of save_string.
6973
0b1afbb3
PA
69742013-02-12 Pedro Alves <palves@redhat.com>
6975
6976 * linux-xtensa-low.c: Ditto.
6977 * xtensa-xtregs.c: Ditto.
6978
8a4ac37e
PA
69792013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6980
6981 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6982 thread_db.
6983
148de6bb
MS
69842013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6985
6986 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6987 aarch64_num_wp_regs and aarch64_num_bp_regs to
6988 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6989
55fac6e0
MS
69902013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6991
6992 * linux-aarch64-low.c (ps_get_thread_area): Replace
6993 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6994
176eb98c
MS
69952013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6996 Marcus Shawcroft <marcus.shawcroft@arm.com>
6997 Nigel Stephens <nigel.stephens@arm.com>
6998 Yufeng Zhang <yufeng.zhang@arm.com>
6999
7000 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7001 (aarch64.c, aarch64-without-fpu.c): New targets.
7002 * configure.srv (aarch64*-*-linux*): New.
7003 * linux-aarch64-low.c: New file.
7004
56f7af9c
MS
70052013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7006
43aaf8b6 7007 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7008 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7009 (dequeue_one_deferred_signal, linux_resume_one_thread)
7010 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7011 (linux_tracefork_grandchild, linux_test_for_tracefork)
7012 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7013 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7014 where the argument is 0.
7015
60f662b0
YQ
70162013-01-25 Yao Qi <yao@codesourcery.com>
7017
7018 * event-loop.c: Include "queue.h".
7019 (gdb_event_p): New typedef.
7020 (struct gdb_event) <next_event>: Remove.
7021 (event_queue): Change to QUEUE(gdb_event_p).
7022 (async_queue_event): Remove.
7023 (gdb_event_xfree): New.
7024 (initialize_event_loop): New.
7025 (process_event): Use API from QUEUE.
7026 (wait_for_event): Likewise.
7027 * server.c (main): Call initialize_event_loop.
7028 * server.h (initialize_event_loop): Declare.
7029
5ae4861a
YQ
70302013-01-18 Yao Qi <yao@codesourcery.com>
7031
7032 * ax.h (struct eval_agent_expr_context): New.
7033 (gdb_eval_agent_expr): Update declaration.
7034 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7035 TFRAME. Add new argument CTX.
7036 * server.h (struct eval_agent_expr_context): Declare.
7037 (agent_mem_read, agent_tsv_read): Update declaration.
7038 (agent_mem_read_string): Likewise.
7039 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7040 (add_traceframe_block): Add new argument TPOINT.
7041 Increase TPOINT->traceframe_usage.
7042 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7043 eval_tracepoint_agent_expr.
7044 (condition_true_at_tracepoint): Likewise.
7045 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7046 (agent_mem_read_string, agent_tsv_read): Likewise.
7047
85e00e85
YQ
70482013-01-16 Yao Qi <yao@codesourcery.com>
7049
7050 * linux-low.c (linux_resume_one_lwp): Don't check
7051 'lwp->bp_reinsert != 0'.
7052
4039cf45
JB
70532013-01-07 Joel Brobecker <brobecker@adacore.com>
7054 Pedro Alves <palves@redhat.com>
7055
7056 * lynx-low.c (ptrace_request_to_str): Define a temporary
7057 macro and use it to simplify this function's implementation.
7058
9044dee2
JB
70592013-01-07 Joel Brobecker <brobecker@adacore.com>
7060
7061 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7062 sets errno.
7063
e6352c8f
JB
70642013-01-07 Joel Brobecker <brobecker@adacore.com>
7065
7066 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7067
50681a27
JB
70682013-01-07 Joel Brobecker <brobecker@adacore.com>
7069
7070 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7071
3f6e77ef
JB
70722013-01-07 Joel Brobecker <brobecker@adacore.com>
7073
7074 * lynx-low.c (lynx_resume): Use the resume_info parameter
7075 to determine the ptid for the lynx_ptrace call, unless
7076 it is equal to minus_one_ptid, in which case we use the
7077 ptid of the current_inferior.
7078 (lynx_wait_1): After having received a thread create/exit
7079 event, resume the inferior's execution using the signaling
7080 thread's ptid, rather than the old ptid.
7081
7fda33ae
JB
70822013-01-07 Joel Brobecker <brobecker@adacore.com>
7083
7084 * lynx-low.c (lynx_resume): Delete variable ret.
7085
b9786c74
JB
70862013-01-01 Joel Brobecker <brobecker@adacore.com>
7087
7088 * gdbreplay.c (gdbreplay_version): Update copyright year.
7089 * server.c (gdbserver_version): Likewise.
7090
8b93d60f
JB
70912012-12-17 Joel Brobecker <brobecker@adacore.com>
7092
7093 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7094 new thread.
7095
037335a7
JB
70962012-12-17 Joel Brobecker <brobecker@adacore.com>
7097
7098 * lynx-low.c (ptrace_request_to_str): Add handling for
7099 PTRACE_GETTRACESIG.
7100
52d4cbd8
JB
71012012-12-17 Joel Brobecker <brobecker@adacore.com>
7102
7103 * lynx-low.c (lynx_attach): Delete variable new_process.
7104
ab8f6ca9
JB
71052012-12-17 Joel Brobecker <brobecker@adacore.com>
7106
7107 * lynx-low.c (lynx_create_inferior): Delete variable
7108 new_process.
7109
78cbc024
JB
71102012-12-17 Joel Brobecker <brobecker@adacore.com>
7111
7112 * lynx-low.c (ptrace_request_to_str): Do not handle
7113 PTRACE_GETTHREADLIST if this macro does not exist.
7114
14a00470
YQ
71152012-12-15 Yao Qi <yao@codesourcery.com>
7116
7117 * Makefile.in (OBS): Add notif.o.
7118 * notif.c, notif.h: New.
7119 * server.c: Include "notif.h".
7120 (struct vstop_notif) <next>: Remove.
7121 <base>: New field.
7122 (queue_stop_reply): Update.
7123 (push_event, send_next_stop_reply): Remove.
7124 (discard_queued_stop_replies): Update.
7125 (notif_stop): New variable.
7126 (handle_v_stopped): Remove.
7127 (handle_v_requests): Don't call handle_v_stopped. Call
7128 handle_ack_notif instead.
7129 (queue_stop_reply_callback): Call notif_event_enque instead
7130 of queue_stop_reply.
7131 (handle_status): Don't call send_next_stop_reply, call
7132 notif_write_event instead.
7133 (kill_inferior_callback): Likewise.
7134 (detach_or_kill_inferior_callback): Likewise.
7135 (main): Call initialize_notif.
7136 (process_serial_event): Call QUEUE_is_empty.
7137 (handle_target_event): Call notif_push instead of push event.
7138 * server.h (push_event): Remove declaration.
7139
61c125b9
TT
71402012-12-10 Tom Tromey <tromey@redhat.com>
7141
7142 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7143 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7144 macros.
7145 (.c.o): Rewrite.
7146 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7147 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7148 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7149 (amd64-linux-ipa.o, ax.o): Rewrite.
7150 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7151 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7152 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7153 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7154 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7155 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7156 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7157 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7158 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7159 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7160 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7161 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7162 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7163 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7164 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7165 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7166 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7167 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7168 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7169 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7170 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7171 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7172 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7173 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7174 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7175 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7176 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7177 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7178 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7179 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7180 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7181 (reg-tilegx.o): Remove.
7182 (all_object_files): New macro.
7183 Include .deps files.
7184 * aclocal.m4, configure: Rebuild.
7185 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7186 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7187 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7188
e90e9ad9
TT
71892012-12-05 Tom Tromey <tromey@redhat.com>
7190
7191 PR gdb/14917:
7192 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7193
02d403bf 71942012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7195
7196 * configure.ac: Check for linux/perf_event.h.
7197 * config.in: Regenerated.
7198 * configure: Regenerated.
7199
0270a750
PA
72002012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7201
7202 * hostio.c (handle_readlink): Decrease buffer size
7203 parameter passed to readlink by one byte.
7204
8c29b58e
YQ
72052012-11-26 Yao Qi <yao@codesourcery.com>
7206
7207 * configure.ac (build_warnings): Append '-Wempty-body'.
7208 * configure: Regenerated.
7209 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7210 body.
7211
8bdce1ff
PM
72122012-11-15 Pierre Muller <muller@sourceware.org>
7213
7214 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7215 * config.in: Regenerate.
7216 * configure: Regenerate.
7217 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7218 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7219 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7220 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7221 header.
7222 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7223 instead of <sys/wait.h> header.
7224 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7225
02d403bf 72262012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7227
7228 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7229 (various make rules): Remove -DGDBSERVER
7230
fbd5db48
YQ
72312012-11-09 Yao Qi <yao@codesourcery.com>
7232
7233 * spu-low.c (current_ptid): Move it to ..
7234 * gdbthread.h: ... here. New.
7235 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7236 * server.c (myresume, process_serial_event): Likewise.
7237 * thread-db.c (thread_db_find_new_threads): Likewise.
7238 * tracepoint.c (run_inferior_command): Likewise.
7239
b3dc46ff
AB
72402012-10-01 Andrew Burgess <aburgess@broadcom.com>
7241
7242 * server.c (handle_search_memory_1): Include access length in
7243 warning message.
7244
07c04788
HPN
72452012-09-05 Michael Brandt <michael.brandt@axis.com>
7246
7247 * linux-crisv32-low.c: Fix compile errors.
7248
918d227b
YQ
72492012-09-04 Yao Qi <yao@codesourcery.com>
7250
7251 * tracepoint.c (cmd_qtsv): Adjust debug message.
7252 Don't check CUR_TPOINT.
7253
18c1b81a
YQ
72542012-08-28 Yao Qi <yao@codesourcery.com>
7255
7256 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7257 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7258 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7259 Remove declarations of xmalloc, xreallloc, xstrdup and
7260 freeargv.
7261 * Makefile.in (libiberty_h): New.
7262 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7263 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7264
dc82f37b
YQ
72652012-08-23 Yao Qi <yao@codesourcery.com>
7266
7267 * server.h: Remove declaration of 'xsnprintf'.
7268
406b1477
KS
72692012-08-22 Keith Seitz <keiths@redhat.com>
7270
7271 * server.h: Include build-gnulib-gbserver/config.h.
7272 * gdbreplay.c: Likewise.
7273
e6712ff1
DE
72742012-08-08 Doug Evans <dje@google.com>
7275
7276 * Makefile.in (SFILES): Add gdb_vecs.c.
7277 (OBS): Add gdb_vecs.o.
7278 (gdb_vecs_h, host_defs_h): New variables.
7279 (thread-db.o): Add $(gdb_vecs_h) dependency.
7280 (gdb_vecs.o): New rule.
7281 * thread-db.c: #include "gdb_vecs.h".
7282 (thread_db_load_search): Use a vector to iterate over path elements.
7283 Handle text appearing after "$pdir".
7284
7285 * configure.ac: Add check for strstr.
7286 * config.in: Regenerate.
7287 * configure: Regenerate.
7288
7c3270ae
UW
72892012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7290
7291 * hostio.c (handle_pread): If pread fails, fall back to attempting
7292 lseek/read.
7293 (handle_pwrite): Likewise for pwrite.
7294
b62e2b27
UW
72952012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7296
7297 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7298 between unsupported TYPE and unimplementable ADDR/LEN combination.
7299 (arm_insert_point): Act on new return value.
7300
78a99e91
PA
73012012-07-31 Pedro Alves <palves@redhat.com>
7302
7303 * server.c (process_point_options): Only skip tokens if we find
7304 one that is unrecognized. Don't treat 'X' specially while
7305 skipping unrecognized tokens.
7306
fcf303ab
UW
73072012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7308
7309 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7310 to 4-byte-align HW breakpoint addresses for Thumb.
7311
7255706c
YQ
73122012-07-27 Yao Qi <yao@codesourcery.com>
7313
7314 PR remote/14161.
7315
7316 * server.h: Declare gdb_agent_about_to_close.
7317 * target.c (kill_inferior): Include "agent.h".
7318 New. Send command 'kill'.
7319 * target.h (kill_inferior): Removed macro.
7320 * tracepoint.c (gdb_agent_about_to_close): New.
7321 (gdb_agent_helper_thread): Handle command 'close'.
7322 Wait endlessly until the inferior stops.
7323 Install gdb_agent_remove_socket to atexit hook.
7324 (agent_socket_name): New static variable.
7325 (gdb_agent_socket_init): Replace local variable 'name' with
7326 'agent_socket_name'.
7327 (gdb_agent_remove_socket): New.
7328
5a3f286f
YQ
73292012-07-27 Yao Qi <yao@codesourcery.com>
7330
7331 * server.c (process_point_options): Stop at 'X' when parsing.
7332
961bd387
ME
73332012-07-19 Michael Eager <eager@eagercon.com>
7334
a261b8f5 7335 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7336 to hw_execute.
7337 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7338 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7339 hardware breakpoint.
7340
aa7c7447
JK
73412012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7342
7343 * gdbserver/linux-low.c (initialize_low): Call
7344 linux_ptrace_init_warnings.
7345
7f216e7c
DE
73462012-07-02 Doug Evans <dje@google.com>
7347
7348 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7349 pointer to int.
7350
d3ce09f5
SS
73512012-07-02 Stan Shebs <stan@codesourcery.com>
7352
7353 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7354 (ax.o): Add it to build rule.
7355 (ax-ipa.o): Ditto.
7356 (OBS): Add format.o.
7357 (IPA_OBS): Add format.o.
7358 * server.c (handle_query): Claim support for breakpoint commands.
7359 (process_point_options): Add command case.
7360 (process_serial_event): Leave running if there are printfs in
7361 effect.
7362 * mem-break.h (any_persistent_commands): Declare.
7363 (add_breakpoint_commands): Declare.
7364 (gdb_no_commands_at_breakpoint): Declare.
7365 (run_breakpoint_commands): Declare.
7366 * mem-break.c (struct point_command_list): New struct.
7367 (struct breakpoint): New field command_list.
7368 (any_persistent_commands): New function.
7369 (add_commands_to_breakpoint): New function.
7370 (add_breakpoint_commands): New function.
7371 (gdb_no_commands_at_breakpoint): New function.
7372 (run_breakpoint_commands): New function.
7373 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7374 locally.
7375 * ax.c: Include format.h.
7376 (ax_printf): New function.
7377 (gdb_eval_agent_expr): Add printf opcode.
7378
2f8f6aed
YQ
73792012-06-13 Yao Qi <yao@codesourcery.com>
7380
7381 * server.c (start_inferior): Remove duplicated writes to fields
7382 'last_resume_kind' and 'last_status' of 'current_inferior'.
7383
0c9070b3
YQ
73842012-06-12 Yao Qi <yao@codesourcery.com>
7385 Pedro Alves <palves@redhat.com>
7386
7387 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7388 comment.
7389 * server.c (handle_v_cont): Extend comment.
7390
c52daf70
YQ
73912012-06-11 Yao Qi <yao@codesourcery.com>
7392
7393 * linux-low.c (linux_attach): Add 'static'.
7394
d38bbb0a
YQ
73952012-06-06 Yao Qi <yao@codesourcery.com>
7396
7397 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7398
89dc0afd
JK
73992012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7400
7401 Fix gcc -flto compilation warning.
7402 * server.c (main): Make variable multi_mode and attach volatile.
7403
75f62ce7
TJB
74042012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7405
7406 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7407 if the platform doesn't know about it.
7408
65f479b6
PA
74092012-05-30 Jeff Kenton <jkenton@tilera.com>
7410
7411 * Makefile.in (SFILES): Add linux-tile-low.c.
7412 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7413 * configure.srv: Handle tilegx-*-linux*.
7414 * linux-tile-low.c: New file.
7415
0c5bf5a9
JK
74162012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7417
7418 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7419
a493e3e2
PA
74202012-05-24 Pedro Alves <palves@redhat.com>
7421
7422 PR gdb/7205
7423
43aaf8b6 7424 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7425
2ea28649
PA
74262012-05-24 Pedro Alves <palves@redhat.com>
7427
7428 PR gdb/7205
7429
7430 Replace target_signal with gdb_signal throughout.
7431
8d409d16
MR
74322012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7433
7434 * linux-low.c (linux_store_registers): Avoid the copying sequence
7435 when no data has been retrieved by ptrace.
7436
23512c01
MGD
74372012-05-22 Will Deacon <will.deacon@arm.com>
7438
7439 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7440 Include asm/ptrace.h.
7441 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7442 already defined.
7443
4934b29e
MR
74442012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7445
7446 * linux-low.c (linux_store_registers): Don't re-retrieve data
7447 with ptrace that has already been obtained from /proc. Always
7448 copy any data retrieved with ptrace to the buffer supplied.
7449
bde24c0a
PA
74502012-05-11 Yao Qi <yao@codesourcery.com>
7451 Pedro Alves <palves@redhat.com>
7452
7453 * linux-low.c (enum stopping_threads_kind): New.
7454 (stopping_threads): Change type to `enum stopping_threads_kind'.
7455 (handle_extended_wait): If stopping and suspending threads, leave
7456 the new_lwp suspended too.
7457 (linux_wait_for_event): Adjust.
7458 (stop_all_lwps): Set `stopping_threads' to
7459 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7460 whether we're suspending threads or just stopping them. Assert no
7461 recursion happens.
7462
623b6bdf
YQ
74632012-04-29 Yao Qi <yao@codesourcery.com>
7464
7465 * server.h: Move some code to ...
7466 * gdbthread.h: ... here. New.
7467 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7468 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7469 (nto-low.o, win32-low.o): Likewise.
7470 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7471 * regcache.c, remote-utils.c, server.c: Likewise.
7472 * target.c, tracepoint.c, win32-low.c: Likewise.
7473
f15f9948
TJB
74742012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7475
7476 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7477 (PTRACE_ARG4_TYPE): Likewise.
7478 (PTRACE_XFER_TYPE): Likewise.
7479 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7480 ptrace to PTRACE_ARG3_TYPE.
7481 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7482 (PTRACE_ARG4_TYPE): Likewise.
7483 (PTRACE_XFER_TYPE): Likewise.
7484 (linux_detach_one_lwp): Cast fourth argument of
7485 ptrace to long then PTRACE_ARG4_TYPE.
7486 (regsets_fetch_inferior_registers): Cast third argument of
7487 ptrace to long then PTRACE_ARG3_TYPE.
7488 (regsets_store_inferior_registers): Likewise.
7489
38ea300a
PA
74902012-04-20 Pedro Alves <palves@redhat.com>
7491
7492 * configure: Regenerate.
7493
c971b7fa
PA
74942012-04-19 Pedro Alves <palves@redhat.com>
7495
43aaf8b6 7496 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7497 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7498 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7499 (all, install-only, uninstall, clean-info, all-lib, clean): No
7500 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7501 (maintainer-clean realclean distclean): Use subdir_do.
7502 (subdir_do): New.
7503 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7504 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7505 * acinclude.m4: Include acx_configure_dir.m4.
7506 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7507 calls. Call AC_PROG_RANLIB. Configure gnulib using
7508 ACX_CONFIGURE_DIR.
7509 (GNULIB): New.
7510 (GNULIB_STDINT_H): Adjust.
7511 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7512 * gdbreplay.c: Include build-gnulib/config.h.
7513 * server.h: Likewise.
7514 * aclocal.m4: Regenerate.
7515 * config.in: Regenerate.
7516 * configure: Regenerate.
c971b7fa 7517
809277f8
PA
75182012-04-19 Pedro Alves <palves@redhat.com>
7519
7520 * Makefile.in (LIBGNU, INCGNU): Adjust.
7521 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7522 (all, install-only, uninstall, clean-info, all-lib, clean)
7523 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7524 * configure.ac: Adjust AC_OUTPUT output.
7525 * aclocal.m4: Regenerate.
7526 * configure: Regenerate.
7527
fd9bb8b8
PA
75282012-04-19 Pedro Alves <palves@redhat.com>
7529
7530 * Makefile.in (generated_files): New.
7531 (server_h): Remove the explicit dependency on config.h, and depend
7532 on $generated_files.
7533
1c298c66
PA
75342012-04-19 Pedro Alves <palves@redhat.com>
7535
7536 * Makefile.in (INCGNU): Add -Ignulib.
7537
57c4b50b
PA
75382012-04-19 Pedro Alves <palves@redhat.com>
7539
7540 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7541 (INCGNU): ... this, and spell out -I here.
7542 (GNULIB_LIB): Rename to ...
7543 (LIBGNU): ... this.
7544 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7545
1030e047
PA
75462012-04-19 Pedro Alves <palves@redhat.com>
7547
7548 * config.in: Regenerate.
7549
447d4319
PA
75502012-04-19 Pedro Alves <palves@redhat.com>
7551
7552 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7553 * server.h (memmem): Remove declaration.
7554 * config.in: Regenerate.
7555 * configure: Regenerate.
7556
aad9eab9
YQ
75572012-04-19 Yao Qi <yao@codesourcery.com>
7558
7559 * Makefile.in (SFILES): Add common/vec.c.
7560 (OBS): Add vec.o.
7561 (vec.o): New rule.
7562
3e10640f
YQ
75632012-04-19 Yao Qi <yao@codesourcery.com>
7564
7565 * remote-utils.c (prepare_resume_reply): Replace with macro
7566 target_core_of_thread.
7567 * server.c (handle_qxfer_threads_proper): Likewise.
7568 * target.h (traget_core_of_thread): New macro.
7569
71622373
PA
75702012-04-18 Pedro Alves <palves@redhat.com>
7571
7572 * aclocal.m4: Regenerate.
7573 * configure: Regenerate.
7574
80d26939
YQ
75752012-04-16 Yao Qi <yao@codesourcery.com>
7576
7577 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7578 duplicated on address.
7579
42476b70
YQ
75802012-04-16 Yao Qi <yao@codesourcery.com>
7581
7582 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7583 (struct tracepoint_action_ops) <send>: New field.
7584 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7585 (agent_expr_send, x_tracepoint_action_send): New.
7586 (l_tracepoint_action_send): New.
7587 (cmd_qtdp): Download and install tracepoint
7588 according to `use_agent'.
7589 (run_inferior_command): Add one more parameter `len'.
7590 Update callers.
7591 (tracepoint_send_agent): New.
7592 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7593
7bc83639
YQ
75942012-04-16 Yao Qi <yao@codesourcery.com>
7595
7596 * tracepoint.c (download_tracepoints): Moved to ...
7597 (cmd_qtstart): ... here.
7598
5f18041e
YQ
75992012-04-14 Yao Qi <yao@codesourcery.com>
7600
7601 * tracepoint.c: Include inttypes.h.
7602 (struct collect_memory_action): Use sized types.
7603 (struct tracepoint): Likewise.
7604 (cmd_qtdp, stop_tracing): Update print specifiers.
7605 (cmd_qtp, response_tracepoint): Likewise.
7606 (collect_data_at_tracepoint): Likewise.
7607 (collect_data_at_step): Likewise.
7608
55a8c076
YQ
76092012-04-14 Yao Qi <yao@codesourcery.com>
7610
7611 Import gnulib module inttypes.
7612 * aclocal.m4, config.in, configure: Regenerated.
7613
dc750257
YQ
76142012-04-14 Yao Qi <yao@codesourcery.com>
7615
7616 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7617 Makefile and config.status at last.
7618
0ab5faf9
YQ
76192012-04-13 Yao Qi <yao@codesourcery.com>
7620
7621 * tracepoint.c: Include stdint.h unconditionally.
7622
18f5fd81
TJB
76232012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7624
7625 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7626 on BFD_HAVE_SYS_PROCFS_TYPE.
7627 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7628 * configure: Regenerate.
7629 * config.in: Likewise.
7630
4d47af5c
L
76312012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7632
7633 * Makefile.in (clean): Also remove x32.c x32-linux.c
7634 x32-avx.c x32-avx-linux.c.
7635 (x32.o): New target.
7636 (x32.c): Likewise.
7637 (x32-linux.o): Likewise.
7638 (x32-linux.c): Likewise.
7639 (x32-avx.o): Likewise.
7640 (x32-avx.c): Likewise.
7641 (x32-avx-linux.o): Likewise.
7642 (x32-avx-linux.c): Likewise.
7643
7644 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7645 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7646 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7647 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7648 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7649 i386/x32-avx-linux.xml.
7650
7651 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7652 (init_registers_x32_avx_linux): Likwise.
7653 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7654 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7655
ecedbe58
PA
76562012-04-13 Pedro Alves <palves@redhat.com>
7657
7658 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7659 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7660 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7661 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7662 the sub-make.
7663
c92b5177
L
76642012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7665
7666 * linux-x86-low.c (compat_x32_clock_t): New.
7667 (compat_x32_siginfo_t): Likewise.
7668 (compat_x32_siginfo_from_siginfo): Likewise.
7669 (siginfo_from_compat_x32_siginfo): Likewise.
7670 (linux_is_elf64): Likewise.
7671 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7672 and siginfo_from_compat_x32_siginfo for x32.
7673 (x86_arch_setup): Set linux_is_elf64.
7674
214d508e
L
76752012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7676
7677 PR gdb/13969
7678 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7679 e_machine field.
7680 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7681 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7682 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7683 compatible with process.
7684
c9a1864a
YQ
76852012-04-12 Yao Qi <yao@codesourcery.com>
7686
7687 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7688 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7689 (install-only, install-info, clean): Handle sub dir gnulib.
7690 (all-lib, am--refresh): New targets.
7691 (memmem.o): Remove target.
7692 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7693 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7694 (AC_REPLACE_FUNCS): Remove memmem.
7695 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7696 (AC_OUTPUT): Generate Makefile in gnulib/.
7697 * aclocal.m4, config.in, configure: Regenerated.
7698
367ba2c2
MR
76992012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7700
7701 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7702
9d236627
PA
77032012-04-05 Pedro Alves <palves@redhat.com>
7704
7705 -Werror=strict-aliasing
7706
7707 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7708 pointer.
7709
111217b3
PA
77102012-04-04 Pedro Alves <palves@redhat.com>
7711
7712 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7713 (sparc_store_gregset_from_stack, sparc_store_gregset)
7714 (sparc_breakpoint_at): Fix formatting.
7715
8365dcf5
TJB
77162012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7717
7718 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7719 are available.
7720 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7721 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7722 * config.in: Regenerate.
7723 * configure: Likewise.
7724
689cc2ae
PA
77252012-03-29 Pedro Alves <palves@redhat.com>
7726
7727 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7728 Correct ptrace arguments.
7729
c14dfd32
PA
77302012-03-28 Pedro Alves <palves@redhat.com>
7731
7732 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7733 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7734 (IA64_FR1_REGNUM): New defines.
7735 (ia64_fetch_register): New.
7736 (the_low_target): Install it.
7737 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7738 field.
7739 * linux-low.c (linux_fetch_registers): Try the
7740 the_low_target.fetch_register hook first.
7741
7742 * linux-arm-low.c (the_low_target): Adjust.
7743 * linux-bfin-low.c (the_low_target): Adjust.
7744 * linux-cris-low.c (the_low_target): Adjust.
7745 * linux-crisv32-low.c (the_low_target): Adjust.
7746 * linux-m32r-low.c (the_low_target): Adjust.
7747 * linux-m68k-low.c (the_low_target): Adjust.
7748 * linux-mips-low.c (the_low_target): Adjust.
7749 * linux-ppc-low.c (the_low_target): Adjust.
7750 * linux-s390-low.c (the_low_target): Adjust.
7751 * linux-sh-low.c (the_low_target): Adjust.
7752 * linux-sparc-low.c (the_low_target): Adjust.
7753 * linux-tic6x-low.c (the_low_target): Adjust.
7754 * linux-x86-low.c (the_low_target): Adjust.
7755 * linux-xtensa-low.c (the_low_target): Adjust.
7756
63c88e13
PA
77572012-03-26 Pedro Alves <palves@redhat.com>
7758
7759 * server.c (handle_qxfer_libraries): Don't bail early if
7760 the_target->qxfer_libraries_svr4 is not NULL.
7761
fb723180
PA
77622012-03-26 Pedro Alves <palves@redhat.com>
7763
7764 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7765
0afae3cf
PA
77662012-03-23 Pedro Alves <palves@redhat.com>
7767
7768 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7769 "library-list-svr4" element's start tag when the the DSO list is
7770 empty.
7771
485f1ee4
PA
77722012-03-23 Pedro Alves <palves@redhat.com>
7773
7774 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7775 a variable whose type size is the same as the inferior's pointer
7776 size.
7777
a5362b9a
TS
77782012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7779
7780 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7781 struct siginfo.
7782 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7783 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7784 * linux-low.h: Include <signal.h>.
7785 (struct siginfo): Remove forward declaration.
7786 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7787 struct siginfo.
7788
d226c142
MF
77892012-03-21 Mike Frysinger <vapier@gentoo.org>
7790
7791 * .gitignore: Ignore more files.
7792
122f36ef
PA
77932012-03-19 Pedro Alves <palves@redhat.com>
7794 Jan Kratochvil <jan.kratochvil@redhat.com>
7795
7796 * server.c (cont_thread, general_thread): Add describing comments.
7797 (start_inferior): Clear `cont_thread'.
7798 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7799 of a process.
7800
fc3e5175
YQ
78012012-03-15 Yao Qi <yao@codesourcery.com>
7802
7803 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7804 handling to ...
7805 (cmd_qtdp): ... here.
7806
8d0d92cd
YQ
78072012-03-15 Yao Qi <yao@codesourcery.com>
7808
7809 * tracepoint.c (struct tracepoint_action_ops): New.
7810 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7811 (m_tracepoint_action_download): New.
7812 (r_tracepoint_action_download): New.
7813 (x_tracepoint_action_download): New.
7814 (l_tracepoint_action_download): New.
7815 (add_tracepoint_action): Install `action->ops' according type.
7816 (download_tracepoint_1): Move code `download' function pointer
7817 of various tracepoint_action_ops.
7818
87b0bb13
JK
78192012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7820
7821 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7822 linux_ptrace_attach_warnings.
7823
5f572dec
JK
78242012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7825
7826 * Makefile.in (linux-ptrace.o): New.
7827 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7828 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7829 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7830 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7831 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7832 of these targets.
7833 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7834
f4647387
YQ
78352012-03-08 Yao Qi <yao@codesourcery.com>
7836 Pedro Alves <palves@redhat.com>
7837
7838 Fix PR server/13392.
7839 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7840 offset of JMP insn.
7841 * tracepoint.c (remove_tracepoint): New.
7842 (cmd_qtdp): Call remove_tracepoint when failed to install.
7843
9b224c5e
PA
78442012-03-07 Pedro Alves <palves@redhat.com>
7845
7846 * linux-low.c (get_detach_signal): New.
7847 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7848 Pass on pending signals to PTRACE_DETACH. Check the result of the
7849 ptrace call.
7850 * server.c (program_signals, program_signals_p): New.
7851 (handle_general_set): Handle QProgramSignals.
7852 * server.h (program_signals, program_signals_p): Declare.
7853
e237a7e2
JK
78542012-03-05 Pedro Alves <palves@redhat.com>
7855 Jan Kratochvil <jan.kratochvil@redhat.com>
7856
7857 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7858 New comment why.
7859
5808517f
YQ
78602012-03-03 Yao Qi <yao@codesourcery.com>
7861
7862 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7863 agent_look_up_symbols.
7864
58b4daa5
YQ
78652012-03-03 Yao Qi <yao@codesourcery.com>
7866
7867 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7868 (linux-x86-low.o): Likewise.
7869 * server.h: Remove in_process_agent_loaded.
7870 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7871 common/agent.c.
7872 Update callers.
7873
8ffcbaaf
YQ
78742012-03-03 Yao Qi <yao@codesourcery.com>
7875
7876 * tracepoint.c (gdb_agent_capability): New global.
7877 (in_process_agent_loaded_ust): Renamed to
7878 `in_process_agent_supports_ust'.
7879 Update callers.
7880 (in_process_agent_supports_ust): Call agent_capability_check.
7881 (clear_installed_tracepoints): Assert that agent supports
7882 agent.
7883
d1feda86
YQ
78842012-03-03 Yao Qi <yao@codesourcery.com>
7885
7886 * linux-low.c (linux_supports_agent): New.
7887 (linux_target_ops): Initialize field `supports_agent' with
7888 linux_supports_agent.
7889 * target.h (struct target_ops) <supports_agent>: New.
7890 (target_supports_agent): New macro.
7891 * server.c (handle_general_set): Handle packet 'QAgent'.
7892 (handle_query): Send `QAgent+'.
7893 * Makefile.in (server.o): Depends on agent.h.
7894
2fa291ac
YQ
78952012-03-03 Yao Qi <yao@codesourcery.com>
7896
7897 * Makefile.in (OBS): Add agent.o.
7898 Add new rule for agent.o.
7899 Track dependence of tracepoint.c on agent.h.
7900 * tracepoint.c (run_inferior_command_1):
7901 (run_inferior_command): Call agent_run_command.
7902 (gdb_ust_connect_sync_socket): Deleted. Move it to
7903 common/agent.c.
7904 (resume_thread, stop_thread): Likewise.
7905 (gdb_ust_socket_init): Renamed to ...
7906 (gdb_agent_socket_init): ... New.
7907 (gdb_ust_thread): Renamed to ...
7908 (gdb_agent_helper_thread): ... New.
7909 (gdb_ust_init): Move some code to ...
7910 (gdb_agent_init): ... here. New.
7911 [HAVE_UST]: Call gdb_ust_init.
7912 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7913 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7914 * config.in, configure: Regenerated.
7915
05044653
PA
79162012-03-02 Pedro Alves <palves@redhat.com>
7917
7918 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7919 * linux-low.c (struct simple_pid_list): New.
7920 (stopped_pids): New a struct simple_pid_list pointer.
7921 (add_to_pid_list, pull_pid_from_list): New.
7922 (handle_extended_wait): Don't assume the first signal new children
7923 report is SIGSTOP. Adjust call to pull_pid_from_list.
7924 (linux_wait_for_lwp): Adjust.
7925
8d00225b
YQ
79262012-03-02 Yao Qi <yao@codesourcery.com>
7927
7928 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7929 debug log.
7930
19560ba5
YQ
79312012-03-02 Yao Qi <yao@codesourcery.com>
7932
7933 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7934 `stop_pc' and `tpoint'. Update caller.
7935
1faeff08
MR
79362012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7937
7938 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7939 * linux-low.c (use_linux_regsets): New macro.
7940 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7941 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7942 (linux_register_in_regsets): New function.
7943 (usr_fetch_inferior_registers): Skip registers covered by
7944 regsets.
7945 (usr_store_inferior_registers): Likewise.
7946 (usr_fetch_inferior_registers): New macro.
7947 (usr_store_inferior_registers): Likewise.
7948 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7949 (linux_store_registers): Likewise.
7950 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7951 prototype.
7952 (init_registers_mips64_dsp_linux): Likewise.
7953 (init_registers_mips_linux): New macro.
7954 (init_registers_mips_dsp_linux): Likewise.
7955 (mips_dsp_num_regs): Likewise.
7956 (DSP_BASE, DSP_CONTROL): New fallback macros.
7957 (mips_base_regs): New macro.
7958 (mips_regmap): Use it. Fix the size.
7959 (mips_dsp_regmap): New variable.
7960 (mips_dsp_regset_bitmap): Likewise.
7961 (mips_arch_setup): New function.
7962 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7963 than mips_regmap.
7964 (mips_cannot_store_register): Likewise.
7965 (the_low_target): Update .arch_setup, .num_regs and .regmap
7966 initializers. Add .regset_bitmap initializer.
7967 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7968 initializer.
7969 * linux-bfin-low.c (the_low_target): Likewise.
7970 * linux-cris-low.c (the_low_target): Likewise.
7971 * linux-crisv32-low.c (the_low_target): Likewise.
7972 * linux-ia64-low.c (the_low_target): Likewise.
7973 * linux-m32r-low.c (the_low_target): Likewise.
7974 * linux-m68k-low.c (the_low_target): Likewise.
7975 * linux-ppc-low.c (the_low_target): Likewise.
7976 * linux-s390-low.c (the_low_target): Likewise.
7977 * linux-sh-low.c (the_low_target): Likewise.
7978 * linux-sparc-low.c (the_low_target): Likewise.
7979 * linux-tic6x-low.c (the_low_target): Likewise.
7980 * linux-x86-low.c (the_low_target): Likewise.
7981 * linux-xtensa-low.c (the_low_target): Likewise.
7982 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7983 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7984 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7985 srv_xmlfiles.
7986 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7987 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7988
c03e6ccc
YQ
79892012-02-29 Yao Qi <yao@codesourcery.com>
7990 Pedro Alves <palves@redhat.com>
7991
7992 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7993 `step_over_finished' is true.
7994
644cebc9
PA
79952012-02-27 Pedro Alves <palves@redhat.com>
7996
7997 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7998 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7999
c14d7ab2
PA
80002012-02-27 Pedro Alves <palves@redhat.com>
8001
8002 PR server/9684
8003 * linux-low.c (pid_is_stopped): New.
8004 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8005
412c89dd
LM
80062012-02-25 Luis Machado <lgustavo@codesourcery.com>
8007
8008 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8009 of conditions.
8010
b745defe
MR
80112012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8012
8013 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8014
9f3a5c85
LM
80152012-02-24 Luis Machado <lgustavo@codesourcery>
8016
8017 * server.c (handle_query): Advertise support for target-side
8018 breakpoint condition evaluation.
8019 (process_point_options): New function.
8020 (process_serial_event): When inserting a breakpoint, check for
8021 a target-side condition that should be evaluated.
8022
8023 * mem-break.c: Include regcache.h and ax.h.
8024 (point_cond_list_t): New data structure.
8025 (breakpoint) <cond_list>: New field.
8026 (find_gdb_breakpoint_at): Make non-static.
8027 (delete_gdb_breakpoint_at): Clear any target-side
8028 conditions.
8029 (clear_gdb_breakpoint_conditions): New function.
8030 (add_condition_to_breakpoint): Likewise.
8031 (add_breakpoint_condition): Likewise.
8032 (gdb_condition_true_at_breakpoint): Likewise.
8033 (gdb_breakpoint_here): Return result directly instead
8034 of going through a local variable.
8035
8036 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8037 (clear_gdb_breakpoint_conditions): Likewise.
8038 (add_breakpoint_condition): Likewise.
8039 (gdb_condition_true_at_breakpoint): Likewise.
8040
8041 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8042 (need_step_over_p): Take target-side breakpoint condition into
8043 consideration.
8044
5e1dc496
LM
80452012-02-24 Luis Machado <lgustavo@codesourcery>
8046
8047 * server.h: Include tracepoint.h.
8048 (agent_mem_read, agent_get_trace_state_variable_value,
8049 agent_set_trace_state_variable_value,
8050 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8051 get_set_tsv_func_addr): New prototypes.
8052
8053 * ax.h: New include file.
8054 * ax.c: New source file.
8055
8056 * tracepoint.c: Include ax.h.
8057 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8058 agent_expr, eval_result_type): Move to ax.h.
8059 (parse_agent_expr): Rename to ...
8060 (gdb_parse_agent_expr): ... this, make it non-static and move
8061 to ax.h.
8062 (unparse_agent_expr) Rename to ...
8063 (gdb_unparse_agent_expr): ... this, make it non-static and move
8064 to ax.h.
8065 (eval_agent_expr): Rename to ...
8066 (eval_tracepoint_agent_expr): ... this.
8067 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8068 forward declarations.
8069 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8070 (agent_get_trace_state_variable_value): New function.
8071 (agent_set_trace_state_variable_value): New function.
8072 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8073 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8074 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8075 (condition_true_at_tracepoint): Likewise.
8076 (parse_agent_expr): Rename to ...
8077 (gdb_parse_agent_expr): ... this and move to ax.c.
8078 (unparse_agent_expr): Rename to ...
8079 (gdb_unparse_agent_expr): ... this and move to ax.c.
8080 (gdb_agent_op_name): Move to ax.c.
8081 (eval_agent_expr): Rename to ...
8082 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8083 and move to ax.c.
8084 (eval_tracepoint_agent_expr): New function.
8085 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8086 non-static.
5e1dc496
LM
8087 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8088 ax.c.
8089 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8090 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8091 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8092 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8093 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8094 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8095 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8096 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8097 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8098 (compile_bytecodes): Remove forward declaration.
8099 (is_goto_target): Move to ax.c.
8100 (compile_bytecodes): Move to ax.c and call
8101 agent_get_trace_state_variable_value (...) and
8102 agent_set_trace_state_variable_value (...).
8103
8104 * Makefile.in: Update ax.c and IPA dependencies.
8105
277e4e52
PA
81062012-02-24 Pedro Alves <palves@redhat.com>
8107
8108 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8109 (cmd_bigqtbuffer_circular): ... this. Only handle
8110 'QTBuffer:circular:'.
8111 (handle_tracepoint_general_set): Adjust.
8112
bf4c19f7
YQ
81132012-02-16 Yao Qi <yao@codesourcery.com>
8114
8115 * inferiors.c: Move code to ...
8116 * dll.c: .... here. New.
8117 * server.h: Declare clear_dlls.
8118 * Makefile.in (SFILES): Add dll.c.
8119 (OBS): Add dll.o
8120 (dll.o): New rule.
8121
d73f2619
YQ
81222012-02-11 Yao Qi <yao@codesourcery.com>
8123
8124 * server.c: (handle_monitor_command): Add a new parameter
8125 `own_buf'.
8126 (handle_query): Update caller.
8127
f8255c2a
JB
81282012-02-09 Joel Brobecker <brobecker@adacore.com>
8129
8130 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8131 * configure, config.in: Regenerate.
8132 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8133 is not defined.
8134
da84f473
PA
81352012-02-02 Pedro Alves <palves@redhat.com>
8136
8137 Try SIGKILL first, then PTRACE_KILL.
8138 * linux-low.c (linux_kill_one_lwp): New.
8139 (linux_kill_one_lwp): Rename to ...
8140 (kill_one_lwp_callback): ... this. Use the new
8141 linux_kill_one_lwp.
8142
e886a173
PA
81432012-02-02 Pedro Alves <palves@redhat.com>
8144
8145 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8146 inferior.
8147
be07f1a2
PA
81482012-01-27 Pedro Alves <palves@redhat.com>
8149
8150 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8151 (elf_64_file_p): Make static.
8152 (linux_pid_exe_is_elf_64_file): New.
8153 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8154 Delete declarations.
8155 (linux_pid_exe_is_elf_64_file): Declare.
8156 * linux-x86-low.c (x86_arch_setup): Use
8157 linux_pid_exe_is_elf_64_file.
8158
d8301ad1
JK
81592012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8160
8161 * linux-low.c (linux_wait_for_event_1): Rename to ...
8162 (linux_wait_for_event): ... here and merge it with former
8163 linux_wait_for_event - new variable wait_ptid, use it.
8164 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8165
01b17894
PA
81662012-01-23 Pedro Alves <palves@redhat.com>
8167
8168 * server.c (main): Avoid yet another case of infinite loop while
8169 detaching/killing after a longjmp.
8170
e825046f
JK
81712012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8172
8173 Code cleanup.
8174 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8175
b9e7b9c3
UW
81762012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8177
8178 * hostio.c (handle_readlink): New function.
8179 (handle_vFile): Call it to handle "vFile:readlink" packets.
8180
901f9912
UW
81812012-01-20 Pedro Alves <palves@redhat.com>
8182 Ulrich Weigand <ulrich.weigand@linaro.org>
8183
8184 * server.c (handle_v_requests): Only support vAttach and vRun to
8185 start multiple processes when in extended protocol mode.
8186
fc1ab1a0
PA
81872012-01-17 Pedro Alves <palves@redhat.com>
8188
8189 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8190 memalign plus mprotect to allocate the scratch buffer.
8191
7d5d4e98
PA
81922012-01-13 Pedro Alves <palves@redhat.com>
8193
8194 * server.c (attach_inferior): Clear `cont_thread'.
8195
f128d5e9
PA
81962012-01-13 Pedro Alves <palves@redhat.com>
8197
8198 * server.c (main): Avoid infinite loop while detaching/killing
8199 after a longjmp.
8200
06db92f0
DE
82012012-01-09 Doug Evans <dje@google.com>
8202
8203 * server.c (start_inferior): Set last_ptid in --wrapper case.
8204
32d92999
YQ
82052012-01-06 Yao Qi <yao@codesourcery.com>
8206
8207 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8208 defined.
8209 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8210
5e0a92a9
YQ
82112012-01-04 Yao Qi <yao@codesourcery.com>
8212
8213 * tracepoint.c (cmd_qtdp): Print debug message
8214 for static tracepoint.
8215
ae639e8c
YQ
82162012-01-04 Yao Qi <yao@codesourcery.com>
8217
8218 * tracepoint.c (trace_vdebug): Differentiate debug message
8219 between gdbserver and IPA.
8220
f72429c5
YQ
82212012-01-03 Yao Qi <yao@codesourcery.com>
8222
8223 * tracepoint.c (tracepoint_was_hit): Don't collect for
8224 static tracepoint.
8225
12c3e59c
JB
82262012-01-02 Joel Brobecker <brobecker@adacore.com>
8227
8228 * terminal.h: Reformat copyright header.
8229
67827812
JB
82302012-01-02 Joel Brobecker <brobecker@adacore.com>
8231
8232 * server.c (gdbserver_version): Update copyright year.
8233 * gdbreplay.c (gdbreplay_version): Likewise.
8234
3e52c33d
JK
82352011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8236
8237 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8238
8239 Revert:
8240 2011-12-18 Hui Zhu <teawater@gmail.com>
8241 * linux-low.c (linux_create_inferior): Save return value to ret.
8242
66f1260e
HZ
82432011-12-18 Hui Zhu <teawater@gmail.com>
8244
8245 * linux-low.c (linux_create_inferior): Save return value to ret.
8246
e77616d7
DE
82472011-12-16 Doug Evans <dje@google.com>
8248
e7b06c57
DE
8249 * linux-low.c (linux_create_inferior): If stdio connection,
8250 redirect stdin from /dev/null, stdout to stderr.
8251 * remote-utils.c (remote_is_stdio): New static global.
8252 (remote_connection_is_stdio): New function.
8253 (remote_prepare): Handle stdio connection.
8254 (remote_open): Ditto.
8255 (remote_close): Don't close stdin for stdio connections.
8256 (read_prim,write_prim): New functions. Replace all calls to
8257 read/write to these.
8258 * server.c (main): Watch for "-" argument. Move call to
8259 remote_prepare before start_inferior.
8260 * server.h (STDIO_CONNECTION_NAME): New macro.
8261 (remote_connection_is_stdio): Declare.
8262
e77616d7
DE
8263 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8264 in debugging output.
8265
82067193
YQ
82662011-12-15 Yao Qi <yao@codesourcery.com>
8267
8268 * tracepoint.c: Include sys/syscall.h.
8269 (gdb_ust_thread): Remove preprocessor conditional.
8270
82bfbe7e
PA
82712011-12-14 Pedro Alves <pedro@codesourcery.com>
8272
8273 * linux-low.c (linux_detach_one_lwp): Call
8274 the_low_target.prepare_to_resume before detaching.
8275
712c6575
YQ
82762011-12-14 Yao Qi <yao@codesourcery.com>
8277
8278 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8279 of write.
8280
d54d1edf
YQ
82812011-12-14 Yao Qi <yao@codesourcery.com>
8282
8283 * i386-low.c (i386_low_stopped_data_address): Initialize local
8284 variable `control'.
8285
6210a125
PA
82862011-12-13 Pedro Alves <pedro@codesourcery.com>
8287
8288 PR remote/13492
8289
8290 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8291 DR_CONTROL unless necessary. Extend comments.
8292 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8293 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8294
2ece8244
YQ
82952011-12-13 Yao Qi <yao@codesourcery.com>
8296
8297 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8298 macros.
8299 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8300
784867a5
JK
83012011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8302
8303 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8304 Print new debug message for such case.
8305
6bf36717
JK
83062011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8307
8308 Fix overlapping memcpy.
8309 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8310 the read_inferior_memory transfer.
8311 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8312 write_inferior_memory transfer.
8313 (set_fast_tracepoint_jump): New variable buf. Use it for the
8314 read_inferior_memory and write_inferior_memory transfers.
8315 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8316 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8317 Use it for the write_inferior_memory transfer.
8318 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8319 buffers.
8320
50275556
MR
83212011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8322
8323 * linux-low.c (fetch_register, store_register): Make code
8324 consistent, fix formatting.
8325
7325beb4
MR
83262011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8327
8328 * linux-low.c (usr_store_inferior_registers): Factor out code
8329 to handle individual registers into...
8330 (store_register): ... this new function.
8331
c642a434
UW
83322011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8333
8334 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8335 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8336 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8337 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8338 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8339 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8340 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8341 (srv_xmlfiles): Add new XML files.
8342
8343 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8344 and <sys/uio.h>.
8345 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8346 (init_registers_s390_linux32v1): Add prototype.
8347 (init_registers_s390_linux32v2): Likewise.
8348 (init_registers_s390_linux64v1): Likewise.
8349 (init_registers_s390_linux64v2): Likewise.
8350 (init_registers_s390x_linux64v1): Likewise.
8351 (init_registers_s390x_linux64v2): Likewise.
8352 (s390_num_regs): Increment to 52.
8353 (s390_regmap): Add orig_r2 register.
8354 (s390_num_regs_3264): Increment to 68.
8355 (s390_regmap_3264): Add orig_r2 register.
8356 (s390_collect_ptrace_register): Handle orig_r2 register.
8357 (s390_supply_ptrace_register): Likewise.
8358 (s390_fill_last_break): New function.
8359 (s390_store_last_break): Likewise.
8360 (s390_fill_system_call): New function.
8361 (s390_store_system_call): Likewise.
8362 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8363 register sets.
8364 (s390_check_regset): New function.
8365 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8366 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8367 Update target_regsets for available register sets.
8368
2268b414
JK
83692011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8370 Jan Kratochvil <jan.kratochvil@redhat.com>
8371
8372 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8373 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8374 New.
8375 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8376 * linux-low.h (struct process_info_private): New member r_debug.
8377 * server.c (handle_qxfer_libraries): Call
8378 the_target->qxfer_libraries_svr4.
8379 (handle_qxfer_libraries_svr4): New function.
8380 (qxfer_packets): New entry "libraries-svr4".
8381 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8382 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8383 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8384 PACKET_qXfer_libraries_svr4.
8385
d6db1fab
UW
83862011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8387
8388 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8389 PSW address/mask between 8-byte and 16-byte formats.
8390 (s390_supply_ptrace_register): Likewise.
8391 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8392 basic addressing mode bit.
8393
242f5f1c
SS
83942011-11-24 Stan Shebs <stan@codesourcery.com>
8395
8396 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8397
f196051f
SS
83982011-11-17 Stan Shebs <stan@codesourcery.com>
8399
8400 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8401 (tracing_start_time): New global.
8402 (tracing_stop_time): New global.
8403 (tracing_user_name): New global.
8404 (tracing_notes): New global.
8405 (tracing_stop_note): New global.
8406 (cmd_qtstart): Set traceframe_usage, start_time.
8407 (stop_tracing): Set stop_time.
8408 (cmd_qtstatus): Report additional status.
8409 (cmd_qtp): New function.
8410 (handle_tracepoint_query): Call it.
8411 (cmd_qtnotes): New function.
8412 (handle_tracepoint_general_set): Call it.
8413 (get_timestamp): Rename from tsv_get_timestamp.
8414
405f8e94
SS
84152011-11-14 Stan Shebs <stan@codesourcery.com>
8416 Kwok Cheung Yeung <kcy@codesourcery.com>
8417
8418 * linux-x86-low.c (small_jump_insn): New.
8419 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8420 trampoline and error message, build a trampoline and issue a small
8421 jump instruction to it.
8422 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8423 trampoline and error message.
8424 (x86_get_min_fast_tracepoint_insn_len): New.
8425 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8426 * linux-low.h (struct linux_target_ops): Add arguments to
8427 install_fast_tracepoint_jump_pad operation, add new operation.
8428 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8429 arguments.
8430 (linux_get_min_fast_tracepoint_insn_len): New function.
8431 (linux_target_op): Add new operation.
8432 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8433 (gdb_trampoline_buffer_end): Ditto.
8434 (gdb_trampoline_buffer_error): Ditto.
8435 (struct ipa_sym_addresses): Add fields for new IPA variables.
8436 (symbol_list): Add entries for new IPA variables.
8437 (struct tracepoint): Add fields to hold the address range of the
8438 trampoline used by the tracepoint.
8439 (trampoline_buffer_head): New static variable.
8440 (trampoline_buffer_tail): Ditto.
8441 (claim_trampoline_space): New function.
8442 (have_fast_tracepoint_trampoline_buffer): New function.
8443 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8444 structure.
8445 (install_fast_tracepoint): Ditto, also add error buffer argument.
8446 (cmd_qtminftpilen): New function.
8447 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8448 (fast_tracepoint_from_trampoline_address): New function.
8449 (fast_tracepoint_collecting): Handle trampoline as part of jump
8450 pad space.
8451 (set_trampoline_buffer_space): New function.
8452 (initialize_tracepoint): Initialize new IPA variables.
8453 * target.h (struct target_ops): Add arguments to
8454 install_fast_tracepoint_jump_pad operation, add new
8455 get_min_fast_tracepoint_insn_len operation.
8456 (target_get_min_fast_tracepoint_insn_len): New.
8457 (install_fast_tracepoint_jump_pad): Add arguments.
8458 * server.h (IPA_BUFSIZ): Define.
8459 * linux-i386-ipa.c: Include extra header files.
8460 (initialize_fast_tracepoint_trampoline_buffer): New function.
8461 (initialize_low_tracepoint): Call it.
8462 * server.h (set_trampoline_buffer_space): Declare.
8463 (claim_trampoline_space): Ditto.
8464 (have_fast_tracepoint_trampoline_buffer): Ditto.
8465
1e4d1764
YQ
84662011-11-14 Yao Qi <yao@codesourcery.com>
8467
8468 * server.c (handle_query): Handle InstallInTrace for qSupported.
8469 * tracepoint.c (add_tracepoint): Sort list.
8470 (install_tracepoint, download_tracepoint): New.
8471 (cmd_qtdp): Call them to install and download tracepoints.
8472 (sort_tracepoints): Removed.
8473 (cmd_qtstart): Update.
8474
5c73ff4e
YQ
84752011-11-14 Yao Qi <yao@codesourcery.com>
8476
8477 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8478 * mem-break.h: Declare.
8479 * tracepoint.c (cmd_qtstart): Move some code to ...
8480 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8481 New.
8482 (download_tracepoints): Move some code to ...
8483 (download_tracepoint_1): ... here. New.
8484
86a30030
YQ
84852011-11-08 Yao Qi <yao@codesourcery.com>
8486
8487 * remote-utils.c (relocate_instruction): A comment fix.
8488
8d26e50c
JB
84892011-11-07 Joel Brobecker <brobecker@adacore.com>
8490
8491 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8492 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8493 dr_status_mirror and dr_control_mirror from debug_reg_state.
8494 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8495 (i386_initial_stuff): Remove use of deleted globals.
8496 (i386_get_thread_context, i386_set_thread_context,
8497 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8498 from debug_reg_state.
8499
a59306a3
YQ
85002011-11-05 Yao Qi <yao@codesourcery.com>
8501
8502 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8503 address as TPOINT's.
8504
3065dfb6
SS
85052011-11-02 Stan Shebs <stan@codesourcery.com>
8506
8507 * tracepoint.c (agent_mem_read_string): New function.
8508 (eval_agent_expr): Call it for tracenz.
8509 * server.c (handle_query): Report support for tracenz.
8510
fd0d8c7c
YQ
85112011-11-02 Yao Qi <yao@codesourcery.com>
8512
8513 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8514
609086b1
YQ
85152011-11-02 Yao Qi <yao@codesourcery.com>
8516
8517 * target.h: Fix a typo in comment.
8518
b9fd1791
PA
85192011-10-31 Pedro Alves <pedro@codesourcery.com>
8520
8521 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8522 clobber the breakpoints' shadows with fast tracepoint jumps.
8523 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8524 * target.c (write_inferior_memory): Also pass MYADDR down to
8525 check_mem_write.
8526
03583c20
UW
85272011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8528
8529 * configure.ac: Check support for personality routine.
8530 * configure: Regenerate.
8531 * config.in: Likewise.
8532 * linux-low.c: Include <sys/personality.h>.
8533 Define ADDR_NO_RANDOMIZE if necessary.
8534 (linux_create_inferior): Disable address space randomization when
8535 forking inferior, if requested.
8536 (linux_supports_disable_randomization): New function.
8537 (linux_target_ops): Install it.
8538 * server.h (disable_randomization): Declare.
8539 * server.c (disable_randomization): New global variable.
8540 (handle_general_set): Handle QDisableRandomization.
8541 (handle_query): Likewise for qSupported.
8542 (main): Support --disable-randomization and --no-disable-randomization
8543 command line arguments.
8544 * target.h (struct target_ops): Add supports_disable_randomization.
8545 (target_supports_disable_randomization): New macro.
8546
723b724b
MF
85472011-09-29 Mike Frysinger <vapier@gentoo.org>
8548
8549 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8550 ifdef check.
8551 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8552 [!PT_GETDSBT] (target_loadmap): New definition.
8553 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8554 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8555 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8556 and PT_GETDSBT to LINUX_LOADMAP.
8557 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8558 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8559
55329a5c 85602011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8561
8562 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8563 (arm_linux_hwbp_cap): New static variable.
8564 (arm_linux_get_hwbp_cap): Replace by ...
8565 (arm_linux_init_hwbp_cap): ... this new function.
8566 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8567 (arm_linux_get_hw_watchpoint_count): Likewise.
8568 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8569 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8570 (arm_prepare_to_resume): Use perror_with_name instead of error.
8571
55329a5c 85722011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8573
8574 * linux-arm-low.c: Include <signal.h>.
8575 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8576 (struct arm_linux_hwbp_cap): New data type.
8577 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8578 (struct arm_linux_hw_breakpoint): New data type.
8579 (MAX_BPTS, MAX_WPTS): Define.
8580 (struct arch_process_info, struct arch_lwp_info): New data types.
8581 (arm_linux_get_hwbp_cap): New function.
8582 (arm_linux_get_hw_breakpoint_count): Likewise.
8583 (arm_linux_get_hw_watchpoint_count): Likewise.
8584 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8585 (arm_hwbp_control_initialize): Likewise.
8586 (arm_hwbp_control_is_enabled): Likewise.
8587 (arm_hwbp_control_is_initialized): Likewise.
8588 (arm_hwbp_control_disable): Likewise.
8589 (arm_linux_hw_breakpoint_equal): Likewise.
8590 (arm_linux_hw_point_initialize): Likewise.
8591 (struct update_registers_data): New data structure.
8592 (update_registers_callback: New function.
8593 (arm_insert_point): Likewise.
8594 (arm_remove_point): Likewise.
8595 (arm_stopped_by_watchpoint): Likewise.
8596 (arm_stopped_data_address): Likewise.
8597 (arm_new_process): Likewise.
8598 (arm_new_thread): Likewise.
8599 (arm_prepare_to_resume): Likewise.
8600 (the_low_target): Register arm_insert_point, arm_remove_point,
8601 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8602 arm_new_thread, and arm_prepare_to_resume.
8603
6b9801d4
SS
86042011-09-15 Stan Shebs <stan@codesourcery.com>
8605
8606 * server.h (struct emit_ops): Add compare-goto fields.
8607 * tracepoint.c (gdb_agent_op_sizes): New table.
8608 (emit_eq_goto): New function.
8609 (emit_ne_goto): New function.
8610 (emit_lt_goto): New function.
8611 (emit_le_goto): New function.
8612 (emit_gt_goto): New function.
8613 (emit_ge_goto): New function.
8614 (is_goto_target): New function.
8615 (compile_bytecodes): Recognize special cases of compare-goto
8616 combinations and call specialized emitters for them.
8617 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8618 (amd64_emit_ne_goto): New function.
8619 (amd64_emit_lt_goto): New function.
8620 (amd64_emit_le_goto): New function.
8621 (amd64_emit_gt_goto): New function.
8622 (amd64_emit_ge_goto): New function.
8623 (amd64_emit_ops): Add the new functions.
8624 (i386_emit_eq_goto): New function.
8625 (i386_emit_ne_goto): New function.
8626 (i386_emit_lt_goto): New function.
8627 (i386_emit_le_goto): New function.
8628 (i386_emit_gt_goto): New function.
8629 (i386_emit_ge_goto): New function.
8630 (i386_emit_ops): Add the new functions.
8631
bf15cbda
SS
86322011-09-08 Stan Shebs <stan@codesourcery.com>
8633
8634 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8635 (i386_emit_epilogue): Restore %ebx.
8636
943ca1dd
JZ
86372011-08-31 Jie Zhang <jzhang918@gmail.com>
8638
8639 * server.c (step_thread): Remove definition.
8640 (process_serial_event): Don't handle Hs.
8641 * server.h (step_thread): Remove declaration.
8642 * target.c (set_desired_inferior): Remove use of step_thread.
8643
e3deef73
LM
86442011-08-24 Luis Machado <lgustavo@codesourcery.com>
8645
8646 * linux-low.c: Include linux-procfs.h.
8647 (linux_attach_lwp_1): Update comments.
8648 (linux_attach): Scan for existing threads when attaching to a
8649 process that is the tgid.
8650 * Makefile.in: Update dependencies.
8651
13da1c97
LM
86522011-08-24 Luis Machado <lgustavo@codesourcery.com>
8653
8654 * configure.srv: Add linux-procfs.o dependencies.
8655
881127c9
YQ
86562011-08-14 Yao Qi <yao@codesourcery.com>
8657
8658 * target.h (struct target_ops): Fix indent.
8659 * win32-low.c (win32_target_ops): Fix comment.
8660
58dbd541
YQ
86612011-08-14 Andrew Jenner <andrew@codesourcery.com>
8662 Yao Qi <yao@codesourcery.com>
8663
8664 * Makefile.in (clean): Remove tic6x-*.c files.
8665 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8666 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8667 (tic6x-c64xp-linux.c): Likewise.
8668 * configure.srv: Add support for tic6x-*-uclinux.
8669 * linux-tic6x-low.c: New.
8670 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8671
78d85199
YQ
86722011-08-14 Andrew Stubbs <ams@codesourcery.com>
8673 Yao Qi <yao@codesourcery.com>
8674
8675 * target.h (struct target_ops): Add read_loadmap.
8676 * linux-low.c (struct target_loadseg): New type.
8677 (struct target_loadmap): New type.
8678 (linux_read_loadmap): New function.
8679 (linux_target_ops): Add linux_read_loadmap.
8680 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
8681 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8682 to NULL.
78d85199 8683
a959a88d
EZ
86842011-08-05 Eli Zaretskii <eliz@gnu.org>
8685
8686 * win32-low.c: Include <stdint.h>.
8687
1ced966e
PA
86882011-07-22 Pedro Alves <pedro@codesourcery.com>
8689
8690 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8691 to the inferior here.
8692 (i386_remove_aligned_watchpoint): Ditto.
8693 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8694 fit part of the watchpoint in the debug registers.
8695 (i386_update_inferior_debug_regs): New.
8696 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8697 registers, and only update the inferior on success.
8698 (i386_low_remove_watchpoint): Ditto.
8699
d26e3629
KY
87002011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8701
8702 * linux-low.c (compare_ints, unique, list_threads, show_process,
8703 linux_core_of_thread): Delete.
8704 (linux_target_ops): Change linux_core_of_thread to
8705 linux_common_core_of_thread.
8706 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8707 * utils.c (malloc_failure): Change type of argument.
8708 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8709 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8710 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8711 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8712 (IPA_OBJS): Add common-utils-ipa.o.
8713 (ptid_h, linux_osdata_h): New macros.
8714 (server_h): Add common/common-utils.h, common/xml-utils.h,
8715 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8716 common/ptid.h.
8717 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8718 ptid.o, buffer.o): New rules.
8719 (linux-low.o): Add common/linux-osdata.h as a dependency.
8720 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8721 * configure.ac: Add AC_HEADER_DIRENT check.
8722 * config.in: Regenerate.
8723 * configure: Regenerate.
8724 * remote-utils.c (xml_escape_text): Delete.
8725 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8726 buffer_xml_printf): Move to common/buffer.c.
8727 * server.c (main): Remove call to initialize_inferiors.
8728 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8729 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8730 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8731 internal_error, gdb_assert, gdb_assert_fail): Delete.
8732 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8733 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8734 common/buffer.h.
8735 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8736 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8737 initialize_inferiors): Delete.
8738
2275a1a7
PA
87392011-07-20 Pedro Alves <pedro@codesourcery.com>
8740
8741 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8742 symbol error.
8743
0a5b1e09
PA
87442011-05-31 Pedro Alves <pedro@codesourcery.com>
8745
8746 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8747 assertion.
8748 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8749
6938fd34
YQ
87502011-05-26 Yao Qi <yao@codesourcery.com>
8751
8752 * Makefile.in (thread-db.o): Track dependence to
8753 common/gdb_thread_db.h.
8754 * thread-db.c: include gdb_thread_db.h from right place.
8755
b481f9e0
TT
87562011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8757
8758 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8759 __FILE__ and __LINE__ to internal_error.
8760
98a5dd13
DE
87612011-05-13 Doug Evans <dje@google.com>
8762
8763 * thread-db.c (try_thread_db_load_from_sdir): New function.
8764 (try_thread_db_load_from_dir): New function.
8765 (thread_db_load_search): Handle $sdir, ignore $pdir.
8766 Remove trying of system directories if search of
8767 libthread-db-search-path fails, that is now done via $sdir.
8768
d248b706
KY
87692011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8770
8771 * server.c (handle_query): Add EnableDisableTracepoints to the list
8772 of supported features.
43aaf8b6 8773 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 8774 tracepoints.
43aaf8b6
PA
8775 (cmd_qtenable_disable): New.
8776 (cmd_qtstart): Install tracepoints even if disabled.
8777 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8778 receiving a QTEnable or QTDisable packet.
8779 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8780 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8781 tracepoints.
8782 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 8783
84e578fb
DE
87842011-05-10 Doug Evans <dje@google.com>
8785
8786 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8787
71f55dd8
DE
87882011-05-04 Doug Evans <dje@google.com>
8789
8790 * linux-low.c (linux_join): Skip process lookup.
8791 * spu-low.c (spu_join): Ditto.
8792 * server.c (join_inferiors_callback): Delete.
8793 (process_serial_event): For 'D' packet (detach) call join_inferior
8794 directly.
8795
4d393d60
JM
87962011-05-04 Joseph Myers <joseph@codesourcery.com>
8797
8798 * README: Don't mention xscale*-*-linux*.
8799 * configure.srv (xscale*-*-linux*): Don't handle target.
8800
b00ad6ff
NF
88012011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8802
8803 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8804 casting pointers.
8805 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8806 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8807 (i386_emit_void_call_2): Likewise.
8808
af96c192
YQ
88092011-04-26 Yao Qi <yao@codesourcery.com>
8810
43aaf8b6
PA
8811 * linux-low.c: Move common macros to linux-ptrace.h.
8812 Include linux-ptrace.h.
af96c192
YQ
8813 * Makefile.in (linux_ptrace_h): New.
8814 (linux-low.o): Depends on linux-ptrace.h.
8815
03f2bd59
JK
88162011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8817
8818 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8819 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8820 (remote_prepare): New function with most of the TCP code from ...
8821 (remote_open): ... here. Detect PORT here unconditionally. Move also
8822 setting transport_is_reliable.
8823 * server.c (run_once): New variable.
8824 (gdbserver_usage): Document it.
8825 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8826 the first run if RUN_ONCE.
8827 * server.h (run_once, remote_prepare): New declarations.
8828
7a9dd1b2
TT
88292011-04-19 Tom Tromey <tromey@redhat.com>
8830
8831 * win32-low.c (handle_load_dll): Remove duplicate "the".
8832
81239425
PM
88332011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8834
8835 Remove support for old Cygwin 1.5 versions.
8836 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8837 function to avoid warning.
8838 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8839 warning.
8840
9e0627f1
PM
88412011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8842
8843 * gdbserver/server.h (Macro _): Define it if not available.
8844
588eebee
MS
88452011-03-14 Michael Snyder <msnyder@vmware.com>
8846
348af9f7 8847 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 8848
43f70d4c
JB
88492011-03-10 Joel Brobecker <brobecker@adacore.com>
8850
8851 * Makefile.in (maintainer-clean realclean distclean): Remove
8852 "make ... subdir_do" command.
8853
348af9f7
MS
88542011-03-10 Michael Snyder <msnyder@vmware.com>
8855
8856 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8857
8858 * server.c (handle_v_run): Free alloced buffer on early return.
8859
e637a4f5
YQ
88602011-03-09 Yao Qi <yao@codesourcery.com>
8861
8862 Revert:
8863 2011-03-04 Yao Qi <yao@codesourcery.com>
8864
8865 * Makefile.in: Remove GNU make feature --directory.
8866
8867 2011-03-05 Yao Qi <yao@codesourcery.com>
8868
8869 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8870 (subdir_do): New make target. Copied from gdb/Makefile.
8871 (maintainer-clean, realclean, distclean, clean): Call corresponding
8872 make targets in common/Makefile.
8873
8874 2011-02-11 Yao Qi <yao@codesourcery.com>
8875
8876 * configure.ac: Call AC_PROG_RANLIB.
8877 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8878 * configure: Regenerate.
8879
e6edda56
JK
88802011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8881
8882 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8883
e5141119
JB
88842011-03-06 Yao Qi <yao@codesourcery.com>
8885
8886 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8887
64794aa4
JB
88882011-03-05 Yao Qi <yao@codesourcery.com>
8889
8890 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8891 (subdir_do): New make target. Copied from gdb/Makefile.
8892 (maintainer-clean, realclean, distclean, clean): Call corresponding
8893 make targets in common/Makefile.
8894
7a762829
YQ
88952011-03-04 Yao Qi <yao@codesourcery.com>
8896
8897 * Makefile.in: Remove GNU make feature --directory.
8898
348af9f7
MS
88992011-03-04 Michael Snyder <msnyder@vmware.com>
8900
8901 * server.c (queue_stop_reply): Call xmalloc not malloc.
8902
89032011-03-02 Michael Snyder <msnyder@vmware.com>
8904
8905 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8906
9f72fee2
MS
89072011-02-28 Michael Snyder <msnyder@vmware.com>
8908
588eebee
MS
8909 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8910 (cmd_qtframe): Ditto.
8911 (cmd_qtbuffer): Ditto.
8912 (cmd_bigqtbuffer): Ditto.
8913
9f72fee2
MS
8914 * utils.c (decimal2str): Initialize 'width' to nine, then
8915 don't mess with it.
8916
8040bd49
UW
89172011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8918
8919 * hostio.c (require_data): Free *data, not data.
8920
7e52cbd0
JK
89212011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8922
8923 * hostio.c (require_data): Use free, not xfree.
8924
9130f83e
MS
89252011-02-27 Michael Snyder <msnyder@vmware.com>
8926
4b812f4e
MS
8927 * server.c (handle_query): Discard unused value.
8928
9130f83e
MS
8929 * hostio.c (require_data): Free malloc memory before returning
8930 error.
8931
69d37113
MS
89322011-02-26 Michael Snyder <msnyder@vmware.com>
8933
8934 * linux-low.c (list_threads): Call closedir for dirent.
8935
35f5825a
MS
89362011-02-27 Michael Snyder <msnyder@vmware.com>
8937
2a589cef
MS
8938 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8939 a case statement falls through.
8940
0adea5f7
MS
8941 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8942
35f5825a
MS
8943 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8944 in comparison.
8945
238f1c74
MS
89462011-02-26 Michael Snyder <msnyder@vmware.com>
8947
8948 * utils.c (decimal2str): Eliminate dead code and dead param.
8949 (pulongest): Drop dead param from call to decimal2str.
8950 (plongest): Ditto.
8951
633ff500
JB
89522011-02-24 Joel Brobecker <brobecker@adacore.com>
8953
8954 Revert the following patch (not approved yet):
8955 2011-02-21 Hui Zhu <teawater@gmail.com>
8956 * tracepoint.c (tp_printf): New function.
8957 (eval_agent_expr): Handle gdb_agent_op_printf.
8958
f9c6ff72
HZ
89592011-02-21 Hui Zhu <teawater@gmail.com>
8960
8961 * tracepoint.c (tp_printf): New function.
8962 (eval_agent_expr): Handle gdb_agent_op_printf.
8963
94d5e490
TT
89642011-02-18 Tom Tromey <tromey@redhat.com>
8965
8966 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8967 (tracepoint.o): Likewise.
8968 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8969 (gdb_agent_op_names): Likewise.
8970
c7f96d2b
TT
89712011-02-18 Tom Tromey <tromey@redhat.com>
8972
8973 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8974 gdb_agent_op_rot>: New constants.
8975 (gdb_agent_op_names): Add pick and roll.
8976 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8977 cases.
8978
0feedb2c
JK
89792011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8980
8981 * aclocal.m4: Regenerated with aclocal-1.11.1.
8982
b3b9301e
PA
89832011-02-14 Pedro Alves <pedro@codesourcery.com>
8984
8985 * server.c (handle_qxfer_traceframe_info): New.
8986 (qxfer_packets): Register "traceframe-info".
8987 (handle_query): Report support for qXfer:traceframe-info:read+.
8988 * tracepoint.c (match_blocktype): New.
8989 (traceframe_find_block_type): Rename to ...
8990 (traceframe_walk_blocks): ... this. Add callback filter argument,
8991 and use it.
8992 (traceframe_find_block_type): New, reimplemented on top of
8993 traceframe_walk_blocks.
8994 (build_traceframe_info_xml): New.
8995 (traceframe_read_info): New.
8996 * server.h (traceframe_read_info): Declare.
8997
4f3e6fb7
YQ
89982011-02-11 Yao Qi <yao@codesourcery.com>
8999
9000 * configure.ac: Call AC_PROG_RANLIB.
9001 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9002 * configure: Regenerate.
9003
764880b7
PA
90042011-02-07 Pedro Alves <pedro@codesourcery.com>
9005
9006 * server.c (gdb_read_memory): Change return semantics to allow
9007 partial transfers.
9008 (handle_search_memory_1): Adjust.
9009 (process_serial_event) <'m' packet>: Handle partial transfers.
9010 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9011
1c79eb8a
PA
90122011-01-28 Pedro Alves <pedro@codesourcery.com>
9013
9014 * regcache.c (init_register_cache): Initialize
9015 regcache->register_status.
9016 (free_register_cache): Release regcache->register_status.
9017 (regcache_cpy): Copy register_status.
9018 (registers_to_string): Print 'x's for unavailable registers.
9019 (supply_register): Mark the register's status valid or
9020 unavailable, depending on whether a buffer was passed in or not.
9021 (supply_register_zeroed): New.
9022 (supply_regblock): Mark the registers' status valid or
9023 unavailable, depending on whether a buffer was passed in or not.
9024 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9025 (struct regcache): New `register_status' field.
9026 (supply_register_zeroed): Declare.
9027 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9028 supply_register_zeroed, rather than passing a NULL buffer to
9029 supply_register.
9030 * tracepoint.c (fetch_traceframe_registers): Update comment.
9031
85724a0e
PA
90322011-01-28 Pedro Alves <pedro@codesourcery.com>
9033
9034 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9035 buffer explicit.
9036
d08aafef
PA
90372011-01-25 Pedro Alves <pedro@codesourcery.com>
9038
9039 * server.h (decode_xfer_write): Change prototype.
9040 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9041 and don't extract the annex here.
9042 * server.c (decode_xfer_read): Remove `annex' parameter,
9043 and don't extract the annex here.
9044 (decode_xfer): New.
9045 (struct qxfer): New.
9046 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9047 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9048 (handle_qxfer_statictrace): New functions, abstracted out from
9049 handle_query, and made to use the struct qxfer interface.
9050 (handle_threads_qxfer_proper): Rename to ...
9051 (handle_qxfer_threads_proper): ... this.
9052 (handle_threads_qxfer): Rename to ...
9053 (handle_qxfer_threads): ... this. Adjust.
9054 (qxfer_packets): New array.
9055 (handle_qxfer): New function.
9056 (handle_query): Use handle_qxfer.
9057
493e2a69
MS
90582011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9059
9060 * gdbreplay.c: Shorten lines of >= 80 columns.
9061 * linux-low.c: Ditto.
9062 * linux-ppc-low.c: Ditto.
9063 * linux-s390-low.c: Ditto.
9064 * linux-sparc-low.c: Ditto.
9065 * linux-x86-low.c: Ditto.
9066 * linux-xtensa-low.c: Ditto.
9067 * mem-break.c: Ditto.
9068 * nto-low.c: Ditto.
9069 * regcache.h: Ditto.
9070 * remote-utils.c: Ditto.
9071 * server.c: Ditto.
9072 * server.h: Ditto.
9073 * thread-db.c: Ditto.
9074 * tracepoint.c: Ditto.
9075 * utils.c: Ditto.
9076 * win32-low.h: Ditto.
9077
44944448
JB
90782011-01-05 Joel Brobecker <brobecker@adacore.com>
9079
9080 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9081 update.
9082
71ce852c
JB
90832011-01-01 Joel Brobecker <brobecker@adacore.com>
9084
9085 * server.c (gdbserver_version): Update copyright year in version
9086 output.
9087 * gdbreplay.c (gdbreplay_version): Ditto.
9088
eb826dc6
MF
90892010-12-29 Jie Zhang <jie.zhang@analog.com>
9090
9091 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9092 * linux-bfin-low.c: New file.
9093 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9094 PT_DATA_ADDR for BFIN targets.
9095 * Makefile.in (SFILES): Add linux-bfin-low.c.
9096 (clean): Remove reg-bfin.c.
9097 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9098 * README: Mention supported Blackfin targets.
9099
39ab222a
MF
91002010-12-23 Mike Frysinger <vapier@gentoo.org>
9101
9102 * .gitignore: New file.
9103
a1f2ce7d
MF
91042010-11-16 Mike Frysinger <vapier@gentoo.org>
9105
9106 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9107
f474844c
JZ
91082010-10-22 Jie Zhang <jie@codesourcery.com>
9109
9110 * Makefile.in: Add FLAGS_TO_PASS variable.
9111 (install): Remove dependency of install-only and recursively
9112 invoke make for install-only.
9113
f1048712
DE
91142010-10-04 Doug Evans <dje@google.com>
9115
9116 * Makefile.in (uninstall): Use $(DESTDIR).
9117
b53a1623
PA
91182010-09-24 Pedro Alves <pedro@codesourcery.com>
9119
e6ee044d
PA
9120 PR gdb/11842
9121
b53a1623
PA
9122 * linux-x86-low.c (compat_siginfo_from_siginfo)
9123 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9124 si_code is < 0. Check for si_code == SI_TIMER before checking for
9125 si_code < 0.
9126
fa1bd1e4
JB
91272010-09-13 Joel Brobecker <brobecker@adacore.com>
9128
9129 * lynx-i386-low.c: New file.
9130 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9131
47fac8f8
JB
91322010-09-13 Joel Brobecker <brobecker@adacore.com>
9133
9134 * lynx-low.c (ptrace_request_to_str): Remove handling for
9135 request values that have been removed in LynxOS 5.x.
9136
1adfc54d
JB
91372010-09-13 Joel Brobecker <brobecker@adacore.com>
9138
9139 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9140 <ptrace.h>
9141
c2a66c29
NS
91422010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9143
9144 * configure.ac: Add --enable-inprocess-agent option.
9145 * configure: Rebuilt.
9146
32fcada3
YQ
91472010-09-06 Yao Qi <yao@codesourcery.com>
9148
9149 * linux-low.c (linux_kill): Remove unused variable.
9150 (linux_stabilize_threads): Likewise.
9151 * server.c (start_inferior): Likewise.
9152 (queue_stop_reply_callback): Likewise.
9153 * tracepoint.c (do_action_at_tracepoint): Likewise.
9154
0cccb683
YQ
91552010-09-06 Yao Qi <yao@codesourcery.com>
9156
9157 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9158 on return.
9159
423ec54c
JK
91602010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9161
9162 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9163
12ac6819
PA
91642010-09-06 Pedro Alves <pedro@codesourcery.com>
9165
9166 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9167 "$(IPA_DEPFILES)".
9168
8ed54b31
JB
91692010-09-01 Joel Brobecker <brobecker@adacore.com>
9170
9171 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9172 gdbserver/lynx-ppc-low.c: New files.
9173 * Makefile.in (lynx_low_h): New variable.
9174 (lynx-low.o, lynx-ppc-low.o): New rules.
9175 * configure.ac: On LynxOS, link with -lnetinet.
9176 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9177 * configure: regenerate.
9178
bb0116a4
JB
91792010-09-01 Joel Brobecker <brobecker@adacore.com>
9180
9181 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9182 * configure.ac: Add check for vasprintf and vsnprintf.
9183 * configure, config.in: Regenerate.
9184 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9185
a778ab81 91862010-09-01 Joel Brobecker <brobecker@adacore.com>
9187
9188 * gdbreplay.c: Move include of alloca.h up, next to include of
9189 malloc.h.
9190 * server.h: Add include of malloc.h.
9191 * mem-break.c: Remove include of malloc.h.
9192 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9193
8b034a19 91942010-09-01 Joel Brobecker <brobecker@adacore.com>
9195
9196 * Makefile.in (memmem.o): Build with -Wno-error.
9197
91982010-09-01 Joel Brobecker <brobecker@adacore.com>
9199
9200 * utils.c (xsnprintf): Make non-static.
9201 * server.h: Add xsnprintf declaration.
9202 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9203 replace calls to snprintf by calls to xsnprintf throughout.
9204
92052010-09-01 Joel Brobecker <brobecker@adacore.com>
9206
9207 * configure.ac: Add configure check for alloca.
9208 * configure, config.in: Regenerate.
9209 * server.h: Include alloca.h if it exists.
9210 * gdbreplay.c: Include alloca.h if it exists.
9211
1a981360
PA
92122010-08-28 Pedro Alves <pedro@codesourcery.com>
9213
9214 * linux-low.c (__SIGRTMIN): Define if not already defined.
9215 (linux_create_inferior): Check for __ANDROID__ rather than
9216 __SIGRTMIN.
9217 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9218 are already deferred.
9219 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9220 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9221 stopped and already has a pending signal to report.
9222 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9223 a pending signal to report or is moving out of a jump pad.
9224 (linux_init_signals): Check for __ANDROID__ rather than
9225 __SIGRTMIN.
9226
b4d51a55
PA
92272010-08-28 Pedro Alves <pedro@codesourcery.com>
9228
9229 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9230 debug_threads check. Avoid a linear search when not doing debug
9231 output.
9232
ec48365d
PA
92332010-08-27 Pedro Alves <pedro@codesourcery.com>
9234
9235 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9236 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9237 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9238 (process_event): Change local fd's type to gdb_fildes_t.
9239 (create_file_handler): Adjust prototype.
9240 (delete_file_handler): Adjust prototype.
9241 (handle_file_event): Adjust prototype. Use pfildes.
9242 (create_file_event): Adjsut prototype.
9243 * remote-utils.c (remote_desc, listen_desc): Change type to
9244 gdb_fildes_t.
9245 * server.h: New gdb_fildes_t typedef.
9246 [USE_WIN32API]: Include winsock2.h.
9247 (delete_file_handler, add_file_handler): Adjust prototypes.
9248 (pfildes): Declare.
9249 * utils.c (pfildes): New.
9250
854d88f0
PA
92512010-08-27 Pedro Alves <pedro@codesourcery.com>
9252
9253 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9254 * configure: Regenerate.
9255
0146f85b
PA
92562010-08-27 Pedro Alves <pedro@codesourcery.com>
9257
9258 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9259 (linux_done_accessing_memory): ... this.
9260 (linux_target_ops): Adjust.
9261 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9262 * nto-low.c (nto_target_ops): Adjust comment.
9263 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9264 * spu-low.c (spu_target_ops): Adjust comment.
9265 * target.h (target_ops): Rename unprepare_to_access_memory field
9266 to done_accessing_memory.
9267 (unprepare_to_access_memory): Rename to ...
9268 (done_accessing_memory): ... this.
9269
90d74c30
PA
92702010-08-26 Pedro Alves <pedro@codesourcery.com>
9271
9272 * linux-low.c (linux_prepare_to_access_memory): New.
9273 (linux_unprepare_to_access_memory): New.
9274 (linux_target_ops): Install them.
9275 * server.c (read_memory): Rename to ...
9276 (gdb_read_memory): ... this. Use
9277 prepare_to_access_memory/prepare_to_access_memory.
9278 (write_memory): Rename to ...
9279 (gdb_write_memory): ... this. Use
9280 prepare_to_access_memory/prepare_to_access_memory.
9281 (handle_search_memory_1): Adjust.
9282 (process_serial_event): Adjust.
9283 * target.h (struct target_ops): New fields
9284 prepare_to_access_memory and unprepare_to_access_memory.
9285 (prepare_to_access_memory, unprepare_to_access_memory): New.
9286 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9287 prepare_to_access_memory/prepare_to_access_memory.
9288 * nto-low.c (nto_target_ops): Adjust.
9289 * spu-low.c (spu_target_ops): Adjust.
9290 * win32-low.c (win32_target_ops): Adjust.
9291
fd467969
PA
92922010-08-26 Pedro Alves <pedro@codesourcery.com>
9293
9294 * Makefile.in (WARN_CFLAGS): Get it from configure.
9295 (WERROR_CFLAGS): New.
9296 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9297 * configure.ac: Introduce --enable-werror, which adds -Werror to
9298 the compiler command line. Enabled by default. Disable with
9299 --disable-werror. Add -Wdeclaration-after-statement
9300 Wpointer-arith and -Wformat-nonliteral to warning flags.
9301 * configure: Regenerate.
9302
331e2f5f
PA
93032010-08-26 Pedro Alves <pedro@codesourcery.com>
9304
9305 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9306
e581f2b4
PA
93072010-08-26 Pedro Alves <pedro@codesourcery.com>
9308
9309 * gdbreplay.c (remote_error): New.
9310 (gdbchar): New.
9311 (expect): Use gdbchar. Check for error reading from GDB.
9312 Clarify sync error output.
9313 (play): Check for errors writing to GDB.
9314 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9315 * remote-utils.c (getpkt): Check for errors writing to the remote
9316 descriptor.
9317
3c11dd79
PA
93182010-08-25 Pedro Alves <pedro@codesourcery.com>
9319
9320 * linux-low.c (linux_wait_1): Move non-debugging code out of
9321 `debug_threads' control.
9322
d20a8ad9
PA
93232010-08-25 Pedro Alves <pedro@codesourcery.com>
9324
9325 * linux-low.c (linux_wait_1): Don't set last_status here.
9326 * server.c (push_event, queue_stop_reply_callback): Assert we're
9327 not pushing a TARGET_WAITKIND_IGNORE event.
9328 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9329 (myresume, handle_target_event): Set the thread's last_resume_kind
9330 and last_status from the target returned status.
9331
964e4306
PA
93322010-08-25 Pedro Alves <pedro@codesourcery.com>
9333
9334 PR threads/10729
9335
9336 * linux-x86-low.c (update_debug_registers_callback): New.
9337 (i386_dr_low_set_addr): Use it.
9338 (i386_dr_low_get_addr): New.
9339 (i386_dr_low_set_control): Use update_debug_registers_callback.
9340 (i386_dr_low_get_control): New.
9341 (i386_dr_low_get_status): Adjust.
9342 * linux-low.c (linux_stop_lwp): New.
9343 * linux-low.h (linux_stop_lwp): Declare.
9344
9345 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9346 argument instead of a i386_debug_reg_state.
9347 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9348 a i386_debug_reg_state.
9349 (i386_insert_aligned_watchpoint): Adjust.
9350 (i386_remove_aligned_watchpoint): Adjust.
9351 (i386_low_stopped_data_address): Read the debug registers from the
9352 inferior instead of from the mirrors.
9353 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9354 (i386_dr_low_get_addr): Declare.
9355 (i386_dr_low_get_control): Declare.
9356 (i386_dr_low_get_status): Change prototype.
9357
9358 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9359 (i386_dr_low_get_addr): New.
9360 (i386_dr_low_get_control): New.
9361 (i386_dr_low_get_status): Adjust prototype. Return
9362 dr_status_mirror.
9363 (i386_initial_stuff): Clear dr_status_mirror and
9364 dr_control_mirror.
9365 (i386_get_thread_context): Adjust.
9366 (i386_set_thread_context): Adjust.
9367 (i386_thread_added): Adjust.
9368
5f21a75b
PA
93692010-08-24 Pedro Alves <pedro@codesourcery.com>
9370
9371 * linux-low.h (linux_thread_area): Delete declaration.
9372
3e4c1235
TS
93732010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9374
9375 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9376 after its termination.
9377
1971b033
PA
93782010-08-09 Pedro Alves <pedro@codesourcery.com>
9379
9380 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9381 (gdb_wants_all_stopped): Delete.
9382 (linux_wait_1): Don't call them.
9383 * server.c (handle_v_cont): Tag all threads as want-stopped.
9384 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9385 stopped as "client-wants-stopped".
9386
310444ac
PA
93872010-07-31 Pedro Alves <pedro@codesourcery.com>
9388
9389 * Makefile.in (signals_h): New.
9390 (server_h): Depend on it.
9391 (server.o): Don't depend on $(signals_def).
9392 (signals.o): Depend on $(signals_def).
9393
a19cae16
JK
93942010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9395
9396 * Makefile.in (signals_def): New.
9397 (server_h): Append include/gdb/signals.h and signals_def.
9398 (server.o): Append signals_def.
9399
30d50328
JK
94002010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9401
9402 * server.c (handle_target_event): Use target_signal_to_host for
9403 resume_info.sig initialization.
9404 * target.h (struct thread_resume) <sig>: New comment.
9405
5c3216e2
OS
94062010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9407
c6f46ca0
OS
9408 * server.c (handle_query): strcpy() the returned string from paddress()
9409 instead of sprintf().
5c3216e2
OS
9410 * utils.c (paddress): Return phex_nz().
9411
6bd31874
JB
94122010-07-07 Joel Brobecker <brobecker@adacore.com>
9413
9414 * server.c (handle_v_cont): Call mourn_inferior if process
9415 just exited.
9416 (myresume): Likewise.
9417
0fb4aa4b
PA
94182010-07-01 Pedro Alves <pedro@codesourcery.com>
9419
9420 Static tracepoints, and integration with UST.
9421
9422 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9423 * mem-break.c (uninsert_all_breakpoints)
9424 (reinsert_all_breakpoints): New.
9425 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9426 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9427 (gdb_agent_ust_loaded, helper_thread_id)
9428 (gdb_agent_helper_thread_id): New macros.
9429 (struct ipa_sym_addresses): Add addr_ust_loaded,
9430 addr_helper_thread_id, addr_cmd_buf.
9431 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9432 (in_process_agent_loaded_ust): New.
9433 (write_e_ust_not_loaded): New.
9434 (maybe_write_ipa_ust_not_loaded): New.
9435 (struct collect_static_trace_data_action): New.
9436 (enum tracepoint_type) <static_tracepoint>: New.
9437 (struct tracepoint) <handle>: Mention static tracepoints.
9438 (struct static_tracepoint_ctx): New.
9439 (CMD_BUF_SIZE): New.
9440 (add_tracepoint_action): Handle static tracepoint actions.
9441 (unprobe_marker_at): New.
9442 (clear_installed_tracepoints): Handle static tracepoints.
9443 (cmd_qtdp): Handle static tracepoints.
9444 (probe_marker_at): New.
9445 (cmd_qtstart): Handle static tracepoints.
9446 (response_tracepoint): Handle static tracepoints.
9447 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9448 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9449 (get_context_regcache): Handle static tracepoints.
9450 (do_action_at_tracepoint): Handle static tracepoint actions.
9451 (traceframe_find_block_type): Handle static trace data blocks.
9452 (traceframe_read_sdata): New.
9453 (download_tracepoints): Download static tracepoint actions.
9454 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9455 (GDB_PROBE_NAME): New.
9456 (ust_ops): New.
9457 (GET_UST_SYM): New.
9458 (USTF): New.
9459 (dlsym_ust): New.
9460 (ust_marker_to_static_tracepoint): New.
9461 (gdb_probe): New.
9462 (collect_ust_data_at_tracepoint): New.
9463 (gdb_ust_probe): New.
9464 (UNIX_PATH_MAX, SOCK_DIR): New.
9465 (gdb_ust_connect_sync_socket): New.
9466 (resume_thread, stop_thread): New.
9467 (run_inferior_command): New.
9468 (init_named_socket): New.
9469 (gdb_ust_socket_init): New.
9470 (cstr_to_hexstr): New.
9471 (next_st): New.
9472 (first_marker, next_marker): New.
9473 (response_ust_marker): New.
9474 (cmd_qtfstm, cmd_qtsstm): New.
9475 (unprobe_marker_at, probe_marker_at): New.
9476 (cmd_qtstmat, gdb_ust_thread): New.
9477 (gdb_ust_init): New.
9478 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9479 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9480 (ST_REGENTRY): New.
9481 (x86_64_st_collect_regmap): New.
9482 (X86_64_NUM_ST_COLLECT_GREGS): New.
9483 (AMD64_RIP_REGNUM): New.
9484 (supply_static_tracepoint_registers): New.
9485 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9486 (ST_REGENTRY): New.
9487 (i386_st_collect_regmap): New.
9488 (i386_NUM_ST_COLLECT_GREGS): New.
9489 (supply_static_tracepoint_registers): New.
9490 * server.c (handle_query): Handle qXfer:statictrace:read.
9491 <qSupported>: Report support for StaticTracepoints, and
9492 qXfer:statictrace:read features.
9493 * server.h (traceframe_read_sdata)
9494 (supply_static_tracepoint_registers): Declare.
9495 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9496 (unpack_varlen_hex): Include in IPA build.
9497 * Makefile.in (ustlibs, ustinc): New.
9498 (IPA_OBJS): Add remote-utils-ipa.o.
9499 ($(IPA_LIB)): Link -ldl and -lpthread.
9500 (UST_CFLAGS): New.
9501 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9502 * config.in, configure: Regenerate.
9503
9e4344e5
PA
95042010-06-20 Ian Lance Taylor <iant@google.com>
9505 Pedro Alves <pedro@codesourcery.com>
9506
9507 * linux-x86-low.c (always_true): Delete.
9508 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9509 trying to fool the compiler with always_true.
9510
c6beb2cb
PA
95112010-06-20 Pedro Alves <pedro@codesourcery.com>
9512
9513 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9514 conditions in gdbserver.
9515
d2ed6730
UW
95162010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9517
9518 * spu-low.c (spu_read_memory): Wrap around local store limit.
9519 (spu_write_memory): Likewise.
9520
4e29fb54
PA
95212010-06-15 Pedro Alves <pedro@codesourcery.com>
9522
9523 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9524 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9525 LONGEST uses.
9526 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9527 uses.
9528 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9529 uses with LONGEST uses.
9530
6a271cae
PA
95312010-06-14 Stan Shebs <stan@codesourcery.com>
9532 Pedro Alves <pedro@codesourcery.com>
9533
9534 Bytecode compiler.
9535
9536 * linux-x86-low.c: Include limits.h.
9537 (add_insns): New.
9538 (always_true): New.
9539 (EMIT_ASM): New.
9540 (EMIT_ASM32): New.
9541 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9542 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9543 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9544 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9545 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9546 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9547 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9548 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9549 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9550 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9551 (amd64_emit_void_call_2): New.
9552 (amd64_emit_ops): New.
9553 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9554 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9555 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9556 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9557 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9558 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9559 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9560 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9561 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9562 (i386_emit_stack_adjust, i386_emit_int_call_1)
9563 (i386_emit_void_call_2): New.
9564 (i386_emit_ops): New.
9565 (x86_emit_ops): New.
9566 (the_low_target): Install x86_emit_ops.
9567 * server.h (struct emit_ops): New.
9568 (get_raw_reg_func_addr): Declare.
9569 (current_insn_ptr, emit_error): Declare.
9570 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9571 (set_trace_state_variable_value): New defines.
9572 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9573 addr_get_trace_state_variable_value and
9574 addr_set_trace_state_variable_value.
9575 (symbol_list): New fields for get_raw_reg,
9576 get_trace_state_variable_value and set_trace_state_variable_value.
9577 (condfn): New typedef.
9578 (struct tracepoint): New field `compiled_cond'.
9579 (do_action_at_tracepoint): Clear compiled_cond.
9580 (get_trace_state_variable_value, set_trace_state_variable_value):
9581 Export in the IPA.
9582 (condition_true_at_tracepoint): If there's a compiled condition,
9583 run that.
9584 (current_insn_ptr, emit_error): New globals.
9585 (struct bytecode_address): New.
9586 (get_raw_reg_func_addr): New.
9587 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9588 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9589 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9590 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9591 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9592 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9593 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9594 (compile_tracepoint_condition, compile_bytecodes): New.
9595 * target.h (emit_ops): Forward declare.
9596 (struct target_ops): New field emit_ops.
9597 (target_emit_ops): New.
9598 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9599 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9600 * linux-low.c (linux_emit_ops): New.
9601 (linux_target_ops): Install it.
9602 * linux-low.h (struct linux_target_ops): New field emit_ops.
9603
92b72907
UW
96042010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9605
9606 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9607 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9608
fa593d66
PA
96092010-06-01 Pedro Alves <pedro@codesourcery.com>
9610 Stan Shebs <stan@codesourcery.com>
9611
9612 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9613 (all): Depend on $(extra_libraries).
9614 (install-only): Install the IPA.
9615 (IPA_OBJS, IPA_LIB): New.
9616 (clean): Remove the IPA lib.
9617 (IPAGENT_CFLAGS): New.
9618 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9619 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9620 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9621 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9622 * configure.ac: Check for atomic builtins support in the compiler.
9623 (IPA_DEPFILES, extra_libraries): Define.
9624 * configure.srv (ipa_obj): Add description.
9625 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9626 (i[34567]86-*-linux*): Set ipa_obj.
9627 (x86_64-*-linux*): Set ipa_obj.
9628 * linux-low.c (stabilizing_threads): New.
9629 (supports_fast_tracepoints): New.
9630 (linux_detach): Stabilize threads before detaching.
9631 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9632 the lwp is either not stabilizing, or is moving out of a jump pad.
9633 (linux_fast_tracepoint_collecting): New.
9634 (maybe_move_out_of_jump_pad): New.
9635 (enqueue_one_deferred_signal): New.
9636 (dequeue_one_deferred_signal): New.
9637 (linux_wait_for_event_1): If moving out of a jump pad, defer
9638 pending signals to later.
9639 (linux_stabilize_threads): New.
9640 (linux_wait_1): Check if threads need moving out of jump pads, and
9641 do it if so.
9642 (stuck_in_jump_pad_callback): New.
9643 (move_out_of_jump_pad_callback): New.
9644 (lwp_running): New.
9645 (linux_resume_one_lwp): Handle moving out of jump pads.
9646 (linux_set_resume_request): Dequeue deferred signals.
9647 (need_step_over_p): Also step over fast tracepoint jumps.
9648 (start_step_over): Also uninsert fast tracepoint jumps.
9649 (finish_step_over): Also reinsert fast tracepoint jumps.
9650 (linux_install_fast_tracepoint_jump): New.
9651 (linux_target_ops): Install linux_stabilize_threads and
9652 linux_install_fast_tracepoint_jump_pad.
9653 * linux-low.h (linux_target_ops) <get_thread_area,
9654 install_fast_tracepoint_jump_pad>: New fields.
9655 (struct lwp_info) <collecting_fast_tracepoint,
9656 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9657 (linux_get_thread_area): Declare.
9658 * linux-x86-low.c (jump_insn): New.
9659 (x86_get_thread_area): New.
9660 (append_insns): New.
9661 (push_opcode): New.
9662 (amd64_install_fast_tracepoint_jump_pad): New.
9663 (i386_install_fast_tracepoint_jump_pad): New.
9664 (x86_install_fast_tracepoint_jump_pad): New.
9665 (the_low_target): Install x86_get_thread_area and
9666 x86_install_fast_tracepoint_jump_pad.
9667 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9668 (struct fast_tracepoint_jump): New.
9669 (fast_tracepoint_jump_insn): New.
9670 (fast_tracepoint_jump_shadow): New.
9671 (find_fast_tracepoint_jump_at): New.
9672 (fast_tracepoint_jump_here): New.
9673 (delete_fast_tracepoint_jump): New.
9674 (set_fast_tracepoint_jump): New.
9675 (uninsert_fast_tracepoint_jumps_at): New.
9676 (reinsert_fast_tracepoint_jumps_at): New.
9677 (set_breakpoint_at): Use write_inferior_memory.
9678 (uninsert_raw_breakpoint): Use write_inferior_memory.
9679 (check_mem_read): Mask out fast tracepoint jumps.
9680 (check_mem_write): Mask out fast tracepoint jumps.
9681 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9682 (set_fast_tracepoint_jump): Declare.
9683 (delete_fast_tracepoint_jump)
9684 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9685 (reinsert_fast_tracepoint_jumps_at): Declare.
9686 * regcache.c: Don't compile many functions when building the
9687 in-process agent library.
9688 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9689 the register buffer in the heap.
9690 (free_register_cache): If the register buffer isn't owned by the
9691 regcache, don't free it.
9692 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9693 pre-existing register caches.
9694 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9695 type.
9696 (convert_ascii_to_int): : Constify `from' parameter type.
9697 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9698 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9699 the needed buffer in-place.
9700 (relocate_instruction): New.
9701 * server.c (handle_query) <qSymbols>: If the target supports
9702 tracepoints, give it a chance of looking up symbols. Report
9703 support for fast tracepoints.
9704 (handle_status): Stabilize threads.
9705 (process_serial_event): Adjust.
9706 * server.h (struct fast_tracepoint_jump): Forward declare.
9707 (struct process_info) <fast_tracepoint_jumps>: New field.
9708 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9709 (decode_X_packet, decode_M_packet): Adjust.
9710 (relocate_instruction): Declare.
9711 (in_process_agent_loaded): Declare.
9712 (tracepoint_look_up_symbols): Declare.
9713 (struct fast_tpoint_collect_status): Declare.
9714 (fast_tracepoint_collecting): Declare.
9715 (force_unlock_trace_buffer): Declare.
9716 (handle_tracepoint_bkpts): Declare.
9717 (initialize_low_tracepoint)
9718 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9719 * target.h (struct target_ops) <stabilize_threads,
9720 install_fast_tracepoint_jump_pad>: New fields.
9721 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9722 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9723 [HAVE_STDINT_H]: Include stdint.h.
9724 (trace_debug_1): Rename to ...
9725 (trace_vdebug): ... this.
9726 (trace_debug): Rename to ...
9727 (trace_debug_1): ... this. Add `level' parameter.
9728 (trace_debug): New.
9729 (ATTR_USED, ATTR_NOINLINE): New.
9730 (IP_AGENT_EXPORT): New.
9731 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9732 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9733 (about_to_request_buffer_space, trace_buffer_is_full)
9734 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9735 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9736 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9737 (traceframe_write_count, traceframes_created)
9738 (trace_state_variables)
9739 New renaming defines.
9740 (struct ipa_sym_addresses): New.
9741 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9742 (symbol_list): New.
9743 (ipa_sym_addrs): New.
9744 (all_tracepoint_symbols_looked_up): New.
9745 (in_process_agent_loaded): New.
9746 (write_e_ipa_not_loaded): New.
9747 (maybe_write_ipa_not_loaded): New.
9748 (tracepoint_look_up_symbols): New.
9749 (debug_threads) [IN_PROCESS_AGENT]: New.
9750 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9751 (UNKNOWN_SIDE_EFFECTS): New.
9752 (stop_tracing): New.
9753 (flush_trace_buffer): New.
9754 (stop_tracing_bkpt): New.
9755 (flush_trace_buffer_bkpt): New.
9756 (read_inferior_integer): New.
9757 (read_inferior_uinteger): New.
9758 (read_inferior_data_pointer): New.
9759 (write_inferior_data_pointer): New.
9760 (write_inferior_integer): New.
9761 (write_inferior_uinteger): New.
9762 (struct collect_static_trace_data_action): Delete.
9763 (enum tracepoint_type): New.
9764 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
9765 <actions_str, step_actions, step_actions_str>: Only include in
9766 GDBserver.
fa593d66
PA
9767 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9768 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9769 (tracepoints): Use IP_AGENT_EXPORT.
9770 (last_tracepoint): Don't include in the IPA.
9771 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9772 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9773 (alloced_trace_state_variables): New.
9774 (trace_state_variables): Use IP_AGENT_EXPORT.
9775 (traceframe_t): Delete unused variable.
9776 (circular_trace_buffer): Don't include in the IPA.
9777 (trace_buffer_start): Delete.
9778 (struct trace_buffer_control): New.
9779 (trace_buffer_free): Delete.
9780 (struct ipa_trace_buffer_control): New.
9781 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9782 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9783 New.
9784 (trace_buffer_ctrl): New.
9785 (TRACE_BUFFER_CTRL_CURR): New.
9786 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9787 Reimplement as macros.
9788 (trace_buffer_wrap): Delete.
9789 (traceframe_write_count, traceframe_read_count)
9790 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9791 (struct tracepoint_hit_ctx) <type>: New field.
9792 (struct fast_tracepoint_ctx): New.
9793 (memory_barrier): New.
9794 (cmpxchg): New.
9795 (record_tracepoint_error): Update atomically in the IPA.
9796 (clear_inferior_trace_buffer): New.
9797 (about_to_request_buffer_space): New.
9798 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9799 updating the same buffer.
9800 (add_tracepoint): Default the tracepoint's type to trap
9801 tracepoint, and orig_size to -1.
9802 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9803 internal variables.
9804 (create_trace_state_variable): New parameter `gdb'. Handle it.
9805 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9806 (cmd_qtdp): Handle fast tracepoints.
9807 (cmd_qtdv): Adjust.
9808 (max_jump_pad_size): New.
9809 (gdb_jump_pad_head): New.
9810 (get_jump_space_head): New.
9811 (claim_jump_space): New.
9812 (sort_tracepoints): New.
9813 (MAX_JUMP_SIZE): New.
9814 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9815 IPA.
9816 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9817 support. Upload fast traceframes, and delete internal IPA
9818 breakpoints.
9819 (stop_tracing_handler): New.
9820 (flush_trace_buffer_handler): New.
9821 (cmd_qtstop): Upload fast tracepoints.
9822 (response_tracepoint): Handle fast tracepoints.
9823 (tracepoint_finished_step): Upload fast traceframes. Set the
9824 tracepoint hit context's tracepoint type.
9825 (handle_tracepoint_bkpts): New.
9826 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9827 type. Add comment about fast tracepoints.
9828 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9829 non-existing action_str field.
9830 (get_context_regcache): Handle fast tracepoints.
9831 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9832 to the regcache.
9833 (fast_tracepoint_from_jump_pad_address): New.
9834 (fast_tracepoint_from_ipa_tpoint_address): New.
9835 (collecting_t): New.
9836 (force_unlock_trace_buffer): New.
9837 (fast_tracepoint_collecting): New.
9838 (collecting): New.
9839 (gdb_collect): New.
9840 (write_inferior_data_ptr): New.
9841 (target_tp_heap): New.
9842 (target_malloc): New.
9843 (download_agent_expr): New.
9844 (UALIGN): New.
9845 (download_tracepoints): New.
9846 (download_trace_state_variables): New.
9847 (upload_fast_traceframes): New.
9848 (IPA_FIRST_TRACEFRAME): New.
9849 (IPA_NEXT_TRACEFRAME_1): New.
9850 (IPA_NEXT_TRACEFRAME): New.
9851 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9852 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9853 (gdb_jump_pad_buffer_end): New.
9854 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9855 (initialize_tracepoint): Adjust.
9856 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9857 buffer. Initialize the low module.
9858 * utils.c (PREFIX, TOOLNAME): New.
9859 (malloc_failure): Use PREFIX.
9860 (error): In the IPA, an error causes an exit.
9861 (fatal, warning): Use PREFIX.
9862 (internal_error): Use TOOLNAME.
9863 (NUMCELLS): Increase to 10.
9864 * configure, config.in: Regenerate.
9865
d149dd1d
PA
98662010-06-01 Pedro Alves <pedro@codesourcery.com>
9867
9868 * server.c (handle_query) <qSupported>: Do two passes over the
9869 qSupported string to avoid nesting strtok.
9870
f6528abd
JK
98712010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9872
9873 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9874 (CDEPS): New.
9875 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9876 -Wl,--dynamic-list.
9877 * configure: Regenerate.
9878 * proc-service.list: New.
9879
ca2a87a0
JK
98802010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9881
9882 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9883 New comment.
9884
363a6e9f
OS
98852010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9886
9887 * gdbreplay.c (remote_open): Check error return from socket() call by
9888 its equality to -1 not by it being negative.
9889 * remote-utils.c (remote_open): Likewise.
9890
d23b6cb1
PA
98912010-05-23 Pedro Alves <pedro@codesourcery.com>
9892
9893 * config.h: Regenerate.
9894
28d3cf85
MK
98952010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9896
9897 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9898 doesn't provide PTRACE_GET_THREAD_AREA.
9899
fea36a59
MK
99002010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9901
9902 * linux-m68k-low.c: Include <asm/ptrace.h>
9903 (ps_get_thread_area): Implement.
9904
24b066ba
DE
99052010-05-03 Doug Evans <dje@google.com>
9906
9907 * event-loop.c (struct callback_event): New struct.
9908 (callback_list): New global.
9909 (append_callback_event, delete_callback_event): New functions.
9910 (process_callback): New function.
9911 (start_event_loop): Call it.
9912 * remote-utils.c (NOT_SCHEDULED): Define.
9913 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9914 moved out of readchar.
9915 (readchar): Rewrite. Call reschedule before returning.
9916 (reset_readchar): New function.
9917 (remote_close): Call it.
9918 (process_remaining, reschedule): New functions.
9919 * server.h (callback_handler_func): New typedef.
9920 (append_callback_event, delete_callback_event): Declare.
9921
9836d6ea
PA
99222010-05-03 Pedro Alves <pedro@codesourcery.com>
9923
9924 * proc-service.c (ps_pglobal_lookup): Use
9925 thread_db_look_up_one_symbol.
9926 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9927 parameter. Use it instead of all_symbols_looked_up.
9928 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9929 field.
9930 (all_symbols_looked_up): Don't declare.
9931 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9932 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9933 field.
9934 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9935 Set all_symbols_looked_up here.
9936 (thread_db_look_up_one_symbol): New.
9937 (thread_db_get_tls_address): Adjust.
9938 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9939 thread_db object on the heap, and tentatively set it in the
9940 process structure.
9941 (thread_db_init): Don't set all_symbols_looked_up here.
9942 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9943
7984d532
PA
99442010-05-03 Pedro Alves <pedro@codesourcery.com>
9945
9946 * linux-low.c (linux_kill, linux_detach): Adjust.
9947 (status_pending_p_callback): Remove redundant statement. Check
9948 for !TARGET_WAITIKIND_IGNORE, instead of
9949 TARGET_WAITKIND_STOPPED.
9950 (handle_tracepoints): Make sure LWP is locked. Adjust.
9951 (linux_wait_for_event_1): Adjust.
9952 (linux_cancel_breakpoints): New.
9953 (unsuspend_one_lwp): New.
9954 (unsuspend_all_lwps): New.
9955 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9956 (send_sigstop_callback): Change return type to int, add new
9957 `except' parameter and handle it.
9958 (suspend_and_send_sigstop_callback): New.
9959 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9960 pass them down. If SUSPEND, also increment the lwp's suspend
9961 count.
9962 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9963 (need_step_over_p): Don't consider suspended LWPs.
9964 (start_step_over): Adjust.
9965 (proceed_one_lwp): Change return type to int, add new `except'
9966 parameter and handle it.
9967 (unsuspend_and_proceed_one_lwp): New.
9968 (proceed_all_lwps): Use find_inferior instead of
9969 for_each_inferior.
9970 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9971 also decrement the suspend count of LWPs. Pass `except' down,
9972 instead of hacking its suspend count.
9973 (linux_pause_all): Add `freeze' parameter. Adjust.
9974 (linux_unpause_all): New.
9975 (linux_target_ops): Install linux_unpause_all.
9976 * server.c (handle_status): Adjust.
9977 * target.h (struct target_ops): New fields `unpause_all' and
9978 `cancel_breakpoints'. Add new parameter to `pause_all'.
9979 (pause_all): Add new `freeze' parameter.
9980 (unpause_all): New.
9981 (cancel_breakpoints): New.
9982 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9983 cancel breakpoints.
9984 (cmd_qtstart): Pause threads.
9985 (stop_tracing): Pause threads, and cancel breakpoints.
9986 * win32-low.c (win32_target_ops): Adjust.
9987
e471f25b
PA
99882010-05-03 Pedro Alves <pedro@codesourcery.com>
9989
9990 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9991 the inferior right away from here...
9992 (linux_wait_1): ... to here, and adjust to check the thread's
9993 last_resume_kind instead of the lwp's step or stop_expected flags.
9994
1915ef4f
PA
99952010-05-02 Pedro Alves <pedro@codesourcery.com>
9996
9997 * README: Use consistent `GDB' and `GDBserver' spellings.
9998
f9e39928
PA
99992010-05-02 Pedro Alves <pedro@codesourcery.com>
10000
10001 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10002 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10003 (linux_detach_one_lwp): Assume the lwp is stopped.
10004 (any_thread_of): Delete.
10005 (linux_detach): Stop all lwps here. Don't blindly delete all
10006 breakpoints.
10007 (delete_lwp_callback): New.
10008 (linux_mourn): Delete all lwps of the process that is gone.
10009 (linux_wait_1): Don't delete the last lwp of the process here.
10010 * mem-break.h (mark_breakpoints_out): Declare.
10011 * mem-break.c (mark_breakpoints_out): New.
10012 (free_all_breakpoints): Use it.
10013 * server.c (handle_target_event): If the process is gone, mark
10014 breakpoints out.
10015 * thread-db.c (struct thread_db) <create_bp>: New field.
10016 (thread_db_enable_reporting): Fix prototype. Store a thread event
10017 breakpoint reference in the thread_db struct.
10018 (thread_db_load_search): Clear the thread_db object.
10019 (try_thread_db_load_1): Ditto.
10020 (switch_to_process): New.
10021 (disable_thread_event_reporting): Use it.
10022 (remove_thread_event_breakpoints): New.
10023 (thread_db_detach, thread_db_mourn): Use it.
10024
1e7fc18c
PA
100252010-05-01 Pedro Alves <pedro@codesourcery.com>
10026
10027 * linux-low.c (linux_enable_event_reporting): New.
10028 (linux_wait_for_event_1, handle_extended_wait): Use it.
10029
02fc4de7
PA
100302010-04-30 Pedro Alves <pedro@codesourcery.com>
10031
10032 * linux-low.c (linux_kill_one_lwp, linux_kill)
10033 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10034 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10035 SIGSTOP even if the LWP is stopped.
10036 (send_sigstop_callback): New.
10037 (stop_all_lwps): Use send_sigstop_callback instead.
10038 (linux_resume_one_thread): Adjust.
10039 (proceed_one_lwp): Still proceed an LWP that the client has
10040 requested to stop, if we haven't reported it as stopped yet. Make
10041 sure that LWPs the client want stopped, have a pending SIGSTOP.
10042
bc3b5632
DE
100432010-04-26 Doug Evans <dje@google.com>
10044
ae1ada35
DE
10045 * server.c (handle_general_set): Make static.
10046
bc3b5632
DE
10047 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10048 Print received char after testing for error/eof instead of before.
10049 (input_interrupt): Tweak comment.
10050
65730243
DE
100512010-04-23 Doug Evans <dje@google.com>
10052
10053 * server.c (start_inferior): Print inferior argv if --debug.
10054
a8ae7dc0
AR
100552010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10056
10057 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10058 * nto-x86-low.c: Include server.h
10059
1c07cc19
PM
100602010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10061
10062 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10063 be consistent with other sources of this directory.
10064 (init_registers_amd64): Correct name of source file of this function
10065 in the comment.
10066
e0a61e09
PM
100672010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10068
10069 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10070 64-bit executables.
10071
54709339
PM
100722010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10073
10074 * win32-i386-low.c: Add 64-bit support.
10075 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10076 (init_registers_amd64): Declare.
10077 (mappings): Add 64-bit version of array.
10078 (init_windows_x86): New function.
10079 (the_low_target): Change init_arch field to init_windows_x86.
10080
e8f0053d
PM
100812010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10082
10083 * win32-low.c: Adapt to support also 64-bit architecture.
10084 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10085 (get_image_name): Use SIZE_T type for local variable `done'.
10086 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10087 (toolhelp_get_dll_name): Idem.
10088 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10089 Use uintptr_t typecast to avoid warning.
10090 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10091 (handle_exception): Use phex_nz to avoid warning.
10092 (win32_wait): Remove unused local variable `process'.
10093
c481e77e
PM
100942010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10095
10096 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10097 `amd64-avx.o'.
10098
12ea4b69
PM
100992010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10100
10101 * configure.ac: Use `ws2_32' library for srv_mingw.
10102 * configure: Regenerate.
10103 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10104 * remote-utils.c: Likewise.
10105
f6d1620c
L
101062010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10107
10108 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10109 if __x86_64__ is defined.
10110
8e642873
PM
101112010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10112
10113 * configure: Regenerate.
10114
711e434b
PM
101152010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10116
10117 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10118 * target.h (target_ops): New get_tib_address field.
10119 * win32-low.h (win32_thread_info): Add thread_local_base field.
10120 * win32-low.c (child_add_thread): Add tlb argument.
10121 Set thread_local_base field to TLB.
10122 (get_child_debug_event): Adapt to child_add_thread change.
10123 (win32_get_tib_address): New function.
10124 (win32_target_ops): Set get_tib_address field to
10125 win32_get_tib_address.
10126 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10127
505106cd
PA
101282010-04-12 Pedro Alves <pedro@codesourcery.com>
10129
505106cd
PA
10130 * linux-low.c (linux_mourn): Also remove the process.
10131 * server.c (handle_target_event): Don't remove the process here.
10132 * nto-low.c (nto_mourn): New.
10133 (nto_target_ops): Install it.
10134 * spu-low.c (spu_mourn): New.
10135 (spu_target_ops): Install it.
10136 * win32-low.c (win32_mourn): New.
10137 (win32_target_ops): Install it.
10138
e8470a06
PA
101392010-04-12 Pedro Alves <pedro@codesourcery.com>
10140
10141 * server.h (buffer_xml_printf): Remove redundant `;'.
10142
45ba0d02
PA
101432010-04-12 Pedro Alves <pedro@codesourcery.com>
10144
10145 * regcache.c (set_register_cache): Invalidate regcaches before
10146 changing the register cache layout.
10147 (regcache_invalidate_one): Allow a NULL regcache.
10148 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10149 regcaches before changing the register cache layout or the target
10150 regsets.
10151
59e04013
L
101522010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10153
10154 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10155 variable warning on Linux/x86-64.
10156
8336d594
PA
101572010-04-11 Pedro Alves <pedro@codesourcery.com>
10158
10159 GDBserver disconnected tracing support.
10160
10161 * linux-low.c (linux_remove_process): Delete.
10162 (add_lwp): Don't set last_resume_kind here.
10163 (linux_kill): Use `mourn'.
10164 (linux_detach): Use `thread_db_detach', and `mourn'.
10165 (linux_mourn): New.
10166 (linux_attach_lwp_1): Adjust comment.
10167 (linux_attach): last_resume_kind moved the thread_info; adjust.
10168 (status_pending_p_callback): Adjust.
10169 (linux_wait_for_event_1): Adjust.
10170 (count_events_callback, select_singlestep_lwp_callback)
10171 (select_event_lwp_callback, cancel_breakpoints_callback)
10172 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10173 (proceed_one_lwp): Adjust.
10174 (linux_async): Add debug output.
10175 (linux_thread_stopped): New.
10176 (linux_pause_all): New.
10177 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10178 linux_pause_all.
10179 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10180 (thread_db_free): Delete declaration.
10181 (thread_db_detach, thread_db_mourn): Declare.
10182 * thread-db.c (thread_db_init): Use thread_db_mourn.
10183 (thread_db_free): Delete, split in two.
10184 (disable_thread_event_reporting): New.
10185 (thread_db_detach): New.
10186 (thread_db_mourn): New.
10187
10188 * server.h (struct thread_info) <last_resume_kind>: New field.
10189 <attached>: Add comment.
10190 <gdb_detached>: New field.
10191 (handler_func): Change return type to int.
10192 (handle_serial_event, handle_target_event): Ditto.
10193 (gdb_connected): Declare.
10194 (tracing): Delete.
10195 (disconnected_tracing): Declare.
10196 (stop_tracing): Declare.
10197
10198 * server.c (handle_query) <qSupported>: Report support for
10199 disconnected tracing.
10200 (queue_stop_reply_callback): Account for running threads.
10201 (gdb_wants_thread_stopped): New.
10202 (gdb_wants_all_threads_stopped): New.
10203 (gdb_reattached_process): New.
10204 (handle_status): Clear the `gdb_detached' flag of all processes.
10205 In all-stop, stop all threads.
10206 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10207 (process_serial_event): If the remote connection breaks, or if an
10208 exit was forced with "monitor exit", force an event loop exit.
10209 Handle disconnected tracing on detach.
10210 (handle_serial_event): Adjust.
10211 (handle_target_event): If GDB isn't connected, forward events back
10212 to the inferior, unless the last process exited, in which case,
10213 exit gdbserver. Adjust interface.
10214
10215 * remote-utils.c (remote_open): Don't block in accept. Instead
10216 register an event loop source on the listen socket file
10217 descriptor. Refactor bits into ...
10218 (listen_desc): ... this new global.
10219 (gdb_connected): ... this new function.
10220 (enable_async_notification): ... this new function.
10221 (handle_accept_event): ... this new function.
10222 (remote_close): Clear remote_desc.
10223
10224 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10225
10226 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10227 New fields.
10228 (mourn_inferior): Define.
10229 (target_process_qsupported): Avoid the dangling else problem.
10230 (thread_stopped): Define.
10231 (pause_all): Define.
10232 (target_waitstatus_to_string): Declare.
10233 * target.c (target_waitstatus_to_string): New.
10234
10235 * tracepoint.c (tracing): Make extern.
10236 (disconnected_tracing): New.
10237 (stop_tracing): Make extern. Handle tracing stops due to GDB
10238 disconnecting.
10239 (cmd_qtdisconnected): New.
10240 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10241 (handle_tracepoint_general_set): Handle QTDisconnected.
10242
10243 * event-loop.c (event_handler_func): Change return type to int.
10244 (process_event): Bail out if the event handler wants the event
10245 loop to stop.
10246 (handle_file_event): Ditto.
10247 (start_event_loop): Bail out if the event handler wants the event
10248 loop to stop.
10249
10250 * nto-low.c (nto_target_ops): Adjust.
10251 * spu-low.c (spu_wait): Don't remove the process here.
10252 (spu_target_ops): Adjust.
10253 * win32-low.c (win32_wait): Don't remove the process here.
10254 (win32_target_ops): Adjust.
10255
5d267c4c
PA
102562010-04-11 Pedro Alves <pedro@codesourcery.com>
10257
10258 * regcache.c (realloc_register_cache): Invalidate inferior's
10259 regcache before recreating it.
10260
623ccd72
PA
102612010-04-09 Pedro Alves <pedro@codesourcery.com>
10262
10263 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10264
219f2f23
PA
102652010-04-09 Stan Shebs <stan@codesourcery.com>
10266 Pedro Alves <pedro@codesourcery.com>
10267
10268 * server.h (LONGEST): New.
10269 (struct thread_info) <while_stepping>: New field.
10270 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10271 Declare.
10272 (initialize_tracepoint, handle_tracepoint_general_set)
10273 (handle_tracepoint_query, tracepoint_finished_step)
10274 (tracepoint_was_hit, release_while_stepping_state_list):
10275 (current_traceframe): Declare.
10276 * server.c (handle_general_set): Handle tracepoint packets.
10277 (read_memory): New.
10278 (write_memory): New.
10279 (handle_search_memory_1): Use read_memory.
10280 (handle_query): Report support for conditional tracepoints, trace
10281 state variables, and tracepoint sources. Handle tracepoint
10282 queries.
10283 (main): Initialize the tracepoints module.
10284 (process_serial_event): Handle traceframe reads/writes.
10285
10286 * linux-low.c (handle_tracepoints): New.
10287 (linux_wait_1): Call it.
10288 (linux_resume_one_lwp): Handle while-stepping.
10289 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10290 (linux_target_ops): Install them.
10291 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10292 New field.
10293 * linux-x86-low.c (x86_supports_tracepoints): New.
10294 (the_low_target). Install it.
10295
10296 * mem-break.h (delete_breakpoint): Declare.
10297 * mem-break.c (delete_breakpoint): Make external.
10298
10299 * target.h (struct target_ops): Add `supports_tracepoints',
10300 `read_pc', and `write_pc' fields.
10301 (target_supports_tracepoints): Define.
10302 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10303 (phex_nz): New.
10304
10305 * regcache.h (struct regcache) <registers_owned>: New field.
10306 (init_register_cache, regcache_cpy): Declare.
10307 (regcache_read_pc, regcache_write_pc): Declare.
10308 (register_cache_size): Declare.
10309 (supply_regblock): Declare.
10310 * regcache.c (init_register_cache): New.
10311 (new_register_cache): Use it.
10312 (regcache_cpy): New.
10313 (register_cache_size): New.
10314 (supply_regblock): New.
10315 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10316
219f2f23
PA
10317 * tracepoint.c: New.
10318
10319 * Makefile.in (OBS): Add tracepoint.o.
10320 (tracepoint.o): New rule.
10321
3a13a53b
L
103222010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10323
10324 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10325 (i386-mmx.o): New.
10326 (i386-mmx.c): Likewise.
10327 (i386-mmx-linux.o): Likewise.
10328 (i386-mmx-linux.c): Likewise.
10329
10330 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10331 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10332 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10333 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10334
10335 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10336 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10337 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10338
1570b33e
L
103392010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10340
10341 * Makefile.in (clean): Updated.
10342 (i386-avx.o): New.
10343 (i386-avx.c): Likewise.
10344 (i386-avx-linux.o): Likewise.
10345 (i386-avx-linux.c): Likewise.
10346 (amd64-avx.o): Likewise.
10347 (amd64-avx.c): Likewise.
10348 (amd64-avx-linux.o): Likewise.
10349 (amd64-avx-linux.c): Likewise.
10350
10351 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10352 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10353 (srv_amd64_regobj): Add amd64-avx.o.
10354 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10355 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10356 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10357 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10358 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10359 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10360 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10361
10362 * i387-fp.c: Include "i386-xstate.h".
10363 (i387_xsave): New.
10364 (i387_cache_to_xsave): Likewise.
10365 (i387_xsave_to_cache): Likewise.
10366 (x86_xcr0): Likewise.
10367
10368 * i387-fp.h (i387_cache_to_xsave): Likewise.
10369 (i387_xsave_to_cache): Likewise.
10370 (x86_xcr0): Likewise.
10371
10372 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10373 * linux-crisv32-low.c (target_regsets): Likewise.
10374 * linux-m68k-low.c (target_regsets): Likewise.
10375 * linux-mips-low.c (target_regsets): Likewise.
10376 * linux-ppc-low.c (target_regsets): Likewise.
10377 * linux-s390-low.c (target_regsets): Likewise.
10378 * linux-sh-low.c (target_regsets): Likewise.
10379 * linux-sparc-low.c (target_regsets): Likewise.
10380 * linux-xtensa-low.c (target_regsets): Likewise.
10381
10382 * linux-low.c: Include <sys/uio.h>.
10383 (regsets_fetch_inferior_registers): Support nt_type.
10384 (regsets_store_inferior_registers): Likewise.
10385 (linux_process_qsupported): New.
10386 (linux_target_ops): Add linux_process_qsupported.
10387
10388 * linux-low.h (regset_info): Add nt_type.
10389 (linux_target_ops): Add process_qsupported.
10390
10391 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10392 and <sys/uio.h>.
10393 (init_registers_i386_avx_linux): New.
10394 (init_registers_amd64_avx_linux): Likewise.
10395 (xmltarget_i386_linux_no_xml): Likewise.
10396 (xmltarget_amd64_linux_no_xml): Likewise.
10397 (PTRACE_GETREGSET): Likewise.
10398 (PTRACE_SETREGSET): Likewise.
10399 (x86_fill_xstateregset): Likewise.
10400 (x86_store_xstateregset): Likewise.
10401 (use_xml): Likewise.
10402 (x86_linux_update_xmltarget): Likewise.
10403 (x86_linux_process_qsupported): Likewise.
10404 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10405 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10406 init_registers_i386_linux here. Call
10407 x86_linux_update_xmltarget.
10408 (the_low_target): Add x86_linux_process_qsupported.
10409
10410 * server.c (handle_query): Call target_process_qsupported.
10411
10412 * target.h (target_ops): Add process_qsupported.
10413 (target_process_qsupported): New.
10414
fc7238bb
PA
104152010-04-03 Pedro Alves <pedro@codesourcery.com>
10416
10417 * inferiors.c (add_thread): Set last_status kind to
10418 TARGET_WAITKIND_IGNORE.
10419 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10420 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10421 (linux_wait_1): Move `thread' local definition to block that uses
10422 it. Don't NULL initialize `event_child'.
10423 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10424 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10425 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10426
bdabb078
PA
104272010-04-01 Pedro Alves <pedro@codesourcery.com>
10428
10429 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10430 an extended waitstatus, or by a watchpoint.
10431 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10432 thread was stepping or has been stopped by a watchpoint.
10433
d3bbe7a0
PA
104342010-04-01 Pedro Alves <pedro@codesourcery.com>
10435
10436 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10437 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10438 of another, then delete the previous, and validate all
10439 breakpoints.
10440 (validate_inserted_breakpoint): New.
10441 (delete_disabled_breakpoints): New.
10442 (validate_breakpoints): New.
10443 (check_mem_read): Validate breakpoints before trusting their
10444 shadow. Delete disabled breakpoints.
10445 (check_mem_write): Validate breakpoints before trusting they
10446 should be inserted. Delete disabled breakpoints.
10447 * mem-break.h (validate_breakpoints):
10448 * server.c (handle_query): Validate breakpoints when we see a
10449 qSymbol query.
10450
8b07ae33
PA
104512010-04-01 Pedro Alves <pedro@codesourcery.com>
10452
10453 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10454 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10455 if we could tell there's a GDB breakpoint at stop_pc.
10456 (need_step_over_p): Don't do a step over if we find a GDB
10457 breakpoint at the resume PC.
10458
10459 * mem-break.c (struct raw_breakpoint): New.
10460 (enum bkpt_type): New type `gdb_breakpoint'.
10461 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10462 fields. New field `raw'.
10463 (find_raw_breakpoint_at): New.
10464 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10465 breakpoint instead.
10466 (set_breakpoint_at): Adjust.
10467 (delete_raw_breakpoint): New.
10468 (release_breakpoint): New.
10469 (delete_breakpoint): Rename to...
10470 (delete_breakpoint_1): ... this. Add proc parameter. Use
10471 release_breakpoint. Return ENOENT.
10472 (delete_breakpoint): Reimplement.
10473 (find_breakpoint_at): Delete.
10474 (find_gdb_breakpoint_at): New.
10475 (delete_breakpoint_at): Delete.
10476 (set_gdb_breakpoint_at): New.
10477 (delete_gdb_breakpoint_at): New.
10478 (gdb_breakpoint_here): New.
10479 (set_reinsert_breakpoint): Use release_breakpoint.
10480 (uninsert_breakpoint): Rename to ...
10481 (uninsert_raw_breakpoint): ... this.
10482 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10483 (reinsert_raw_breakpoint): Change parameter type to
10484 raw_breakpoint.
10485 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10486 instead.
10487 (check_breakpoints): Adjust. Use release_breakpoint.
10488 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10489 (breakpoint_inserted_here): Ditto.
10490 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10491 Don't trust the breakpoint's shadow if it is not inserted.
10492 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10493 (delete_all_breakpoints): Adjust.
10494 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10495 use delete_breakpoint_1.
10496
10497 * mem-break.h (breakpoints_supported): Delete declaration.
10498 (set_gdb_breakpoint_at): Declare.
10499 (gdb_breakpoint_here): Declare.
10500 (delete_breakpoint_at): Delete.
10501 (delete_gdb_breakpoint_at): Declare.
10502
10503 * server.h (struct raw_breakpoint): Forward declare.
10504 (struct process_info): New field `raw_breakpoints'.
10505
10506 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10507 breakpoints.
10508
6bf5e0ba
PA
105092010-03-24 Pedro Alves <pedro@codesourcery.com>
10510
10511 * linux-low.c (status_pending_p_callback): Fix comment.
10512 (linux_wait_for_event_1): Move most of the internal breakpoint
10513 handling from here...
10514 (linux_wait_1): ... to here.
10515 (count_events_callback): New.
10516 (select_singlestep_lwp_callback): New.
10517 (select_event_lwp_callback): New.
10518 (cancel_breakpoints_callback): New.
10519 (select_event_lwp): New.
10520 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10521 priority to all LWPs that have had events that should be reported
10522 to the client. Cancel breakpoints when about to reporting the
10523 event to the client, not while stopping lwps. No longer cancel
10524 finished single-steps here.
10525 (cancel_finished_single_step): Delete.
10526 (cancel_finished_single_steps): Delete.
10527
414a389f
PA
105282010-03-24 Pedro Alves <pedro@codesourcery.com>
10529
10530 * mem-break.c (enum bkpt_type): New.
10531 (struct breakpoint): New field `type'.
10532 (set_breakpoint_at): Change return type to struct breakpoint
10533 pointer. Set type to `other_breakpoint' by default.
10534 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10535 in the breakpoint list.
10536 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10537 (reinsert_breakpoint): Rename to ...
10538 (reinsert_raw_breakpoint): ... this.
10539 (reinsert_breakpoints_at): Adjust.
10540 * mem-break.h (struct breakpoint): Declare.
10541 (set_breakpoint_at): Change return type to struct breakpoint
10542 pointer.
10543
2280c721
PA
105442010-03-24 Pedro Alves <pedro@codesourcery.com>
10545
10546 * server.c (handle_query): Assign, not compare.
10547
d50171e4
PA
105482010-03-24 Pedro Alves <pedro@codesourcery.com>
10549
10550 Teach linux gdbserver to step-over-breakpoints.
10551
10552 * linux-low.c (can_hardware_single_step): New.
10553 (supports_breakpoints): New.
10554 (handle_extended_wait): If stopping threads, read the stop pc of
10555 the new cloned LWP.
10556 (get_pc): New.
10557 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10558 low target doesn't support retrieving the PC.
10559 (add_lwp): Set last_resume_kind to resume_continue.
10560 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10561 (linux_attach): Don't clear stop_expected. Set the lwp's
10562 last_resume_kind to resume_stop.
10563 (linux_detach_one_lwp): Don't check for removed breakpoints.
10564 (check_removed_breakpoint): Delete.
10565 (status_pending_p): Rename to ...
10566 (status_pending_p_callback): ... this. Don't check for removed
10567 breakpoints. Don't consider threads that are stopped from GDB's
10568 perspective.
10569 (linux_wait_for_lwp): Always read the stop_pc here.
10570 (cancel_breakpoint): New.
10571 (step_over_bkpt): New global.
10572 (linux_wait_for_event_1): Implement stepping over breakpoints.
10573 (gdb_wants_lwp_stopped): New.
10574 (gdb_wants_all_stopped): New.
10575 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10576 single-step traps here. Store the thread's last reported target
10577 wait status.
10578 (send_sigstop): Don't clear stop_expected. Always set it,
10579 instead.
10580 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10581 (cancel_finished_single_step): New.
10582 (cancel_finished_single_steps): New.
10583 (wait_for_sigstop): Don't cancel finished single-step traps here.
10584 (linux_resume_one_lwp): Don't check for removed breakpoints.
10585 Don't set `step' on non-hardware step archs.
10586 (linux_set_resume_request): Ignore resume_stop requests if already
10587 stopping or stopped. Set the lwp's last_resume_kind.
10588 (resume_status_pending_p): Don't check for removed breakpoints.
10589 (need_step_over_p): New.
10590 (start_step_over): New.
10591 (finish_step_over): New.
10592 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10593 requests. Clear the thread's last reported target waitstatus.
10594 Don't use the `suspended' flag. Don't consider pending breakpoints.
10595 (linux_resume): Start a step-over if necessary.
10596 (proceed_one_lwp): New.
10597 (proceed_all_lwps): New.
10598 (unstop_all_lwps): New.
10599 * linux-low.h (struct lwp_info): Rewrite comment for the
10600 `suspended' flag. Add the `stop_pc' field. Delete the
10601 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10602 Add `'last_resume_kind' and `need_step_over' fields.
10603 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10604 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10605 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10606 (set_raw_breakpoint_at): New.
10607 (set_breakpoint_at): Rewrite to use it.
10608 (reinsert_breakpoint_handler): Delete.
10609 (set_reinsert_breakpoint): New.
10610 (reinsert_breakpoint_by_bp): Delete.
10611 (delete_reinsert_breakpoints): New.
10612 (uninsert_breakpoint): Rewrite.
10613 (uninsert_breakpoints_at): New.
10614 (reinsert_breakpoint): Rewrite.
10615 (reinsert_breakpoints_at): New.
10616 (check_breakpoints): Rewrite.
10617 (breakpoint_here): New.
10618 (breakpoint_inserted_here): New.
10619 (check_mem_read): Adjust.
10620 * mem-break.h (breakpoints_supported, breakpoint_here)
10621 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10622 (reinsert_breakpoint_by_bp): Delete declaration.
10623 (delete_reinsert_breakpoints): Declare.
10624 (reinsert_breakpoint): Delete declaration.
10625 (reinsert_breakpoints_at): Declare.
10626 (uninsert_breakpoint): Delete declaration.
10627 (uninsert_breakpoints_at): Declare.
10628 (check_breakpoints): Adjust prototype.
10629 * server.h: Adjust include order.
10630 (struct thread_info): Declare here. Add a `last_status' field.
10631
30ba68cb
MS
106322010-03-23 Michael Snyder <msnyder@vmware.com>
10633
10634 * server.c (crc32): New function.
10635 (handle_query): Add handling for 'qCRC:' request.
10636
b9a881c2
PA
106372010-03-23 Pedro Alves <pedro@codesourcery.com>
10638
10639 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10640 lwp had been stopped by a watchpoint.
10641
e92d13d5
PA
106422010-03-16 Pedro Alves <pedro@codesourcery.com>
10643
10644 * server.h (internal_error): Declare.
10645 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10646 * utils.c (internal_error): New function.
10647
64daa791
AS
106482010-03-15 Andreas Schwab <schwab@redhat.com>
10649
10650 * configure.srv: Fix typo setting srv_regobj.
10651
f52cd8cd
PA
106522010-03-15 Pedro Alves <pedro@codesourcery.com>
10653
10654 * linux-low.c (fetch_register): Avoid passing a non string literal
10655 format to `error'.
10656 (usr_store_inferior_registers): Ditto.
10657
93ae6fdc
PA
106582010-03-14 Pedro Alves <pedro@codesourcery.com>
10659
10660 * linux-low.c (linux_write_memory): Bail out early if peeking
10661 memory failed.
10662
c3adc08c
PA
106632010-03-14 Pedro Alves <pedro@codesourcery.com>
10664
10665 * linux-low.h (struct lwp_info): New fields
10666 `stopped_by_watchpoint' and `stopped_data_address'.
10667 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10668 here, and cache them in the lwp object.
10669 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10670 directly.
10671 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10672 field.
10673 (linux_stopped_by_watchpoint): Rewrite.
10674 (linux_stopped_data_address): Rewrite.
10675
bce522a2
PA
106762010-03-06 Simo Melenius <simo.melenius@iki.fi>
10677
10678 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10679 switching the current inferior, not before.
10680
90884b2b
L
106812010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10682
10683 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10684 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10685 i386-linux.c and amd64-linux.c.
10686 (reg-i386.o): Removed.
10687 (reg-i386.c): Likewise.
10688 (reg-i386-linux.o): Likewise.
10689 (reg-i386-linux.c): Likewise.
10690 (reg-x86-64.o): Likewise.
10691 (reg-x86-64.c): Likewise.
10692 (reg-x86-64-linux.o): Likewise.
10693 (reg-x86-64-linux.c): Likewise.
10694 (i386.o): New.
10695 (i386.c): Likewise.
10696 (i386-linux.o): Likewise.
10697 (i386-linux.c): Likewise.
10698 (amd64.o): Likewise.
10699 (amd64.c): Likewise.
10700 (amd64-linux.o): Likewise.
10701 (amd64-linux.c): Likewise.
10702
10703 * configure.srv (srv_i386_regobj): New.
10704 (srv_i386_linux_regobj): Likewise.
10705 (srv_amd64_regobj): Likewise.
10706 (srv_amd64_linux_regobj): Likewise.
10707 (srv_i386_32bit_xmlfiles): Likewise.
10708 (srv_i386_64bit_xmlfiles): Likewise.
10709 (srv_i386_xmlfiles): Likewise.
10710 (srv_amd64_xmlfiles): Likewise.
10711 (srv_i386_linux_xmlfiles): Likewise.
10712 (srv_amd64_linux_xmlfiles): Likewise.
10713 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10714 srv_xmlfiles to $srv_i386_xmlfiles.
10715 (i[34567]86-*-mingw32ce*): Likewise.
10716 (i[34567]86-*-mingw*): Likewise.
10717 (i[34567]86-*-nto*): Likewise.
10718 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10719 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10720 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10721 (x86_64-*-linux*): Likewise.
10722
10723 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10724 (init_registers_amd64_linux): New.
10725 (x86_arch_setup): Replace init_registers_x86_64_linux with
10726 init_registers_amd64_linux.
10727
193f13e6
MK
107282010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10729
10730 * configure.ac: Check for libdl. If it is not available link against
10731 static libthread_db.
10732 * configure: Regenerate.
10733
85d721b8
PA
107342010-02-22 Pedro Alves <pedro@codesourcery.com>
10735
10736 PR9605
10737
10738 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10739 handing a read watchpoint.
10740 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10741
6076632b
DE
107422010-02-12 Doug Evans <dje@google.com>
10743
10744 * linux-low.c (linux_supports_tracefork_flag): Document.
10745 (linux_look_up_symbols): Add comment.
10746
3327ccf7
L
107472010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10748
10749 * regcache.c (supply_register): Clear regcache if buf is NULL.
10750
0718675c 107512010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 10752 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
10753
10754 * inferiors.c (find_inferior): Add function documentation.
10755 (unloaded_dll): Handle the case where the unloaded dll has not
10756 been previously registered in the dll list.
10757
177321bd
DJ
107582010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10759
10760 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10761 (thumb2_breakpoint): New.
10762 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10763
2b009048
DJ
107642010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10765
10766 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10767 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10768 breakpoints.
10769
3be029c7
PA
107702010-01-21 Pedro Alves <pedro@codesourcery.com>
10771
10772 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10773
18f5de3b
JK
107742010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10775
10776 * linux-s390-low.c (s390_collect_ptrace_register)
10777 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10778
3743bb4f
DE
107792010-01-21 Doug Evans <dje@google.com>
10780
14ce3065
DE
10781 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10782 (PTRACE_ARG4_TYPE): New macro.
10783 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10784 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10785 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10786 (usr_store_inferior_registers): Ditto.
10787 (linux_read_memory, linux_write_memory): Ditto.
10788 (linux_test_for_tracefork): Ditto.
10789
3743bb4f
DE
10790 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10791 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10792
8b315be5
PA
107932010-01-21 Pedro Alves <pedro@codesourcery.com>
10794
10795 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10796 target.
10797
85492558
PA
107982010-01-21 Pedro Alves <pedro@codesourcery.com>
10799
10800 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10801 prototype to take a regcache. Adjust.
10802
442ea881
PA
108032010-01-20 Pedro Alves <pedro@codesourcery.com>
10804
10805 * regcache.h (struct thread_info): Forward declare.
10806 (struct regcache): New.
10807 (new_register_cache): Adjust prototype.
10808 (get_thread_regcache): Declare.
10809 (free_register_cache): Adjust prototype.
10810 (registers_to_string, registers_from_string): Ditto.
10811 (supply_register, supply_register_by_name, collect_register)
10812 (collect_register_as_string, collect_register_by_name): Ditto.
10813 * regcache.c (struct inferior_regcache_data): Delete.
10814 (get_regcache): Rename to ...
10815 (get_thread_regcache): ... this. Adjust. Switch inferior before
10816 fetching registers.
10817 (regcache_invalidate_one): Adjust.
10818 (regcache_invalidate): Fix prototype.
10819 (new_register_cache): Return the new register cache.
10820 (free_register_cache): Change prototype.
10821 (realloc_register_cache): Adjust.
10822 (registers_to_string): Change prototype to take a regcache. Adjust.
10823 (registers_from_string): Ditto.
10824 (register_data): Ditto.
10825 (supply_register): Ditto.
10826 (supply_register_by_name): Ditto.
10827 (collect_register): Ditto.
10828 (collect_register_as_string): Ditto.
10829 (collect_register_by_name): Ditto.
10830 * server.c (process_serial_event): Adjust.
10831 * linux-low.h (regset_fill_func, regset_store_func): Change
10832 prototype.
10833 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10834 Change prototype.
10835 * linux-low.c (get_stop_pc): Adjust.
10836 (check_removed_breakpoint): Adjust.
10837 (linux_wait_for_event): Adjust.
10838 (linux_resume_one_lwp): Adjust.
10839 (fetch_register): Add regcache parameter. Adjust.
10840 (usr_store_inferior_registers): Ditto.
10841 (regsets_fetch_inferior_registers): Ditto.
10842 (regsets_store_inferior_registers): Ditto.
10843 (linux_fetch_registers, linux_store_registers): Ditto.
10844 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10845 regcache. Adjust.
43aaf8b6
PA
10846 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10847 Ditto.
442ea881
PA
10848 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10849 prototype to take a regcache.
10850 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10851 * remote-utils.c (convert_ascii_to_int, outreg)
10852 (prepare_resume_reply): Change prototype to take a regcache.
10853 Adjust.
10854 * target.h (struct target_ops) <fetch_registers, store_registers>:
10855 Change prototype to take a regcache.
10856 (fetch_inferior_registers, store_inferior_registers): Change
10857 prototype to take a regcache. Adjust.
10858 * proc-service.c (ps_lgetregs): Adjust.
10859 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10860 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10861 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10862 take a regcache. Adjust.
10863 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10864 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10865 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10866 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10867 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10868 (cris_cannot_fetch_register):
10869 (cris_breakpoint_at): Change prototype to take a regcache.
10870 Adjust.
10871 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10872 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10873 to take a regcache. Adjust.
10874 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10875 Adjust.
10876 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10877 take a regcache. Adjust.
10878 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10879 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10880 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10881 * linux-mips-low.c (mips_get_pc):
10882 (mips_set_pc): Change prototype to take a regcache. Adjust.
10883 (mips_reinsert_addr): Adjust.
10884 (mips_collect_register): Change prototype to take a regcache.
10885 Adjust.
10886 (mips_supply_register):
10887 (mips_collect_register_32bit, mips_supply_register_32bit)
10888 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10889 (mips_store_fpregset): Ditto.
43aaf8b6
PA
10890 * linux-ppc-low.c (ppc_supply_ptrace_register)
10891 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
10892 (parse_spufs_run): Adjust.
10893 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10894 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10895 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10896 take a regcache. Adjust.
10897 * linux-s390-low.c (s390_collect_ptrace_register)
10898 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10899 (s390_set_pc): Change prototype to take a regcache. Adjust.
10900 (s390_arch_setup): Adjust.
10901 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10902 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10903 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10904 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10905 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10906 regcache. Adjust.
10907 (sparc_breakpoint_at): Adjust.
10908 * linux-xtensa-low.c (xtensa_fill_gregset):
10909 (xtensa_store_gregset):
10910 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10911 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10912 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10913 prototype to take a regcache. Adjust.
10914 * win32-arm-low.c (arm_fetch_inferior_register)
10915 (arm_store_inferior_register): Change prototype to take a
10916 regcache. Adjust.
10917 * win32-i386-low.c (i386_fetch_inferior_register)
10918 (i386_store_inferior_register): Change prototype to take a
10919 regcache. Adjust.
10920 * win32-low.c (child_fetch_inferior_registers)
10921 (child_store_inferior_registers): Change prototype to take a
10922 regcache. Adjust.
10923 (win32_wait): Adjust.
10924 (win32_fetch_inferior_registers): Change prototype to take a
10925 regcache. Adjust.
10926 (win32_store_inferior_registers): Adjust.
10927 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10928 store_inferior_register>: Change prototype to take a regcache.
10929
60c3d7b0
DE
109302010-01-20 Doug Evans <dje@google.com>
10931
10932 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10933 #ifdef.
10934 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 10935 (W_STOPCODE): Provide definition if missing.
60c3d7b0 10936
dc146f7c
VP
109372010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10938
10939 * linux-low.c (linux_core_of_thread): New.
10940 (compare_ints, show_process, list_threads): New.
10941 (linux_qxfer_osdata): Report threads and cores.
10942 (linux_target_op): Register linux_core_of_thread.
10943 * remote-utils.c (prepare_resume_reply): Report the core.
10944 (buffer_xml_printf): Support %d specifier.
10945 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10946 New.
10947 (handle_query): Handle qXfer:threads. Announce availability
10948 thereof.
10949 * target.h (struct target_ops): New field core_of_thread.
10950
7803799a
UW
109512010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10952
10953 * Makefile.in (clean): Remove new generated files.
10954 (reg-s390.o, reg-s390.c): Remove rules.
10955 (reg-s390x.o, reg-s390x.c): Likewise.
10956 (s390-linux32.o, s390-linux32.c): Add rules.
10957 (s390-linux64.o, s390-linux64.c): Likewise.
10958 (s390x-linux64.o, s390x-linux64.c): Likewise.
10959 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10960 * linux-s390-low.c: Include <elf.h>.
10961 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10962 (init_registers_s390): Remove prototype.
10963 (init_registers_s390x): Likewise.
10964 (init_registers_s390_linux32): Add prototype.
10965 (init_registers_s390_linux64): Likewise.
10966 (init_registers_s390x_linux64): Likewise.
10967 (s390_num_regs_3264): New define.
10968 (s390_regmap_3264): New global variable.
10969 (s390_cannot_fetch_register): Remove obsolete check.
10970 (s390_cannot_store_register): Likewise.
10971 (s390_collect_ptrace_register): Handle upper/lower register halves.
10972 (s390_supply_ptrace_register): Likewise.
10973 (s390_fill_gregset): Update to register number changes.
10974 (s390_get_hwcap): New routine.
10975 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10976 Install appropriate regmap and register set.
10977
6e7ffa39
JB
109782010-01-01 Joel Brobecker <brobecker@adacore.com>
10979
10980 * server.c (gdbserver_version): Update copyright year to 2010.
10981 * gdbreplay.c (gdbreplay_version): Likewise.
10982
957f3f49
DE
109832009-12-28 Doug Evans <dje@google.com>
10984
10985 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10986 elf/external.h. Include <elf.h> instead but only if necessary.
10987
ca5c370d
PA
109882009-12-28 Pedro Alves <pedro@codesourcery.com>
10989
10990 * linux-low.c (linux_remove_process): Remove `detaching'
10991 parameter. Don't release/detach from thread_db here.
10992 (linux_kill): Release/detach from thread_db here, ...
10993 (linux_detach): ... and here, before actually detaching.
10994 (linux_wait_1): ... and here, when a process exits.
10995 * thread-db.c (any_thread_of): New.
10996 (thread_db_free): Switch the current inferior to a thread of the
10997 passed in process.
10998
4ee62156
DE
109992009-12-21 Doug Evans <dje@google.com>
11000
d90e6a88
DE
11001 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11002
c5f62d5f
DE
11003 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11004 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11005 warning ifndef __NR_tkill. Move setting of errno there too.
11006 Delete unnecessary resetting of errno after syscall.
11007 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11008
10e86dd7
DE
11009 * configure.ac: Check for dladdr.
11010 * config.in: Regenerate.
11011 * configure: Regenerate.
11012 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11013 (try_thread_db_load): Update.
11014
4ee62156
DE
11015 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11016
00f515da
DE
110172009-12-18 Doug Evans <dje@google.com>
11018
e9464885
DE
11019 * event-loop.c: Include unistd.h if it exists.
11020
07d4f67e
DE
11021 * linux-low.c (my_waitpid): Move definition away from being in
11022 between linux_tracefork_child/linux_test_for_tracefork.
11023
00f515da
DE
11024 * gdb_proc_service.h (psaddr_t): Fix type.
11025 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11026 signature to match glibc.
11027
1de1badb
DE
110282009-12-16 Doug Evans <dje@google.com>
11029
11030 * linux-low.c (linux_read_memory): Fix argument to read.
11031
aeeb81d1
PA
110322009-11-26 Pedro Alves <pedro@codesourcery.com>
11033
11034 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11035 events, don't leave current_inferior pointing at null.
11036
10357975
PA
110372009-11-26 Pedro Alves <pedro@codesourcery.com>
11038
11039 * win32-low.c (LOG): Delete.
11040 (OUTMSG): Output to stderr.
11041 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11042 on compile time LOG macro.
11043 (win32_wait): Fix debug output.
11044
cf6e3471
PA
110452009-11-26 Pedro Alves <pedro@codesourcery.com>
11046
11047 * win32-low.c (win32_add_one_solib): If the dll name is
11048 "ntdll.dll", prepend the system directory to the dll path.
11049
0c85e18e
MK
110502009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11051
11052 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11053
9ac544ce 110542009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11055 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11056
11057 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11058 * configure.ac: Check for __mcoldfire__ and set
11059 gdb_cv_m68k_is_coldfire.
11060 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11061 reg-cf.o and reg-m68k.o.
11062 * configure: Regenerated.
11063
fd7dd3e6
PA
110642009-11-16 Pedro Alves <pedro@codesourcery.com>
11065
11066 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11067 Pass it to thread_db_free.
11068 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11069 proper `detaching' argument to linux_remove_process.
11070 * linux-low.h (thread_db_free): Add `detaching' parameter.
11071 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11072 to thread_db_free.
11073 (thread_db_free): Add `detaching' parameter. Only
11074 call td_ta_clear_event if detaching from process.
11075
75aa492e
MK
110762009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11077
11078 * thread-db.c (thread_db_free): Fix typo.
11079
21e1bee4
PP
110802009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11081
11082 PR gdb/10838
11083 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11084
8838b45e
NS
110852009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11086
11087 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11088 with an i686 compiler.
11089 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11090 needed.
11091 * configure: Rebuilt.
11092
8a35fb51
SL
110932009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11094
11095 PR gdb/10783
11096
11097 * server.c (handle_search_memory_1): Correct read_addr initialization
11098 in loop for searching subsequent chunks.
11099
96f15937
PP
111002009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11101
11102 * configure.ac: New --with-libthread-db option.
11103 * thread-db.c: Allow direct dependence on libthread_db.
11104 (thread_db_free): Adjust.
11105 * config.in: Regenerate.
11106 * configure: Likewise.
889bf7c5 11107
5f7d1694
PP
111082009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11109
11110 PR gdb/10757
11111 * thread-db.c (attach_thread): New function.
11112 (maybe_attach_thread): Return success/failure.
11113 (find_new_threads_callback): Adjust.
889bf7c5
PA
11114 (thread_db_find_new_threads): Loop until no new threads.
11115
88e3b899
PA
111162009-10-13 Pedro Alves <pedro@codesourcery.com>
11117
11118 * proc-service.c (ps_lgetregs): Formatting.
11119
cdbfd419
PP
111202009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11121
11122 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11123 * configure.ac: Adjust.
11124 * linux-low.h (struct process_info_private): Move members to struct
11125 thread_db.
11126 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11127 * linux-low.c (linux_remove_process): Adjust.
11128 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11129 * server.c (handle_query): Move code ...
11130 (handle_monitor_command): ... here. New function.
11131 * target.h (struct target_ops): New member.
11132 * thread-db.c (struct thread_db): New.
11133 (libthread_db_search_path): New variable.
11134 (thread_db_create_event, thread_db_enable_reporting)
11135 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11136 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11137 (try_thread_db_load_1, dladdr_to_soname): New functions.
11138 (try_thread_db_load, thread_db_load_search): New functions.
11139 (thread_db_init): Search for libthread_db.
11140 (thread_db_free): New function.
11141 (thread_db_handle_monitor_command): Likewise.
11142 * config.in: Regenerate.
11143 * configure: Regenerate.
889bf7c5 11144
4168d2d6
UW
111452009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11146
11147 * spu-low.c (spu_kill): Wait for inferior to terminate.
11148 Call clear_inferiors.
11149 (spu_detach): Call clear_inferiors.
11150
81ecdfbb
RW
111512009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11152
11153 * aclocal.m4: Regenerate.
11154 * config.in: Likewise.
11155 * configure: Likewise.
11156
0b9ff2c0
UW
111572009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11158
11159 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11160 (parse_spufs_run): New function.
11161 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11162 (ppc_breakpoint_at): Handle SPU breakpoints.
11163
efcbbd14
UW
111642009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11165
11166 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11167 (SPUFS_MAGIC): Define.
11168 (spu_enumerate_spu_ids): New function.
11169 (linux_qxfer_spu): New function.
11170 (linux_target_ops): Install linux_qxfer_spu.
11171
f4d9bade
UW
111722009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11173
11174 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11175 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11176 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11177 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11178 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11179 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11180 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11181 (init_registers_powerpc_cell32l): Add prototype.
11182 (init_registers_powerpc_cell64l): Likewise.
11183 (ppc_arch_setup): Detect Cell/B.E. architecture.
11184
96e946ca
RW
111852009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11186
11187 * Makefile.in (datarootdir): New variable.
11188
58d6951d
DJ
111892009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11190
11191 * linux-low.c (linux_write_memory): Update debugging output.
11192 * Makefile.in (clean): Add new descriptions.
11193 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11194 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11195 * configure.srv: Add new files for arm*-*-linux*.
11196 * linux-arm-low.c: Add new declarations.
11197 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11198 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11199 (HWCAP_VFPv3D16): New.
11200 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11201 instead of __IWMMXT__.
11202 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11203 (arm_arch_setup): New.
11204 (target_regsets): Remove #ifdef. Add VFP regset.
11205 (the_low_target): Use arm_arch_setup.
11206
12b42a12
DJ
112072009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11208
11209 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11210 the main thread again.
11211
ac8c974e
AR
112122009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11213
11214 Adding Neutrino gdbserver.
11215 * configure: Regenerated.
11216 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11217 * configure.srv (i[34567]86-*-nto*): New target.
11218 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11219 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11220 (nto_comctrl) [__QNX__]: New function.
11221 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11222
4424e0c3 112232009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11224
11225 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11226 srv_tgtobj.
11227
912cf4ba
PA
112282009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11229 Pedro Alves <pedro@codesourcery.com>
11230
11231 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11232 don't support CONTEXT_EXTENDED_REGISTERS.
11233 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11234 (the_low_target): Install them.
11235 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11236 failing with ERROR_PIPE_NOT_CONNECTED.
11237
aa5ca48f
DE
112382009-06-30 Doug Evans <dje@google.com>
11239 Pierre Muller <muller@ics.u-strasbg.fr>
11240
11241 Add h/w watchpoint support to x86-linux, win32-i386.
11242 * Makefile.in (SFILES): Add i386-low.c
11243 (i386_low_h): Define.
11244 (i386-low.o): Add dependencies.
11245 (linux-x86-low.o): Add i386-low.h dependency.
11246 (win32-i386-low.o): Ditto.
11247 * i386-low.c: New file.
11248 * i386-low.h: New file.
11249 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11250 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11251 * linux-low.c (linux_add_process): Initialize arch_private.
11252 (linux_remove_process): Free arch_private.
11253 (add_lwp): Initialize arch_private.
11254 (delete_lwp): Free arch_private.
11255 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11256 provided.
11257 * linux-low.h (process_info_private): New member arch_private.
11258 (lwp_info): New member arch_private.
11259 (linux_target_ops): New members new_process, new_thread,
11260 prepare_to_resume.
11261 (ptid_of): New macro.
11262 * linux-x86-low.c: Include stddef.h, i386-low.h.
11263 (arch_process_info): New struct.
11264 (arch_lwp_info): New struct.
11265 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11266 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11267 (i386_dr_low_get_status): New function.
11268 (x86_insert_point, x86_remove_point): New functions.
11269 (x86_stopped_by_watchpoint): New function.
11270 (x86_stopped_data_address): New function.
11271 (x86_linux_new_process, x86_linux_new_thread): New functions.
11272 (x86_linux_prepare_to_resume): New function.
11273 (the_low_target): Add entries for insert_point, remove_point,
11274 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11275 prepare_to_resume.
11276 * server.c (debug_hw_points): New global.
11277 (monitor_show_help): Document set debug-hw-points.
11278 (handle_query): Process "set debug-hw-points".
11279 * server.h (debug_hw_points): Declare.
11280 (paddress): Declare.
11281 * utils.c (NUMCELLS, CELLSIZE): New macros.
11282 (get_sell, xsnprintf, paddress): New functions.
11283 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11284 remove_point, stopped_by_watchpoint, stopped_data_address.
11285 * win32-i386-low.c: Include i386-low.h.
11286 (debug_reg_state): Replaces dr.
11287 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11288 (i386_dr_low_get_status): New function.
11289 (i386_insert_point, i386_remove_point): New functions.
11290 (i386_stopped_by_watchpoint): New function.
11291 (i386_stopped_data_address): New function.
11292 (i386_initial_stuff): Update.
11293 (get_thread_context,set_thread_context,i386_thread_added): Update.
11294 (the_low_target): Add entries for insert_point,
11295 remove_point, stopped_by_watchpoint, stopped_data_address.
11296 * win32-low.c (win32_insert_watchpoint): New function.
11297 (win32_remove_watchpoint): New function.
11298 (win32_stopped_by_watchpoint): New function.
11299 (win32_stopped_data_address): New function.
11300 (win32_target_ops): Add entries for insert_watchpoint,
11301 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11302 * win32-low.h (win32_target_ops): New members insert_point,
11303 remove_point, stopped_by_watchpoint, stopped_data_address.
11304
d993e290
PA
113052009-06-25 Pedro Alves <pedro@codesourcery.com>
11306
11307 * server.c (process_serial_event): Re-return unsupported, not
11308 error, if the type isn't recognized. Re-allow supporting only
11309 insert or remove packets. Also call require_running for
11310 breakpoints. Add missing break statement to default case. Tidy.
11311 * target.h (struct target_ops): Rename insert_watchpoint to
11312 insert_point, and remove_watchpoint to remove_point.
11313
11314 * linux-low.h (struct linux_target_ops): Likewise.
11315 * linux-low.c (linux_insert_watchpoint): Rename to ...
11316 (linux_insert_point): ... this. Adjust.
11317 (linux_remove_watchpoint): Rename to ...
11318 (linux_remove_point): ... this. Adjust.
11319 (linux_target_ops): Adjust.
11320 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11321 (cris_insert_point): ... this.
11322 (cris_remove_watchpoint): Rename to ...
11323 (cris_remove_point): ... this.
11324 (the_low_target): Adjust.
11325
0f54c268
PM
113262009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11327
11328 * server.c (handle_v_kill): Pass signal_pid to
11329 kill_inferior if multi_process is zero.
11330
c6314022
AR
113312009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11332
11333 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11334 * target.h (target_ops): Comment for *_watchpoint to make it clear
11335 the functions can get types '0' and '1'.
11336
4463ce24
AR
113372009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11338
11339 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11340 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11341 * regcache.c (get_regcache): Likewise.
11342 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11343 * win32-low.c (child_fetch_inferior_registers): Remove check for
11344 regno 0.
11345
cf8fd78b
PA
113462009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11347 Pedro Alves <pedro@codesourcery.com>
11348
11349 * target.h (struct target_ops) <supports_multi_process>: New
11350 callback.
11351 (target_supports_multi_process): New.
11352 * server.c (handle_query): Even if GDB reports support, only
11353 enable multi-process if the target also supports it. Report
11354 multi-process support only if the target backend supports it.
11355 * linux-low.c (linux_supports_multi_process): New function.
11356 (linux_target_ops): Install it as target_supports_multi_process
11357 callback.
11358
47c0c975
DE
113592009-05-24 Doug Evans <dje@google.com>
11360
e09875d4
DE
11361 Global renaming of find_thread_pid to find_thread_ptid.
11362 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11363 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11364 All callers updated.
11365
e27d73f6
DE
11366 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11367 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11368 directly.
11369
47c0c975
DE
11370 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11371 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11372 (linux_resume_one_lwp): Ditto.
11373
2acc282a
DE
113742009-05-23 Doug Evans <dje@google.com>
11375
11376 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11377 from struct inferior_list_entry * to struct lwp_info *.
11378 All callers updated.
11379
9f1036c1
DE
113802009-05-13 Doug Evans <dje@google.com>
11381
11382 * linux-x86-low.c: Don't include assert.h.
11383 (x86_siginfo_fixup): Use fatal, not assert.
11384 (x86_arch_setup): Fix comment.
11385
d0722149
DE
113862009-05-12 Doug Evans <dje@google.com>
11387
11388 Biarch support for i386/amd64 gdbserver.
11389 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11390 Add linux-x86-low.c.
11391 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11392 (linux-x86-low.o): Add.
11393 * linux-x86-64-low.c: Delete.
11394 * linux-i386-low.c: Delete.
11395 * linux-x86-low.c: New file.
11396 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11397 linux-x86-low.o.
11398 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11399 linux-x86-low.o.
11400 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11401 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11402 (linux_child_pid_to_exec_file): New function.
11403 (elf_64_header_p, elf_64_file_p): New functions.
11404 (siginfo_fixup): New function.
11405 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11406 give target a chance to convert layout.
11407 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11408 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11409
fdeb2a12
DE
114102009-05-07 Doug Evans <dje@google.com>
11411
11412 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11413 (regsets_store_inferior_registers): Ditto.
11414
a6dbe5df
PA
114152009-05-06 Pedro Alves <pedro@codesourcery.com>
11416
11417 PR server/10048
11418
11419 * linux-low.c (must_set_ptrace_flags): Delete.
11420 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11421 of the global.
11422 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11423 `lwp->must_set_ptrace_flags' instead.
ba42693b 11424 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11425 (linux_wait_1): ... not here.
11426
5091eb23
DE
114272009-04-30 Doug Evans <dje@google.com>
11428
9f767825
DE
11429 * inferiors.c (started_inferior_callback): New function.
11430 (attached_inferior_callback): New function.
11431 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11432 * server.c (print_started_pid, print_attached_pid): New functions.
11433 (detach_or_kill_for_exit): New function.
11434 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11435 * server.h (have_started_inferiors_p): Declare.
11436 (have_attached_inferiors_p): Declare.
11437
5091eb23
DE
11438 * inferiors.c (remove_process): Fix memory leak, free process.
11439 * linux-low.c (linux_remove_process): New function.
11440 (linux_kill): Call it instead of remove_process.
11441 (linux_detach, linux_wait_1): Ditto.
11442
155c8968
PA
114432009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11444
11445 * configure.srv: Add x86 Windows CE target.
11446
7fe519cb
UW
114472009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11448
11449 * inferiors.c (get_thread_process): Make global.
11450 * server.h (get_thread_process): Add prototype.
11451 * thread-db.c (find_one_thread): Use get_thread_process
11452 instead of current_process.
11453 (thread_db_get_tls_address): Do not crash if called when
11454 thread layer is not yet initialized.
11455
5472f405
UW
114562009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11457
11458 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11459 * spu-low.c (current_tid): Rename to ...
11460 (current_ptid): ... this.
11461 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11462 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11463 ptid_get_lwp (current_ptid) instead of current_tid.
11464 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11465 instead of current_tid. Use find_process_pid to verify pid
11466 argument is valid. Pass proper argument to remove_process.
11467 (spu_thread_alive): Compare current_ptid instead of current_tid.
11468 (spu_resume): Likewise.
11469
55ac2b99
PA
114702009-04-02 Pedro Alves <pedro@codesourcery.com>
11471
11472 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11473 variable.
11474
95954743
PA
114752009-04-01 Pedro Alves <pedro@codesourcery.com>
11476
11477 Implement the multiprocess extensions, and add linux multiprocess
11478 support.
11479
11480 * server.h (ULONGEST): Declare.
11481 (struct ptid, ptid_t): New.
11482 (minus_one_ptid, null_ptid): Declare.
11483 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11484 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11485 (struct inferior_list_entry): Change `id' type from unsigned from
11486 to ptid_t.
11487 (struct sym_cache, struct breakpoint, struct
11488 process_info_private): Forward declare.
11489 (struct process_info): Declare.
11490 (current_process): Declare.
11491 (all_processes): Declare.
11492 (initialize_inferiors): Declare.
11493 (add_thread): Adjust to use ptid_t.
11494 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11495 (add_process, remove_process, find_thread_pid): Declare.
11496 (find_inferior_id): Adjust to use ptid_t.
11497 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11498 (multi_process): Declare.
11499 (push_event): Adjust to use ptid_t.
11500 (read_ptid, write_ptid): Declare.
11501 (prepare_resume_reply): Adjust to use ptid_t.
11502 (clear_symbol_cache): Declare.
11503 * inferiors.c (all_processes): New.
11504 (null_ptid, minus_one_ptid): New.
11505 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11506 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11507 (add_thread): Change unsigned long to ptid. Remove gdb_id
11508 parameter. Adjust.
11509 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11510 (gdb_id_to_thread): Rename to ...
11511 (find_thread_pid): ... this. Change unsigned long to ptid.
11512 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11513 (loaded_dll, pull_pid_from_list): Adjust.
11514 (add_process, remove_process, find_process_pid)
11515 (get_thread_process, current_process, initialize_inferiors): New.
11516 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11517 (struct target_waitstatus) <related_pid>: Ditto.
11518 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11519 return type to int.
11520 (struct target_ops) <join>: Add `pid' argument.
11521 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11522 (struct target_ops) <wait>: Add `ptid' field. Change return type
11523 to ptid.
11524 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11525 (mywait): Add `ptid' argument. Change return type to ptid_t.
11526 (target_pid_to_str): Declare.
11527 * target.c (set_desired_inferior): Adjust to use ptids.
11528 (mywait): Add new `ptid' argument. Adjust.
11529 (target_pid_to_str): New.
11530 * mem-break.h (free_all_breakpoints): Declare.
11531 * mem-break.c (breakpoints): Delelete.
11532 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11533 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11534 to use per-process breakpoint list.
11535 (free_all_breakpoints): New.
11536 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11537 (symbol_cache, all_symbols_looked_up): Delete.
11538 (hexchars): New.
11539 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11540 read_ptid): New.
11541 (prepare_resume_reply): Change ptid argument's type from unsigned
11542 long to ptid_t. Adjust. Implement W;process and X;process.
11543 (free_sym_cache, clear_symbol_cache): New.
11544 (look_up_one_symbol): Adjust to per-process symbol cache. *
11545 * server.c (cont_thread, general_thread, step_thread): Change type
11546 to ptid_t.
11547 (attached): Delete.
11548 (multi_process): New.
11549 (last_ptid): Change type to ptid_t.
11550 (struct vstop_notif) <ptid>: Change type to ptid_t.
11551 (queue_stop_reply, push_event): Change `ptid' argument's type to
11552 ptid_t.
11553 (discard_queued_stop_replies): Add `pid' argument.
11554 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11555 changes. Don't reference the `attached' global.
11556 (attach_inferior): Adjust to mywait interface changes.
11557 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11558 features. Handle and report "multiprocess+". Handle
11559 "qAttached:PID".
11560 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11561 changes.
11562 (handle_v_kill): New.
11563 (handle_v_stopped): Adjust to use target_pid_to_str.
11564 (handle_v_requests): Allow multiple attaches and runs when
11565 multiprocess extensions are in effect. Handle "vKill".
11566 (myresume): Adjust to use ptids.
11567 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11568 (handle_status): Adjust to discard_queued_stop_replies interface
11569 change.
11570 (first_thread_of, kill_inferior_callback)
11571 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11572 (main): Call initialize_inferiors. Adjust to use ptids, killing
11573 and detaching from all inferiors. Handle multiprocess packet
11574 variants.
11575 * linux-low.h: Include gdb_proc_service.h.
11576 (struct process_info_private): New.
11577 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11578 <lwpid_of>: Use ptid_get_lwp.
11579 (get_lwp_thread): Adjust.
11580 (struct lwp_info): Add `dead' member.
11581 (find_lwp_pid): Declare.
11582 * linux-low.c (thread_db_active): Delete.
11583 (new_inferior): Adjust comment.
11584 (inferior_pid): Delete.
11585 (linux_add_process): New.
11586 (handle_extended_wait): Adjust.
11587 (add_lwp): Change unsigned long to ptid.
11588 (linux_create_inferior): Add process to processes table. Adjust
11589 to use ptids. Don't set new_inferior here.
11590 (linux_attach_lwp): Rename to ...
11591 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11592 it. Adjust to use ptids.
11593 (linux_attach_lwp): New.
11594 (linux_attach): Add process to processes table. Don't set
11595 new_inferior here.
11596 (struct counter): New.
11597 (second_thread_of_pid_p, last_thread_of_process_p): New.
11598 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11599 multiple processes.
11600 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11601 processes. Remove process from process table.
11602 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11603 to multiple processes.
11604 (any_thread_of): New.
11605 (linux_detach): Add `pid' argument, and handle it. Remove process
11606 from processes table.
11607 (linux_join): Add `pid' argument. Handle it.
11608 (linux_thread_alive): Change unsighed long argument to ptid_t.
11609 Consider dead lwps as not being alive.
11610 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11611 threads we're not interested in.
11612 (same_lwp, find_lwp_pid): New.
11613 (linux_wait_for_lwp): Change `pid' argument's type from int to
11614 ptid_t. Adjust.
11615 (linux_wait_for_event): Rename to ...
11616 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11617 from int to ptid_t. Adjust.
11618 (linux_wait_for_event): New.
11619 (linux_wait_1): Add `ptid' argument. Change return type to
11620 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11621 that exit from the process table.
11622 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11623 Adjust.
11624 (mark_lwp_dead): New.
11625 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11626 stopping all threads, mark its main lwp as dead.
11627 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11628 ptids.
11629 (fetch_register, usr_store_inferior_registers)
11630 (regsets_fetch_inferior_registers)
11631 (regsets_store_inferior_registers, linux_read_memory)
11632 (linux_write_memory): Inline `inferior_pid'.
11633 (linux_look_up_symbols): Adjust to use per-process
11634 `thread_db_active'.
11635 (linux_request_interrupt): Adjust to use ptids.
11636 (linux_read_auxv): Inline `inferior_pid'.
11637 (initialize_low): Don't reference thread_db_active.
11638 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11639 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11640 (ps_getpid): Return the pid of the current inferior.
11641 * thread-db.c (proc_handle, thread_agent): Delete.
11642 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11643 per-process data.
11644 (find_one_thread): Change argument type to ptid_t. Adjust to
11645 per-process data.
11646 (maybe_attach_thread): Adjust to per-process data and ptids.
11647 (thread_db_find_new_threads): Ditto.
11648 (thread_db_init): Ditto.
11649 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11650 processes table. Adjust to use ptids.
11651 (spu_kill, spu_detach): Adjust interface. Remove process from
11652 processes table.
11653 (spu_join, spu_thread_alive): Adjust interface.
11654 (spu_wait): Adjust interface. Remove process from processes
11655 table. Adjust to use ptids.
11656 * win32-low.c (current_inferior_tid): Delete.
11657 (current_inferior_ptid): New.
11658 (debug_event_ptid): New.
11659 (thread_rec): Take a ptid. Adjust.
11660 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11661 (child_delete_thread): Ditto.
11662 (do_initial_child_stuff): Add `attached' argument. Add process to
11663 processes table.
11664 (child_fetch_inferior_registers, child_store_inferior_registers):
11665 Adjust.
11666 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11667 (win32_attach): Pass 1 to do_initial_child_stuff.
11668 (win32_kill): Adjust interface. Remove process from processes
11669 table.
11670 (win32_detach): Ditto.
11671 (win32_join): Adjust interface.
11672 (win32_thread_alive): Take a ptid.
11673 (win32_resume): Adjust to use ptids.
11674 (get_child_debug_event): Ditto.
11675 (win32_wait): Adjust interface. Remove exiting process from
11676 processes table.
11677
bd99dc85
PA
116782009-04-01 Pedro Alves <pedro@codesourcery.com>
11679
11680 Non-stop mode support.
11681
11682 * server.h (non_stop): Declare.
11683 (gdb_client_data, handler_func): Declare.
11684 (delete_file_handler, add_file_handler, start_event_loop):
11685 Declare.
11686 (handle_serial_event, handle_target_event, push_event)
11687 (putpkt_notif): Declare.
11688 * target.h (enum resume_kind): New.
11689 (struct thread_resume): Replace `step' field by `kind' field.
11690 (TARGET_WNOHANG): Define.
11691 (struct target_ops) <wait>: Add `options' argument.
11692 <supports_non_stop, async, start_non_stop>: New fields.
11693 (target_supports_non_stop, target_async): New.
11694 (start_non_stop): Declare.
11695 (mywait): Add `options' argument.
11696 * target.c (mywait): Add `options' argument. Print child exit
11697 notifications here.
11698 (start_non_stop): New.
11699 * server.c (non_stop, own_buf, mem_buf): New globals.
11700 (struct vstop_notif): New.
11701 (notif_queue): New global.
11702 (queue_stop_reply, push_event, discard_queued_stop_replies)
11703 (send_next_stop_reply): New.
11704 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11705 interface changes.
11706 (attach_inferior): In non-stop mode, don't wait for the target
11707 here.
11708 (handle_general_set): Handle QNonStop.
11709 (handle_query): When handling qC, return the current general
11710 thread, instead of the first thread of the list.
11711 (handle_query): If the backend supports non-stop mode, include
11712 QNonStop+ in the qSupported query response.
11713 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11714 and non-stop mode.
11715 (handle_v_attach, handle_v_run): Handle non-stop mode.
11716 (handle_v_stopped): New.
11717 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11718 (myresume): Adjust to use resume_kind. Handle non-stop.
11719 (queue_stop_reply_callback): New.
11720 (handle_status): Handle non-stop mode.
11721 (main): Clear non_stop flag on reconnection. Use the event-loop.
11722 Refactor serial protocol handling from here ...
11723 (process_serial_event): ... to this new function. When GDB
11724 selects any thread, select one here. In non-stop mode, wait until
11725 GDB acks all pending events before exiting.
11726 (handle_serial_event, handle_target_event): New.
11727 * remote-utils.c (remote_open): Install remote_desc in the event
11728 loop.
11729 (remote_close): Remove remote_desc from the event loop.
11730 (putpkt_binary): Rename to...
11731 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11732 (putpkt_binary): New as wrapper around putpkt_binary_1.
11733 (putpkt_notif): New.
11734 (prepare_resume_reply): In non-stop mode, don't change the
11735 general_thread.
11736 * event-loop.c: New.
11737 * Makefile.in (OBJ): Add event-loop.o.
11738 (event-loop.o): New rule.
11739
11740 * linux-low.h (pid_of): Moved here.
11741 (lwpid_of): New.
11742 (get_lwp_thread): Use lwpid_of.
11743 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11744 * linux-low.c (pid_of): Delete.
11745 (inferior_pid): Use lwpid_of.
11746 (linux_event_pipe): New.
11747 (target_is_async_p): New.
11748 (delete_lwp): New.
11749 (handle_extended_wait): Use lwpid_of.
11750 (add_lwp): Don't set lwpid field.
11751 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11752 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11753 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11754 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11755 first. Adjust to linux_wait_for_event interface changes. Use
11756 lwpid_of.
11757 (linux_detach): Don't delete the main lwp here.
11758 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11759 (status_pending_p): Don't consider explicitly suspended lwps.
11760 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11761 pointer. Add OPTIONS argument. Change return type to int. Use
11762 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11763 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11764 pointer. Add status pointer argument. Return a pid instead of a
11765 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11766 changes. In non-stop mode, don't switch to a random thread.
11767 (linux_wait): Rename to...
11768 (linux_wait_1): ... this. Add target_options argument, and handle
11769 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11770 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11771 clean exit and signal exit code. Don't stop all threads in
11772 non-stop mode. In all-stop mode, only stop all threads when
11773 reporting a stop to GDB. Handle explicit thread stop requests.
11774 (async_file_flush, async_file_mark): New.
11775 (linux_wait): New.
11776 (send_sigstop): Use lwpid_of.
11777 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11778 interface changes. In non-stop mode, don't switch to a random
11779 thread.
11780 (linux_resume_one_lwp): Use lwpid_of.
11781 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11782 (linux_resume_one_thread): ... this. Handle resume_stop. In
11783 non-stop mode, don't look for pending flag in all threads.
11784 (resume_status_pending_p): Don't consider explicitly suspended
11785 threads.
11786 (my_waitpid): Reimplement. Emulate __WALL.
11787 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11788 Use lwpid_of.
11789 (sigchld_handler, linux_supports_non_stop, linux_async)
11790 (linux_start_non_stop): New.
11791 (linux_target_ops): Register linux_supports_non_stop, linux_async
11792 and linux_start_non_stop.
11793 (initialize_low): Install SIGCHLD handler.
11794 * thread-db.c (thread_db_create_event, find_one_thread)
11795 (thread_db_get_tls_address): Use lwpid_of.
11796 * win32-low.c (win32_detach): Adjust to use resume_kind.
11797 (win32_wait): Add `options' argument.
11798 * spu-low.c (spu_resume): Adjust to use resume_kind.
11799 (spu_wait): Add `options' argument.
11800
5b1c542e
PA
118012009-04-01 Pedro Alves <pedro@codesourcery.com>
11802
11803 Decouple target code from remote protocol.
11804
11805 * target.h (enum target_waitkind): New.
11806 (struct target_waitstatus): New.
11807 (struct target_ops) <wait>: Return an unsigned long. Take a
11808 target_waitstatus pointer instead of a char pointer.
11809 (mywait): Likewise.
11810 * target.c (mywait): Change prototype to return an unsigned long.
11811 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11812 * server.h (thread_from_wait, old_thread_from_wait): Delete
11813 declarations.
11814 (prepare_resume_reply): Change prototype to take a
11815 target_waitstatus.
11816 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11817 (last_status, last_ptid): New.
11818 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11819 pid instead of a signal.
11820 (attach_inferior): Remove "status" and "signal" parameters.
11821 Adjust.
11822 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11823 not as an address.
11824 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11825 (handle_v_requests, myresume): Remove "status" and "signal"
11826 parameters. Adjust.
11827 (handle_status): New.
11828 (main): Delete local `status'. Adjust.
11829 * remote-utils.c: Include target.h.
11830 (prepare_resume_reply): Change prototype to take a
11831 target_waitstatus. Adjust.
11832
11833 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11834 interface.
11835 * spu-low.c (spu_wait): Adjust.
11836 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11837 Delete.
11838 (win32_wait): Adjust.
11839
2bd7c093
PA
118402009-04-01 Pedro Alves <pedro@codesourcery.com>
11841
11842 * target.h (struct thread_resume): Delete leave_stopped member.
11843 (struct target_ops): Add a `n' argument to the `resume' callback.
11844 * server.c (start_inferior): Adjust.
11845 (handle_v_cont, myresume): Adjust.
11846 * linux-low.c (check_removed_breakpoint): Adjust to resume
11847 interface change, and to removed leave_stopped field.
11848 (resume_ptr): Delete.
11849 (struct thread_resume_array): New.
11850 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11851 resume interface change.
11852 (linux_continue_one_thread, linux_queue_one_thread)
11853 (resume_status_pending_p): Check if the resume field is NULL
11854 instead of checking the leave_stopped member.
11855 (linux_resume): Adjust to the target resume interface change.
11856 * spu-low.c (spu_resume): Adjust to the target resume interface
11857 change.
11858 * win32-low.c (win32_detach, win32_resume): Ditto.
11859
c35fafde
PA
118602009-04-01 Pedro Alves <pedro@codesourcery.com>
11861
11862 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11863 flag.
11864 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11865 pending.
11866 (linux_continue_one_thread): Only preserve the stepping flag if
11867 there's a pending breakpoint.
11868
0a59d50b
PA
118692009-03-31 Pedro Alves <pedro@codesourcery.com>
11870
11871 * server.c (main): After the inferior having exited, call
11872 remote_close before exiting gdbserver.
11873
f04c6d38
TJB
118742009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11875
11876 Fix size of FPSCR in Power 7 processors.
11877 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11878 (PPC_FEATURE_HAS_DFP): New #define.
11879 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11880 size of the FPSCR.
11881
78e5cee6
PA
118822009-03-23 Pedro Alves <pedro@codesourcery.com>
11883
11884 * server.c (handle_query) Whitespace and formatting.
11885
1b3f6016
PA
118862009-03-22 Pedro Alves <pedro@codesourcery.com>
11887
11888 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11889 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11890 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11891 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11892 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11893 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11894 Makefile.in, configure.ac: Fix whitespace throughout.
11895 * configure: Regenerate.
11896
a07b2135
PA
118972009-03-22 Pedro Alves <pedro@codesourcery.com>
11898
11899 * inferiors.c (find_inferior): Make it safe for the callback
11900 function to delete the currently iterated inferior.
11901
67cc2626
PA
119022009-03-22 Pedro Alves <pedro@codesourcery.com>
11903
11904 * Makefile.in (linuw_low_h): Move higher.
11905 (thread-db.o): Depend on $(linux_low_h).
11906
54a0b537
PA
119072009-03-17 Pedro Alves <pedro@codesourcery.com>
11908
11909 Rename "process" to "lwp" throughout.
11910
11911 * linux-low.c (all_processes): Rename to...
11912 (all_lwps): ... this.
11913 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11914 (add_process): Rename to ...
11915 (add_lwp): ... this. Adjust.
11916 (linux_create_inferior): Adjust.
11917 (linux_attach_lwp): Adjust.
11918 (linux_attach): Adjust.
11919 (linux_kill_one_process): Rename to ...
11920 (linux_kill_one_lwp): ... this. Adjust.
11921 (linux_kill): Adjust.
11922 (linux_detach_one_process): Rename to ...
11923 (linux_detach_one_lwp): ... this. Adjust.
11924 (linux_detach): Adjust.
11925 (check_removed_breakpoint): Adjust.
11926 (status_pending_p): Adjust.
11927 (linux_wait_for_process): Rename to ...
11928 (linux_wait_for_lwp): ... this. Adjust.
11929 (linux_wait_for_event): Adjust.
11930 (send_sigstop): Adjust.
11931 (wait_for_sigstop): Adjust.
11932 (stop_all_processes): Rename to ...
11933 (stop_all_lwps): ... this.
11934 (linux_resume_one_process): Rename to ...
11935 (linux_resume_one_lwp): ... this. Adjust.
11936 (linux_set_resume_request, linux_continue_one_thread)
11937 (linux_queue_one_thread, resume_status_pending_p)
11938 (usr_store_inferior_registers, regsets_store_inferior_registers)
11939 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11940 Adjust.
11941 * linux-low.h (get_process): Rename to ...
11942 (get_lwp): ... this. Adjust.
11943 (get_thread_process): Rename to ...
11944 (get_thread_lwp): ... this. Adjust.
11945 (get_process_thread): Rename to ...
11946 (get_lwp_thread): ... this. Adjust.
11947 (struct process_info): Rename to ...
11948 (struct lwp_info): ... this.
11949 (all_processes): Rename to ...
11950 (all_lwps): ... this.
11951 * proc-service.c (ps_lgetregs): Adjust.
11952 * thread-db.c (thread_db_create_event, find_one_thread)
11953 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11954
0b16c5cf
PA
119552009-03-14 Pedro Alves <pedro@codesourcery.com>
11956
11957 * server.c (handle_query): Handle "qAttached".
11958
32de4b9d
NS
119592009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11960
11961 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11962 GPLv3, update license URL.
11963
2aecd87f
DE
119642009-03-01 Doug Evans <dje@google.com>
11965
93efd302 11966 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
11967 (server_h): Add gdb_signals.h.
11968 (signals.o): Update.
11969 * server.h (target_signal_from_host,target_signal_to_host_p)
11970 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11971
86b1f9c5
PM
119722009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11973
11974 * remote-utils.c (getpkt): Also generate remote-debug
11975 information if noack_mode is set.
11976
4aa995e1
PA
119772009-02-06 Pedro Alves <pedro@codesourcery.com>
11978
11979 * server.c (handle_query): Report qXfer:siginfo:read and
11980 qXfer:siginfo:write as supported and handle them.
11981 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11982 * linux-low.c (linux_xfer_siginfo): New.
11983 (linux_target_ops): Set it.
11984
62709adf
PA
119852009-01-26 Pedro Alves <pedro@codesourcery.com>
11986
11987 * server.c (gdbserver_usage): Mention --remote-debug.
11988 (main): Accept '--remote-debug' switch.
11989
aef93bd7
DE
119902009-01-18 Doug Evans <dje@google.com>
11991
11992 * regcache.c (new_register_cache): No need to check result of xcalloc.
11993 * server.c (handle_search_memory): Back out calls to xmalloc,
11994 result is checked and error is returned to user upon failure.
11995 (handle_query): Ditto. Add more checks for result of malloc.
11996 (handle_v_cont): Check result of malloc, report error back to
11997 user upon failure.
11998 (handle_v_run): Ditto. Call freeargv.
11999 * server.h (freeargv): Declare.
12000 * utils.c (freeargv): New fn.
12001
54363045
DE
120022009-01-15 Doug Evans <dje@google.com>
12003
f626972c
DE
12004 * gdbreplay.c (perror_with_name): Make arg const char *.
12005 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12006 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12007 * utils.c (perror_with_name): Make arg const char *.
54363045 12008
18aae699
PA
120092009-01-14 Pedro Alves <pedro@codesourcery.com>
12010
12011 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12012 when handling a EXIT_PROCESS_DEBUG_EVENT.
12013
ff703abe
JB
120142009-01-06 Joel Brobecker <brobecker@adacore.com>
12015
12016 * gdbreplay.c (gdbreplay_version): Update copyright year.
12017 * server.c (gdbserver_version): Likewise.
12018
f21cc1a2 120192009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12020
12021 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12022 (handle_extended_wait): Improve comment.
0e21c1ec 12023
bca929d3
DE
120242008-12-13 Doug Evans <dje@google.com>
12025
12026 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12027 * server.h (ATTR_MALLOC): New macro.
12028 (xmalloc,xcalloc,xstrdup): Declare.
12029 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12030 * inferiors.c: Ditto.
12031 * linux-low.c: Ditto.
12032 * mem-break.c: Ditto.
12033 * regcache.c: Ditto.
12034 * remote-utils.c: Ditto.
12035 * server.c: Ditto.
12036 * target.c: Ditto.
12037 * win32-low.c: Ditto.
12038
97438e3f
DE
120392008-12-12 Doug Evans <dje@google.com>
12040
896c7fbb
DE
12041 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12042 in debugging printf.
12043
97438e3f
DE
12044 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12045
e3b886f8
DE
120462008-12-09 Doug Evans <dje@google.com>
12047
12048 * linux-low.h (struct process_info): Delete member tid, unused.
12049 * thread-db.c (find_one_thread): Update.
12050 (maybe_attach_thread): Update.
12051
07e059b5
VP
120522008-12-02 Pedro Alves <pedro@codesourcery.com>
12053
889bf7c5
PA
12054 * target.h (struct target_ops): Add qxfer_osdata member.
12055 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12056 and dirent.h.
12057 (linux_qxfer_osdata): New functions.
12058 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12059 callback.
12060 * server.c (handle_query): Handle "qXfer:osdata:read:".
12061 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12062 (buffer_xml_printf): New functions.
12063 * server.h (struct buffer): New.
12064 (buffer_grow_str, buffer_grow_str0): New macros.
12065 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12066 (buffer_xml_printf): Declare.
07e059b5 12067
4cab47ab
DE
120682008-11-24 Doug Evans <dje@google.com>
12069
12070 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12071
f142445f
DJ
120722008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12073
12074 * server.c (handle_v_run): Always use the supplied argument list.
12075
d0107bb6 120762008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12077
d0107bb6
BW
12078 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12079 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12080
2c4ad781
TJB
120812008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12082
12083 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12084 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12085 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12086 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12087 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12088 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12089 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12090 XML target descriptions.
12091 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12092 when inferior is running on an ISA 2.05 or later processor. Add
12093 special case to return offset for full 64-bit slot of FPSCR when
12094 in 32-bits.
12095
dfb64f85
DJ
120962008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12097
12098 * Makefile.in (SFILES, clean): Added sparc64 files.
12099 (reg-sparc64.o, reg-sparc64.c): New.
12100 * configure.srv (sparc*-*-linux*): New configuration.
12101 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12102 syscall arguments for SPARC.
12103 (regsets_store_inferior_registers): Likewise.
12104 * linux-sparc-low.c: New file.
12105
66b6e1dd
DE
121062008-10-21 Doug Evans <dje@google.com>
12107
12108 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12109 (READLINE_DIR,READLINE_DEP): Delete.
12110 (INTERNAL_CFLAGS): Update.
12111 (LINTFLAGS): Update.
12112
9b710a42
PA
121132008-10-10 Pedro Alves <pedro@codesourcery.com>
12114
12115 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12116 whole argv from the last run, not just argv[0].
12117
5822d809
PA
121182008-09-08 Pedro Alves <pedro@codesourcery.com>
12119
12120 * regcache.c (new_register_cache): Return NULL if the register
12121 cache size isn't known yet.
12122 (free_register_cache): Avoid dereferencing a NULL regcache.
12123
74aac56f
DJ
121242008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12125
12126 * configure.srv: Merge MIPS and MIPS64.
12127
400b20f5
MR
121282008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12129
12130 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12131
677c5bb1
LM
121322008-08-18 Luis Machado <luisgpm@br.ibm.com>
12133
12134 * Makefile.in: Add required vsx dependencies.
12135
12136 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12137 Declare init_registers_powerpc_vsx32l.
12138 Declare init_registers_powerpc_vsx64l.
12139 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12140 (ppc_arch_setup): Check for VSX in hwcap.
12141 (ppc_fill_vsxregset): New function.
12142 (ppc_store_vsxregset): New function.
12143 Add new VSX entry in regset_info target_regsets.
12144
12145 * configure.srv: Add new VSX dependencies.
12146
a6f3e723
SL
121472008-08-12 Pedro Alves <pedro@codesourcery.com>
12148
12149 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12150 (remote_open): Set or clear transport_is_reliable.
12151 (putpkt_binary): Don't expect acks in noack mode.
12152 (getpkt): Don't send ack/nac in noack mode.
12153 * server.c (handle_general_set): Handle QStartNoAckMode.
12154 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12155 qSupported.
12156 (main): Reset noack_mode on every connection.
12157 * server.h (noack_mode): Declare.
12158
a417dc56
RW
121592008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12160
12161 * Makefile.in (GDBREPLAY_OBS): New variable.
12162 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12163
3221518c
UW
121642008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12165 Daniel Jacobowitz <dan@codesourcery.com>
12166
12167 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12168 (usr_store_inferior_registers): Likewise.
12169 (regsets_store_inferior_registers): Likewise.
12170
ec56be1b
PA
121712008-07-31 Rolf Jansen <rj@surtec.com>
12172 Pedro Alves <pedro@codesourcery.com>
12173
12174 * configure.ac: Check for memmem declaration.
12175 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12176 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12177 (disable_packet_qfThreadInfo): Unconditionally compile.
12178 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12179 * configure, config.in: Regenerate.
12180
2fe5e3ff
DE
121812008-07-28 Doug Kwan <dougkwan@google.com>
12182
12183 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12184 (linux_write_memory): Remove declaration of errno.
12185
836acd6d
UW
121862008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12187
12188 * linux-low.c (handle_extended_wait): Do not use "status"
12189 variable uninitialized.
12190
aeba519e
PA
121912008-07-07 Pedro Alves <pedro@codesourcery.com>
12192
12193 * server.c (handle_v_attach): Inhibit reporting dll changes.
12194
db42f210
PA
121952008-06-27 Pedro Alves <pedro@codesourcery.com>
12196
12197 * remote-utils.c (prepare_resume_reply): If requested, don't
12198 output "thread:TID" in the T stop reply.
12199
12200 * server.c (disable_packet_vCont, disable_packet_Tthread)
12201 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12202 (handle_query): If requested, disable support for qC, qfThreadInfo
12203 and qsThreadInfo.
12204 (handle_v_requests): If requested, disable support for vCont.
12205 (gdbserver_show_disableable): New.
12206 (main): Handle --disable-packet and --disable-packet=LIST.
12207
12208 * server.h (disable_packet_vCont, disable_packet_Tthread)
12209 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12210
8e4c5421
CD
122112008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12212
12213 * server.c (gdbserver_usage): Mention --version.
12214
6e23a804
DJ
122152008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12216
12217 * Makefile.in (gdbreplay.o): New rule.
12218
90aa6a40
JM
122192008-06-06 Joseph Myers <joseph@codesourcery.com>
12220
12221 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12222 message, not gdbserver.
12223
c16158bc 122242008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12225 Nathan Sidwell <nathan@codesourcery.com>
12226 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12227
12228 * acinclude.m4: Include ../../config/acx.m4.
12229 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12230 * configure, config.in: Regenerate.
12231 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12232 * server.c (gdbserver_version): Print PKGVERSION.
12233 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12234 (main): Adjust gdbserver_usage calls.
12235 * gdbreplay.c (version, host_name): Add declarations.
12236 (gdbreplay_version, gdbreplay_usage): New.
12237 (main): Accept --version and --help options.
12238
aeb75bf5
DJ
122392008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12240
12241 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12242 (arm_breakpoint_at): Handle Thumb.
12243 (the_low_target): Add comment.
12244
76b233dd
UW
122452008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12246
12247 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12248
08388c79
DE
122492008-05-09 Doug Evans <dje@google.com>
12250
a3c83fae
DE
12251 * server.h (decode_search_memory_packet): Declare.
12252 * remote-utils.c (decode_search_memory_packet): New fn.
12253 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12254 (handle_search_memory): New fn.
12255 (handle_query): Process qSearch:memory packets.
12256
bb9c3d36
UW
122572008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12258
12259 * regcache.c (registers_length): Remove.
12260 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12261 full register packet.
12262 * regcache.h (registers_length): Remove prototype.
12263 * server.h (PBUFSIZ): Define to 16384.
12264
7284e1be
UW
122652008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12266
12267 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12268 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12269 powerpc-64l.o, and powerpc-altivec64l.o.
12270 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12271 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12272 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12273 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12274 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12275 to srv_xmlfiles.
12276
12277 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12278 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12279 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12280 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12281 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12282 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12283 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12284 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12285 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12286 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12287 (clean): Update.
12288
12289 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12290 (init_registers_powerpc_32l): ... this new prototype.
12291 (init_registers_powerpc_32): Remove, replace by ...
12292 (init_registers_powerpc_altivec32l): ... this new prototype.
12293 (init_registers_powerpc_e500): Remove, replace by ...
12294 (init_registers_powerpc_e500l): ... this new prototype.
12295 (init_registers_ppc64): Remove, replace by ...
12296 (init_registers_powerpc_64l): ... this new prototype.
12297 (init_registers_powerpc_64): Remove, replace by ...
12298 (init_registers_powerpc_altivec64l): ... this new prototype.
12299 (ppc_num_regs): Set to 73.
12300 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12301 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12302 (ppc_cannot_store_register): Handle orig_r3 and trap.
12303 (ppc_arch_setup): Update init_registers_... calls.
12304 (ppc_fill_gregset): Handle orig_r3 and trap.
12305
12306 * inferiors.c (clear_inferiors): Reset current_inferior.
12307
fdc59709
PB
123082008-04-23 Paolo Bonzini <bonzini@gnu.org>
12309
889bf7c5
PA
12310 * acinclude.m4: Add override.m4.
12311 * configure: Regenerate.
fdc59709 12312
c9b2f845
UW
123132008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12314
12315 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12316 initial call to init_register_ppc64.
12317
550512b8
UW
123182008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12319
43aaf8b6
PA
12320 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12321 single powerpc*-*-linux* case.
550512b8
UW
12322 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12323
b6430ec3
UW
123242008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12325
12326 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12327 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12328 from reg_xmlfiles.
12329 * linux-ppc-low.c: Include <elf.h>.
12330 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12331 (ppc_hwcap): New global variable.
12332 (ppc_regmap): Remove __SPE__ #ifdef sections.
12333 (ppc_regmap_e500): New global variable.
12334 (ppc_cannot_store_register): Update __SPE__ special case.
12335 (ppc_get_hwcap): New function.
12336 (ppc_arch_setup): Use it to determine whether inferior supports
12337 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12338 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12339 Do not access registers if target does not support AltiVec.
12340 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12341 Do not access registers if target does not support SPE.
12342 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12343
52fa2412
UW
123442008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12345
12346 * linux-low.c (disabled_regsets, num_regsets): New.
12347 (use_regsets_p): Delete.
12348 (linux_wait_for_process): Clear disabled_regsets.
12349 (regsets_fetch_inferior_registers): Check and set it.
12350 (regsets_store_inferior_registers): Likewise.
12351 (linux_fetch_registers, linux_store_registers): Do not use
12352 use_regsets_p.
12353 (initialize_low): Allocate disabled_regsets.
12354
e28b3332
DJ
123552008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12356
12357 * Makefile.in (LIBOBJS): New.
12358 (OBS): Use LIBOBJS.
12359 (memmem.o): New rule.
12360 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12361 * configure: Regenerated.
12362
4536995d
UW
123632008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12364
12365 * server.c (handle_query): Never return "unsupported" for
12366 qXfer:features:read queries.
12367
221c031f
UW
123682008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12369
12370 * server.c (get_features_xml): Fix inverted condition.
12371 (handle_query): Always support qXfer:feature:read.
12372
ccd213ac
DJ
123732008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12374
12375 * server.c (wrapper_argv): New.
12376 (start_inferior): Handle wrapper_argv. If set, expect an extra
12377 trap.
12378 (gdbserver_usage): Document --wrapper.
12379 (main): Parse --wrapper.
12380
6fe305f7
UW
123812008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12382
12383 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12384 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12385 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12386 (ppc_set_pc): Likewise.
12387 (ppc_arch_setup): New function.
12388 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12389 of collect_register.
889bf7c5 12390 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12391
5b0a002e
UW
123922008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12393
12394 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12395 instead of linux-ppc64-low.o.
12396 * linux-ppc64-low.c: Remove file.
12397 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12398 (linux-ppc64-low.o): Remove rule.
12399
12400 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12401 (init_registers_powerpc_64): Likewise.
12402 (ppc_regmap): Conditionally define depending on __powerpc64__.
12403 (ppc_cannot_store_register): Do not special-case "fpscr" when
12404 compiled on __powerpc64__.
12405 (ppc_collect_ptrace_register): New function.
12406 (ppc_supply_ptrace_register): New function.
12407 (ppc_breakpoint): Change type to "unsigned int".
12408 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12409 (the_low_target): Conditionally provide initializers for the
889bf7c5 12410 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12411 collect_ptrace_register and supply_ptrace_register members.
12412
9b4b61c8
UW
124132008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12414
12415 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12416 * server.c (gdbserver_xmltarget): Define.
12417 (get_features_xml): Use it to replace "target.xml" and arch_string.
12418
12419 * configure.srv: Remove srv_xmltarget. Add XML files that were
12420 mentioned there to srv_xmlfiles instead. Remove conditional tests
12421 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12422 srv_xmlfiles and srv_regobj to include all possible choices.
12423 * configure.ac (srv_xmltarget): Remove.
12424 (srv_xmlfiles): Do not add "target.xml".
12425 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12426 checks for supplementary target information.
12427 * configure: Regenerate.
12428 * Makefile.in (XML_TARGET): Remove.
12429 (target.xml): Remove rule.
12430 (clean): Do not clean up target.xml.
12431 (.PRECIOUS): Do not mention target.xml.
12432
12433 * target.h (struct target_ops): Remove arch_string member.
12434 * linux-low.c (linux_arch_string): Remove.
12435 (linux_target_ops): Remove arch_string initializer.
12436 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12437 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12438 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12439 * spu-low.c (spu_arch_string): Remove.
12440 (spu_target_ops): Remove arch_string initializer.
12441 * win32-low.c (win32_arch_string): Remove.
12442 (win32_target_ops): Remove arch_string initializer.
12443 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12444 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12445 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12446
ee1a7ae4
UW
124472008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12448
12449 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12450 by collect_ptrace_register and supply_ptrace_register hooks.
12451 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12452 instead of checking for the_low_target.left_pad_xfer.
12453 (usr_store_inferior_registers): Use collect_ptrace_register callback
12454 instead of checking for the_low_target.left_pad_xfer.
12455
12456 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12457 (s390_supply_ptrace_register): Likewise.
12458 (s390_fill_gregset): Call s390_collect_ptrace_register.
12459 (the_low_target): Update.
12460
12461 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12462 (ppc_supply_ptrace_register): Likewise.
12463 (the_low_target): Update.
12464
12465 * linux-i386-low.c (the_low_target): Update.
12466 * linux-x86-64-low.c (the_low_target): Update.
12467
d61ddec4
UW
124682008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12469
12470 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12471 reg-s390.o and reg-s390x.o.
12472
12473 * linux-low.c (new_inferior): New global variable.
12474 (linux_create_inferior, linux_attach): Set it.
12475 (linux_wait_for_process): Call the_low_target.arch_setup after the
12476 target has stopped for the first time.
12477 (initialize_low): Do not call the_low_target.arch_setup.
12478
12479 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12480 (s390_set_pc): Likewise.
12481 (s390_arch_setup): New function.
12482 (the_low_target): Use s390_arch_setup as arch_setup routine.
12483
12484 * regcache.c (realloc_register_cache): New function.
12485 (set_register_cache): Call it for each existing regcache.
12486
d05b4ac3
UW
124872008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12488
12489 * server.h (init_registers): Remove prototype.
12490
12491 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12492 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12493 instead of init_registers ().
12494 * linux-arm-low.c (init_registers_arm): Add prototype.
12495 (init_registers_arm_with_iwmmxt): Likewise.
12496 (the_low_target): Add initializer for arch_setup field.
12497 * linux-cris-low.c (init_registers_cris): Add prototype.
12498 (the_low_target): Add initializer for arch_setup field.
12499 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12500 (the_low_target): Add initializer for arch_setup field.
12501 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12502 (the_low_target): Add initializer for arch_setup field.
12503 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12504 (the_low_target): Add initializer for arch_setup field.
12505 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12506 (the_low_target): Add initializer for arch_setup field.
12507 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12508 (the_low_target): Add initializer for arch_setup field.
12509 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12510 (init_registers_mips64_linux): Likewise.
12511 (the_low_target): Add initializer for arch_setup field.
12512 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12513 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12514 (the_low_target): Add initializer for arch_setup field.
12515 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12516 (init_registers_powerpc_64): Likewise.
12517 (the_low_target): Add initializer for arch_setup field.
12518 * linux-s390-low.c (init_registers_s390): Add prototype.
12519 (init_registers_s390x): Likewise.
12520 (the_low_target): Add initializer for arch_setup field.
12521 * linux-sh-low.c (init_registers_sh): Add prototype.
12522 (the_low_target): Add initializer for arch_setup field.
12523 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12524 (the_low_target): Add initializer for arch_setup field.
12525 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12526 (the_low_target): Add initializer for arch_setup field.
12527
12528 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12529 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12530 instead of init_registers ().
12531 * win32-arm-low.c (init_registers_arm): Add prototype.
12532 (the_low_target): Add initializer for arch_setup field.
12533 * win32-i386-low.c (init_registers_i386): Add prototype.
12534 (the_low_target): Add initializer for arch_setup field.
12535
12536 * spu-low.c (init_registers_spu): Add prototype.
12537 (initialize_low): Call initialie_registers_spu () instead of
12538 initialize_registers ().
12539
fd96d250
PA
125402008-02-19 Pedro Alves <pedro@codesourcery.com>
12541
12542 * server.c (handle_v_requests): When handling the vRun and vAttach
12543 packets, if already debugging a process, don't kill it. Return an
12544 error instead.
12545
d41b6bb4
DJ
125462008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12547
12548 * server.c (handle_query): Correct length check.
12549
5ac588cf
PA
125502008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12551
12552 * win32-low.c (do_initial_child_stuff): Add process handle
12553 parameter. Set current_process_handle and current_process_id from the
12554 parameters. Clear globals.
12555 (win32_create_inferior): Don't set current_process_handle and
12556 current_process_id here. Instead pass them on the call to
12557 do_initial_child_stuff.
12558 (win32_attach): Likewise.
12559 (win32_clear_inferiors): New.
12560 (win32_kill): Don't close the current process handle or the
12561 current thread handle here. Instead call win32_clear_inferiors.
12562 (win32_detach): Don't open a new handle to the process. Call
12563 win32_clear_inferiors.
12564 (win32_join): Don't rely on current_process_handle; open a new
12565 handle using the process id.
12566 (win32_wait): Call win32_clear_inferiors when the inferior process
12567 has exited.
12568
ecd7ecbc
DJ
125692008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12570
12571 * server.c (monitor_show_help): Add "exit".
12572
1525d545
MG
125732008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12574
ecd7ecbc 12575 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12576 (clean): Add reg-xtensa.c.
12577 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12578 * configure.srv (xtensa*-*-linux*) New target.
12579 * linux-xtensa-low.c: New.
12580 * xtensa-xtregs.c: New.
1525d545 12581
59a016f0
PA
125822008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12583
12584 * hostio.c: Don't include errno.h.
12585 (errno_to_fileio_errno): Move to hostio-errno.
12586 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12587 error number outputting to the target->hostio_last_error callback.
12588 (hostio_packet_error): Use FILEIO_EINVAL directly.
12589 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12590 calls to hostio_error.
12591 * hostio-errno.c: New.
12592 * server.h (hostio_last_error_from_errno): Declare.
12593 * target.h (target_ops): Add hostio_last_error member.
12594 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12595 as hostio_last_error handler.
889bf7c5 12596 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12597 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12598 (wince_hostio_last_error): New functions.
12599 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12600 as hostio_last_error handler.
12601 (win32_target_ops) [!_WIN32_WCE]: Register
12602 hostio_last_error_from_errno as hostio_last_error handler.
12603 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12604 (hostio-errno.o): New rule.
12605 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12606 * configure.srv (srv_hostio_err_objs): New variable. Default to
12607 hostio-errno.o.
12608 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12609 * configure: Regenerate.
12610
2d717e4f
DJ
126112008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12612
12613 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12614 (linux_kill, linux_detach): Clean up the process list.
12615 * remote-utils.c (remote_open): Improve port number parsing.
12616 (putpkt_binary, input_interrupt): Only send interrupts if the target
12617 is running.
12618 * server.c (extended_protocol): Make static.
12619 (attached): Define earlier.
12620 (exit_requested, response_needed, program_argv): New variables.
12621 (target_running): New.
12622 (start_inferior): Clear attached here.
12623 (attach_inferior): Set attached here.
12624 (require_running): Define.
12625 (handle_query): Use require_running and target_running. Implement
12626 "monitor exit".
12627 (handle_v_attach, handle_v_run): New.
12628 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12629 (gdbserver_usage): Update.
12630 (main): Redo argument parsing. Handle --debug and --multi. Handle
12631 --attach along with other options or after the port. Save
12632 program_argv. Support no initial program. Resynchronize
12633 communication with GDB after an error. Handle "monitor exit".
12634 Use require_running and target_running. Always allow the extended
12635 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12636 restart in extended mode.
12637 * README: Refer to the GDB manual. Update --attach usage.
12638
7407e2de
AS
126392007-12-20 Andreas Schwab <schwab@suse.de>
12640
12641 * linux-low.c (STACK_SIZE): Define.
12642 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12643 (linux_test_for_tracefork): Likewise.
12644
b65d95c5
DJ
126452007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12646
12647 * linux-low.c (linux_wait_for_event): Update messages. Do not
12648 reinsert auto-delete breakpoints.
12649 * mem-break.c (struct breakpoint): Change return type of handler to
12650 int.
12651 (set_breakpoint_at): Update handler type.
12652 (reinsert_breakpoint_handler): Return 1 instead of calling
12653 delete_breakpoint.
12654 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12655 setting a new one.
12656 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12657 * mem-break.h (set_breakpoint_at): Update handler type.
12658 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12659 * win32-low.c (auto_delete_breakpoint): New.
12660 (get_child_debug_event): Use it.
12661
4e799345
DJ
126622007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12663
12664 * configure.ac: Check for pread and pwrite.
12665 * hostio.c (handle_pread): Fall back to lseek and read.
12666 (handle_pwrite): Fall back to lseek and write.
12667 * config.in, configure: Regenerated.
12668
27524b67
DJ
126692007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12670
12671 * server.c (myresume): Add own_buf argument.
12672 (main): Update calls.
12673
a20d5e98
DJ
126742007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12675
12676 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12677 * remote-utils.c (remote_open): Do not call disable_async_io.
12678 (block_async_io): Delete.
12679 (unblock_async_io): Make static.
12680 (initialize_async_io): New.
12681 * server.c (handle_v_cont): Handle async I/O here.
12682 (myresume): Likewise. Move other common resume tasks here...
12683 (main): ... from here. Call initialize_async_io. Disable async
12684 I/O before the main loop.
12685 * server.h (initialize_async_io): Declare.
12686 (block_async_io, unblock_async_io): Delete prototypes.
12687 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12688
b79d787e
DJ
126892007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12690
12691 * remote-utils.c (readchar): Allow binary data in received messages.
12692
d97903b2
PA
126932007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12694
12695 * win32-low.c (attaching): New global.
12696 (win32_create_inferior): Clear the `attaching' global.
12697 (win32_attach): Set the `attaching' global.
12698 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12699 attaching. Only set a breakpoint at the entry point if not
12700 attaching.
12701
311de423
PA
127022007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12703
12704 * server.c (main): Don't report dll events on the initial
12705 connection on attaches.
12706
6c2d16d2
PA
127072007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12708
12709 * server.c (main): Relax numerical bases supported for the pid of
12710 the --attach command line argument.
12711
5ca906e6
PA
127122007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12713
12714 * win32-low.c (win32_attach): Call OpenProcess before
12715 DebugActiveProcess, not after. Add last error output to error
12716 call.
12717
9c6c8194
PA
127182007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12719
12720 * win32-low.c (win32_get_thread_context)
12721 (win32_set_thread_context): New functions.
12722 (thread_rec): Use win32_get_thread_context.
12723 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12724 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12725 field.
12726
4d5d1aaa
PA
127272007-12-03 Leo Zayas
12728 Pedro Alves <pedro_alves@portugalmail.pt>
12729
12730 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12731 global variables.
12732 (child_add_thread): Minor cleanup.
12733 (child_continue): Resume artificially suspended threads before
12734 calling ContinueDebugEvent.
12735 (suspend_one_thread): New.
12736 (fake_breakpoint_event): New.
12737 (get_child_debug_event): Change return type to int. Check here if
12738 gdb sent an interrupt request. If a soft interrupt was requested,
12739 fake a breakpoint event. Return 0 if there is no event to handle,
12740 and 1 otherwise.
12741 (win32_wait): Don't check here if gdb sent an interrupt request.
12742 Ensure there is a valid event to handle.
12743 (win32_request_interrupt): Add soft interruption method as last
12744 resort.
12745
c436e841
PA
127462007-12-03 Leo Zayas
12747 Pedro Alves <pedro_alves@portugalmail.pt>
12748
12749 * win32-low.h (win32_thread_info): Add descriptions to the
12750 structure members. Replace `suspend_count' counter by a
12751 `suspended' flag.
12752 * win32-low.c (thread_rec): Update condition of when to get the
12753 context from the inferior. Rely on ContextFlags being set if it
12754 has already been retrieved. Only suspend the inferior thread if
12755 we haven't already. Warn if that fails.
12756 (continue_one_thread): s/suspend_count/suspended/. Only call
12757 ResumeThread once. Warn if that fails.
12758
e7b5fa67
PA
127592007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12760
12761 * win32-low.c (win32_wait): Don't read from the inferior when it
12762 has already exited.
12763
a385171d
PA
127642007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12765
12766 * Makefile.in (win32_low_h): New variable.
12767 (win32-low.o): Add dependency on $(win32_low_h).
12768 (win32-arm-low.o, win32-i386-low.o): New rules.
12769
f80c84b3
DJ
127702007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12771
12772 * hostio.c: Correct copyright year.
12773
a6b151f1
DJ
127742007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12775
12776 * Makefile.in (OBS): Add hostio.o.
12777 (hostio.o): New rule.
12778 * server.h (handle_vFile): Declare.
12779 * hostio.c: New file.
12780 * server.c (handle_v_requests): Take packet_len and new_packet_len
12781 for binary packets. Call handle_vFile.
12782 (main): Update call to handle_v_requests.
12783
f9387fc3
DJ
127842007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12785
12786 * linux-low.c: Include <sched.h>.
12787
51c2684e
DJ
127882007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12789
12790 * linux-low.c (linux_tracefork_grandchild): New.
12791 (linux_tracefork_child): Use clone.
12792 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12793
75f83163
JB
127942007-10-31 Joel Brobecker <brobecker@adacore.com>
12795
12796 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12797
da5898ce
DJ
127982007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12799
12800 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12801
24a09b5f
DJ
128022007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12803
12804 * inferiors.c (change_inferior_id): Delete.
12805 (add_pid_to_list, pull_pid_from_list): New.
12806 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12807 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12808 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12809 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12810 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12811 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12812 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12813 (using_threads): Always set to 1.
12814 (handle_extended_wait): New.
12815 (add_process): Do not set TID.
12816 (linux_create_inferior): Set must_set_ptrace_flags.
12817 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12818 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12819 (linux_thread_alive): Rename TID argument to LWPID.
12820 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12821 (linux_wait_for_event): Do not use TID or check using_threads. Update
12822 call to dead_thread_notify. Call handle_extended_wait.
12823 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12824 (send_sigstop): Delete sigstop_sent.
12825 (wait_for_sigstop): Avoid TID.
12826 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12827 (linux_test_for_tracefork): New.
12828 (linux_lookup_signals): Use thread_db_active and
12829 linux_supports_tracefork_flag.
12830 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12831 * linux-low.h (get_process_thread): Avoid TID.
12832 (struct process_ifo): Move thread_known and tid to the end. Remove
12833 sigstop_sent.
12834 (linux_attach_lwp, thread_db_init): Update prototypes.
12835 * server.h (change_inferior_id): Delete prototype.
12836 (add_pid_to_list, pull_pid_from_list): New prototypes.
12837 * thread-db.c (thread_db_use_events): New.
12838 (find_first_thread): Rename to...
12839 (find_one_thread): ...this. Update callers and messages. Do not
12840 call fatal. Check thread_db_use_events. Do not call
12841 change_inferior_id or new_thread_notify.
12842 (maybe_attach_thread): Update. Do not call new_thread_notify.
12843 (thread_db_init): Set thread_db_use_events. Check use_events.
12844 * utils.c (fatal, warning): Correct message prefix.
12845
30ed0a8f
DJ
128462007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12847
12848 * Makefile.in (clean): Remove new files.
12849 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12850 (powerpc-64.o, powerpc-64.c): New rules.
12851 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12852 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12853 with SPE.
12854 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12855 SPE targets.
12856 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12857 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12858 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12859 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12860 (target_regsets): Add AltiVec and SPE register sets.
12861 * configure.ac: Check for AltiVec and SPE.
12862 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12863 (ppc_fill_vrregset, ppc_store_vrregset): New.
12864 (target_regsets): Add AltiVec register set.
12865 * configure: Regenerated.
12866
fd462a61
DJ
128672007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12868
12869 * linux-low.c (O_LARGEFILE): Define.
12870 (linux_read_memory): Use /proc/PID/mem.
12871 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12872 * configure, config.in: Regenerated.
12873
69f223ed
DJ
128742007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12875
12876 * linux-low.c (linux_wait_for_event): Do not pass signals while
12877 single-stepping.
12878
aec18585
PA
128792007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12880
12881 * win32-low.c (create_process): New.
12882 (win32_create_inferior): Use create_process instead of
12883 CreateProcess. If create_process failed retry appending an ".exe"
12884 suffix. Store the GetLastError result immediatelly after
12885 create_process calls and use it on the call to error.
12886
34d86ddd
PA
128872007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12888
12889 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12890
5a0e3bd0
JB
128912007-08-23 Joel Brobecker <brobecker@adacore.com>
12892
12893 * configure.ac: Switch license to GPLv3.
12894
f88c79e6
MS
128952007-08-01 Michael Snyder <msnyder@access-company.com>
12896
12897 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12898
6b3d9b83
PA
128992007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12900
12901 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12902 typedef.
12903 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12904 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12905 CloseToolhelp32Snapshot.
12906 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12907 CloseToolhelp32Snapshot.
12908
c588c53c
MS
129092007-07-27 Michael Snyder <michael.snyder@access-company.com>
12910
12911 * server.c (main): Check for inferior exit before main loop.
12912
aa0403d9
PA
129132007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12914
12915 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12916 instead of on tmp_desc.
12917
255e7678
DJ
129182007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12919 Daniel Jacobowitz <dan@codesourcery.com>
12920
12921 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12922 (add_thread): Minor cleanups.
12923 (clear_inferiors): Move lower in the file. Clear the DLL
12924 list.
12925 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12926 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12927 (xml_escape_text): New.
12928 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12929 for qSupported.
12930 (handle_v_cont): Report errors.
12931 (gdbserver_version): Update.
12932 (main): Correct size of own_buf. Do not report initial DLL events.
12933 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12934 (unloaded_dll, xml_escape_text): New.
12935 * win32-low.c (enum target_waitkind): Update comments.
12936 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12937 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12938 (win32_EnumProcessModules, win32_GetModuleInformation)
12939 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12940 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12941 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12942 (win32_Module32First, win32_Module32Next, load_toolhelp)
12943 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12944 (get_child_debug_event): Handle DLL events.
12945 (win32_wait): Likewise.
12946
0d37add9
DJ
129472007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12948
12949 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12950 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12951
45e2715e
PA
129522007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12953
12954 * win32-low.c (handle_output_debug_string): Ignore event if not
12955 waiting.
12956
c5674cf1
PA
129572007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12958
12959 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12960
2bbe3cc1
DJ
129612007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12962
12963 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12964
ae13219e
DJ
129652007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12966
12967 * inferiors.c (change_inferior_id): Add comment.
12968 * linux-low.c (check_removed_breakpoint): Add an early
12969 prototype. Improve debug output.
12970 (linux_attach): Doc update.
12971 (linux_detach_one_process, linux_detach): Clean up before releasing
12972 each process.
12973 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12974 * linux-low.h (struct process_info): Doc improvement.
12975 * mem-break.c (delete_all_breakpoints): New.
12976 * mem-break.h (delete_all_breakpoints): New prototype.
12977 * thread-db.c (find_first_thread): New.
12978 (thread_db_create_event): Call it instead of
12979 thread_db_find_new_threads. Clean up unused variables.
12980 (maybe_attach_thread): Remove first thread handling.
12981 (thread_db_find_new_threads): Use find_first_thread.
12982 (thread_db_get_tls_address): Likewise.
12983
4105de34
DJ
129842007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12985
12986 * thread-db.c (thread_db_find_new_threads): Add prototype.
12987 (thread_db_create_event): Check for the main thread before adding
12988 a new thread.
12989 (maybe_attach_thread): Only enable event reporting if TID == 0.
12990 (thread_db_get_tls_address): Check for new threads.
12991
2b876972
DJ
129922007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12993
12994 * linux-low.c (linux_create_inferior): Try execv before execvp.
12995 * spu-low.c (spu_create_inferior): Likewise.
12996
7a245884
DJ
129972007-06-13 Mike Frysinger <vapier@gentoo.org>
12998
12999 * linux-low.c (linux_create_inferior): Change execv to execvp.
13000 * spu-low.c (spu_create_inferior): Likewies.
13001
117ce543
DJ
130022007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13003
13004 * Makefile.in (clean): Clean new files instead of deleted ones.
13005 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13006 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13007 rules.
13008 * configure.srv: Specify XML files and new regformats for MIPS and
13009 MIPS64 GNU/Linux.
13010 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13011 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13012 an entry for the restart register.
13013 (mips_cannot_fetch_register, mips_cannot_store_register)
13014 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13015 register names to match the XML descriptions.
13016 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13017 restart register instead of $0.
13018
0e7f50da
UW
130192007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13020 Markus Deuling <deuling@de.ibm.com>
13021
13022 * remote-utils.c (decode_xfer_write): New function.
13023 * server.h (decode_xfer_write): Add prototype.
13024 * server.c (handle_query): Add PACKET_LEN argument. Support
13025 qXfer:spu:read and qXfer:spu:write packets.
13026 (main): Pass packet_len to handle_query.
13027 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13028 * target.h (target_ops): Add qxfer_spu.
13029
374c1d38
UW
130302007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13031
13032 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13033 accessing non-seekable spufs files.
13034
bb63802a
UW
130352007-05-16 Markus Deuling <deuling@de.ibm.com>
13036
889bf7c5 13037 * server.c (handle_query): Add reply for qC packet.
bb63802a 13038
7390519e
PA
130392007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13040 Leo Zayas <lerele@champenstudios@com>
13041
13042 * server.h (check_remote_input_interrupt_request): New function.
13043 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13044 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13045 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13046 (check_remote_input_interrupt_request): New function.
13047 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13048 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13049 winapi_GenerateConsoleCtrlEvent): New typedefs.
13050 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13051 to 250 ms.
13052 (win32_wait): Check for remote interrupt request
13053 with check_remote_input_interrupt_request.
13054 (win32_request_interrupt): New function.
13055 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13056
34b34921
PA
130572007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13058
13059 * win32-low.c (debug_registers_changed,
13060 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13061 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13062 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13063 (thread_rec): Get context using the low target.
13064 (child_add_thread): Call thread_added on the low target,
13065 which does the same thing.
13066 (regptr): Delete.
13067 (do_initial_child_stuff): Remove debug registers references.
13068 Set context using the low target. Resume threads after
13069 setting the contexts.
13070 (child_continue): Remove dead variable. Remove debug
13071 registers references.
13072 (child_fetch_inferior_registers): Go through the low target.
13073 (do_child_store_inferior_registers): Remove.
13074 (child_store_inferior_registers): Go through the low target.
13075 (win32_resume): Remove debug registers references.
13076 Set context using the low target.
13077 (handle_exception): Change return type to void. Don't record
13078 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13079 first chance exception.
889bf7c5 13080 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13081 goto loop. Always return after waiting for debug event.
13082 (win32_wait): Convert to switch statement. Handle spurious
13083 events.
13084
13085 * win32-i386-low.c (debug_registers_changed,
13086 debug_registers_used): New.
13087 (initial_stuff): Rename to ...
13088 (i386_initial_stuff): ... this. Clear debug registers
13089 state variables.
13090 (store_debug_registers): Delete.
13091 (i386_get_thread_context): New.
13092 (load_debug_registers): Delete.
13093 (i386_set_thread_context): New.
13094 (i386_thread_added): New.
13095 (single_step): Rename to ...
13096 (i386_single_step): ... this.
13097 (do_fetch_inferior_registers): Rename to ...
13098 (i386_fetch_inferior_register): ... this.
13099 (i386_store_inferior_register): New.
13100 (the_low_target): Adapt to new interface.
13101
13102 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13103 (arm_get_thread_context): New.
13104 (arm_set_thread_context): New.
13105 (regptr): New.
13106 (do_fetch_inferior_registers): Rename to ...
13107 (arm_fetch_inferior_register): ... this.
13108 (arm_store_inferior_register): New.
13109 (arm_wince_breakpoint): Reimplement as unsigned long.
13110 (arm_wince_breakpoint_len): Define.
13111 (the_low_target): Adapt to new interface.
13112
13113 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13114 load_debug_registers. Add get_thread_context, set_thread_context,
13115 thread_added and store_inferior_register. Rename
13116 fetch_inferior_registers to fetch_inferior_register.
13117 (regptr): Remove declaration.
13118
dd6953e1
PA
131192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13120
13121 * linux-low.c (linux_detach): Change return type to int. Return 0.
13122 * spu-low.c (spu_detach): Likewise.
13123
444d6139
PA
131242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13125
13126 * target.h (target_ops): Change return type of detach to int.
13127 Add join.
13128 (join_inferior): New.
13129 * server.c (main): Don't skip detach support on mingw32.
13130 If the inferior doesn't support detaching return error.
13131 Call join_inferior instead of using waitpid.
13132 * linux-low.c (linux_join): New.
13133 (linux_target_op): Add linux_join.
13134 * spu-low.c (spu_join): New.
13135 (spu_target_ops): Add spu_join.
13136 * win32-low.c (win32_detach): Adapt to new interface.
13137 Reopen current_process_handle before detaching. Issue a child
13138 resume before detaching.
13139 (win32_join): New.
13140 (win32_target_op): Add win32_join.
13141
1d5315fe
PA
131422007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13143
13144 * win32-low.c (win32-attach): Fix return value.
13145 * target.h (target_ops): Describe ATTACH return values.
13146
bf914831
PA
131472007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13148
13149 * win32-low.c (GETPROCADDRESS): Define.
13150 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13151 (winapi_DebugSetProcessKillOnExit): Likewise.
13152 (win32_create_inferior): Force usage of ansi CreateProcessA.
13153 (win32_attach): Use GETPROCADDRESS.
13154 (win32_detach): Likewise.
13155
f72f3e60
PA
131562007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13157
13158 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13159
ed50f18f
PA
131602007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13161
13162 * win32-low.c: Commit leftover changes from 2007-03-29.
13163
0c2ead7e
DJ
131642007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13165
13166 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13167 fields short instead of int. Add explicit padding.
13168 (i387_cache_to_fsave): Remove unnecessary casts.
13169 (i387_fsave_to_cache): Doc fix.
13170 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13171
73725ff3
DJ
131722007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13173
13174 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13175 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13176
d99f33d8
PA
131772007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13178
13179 * configure.srv (arm*-*-mingw32ce*): Move near the other
13180 arm targets.
13181
68070c10
PA
131822007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13183
2482afc6 13184 * configure.ac: Add errno checking.
68070c10
PA
13185 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13186 sys/file.h and malloc.h.
13187 (AC_CHECK_DECLS): Add perror.
13188 (srv_mingwce): Handle.
2482afc6 13189 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13190 win32-i386-low.o to srv_tgtobj.
13191 (i[34567]86-*-mingw*): Likewise.
13192 (arm*-*-mingw32ce*): Add case.
13193 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13194 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13195 [__MINGW32CE__] (strerror): New function.
13196 [__MINGW32CE__] (errno): Define to GetLastError.
13197 [__MINGW32CE__] (COUNTOF): New macro.
13198 (remote_open): Remove extra close call.
13199 * mem-break.c (delete_breakpoint_at): New function.
13200 * mem-break.h (delete_breakpoint_at): Declare.
13201 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13202 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13203 [USE_WIN32API] (read, write): Add char* casts.
13204 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13205 * server.h: Include wincecompat.h on Windows CE.
13206 [HAVE_ERRNO_H]: Check.
13207 (perror): Declare if not declared.
13208 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13209 (perror_with_name): Remove errno declaration.
13210 * wincecompat.h: New.
13211 * wincecompat.c: New.
13212 * win32-low.h: New.
13213 * win32-arm-low.c: New.
13214 * win32-i386-low.c: New.
13215 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13216 (OUTMSG2): Make it safe.
13217 (_T): New macro.
13218 (COUNTOF): New macro.
13219 (NUM_REGS): Get it from the low target.
13220 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13221 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13222 (thread_rec): Let low target handle debug registers.
13223 (child_add_thread): Likewise.
13224 (child_init_thread_list): Likewise.
13225 (continue_one_thread): Likewise.
13226 (regptr): New.
13227 (do_child_fetch_inferior_registers): Move to ...
13228 * win32-i386-low.c: ... here, and rename to ...
13229 (do_fetch_inferior_registers): ... this.
889bf7c5 13230 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13231 Go through the low target.
13232 (do_child_store_inferior_registers): Use regptr.
13233 (strwinerror): New function.
13234 (win32_create_inferior): Handle Windows CE.
13235 Use strwinerror instead of strerror on Windows error
13236 codes. Add program to the error output.
13237 Don't close the main thread handle on Windows CE.
13238 (win32_attach): Use coredll.dll on Windows CE.
13239 (win32_kill): Close current process and current
13240 thread handles.
13241 (win32_detach): Use coredll.dll on Windows CE.
13242 (win32_resume): Let low target handle debug registers, and
13243 step request.
13244 (handle_exception): Add/Remove initial breakpoint. Avoid
13245 non-existant WSTOPSIG on Windows CE.
13246 (win32_read_inferior_memory): Cast to remove warning.
13247 (win32_arch_string): Go through the low target.
13248 (initialize_low): Call set_breakpoint_data with the low
13249 target's breakpoint.
13250 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13251 FOP_REGNUM, mappings): Move to ...
13252 * win32-i386-low.c: ... here.
13253 * win32-low.c (win32_thread_info): Move to ...
13254 * win32-low.h: ... here.
13255 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13256 win32-arm-low.c and wincecompat.c.
13257 (all:): Add $EXEEXT.
13258 (install-only:): Likewise.
13259 (gdbserver:): Likewise.
13260 (gdbreplay:): Likewise.
13261 * config.in: Regenerate.
13262 * configure: Regenerate.
13263
41093d81
PA
132642007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13265
13266 * win32-low.c: Rename typedef thread_info to
13267 win32_thread_info throughout.
13268
544afa54
PA
132692007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13270
13271 * win32-i386-low.c: Rename to ...
13272 * win32-low.c: ... this.
13273 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13274 * Makefile.in: Likewise.
13275
bce7165d
PA
132762007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13277
13278 * remote-utils.c (monitor_output): Constify msg parameter.
13279 * server.h (monitor_output): Likewise.
13280 * win32-i386-low.c (handle_output_debug_string): New.
13281 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13282 handle_output_debug_string.
13283 (get_child_debug_event): Likewise.
13284
506c7aa0
DJ
132852007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13286
13287 * server.c (main): Correct strtoul check.
13288
42c81e2a
DJ
132892007-03-27 Jon Ringle <jon@ringle.org>
13290
13291 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13292
9453113a
DJ
132932007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13294
13295 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13296
64a69107
DJ
132972007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13298
13299 * terminal.h: Check HAVE_SGTTY_H.
13300
133012007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13302
13303 * remote-utils.c (remote_open): Print out the assigned port number.
13304
c74d0ad8
DJ
133052007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13306
13307 * remote-utils.c (monitor_output): New function.
13308 * server.c (debug_threads): Define here.
13309 (monitor_show_help): New function.
13310 (handle_query): Handle qRcmd.
13311 (main): Do not handle 'd' packet.
13312 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13313 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13314 of debug_threads.
13315
de7c3b4a
PA
133162007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13317
13318 * Makefile.in (EXEEXT): New.
13319 (clean): Use $(EXEEXT).
13320
ef57601b
PA
133212007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13322
13323 * target.h (target_ops): Rename send_signal to request_interrupt,
13324 and remove enum target_signal parameter.
13325 * linux-low.c (linux_request_interrupt): Rename from
13326 linux_send_signal, and always send SIGINT.
13327 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13328 and always send SIGINT.
13329 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13330 of send_signal.
13331 (input_interrupt): Likewise.
13332
820f2bda
PA
133332007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13334
13335 * server.c (get_features_xml): Check if target implemented
13336 arch_string.
13337 * win32-i386-low.c (win32_arch_string): New.
13338 (win32_target_ops): Add win32_arch_string as arch_string member.
13339
ab39bf24
UW
133402007-02-22 Markus Deuling <deuling@de.ibm.com>
13341
13342 * spu-low.c (spu_arch_string): New.
13343 (spu_target_ops): Add spu_arch_string.
13344
61ff6e04
DJ
133452007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13346
13347 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13348 * configure.ac: Do not check for terminal.h.
13349 * configure, config.in: Regenerated.
13350
fb1e4ffc
DJ
133512007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13352
13353 * Makefile.in (OBS): Add $(XML_BUILTIN).
13354 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13355 (clean): Update.
13356 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13357 (arm-with-iwmmxt.c): New.
13358 * config.in, configure: Regenerate.
13359 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13360 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13361 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13362 (arm*-*-linux*): Add iWMMXt and regset support.
13363 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13364 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13365 (arm_store_wmmxregset, target_regsets): New.
13366 * server.c (get_features_xml): Take annex argument. Check builtin
13367 XML documents.
13368 (handle_query): Handle multiple annexes.
13369
0f48aa01
DJ
133702007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13371
13372 * remote-utils.c [USE_WIN32API] (read, write): Define.
13373 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13374 write.
13375
23181151
DJ
133762007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13377
13378 * linux-i386-low.c (the_low_target): Set arch_string.
13379 * linux-x86-64-low.c (the_low_target): Likewise.
13380 * linux-low.c (linux_arch_string): New.
13381 (linux_target_ops): Add it.
13382 * linux-low.h (struct linux_target_ops): Add arch_string.
13383 * server.c (write_qxfer_response): Use const void * for DATA.
13384 (get_features_xml): New.
13385 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13386 * target.h (struct target_ops): Add arch_string method.
13387
9d606399
DJ
133882007-01-03 Denis Pilat <denis.pilat@st.com>
13389 Daniel Jacobowitz <dan@codesourcery.com>
13390
13391 * linux-low.c (linux_kill): Handle being called with no threads.
13392 * win32-i386-low.c (win32_kill): Likewise.
13393 (get_child_debug_event): Clear current_process_handle.
13394
133952006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13396 Daniel Jacobowitz <dan@codesourcery.com>
13397
13398 * remote-utils.c (remote_open): Check the type of specified
13399 serial port devices before opening them.
13400 * server.c (main): Kill the inferior if an error occurs during
13401 the first remote_open.
13402
a5e13d24
DJ
134032006-12-05 Markus Deuling <deuling@de.ibm.com>
13404
13405 * README: Update supported targets.
13406
186947f7
DJ
134072006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13408
13409 * Makefile.in (clean): Remove reg-mips64.c.
13410 (reg-mips64.c, reg-mips64.o): New rules.
13411 * configure.srv: Handle mips64. Include regset support for mips.
13412 * linux-mips-low.c (union mips_register): New.
13413 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13414 (mips_breakpoint, mips_breakpoint_at): Use int.
13415 (mips_collect_register, mips_supply_register)
13416 (mips_collect_register_32bit, mips_supply_register_32bit)
13417 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13418 (mips_store_fpregset, target_regsets): New.
13419 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13420
a13e2c95
UW
134212006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13422
13423 * configure.srv: Add target "spu*-*-*".
13424 * Makefile.in (clean): Remove reg-spu.c.
13425 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13426 * spu-low.c: New file.
13427
cb7283db
DJ
134282006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13429
13430 * configure.ac: Correct td_thr_tls_get_addr test.
13431 * configure: Regenerated.
13432
89be2091
DJ
134332006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13434
13435 * linux-low.c (linux_wait_for_event): Reformat. Use the
13436 pass_signals array.
13437 * remote-utils.c (decode_address_to_semicolon): New.
13438 * server.c (pass_signals, handle_general_set): New.
13439 (handle_query): Mention QPassSignals for qSupported.
13440 (main): Call handle_general_set.
13441 * server.h (pass_signals, decode_address_to_semicolon): New.
13442
000ef4f0
DJ
134432006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13444
13445 * server.c (handle_query): Correct error handling for read_auxv.
13446
b7149293
UW
134472005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13448
13449 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13450 and srv_linux_thread_db to yes.
13451 * linux-s390-low.c (s390_fill_gregset): New function.
13452 (target_regsets): Define data structure.
13453
dae5f5cf
DJ
134542006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13455
13456 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13457 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13458 * config.in, configure: Regenerated.
13459 * inferiors.c (gdb_id_to_thread): New function.
13460 (gdb_id_to_thread_id): Use it.
13461 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13462 * linux-low.h (struct process_info): Add th member.
13463 (thread_db_get_tls_address): New prototype.
13464 * remote-utils.c (decode_address): Make non-static.
13465 * server.c (handle_query): Handle qGetTLSAddr.
13466 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13467 * target.h (struct target_ops): Add get_tls_address.
13468 * thread-db.c (maybe_attach_thread): Save the thread handle.
13469 (thread_db_get_tls_address): New.
13470
32ca6d61
DJ
134712006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13472
13473 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13474 (linux_resume_one_process): Take a siginfo_t *. Update all
13475 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13476 (struct pending_signals): Add a siginfo_t.
13477 (linux_wait_for_process): Always set last_status.
13478 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13479 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13480 * linux-low.h (struct process_info): Add last_status.
13481
5ffff7c1
DJ
134822006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13483
13484 * remote-utils.c (try_rle): New function.
13485 (putpkt_binary): Use it.
13486
8695c747
DJ
134872006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13488
13489 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13490 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13491 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13492 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13493 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13494 point registers.
13495
290fadea
RS
134962006-08-08 Richard Sandiford <richard@codesourcery.com>
13497
13498 * server.c (terminal_fd): New variable.
13499 (old_foreground_pgrp): Likewise.
13500 (restore_old_foreground_pgrp): New function.
13501 (start_inferior): Record the terminal file descriptor in terminal_fd
13502 and its original foreground group in old_foreground_pgrp. Register
13503 restore_old_foreground_pgrp with atexit().
13504
9f2e1e63
DJ
135052006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13506
13507 * server.c (handle_query): Correct qPart to qXfer.
13508
b80864fb
DJ
135092006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13510
13511 * configure.ac: Check for more headers which are missing on
13512 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13513 * configure.srv: Add Cygwin and mingw32.
13514 * remote-utils.c: Don't include headers unconditionally which
13515 are missing on mingw32. Include <winsock.h> for mingw32.
13516 (remote_open): Adjust for mingw32 support. Flush
13517 standard error after writing to it.
13518 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13519 (unblock_async_io, enable_async_io, disable_async_io)
13520 (readchar, getpkt): Update for Winsock support.
13521 (prepare_resume_reply): Expect a protocol signal number.
13522 * server.c: Disable <sys/wait.h> on mingw32.
13523 (start_inferior): Adjust for mingw32 support. Flush
13524 standard error after writing to it.
13525 (attach_inferior): Likewise. Use protocol signal
13526 numbers.
13527 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13528 and names.
13529 * win32-i386-low.c: New file.
13530 * Makefile.in (XM_CLIBS): Set.
13531 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13532 (win32-i386-low.o): New dependency rule.
13533 * linux-low.c (linux_wait): Use target signal numbers.
13534 * target.h (struct target_ops): Doc fix.
13535 * server.h (target_signal_to_name): New prototype.
13536 * gdbreplay.c: Don't include headers unconditionally which
13537 are missing on mingw32. Include <winsock.h> for mingw32.
13538 (remote_close, remote_open): Adjust for Winsock support.
13539 * configure, config.in: Regenerated.
13540
0876f84a
DJ
135412006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13542
13543 * server.c (decode_xfer_read, write_qxfer_response): New.
13544 (handle_query): Take a packet length argument. Handle
13545 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13546 the qSupported response.
13547 (main): Update call to handle_query.
13548
01f9e8fa
DJ
135492006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13550
13551 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13552 (putpkt_binary): Renamed from putpkt and adjusted for binary
13553 data.
13554 (putpkt): New wrapper for putpkt_binary.
13555 (readchar): Don't mask off the high bit.
13556 (decode_X_packet): New function.
13557 * server.c (main): Call putpkt_binary if a handler sets the packet
13558 length. Save the length of the incoming packet. Handle 'X'.
13559 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13560
be2a5f71
DJ
135612006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13562
13563 * server.c (handle_query): Handle qSupported.
13564
ea025f5f
DJ
135652006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13566
13567 * remote-utils.c (all_symbols_looked_up): New variable.
13568 (look_up_one_symbol): Check it.
13569 * server.h (look_up_one_symbol): New declaration.
13570 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13571
9308fc88
DJ
135722006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13573
13574 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13575 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13576 (PTRACE_GET_THREAD_AREA): Define.
13577 (ps_get_thread_area): New function.
13578
52fb6437
NS
135792006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13580
13581 * configure.srv (m68k*-*-uclinux*): New target.
13582 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13583 (linux_resume_one_process): Remove extraneous cast.
13584 (linux_read_offsets): New.
13585 (linux_target_op): Add linux_read_offsets on mmuless systems.
13586 * server.c (handle_query): Add qOffsets logic.
13587 * target.h (struct target_ops): Add read_offsets.
13588
21b0f40c
DJ
135892006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13590
13591 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13592 (PTRACE_GET_THREAD_AREA): Define.
13593 (ps_get_thread_area): New function.
13594 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13595 (linux-x86-64-low.o): Update.
13596
0050a760
DJ
135972006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13598
13599 * configure.ac: Remove checks for prfpregset_t.
13600 * gdb_proc_service.h: New file.
13601 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13602 new "gdb_proc_service.h".
13603 * proc-service.c: Likewise.
13604 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13605 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13606 * Makefile.in (gdb_proc_service_h): Updated.
13607 * configure, config.in: Regenerated.
13608
b92a518e
DJ
136092006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13610
13611 * remote-utils.c (prepare_resume_reply): Move declaration
13612 of gdb_id_from_wait to the top of the block.
13613
545587ee
DJ
136142006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13615
13616 * linux-low.c (regsets_store_inferior_registers): Read the regset
13617 from the target before filling it.
13618
9db87ebd
DJ
136192006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13620
13621 * server.c (attach_inferior): Return SIGTRAP for a successful
13622 attach.
13623
dd24457d
DJ
136242006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13625
13626 * Makefile.in (OBS): Add version.o.
13627 (STAGESTUFF): Delete.
13628 (version.o): Add dependencies.
13629 (version.c): Replace rule.
13630 (clean): Remove version.c.
13631 * server.c (gdbserver_version): New.
13632 (gdbserver_usage): Use printf.
13633 (main): Handle --version and --help.
13634 * server.h (version, host_name): Add declarations.
13635
6f0f660e
EZ
136362005-12-23 Eli Zaretskii <eliz@gnu.org>
13637
889bf7c5
PA
13638 * linux-arm-low.c:
13639 * linux-arm-low.c:
13640 * inferiors.c:
13641 * i387-fp.h:
13642 * i387-fp.c:
13643 * gdbreplay.c:
13644 * regcache.c:
13645 * proc-service.c:
13646 * mem-break.h:
13647 * mem-break.c:
13648 * linux-x86-64-low.c:
13649 * linux-sh-low.c:
13650 * linux-s390-low.c:
13651 * linux-ppc64-low.c:
13652 * linux-ppc-low.c:
13653 * linux-mips-low.c:
13654 * linux-m68k-low.c:
13655 * linux-m32r-low.c:
13656 * linux-low.h:
13657 * linux-low.c:
13658 * linux-ia64-low.c:
13659 * linux-i386-low.c:
13660 * linux-crisv32-low.c:
13661 * thread-db.c:
13662 * terminal.h:
13663 * target.h:
13664 * target.c:
13665 * server.h:
13666 * server.c:
13667 * remote-utils.c:
13668 * regcache.h:
13669 * utils.c:
13670 * Makefile.in:
13671 * configure.ac:
6f0f660e
EZ
13672 * gdbserver.1: Add (C) after Copyright. Update the FSF
13673 address.
13674
9d1fb177
DJ
136752005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13676
13677 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13678 (arm_breakpoint_at): Recognize both breakpoints.
13679 (the_low_target): Use the correct breakpoint instruction.
13680
011a70c2
DJ
136812005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13682
13683 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13684 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13685 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13686 (the_low_target): Update.
13687
7fb85e41
AS
136882005-10-25 Andreas Schwab <schwab@suse.de>
13689
13690 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13691
13692 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13693 (ia64_num_regs): Reduce to 462.
13694
3db0444b
DJ
136952005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13696
13697 * acinclude.m4: Correct quoting.
13698 * aclocal.m4: Regenerated.
13699
13700 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13701 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13702 (thread_db_init): Call thread_db_err_str.
13703 * configure.ac: Check for TD_VERSION.
13704 * config.in, configure: Regenerated.
13705
bee0189a
DJ
137062005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13707
13708 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13709
e9d25b98
DJ
137102005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13711
13712 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13713 is not available. Define HAVE_PTRACE_GETREGS if it is.
13714 * config.in, configure: Regenerated.
13715 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13716 * linux-i386-low.c, linux-m68k-low.c: Update to use
13717 HAVE_PTRACE_GETREGS.
13718 * linux-low.c (regsets_fetch_inferior_registers)
13719 (regsets_store_inferior_registers): Only return 0 if we processed
13720 GENERAL_REGS.
13721 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13722 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13723
a06660f7
DJ
137242005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13725
13726 * inferiors.c (struct thread_info): Add gdb_id.
13727 (add_thread): Add gdb_id argument.
13728 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13729 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13730 calls to add_thread.
13731 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13732 * server.c (handle_query): Use thread_to_gdb_id.
13733 (handle_v_cont, main): Use gdb_id_to_thread_id.
13734 * server.h (add_thread): Update prototype.
13735 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13736 prototypes.
13737
5a1f5858
DJ
137382005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13739
13740 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13741 left-padded registers.
13742 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13743 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13744
e122f1f5
SE
137452005-07-01 Steve Ellcey <sje@cup.hp.com>
13746
13747 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13748 * configure: Regenerate.
13749 * config.in: Regenerate.
13750 * server.h (NEED_DECLARATION_STRERROR):
13751 Replace with !HAVE_DECL_STRERROR.
13752
d592fa2f
DJ
137532005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13754
13755 * linux-low.c (linux_wait, linux_send_signal): Don't test
13756 an unsigned long variable for > 0 if it could be MAX_ULONG.
13757 * server.c (myresume): Likewise.
13758 * target.c (set_desired_inferior): Likewise.
13759
ccbd4912
MK
137602005-06-13 Mark Kettenis <kettenis@gnu.org>
13761
13762 * configure.ac: Simplify and improve check for socklen_t.
13763 * configure, config.in: Regenerate.
13764
f450004a
DJ
137652005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13766
13767 * acconfig.h: Remove.
13768 * configure.ac: Add a test for socklen_t. Use three-argument
13769 AC_DEFINE throughout.
13770 * config.in: Regenerated using autoheader 2.59.
13771 * configure: Regenerated.
13772
13773 * gdbreplay.c (socklen_t): Provide a default.
13774 (remote_open): Use socklen_t.
13775 * remote-utils.c (socklen_t): Provide a default.
13776 (remote_open): Use socklen_t.
13777 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13778 unsigned char.
13779
13780 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13781 char for buffers.
13782 * linux-low.c (linux_read_memory, linux_write_memory)
13783 (linux_read_auxv): Likewise.
13784 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13785 (check_mem_write): Likewise.
13786 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13787 Likewise.
13788 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13789 (registers_from_string, register_data): Likewise.
13790 * server.c (handle_query, main): Likewise.
13791 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13792 (decode_M_packet): Likewise.
13793 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13794 * target.h (struct target_ops): Update read_memory, write_memory,
13795 and read_auxv.
13796 (read_inferior_memory, write_inferior_memory): Update.
13797 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13798 to unsigned char *.
13799 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13800 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13801 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13802 linux-s390-low.c, linux-sh-low.c: Update for changes in
13803 read_inferior_memory and the_low_target->breakpoint.
13804
eee84df1
DJ
138052005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13806
13807 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13808 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13809 * configure.srv: Add powerpc64-*-linux*.
13810 * linux-ppc64-low.c: New file.
13811
45b134e5
OF
138122005-05-23 Orjan Friberg <orjanf@axis.com>
13813
13814 * linux-cris-low.c: New file with support for CRIS.
13815 * linux-crisv32-low.c: Ditto for CRISv32.
13816 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13817 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 13818 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
13819 reg-crisv32.o, and reg-crisv32.c to make rules.
13820 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13821 recognized targets.
13822
48d93c75
UW
138232005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13824
13825 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13826 of sizeof (PTRACE_XFER_TYPE).
13827 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13828
e013ee27
OF
138292005-05-12 Orjan Friberg <orjanf@axis.com>
13830
889bf7c5 13831 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
13832 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13833 pointers for hardware watchpoint support.
13834 * linux-low.h (struct linux_target_ops): Ditto.
13835 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13836 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13837 to linux_target_ops.
13838 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13839 reply packet.
13840 * server.c (main): Recognize 'Z' and 'z' packets.
13841
b0ded00b
UW
138422005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13843
13844 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13845 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13846 (the_low_target): Add new members.
13847
8643e2ad
DJ
138482005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13849
13850 * proc-service.c (ps_lgetregs): Search all_processes instead of
13851 all_threads.
13852
fc620387
DJ
138532005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13854
13855 * server.c (start_inferior): Change return type to int.
13856 (attach_inferior): Change sigptr to int *.
13857 (handle_v_cont, handle_v_requests): Change signal to int *.
13858 (main): Change signal to int.
13859
138602005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
13861
13862 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13863 * configure.srv: Add m32r*-*-linux*.
13864 * linux-m32r-low.c: New file.
13865
e0e76420
DJ
138662005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13867
13868 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13869
a1928bad
DJ
138702005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13871
13872 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13873 Take unsigned long arguments for PIDs.
13874 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13875 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13876 (wait_for_sigstop, linux_resume_one_process)
13877 (regsets_fetch_inferior_registers, linux_send_signal)
13878 (linux_read_auxv): Likewise. Update the types of variables holding
13879 PIDs. Update format string specifiers.
13880 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13881 * remote-utils.c (prepare_resume_reply): Likewise.
13882 * server.c (cont_thread, general_thread, step_thread)
13883 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13884 unsigned long.
13885 (handle_query): Update format specifiers.
13886 (handle_v_cont, main): Use strtoul for thread IDs.
13887 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13888 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13889 (general_thread, step_thread, thread_from_wait)
13890 (old_thread_from_wait): Update.
13891 * target.h (struct thread_resume): Use unsigned long for THREAD.
13892 (struct target_ops): Use unsigned long for arguments to attach and
13893 thread_alive.
13894
dcdb98d2
DJ
138952005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13896
13897 * acinclude.m4: Include bfd/bfd.m4 directly.
13898 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13899 <agriffis@toolchain.org>.
13900 * aclocal.m4, configure: Regenerated.
13901
bec39cab
AC
139022005-01-07 Andrew Cagney <cagney@gnu.org>
13903
13904 * configure.ac: Rename configure.in, require autoconf 2.59.
13905 * configure: Re-generate.
13906
434c4c77
DJ
139072004-12-08 Daniel Jacobowitz <dan@debian.org>
13908
13909 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13910 LIBS when finished.
13911 * aclocal.m4: Regenerated.
13912 * configure: Regenerated.
13913
db1d3e1b
AS
139142004-11-21 Andreas Schwab <schwab@suse.de>
13915
13916 * linux-m68k-low.c (m68k_num_gregs): Define.
13917 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13918 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13919 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13920 (m68k_breakpoint_at): New. Add to the_low_target.
13921
13922 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13923 srv_linux_thread_db to yes.
13924
43360365
JB
139252004-10-20 Joel Brobecker <brobecker@gnat.com>
13926
13927 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13928 (ARCH_SET_FS): Likewise.
13929 (ARCH_GET_FS): Likewise.
13930 (ARCH_GET_GS): Likewise.
13931
fd500816
DJ
139322004-10-16 Daniel Jacobowitz <dan@debian.org>
13933
13934 * linux-i386-low.c (ps_get_thread_area): New.
13935 * linux-x86-64-low.c (ps_get_thread_area): New.
13936 * linux-low.c: Include <sys/syscall.h>.
13937 (linux_kill_one_process): Don't kill the first thread here.
13938 (linux_kill): Kill the first thread here.
13939 (kill_lwp): New function.
13940 (send_sigstop, linux_send_signal): Use it.
13941 * proc-service.c: Clean up #ifdefs.
13942 (fpregset_info): Delete.
13943 (ps_lgetregs): Update and enable implementation.
13944 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13945 implementations.
13946 * remote-utils.c (struct sym_cache, symbol_cache): New.
13947 (input_interrupt): Print a clearer message.
13948 (async_io_enabled): New variable.
13949 (enable_async_io, disable_async_io): Use it. Update comments.
13950 (look_up_one_symbol): Use the symbol cache.
13951 * thread-db.c (thread_db_look_up_symbols): New function.
13952 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13953
f6de3c42
DJ
139542004-10-16 Daniel Jacobowitz <dan@debian.org>
13955
13956 * configure.in: Test for -rdynamic.
13957 * configure: Regenerated.
13958 * Makefile (INTERNAL_LDFLAGS): New.
13959 (gdbserver, gdbreplay): Use it.
13960
2c0fc042
AC
139612004-09-02 Andrew Cagney <cagney@gnu.org>
13962
13963 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13964
075b3282
DJ
139652004-03-23 Daniel Jacobowitz <drow@mvista.com>
13966
13967 * linux-low.c (linux_wait): Clear all_processes list also.
13968
fa6a77dc
DJ
139692004-03-12 Daniel Jacobowitz <drow@mvista.com>
13970
13971 * linux-low.c: Include <errno.h>. Remove extern declaration of
13972 errno.
13973
6d782a97
DJ
139742004-03-12 Daniel Jacobowitz <drow@mvista.com>
13975
13976 * gdbreplay.c, server.h, utils.c: Update copyright years.
13977
3a7fb99b
DJ
139782004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13979
13980 * server.c (main): Print child status or termination signal from
13981 variable 'signal', not 'sig'.
13982
c3e735a6
DJ
139832004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13984
13985 * linux-low.c (linux_read_memory): Change return type to
13986 int. Check for and return error from ptrace().
13987 * target.c (read_inferior_memory): Change return type to int. Pass
13988 back return status from the_target->read_memory().
13989 * target.h (struct target_ops): Adapt *read_memory() prototype.
13990 Update comment.
13991 (read_inferior_memory): Adapt prototype.
13992 * server.c (main): Return an error packet if
13993 read_inferior_memory() returns an error.
13994
a59d1c82
DJ
139952004-03-04 Daniel Jacobowitz <drow@mvista.com>
13996
13997 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13998 Unify with other clean targets.
13999
dc3f8883
DJ
140002004-02-29 Daniel Jacobowitz <drow@mvista.com>
14001
14002 * server.c (handle_v_cont): Call set_desired_inferior.
14003
89a208da
DJ
140042004-02-29 Daniel Jacobowitz <drow@mvista.com>
14005
14006 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14007
62ea82f5
DJ
140082004-02-29 Daniel Jacobowitz <drow@mvista.com>
14009
14010 * linux-low.c (linux_wait): Unblock async I/O.
14011 (linux_resume): Block and enable async I/O.
14012 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14013 * server.h (block_async_io, unblock_async_io): Add prototypes.
14014
6910d122
DJ
140152004-02-29 Daniel Jacobowitz <drow@mvista.com>
14016
14017 * remote-utils.c (remote_open): Print a status notice after
14018 opening a TCP port.
14019 * server.c (attach_inferior): Print a status notice after
14020 attaching.
14021
140222004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14023
14024 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14025
c89dc5d4
DJ
140262004-02-26 Daniel Jacobowitz <drow@mvista.com>
14027
14028 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14029 error packet.
14030 * server.c, target.h: Update copyright years.
14031
4b8dad4a
RM
140322004-02-25 Roland McGrath <roland@redhat.com>
14033
14034 * target.h (struct target_ops): New member `read_auxv'.
14035 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14036 * linux-low.c (linux_read_auxv): New function.
14037 (linux_target_ops): Initialize `read_auxv' member to that.
14038
d7446758
JB
140392004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14040
14041 Committed by Jim Blandy <jimb@redhat.com>.
14042
14043 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14044 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14045 instead of GPR_SIZE to distiguish s390 and s390x targets.
14046
5544ad89
DJ
140472004-01-31 Daniel Jacobowitz <drow@mvista.com>
14048
14049 * linux-low.c: Update copyright year.
14050 (check_removed_breakpoint): Clear pending_is_breakpoint.
14051 (linux_set_resume_request, linux_queue_one_thread)
14052 (resume_status_pending_p): New functions.
14053 (linux_continue_one_thread): Use process->resume.
14054 (linux_resume): Only resume threads if there are no pending events.
14055 * linux-low.h (struct process_info): Add resume request
14056 pointer.
14057
2a68b70e
DJ
140582004-01-30 Daniel Jacobowitz <drow@mvista.com>
14059
14060 * regcache.c (new_register_cache): Clear the allocated register
14061 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14062
64386c31
DJ
140632003-10-13 Daniel Jacobowitz <drow@mvista.com>
14064
14065 * linux-low.c (linux_resume): Take a struct thread_resume *
14066 argument.
14067 (linux_wait): Update call.
14068 (resume_ptr): New static variable.
14069 (linux_continue_one_thread): Renamed from
14070 linux_continue_one_process. Use resume_ptr.
14071 (linux_resume): Use linux_continue_one_thread.
14072 * server.c (handle_v_cont, handle_v_requests): New functions.
14073 (myresume): New function.
14074 (main): Handle 'v' case.
14075 * target.h (struct thread_resume): New type.
14076 (struct target_ops): Change argument of "resume" to struct
14077 thread_resume *.
14078 (myresume): Delete macro.
14079
c938e9b0
L
140802003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14081
14082 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14083 (uninstall): Support DESTDIR.
14084
7f313d07
BC
14085Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14086
14087 * configure.srv: Add xscale*linux copy of arm*linux entry.
14088
3b2fc2ea
DJ
140892003-07-24 Daniel Jacobowitz <drow@mvista.com>
14090
14091 * linux-arm-low.c (arm_reinsert_addr): New function.
14092 (the_low_target): Add arm_reinsert_addr.
14093
1c0a559e
MK
140942003-07-08 Mark Kettenis <kettenis@gnu.org>
14095
14096 * mem-break.c: Remove whitespace at end of file.
14097
43d5792c
DJ
140982003-06-28 Daniel Jacobowitz <drow@mvista.com>
14099
14100 * configure.in: Check whether we need to prototype strerror.
14101 * server.h: Optionally prototype strerror.
14102 * gdbreplay.c (perror_with_name): Use strerror.
14103 * linux-low.c (linux_attach_lwp): Use strerror.
14104 * utils.c (perror_with_name): Use strerror.
14105 * config.in, configure: Regenerated.
14106
c8a86edf
DJ
141072003-06-28 Daniel Jacobowitz <drow@mvista.com>
14108
14109 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14110 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14111
73d37363
DJ
141122003-06-20 Daniel Jacobowitz <drow@mvista.com>
14113
14114 * Makefile.in (SFILES): Update.
14115 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14116 low-sun3.c: Remove files.
14117
6ad8ae5c
DJ
141182003-06-17 Daniel Jacobowitz <drow@mvista.com>
14119
14120 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14121 (linux_detach_one_process, linux_detach): New functions.
14122 (linux_target_ops): Add linux_detach.
14123 * server.c (main): Handle 'D' packet.
14124 * target.h (struct target_ops): Add "detach" member.
14125 (detach_inferior): Define.
14126
1581182a
MK
141272003-06-13 Mark Kettenis <kettenis@gnu.org>
14128
14129 From Kelley Cook <kelleycook@wideopenwest.com>:
14130 * configure.srv: Accept i[34567]86 variants.
14131
e5379b03
DJ
141322003-06-05 Daniel Jacobowitz <drow@mvista.com>
14133
14134 * linux-low.c (linux_wait_for_event): Correct comment typos.
14135 (linux_resume_one_process): Call check_removed_breakpoint.
14136 (linux_send_signal): New function.
14137 (linux_target_ops): Add linux_send_signal.
14138 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14139 of kill.
14140 * target.h (struct target_ops): Add send_signal.
14141
2ff29de4
JB
141422003-05-29 Jim Blandy <jimb@redhat.com>
14143
14144 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14145 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14146 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14147 away part of the register's value.
14148
254787d4
DJ
141492003-03-26 Daniel Jacobowitz <drow@mvista.com>
14150
14151 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14152 (linux_wait_for_event, linux_init_signals): Likewise.
14153
94e10508
DJ
141542003-03-17 Daniel Jacobowitz <drow@mvista.com>
14155
14156 * configure.in: Check for stdlib.h.
14157 * configure: Regenerated.
14158 * config.in: Regenerated.
14159
4c0711e0
DJ
141602003-01-04 Andreas Schwab <schwab@suse.de>
14161
14162 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14163
ef66e766
AC
141642003-01-02 Andrew Cagney <ac131313@redhat.com>
14165
14166 * Makefile.in: Remove obsolete code.
14167
a1358604
DJ
141682002-11-20 Daniel Jacobowitz <drow@mvista.com>
14169
14170 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14171 defined(PT_FPR0_HI).
14172
23ce3b1c
DJ
141732002-11-17 Stuart Hughes <seh@zee2.com>
14174
14175 * linux-arm-low.c (arm_num_regs): Increase.
14176 (arm_regmap): Include status register.
14177
141782002-11-17 Daniel Jacobowitz <drow@mvista.com>
14179
14180 * linux-low.c (register_addr): Remove incorrect -1 check.
14181
a9fa9f7d
DJ
141822002-08-29 Daniel Jacobowitz <drow@mvista.com>
14183
14184 * linux-low.c (linux_create_inferior): Call setpgid. Return
14185 the new PID.
14186 (unstopped_p, linux_signal_pid): Remove.
14187 (linux_target_ops): Remove linux_signal_pid.
14188 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14189 global instead of target method.
14190 * target.h (struct target_ops): Remove signal_pid. Update comment
14191 for create_inferior.
14192 * server.c (signal_pid): New variable.
14193 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14194 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14195 (attach_inferior): Set signal_pid.
14196
17574093
DJ
141972002-08-23 Daniel Jacobowitz <drow@mvista.com>
14198
14199 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14200
142012002-08-20 Jim Blandy <jimb@redhat.com>
14202
14203 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14204 default for this.
14205
142062002-08-01 Andrew Cagney <cagney@redhat.com>
14207
14208 * Makefile.in: Make chill references obsolete.
14209
142102002-07-24 Kevin Buettner <kevinb@redhat.com>
14211
14212 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14213 * configure: Regenerate.
14214 * config.in: Regenerate.
14215
142162002-07-09 David O'Brien <obrien@FreeBSD.org>
14217
14218 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14219 (perror_with_name, remote_close, remote_open, expect, play): Static.
14220
142212002-07-04 Michal Ludvig <mludvig@suse.cz>
14222
4b8dad4a 14223 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14224 byte offsets instead of an array of indexes.
14225 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14226
142272002-06-13 Daniel Jacobowitz <drow@mvista.com>
14228
14229 * regcache.c: Add comment.
14230
142312002-06-11 Daniel Jacobowitz <drow@mvista.com>
14232
14233 * thread-db.c: New file.
14234 * proc-service.c: New file.
14235 * acinclude.m4: New file.
14236 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14237 proc-service.o, and thread-db.o.
14238 (linux-low.o): Add USE_THREAD_DB.
14239 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14240 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14241 * aclocal.m4: Regenerated.
14242 * config.in: Regenerated.
14243 * configure: Regenerated.
14244 * configure.in: Check for proc_service.h, sys/procfs.h,
14245 thread_db.h, and linux/elf.h headrs.
14246 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14247 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14248 Check for -lthread_db and thread support.
14249 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14250 PowerPC, and SuperH.
14251 * i387-fp.c: Constify arguments.
14252 * i387-fp.h: Likewise.
14253 * inferiors.c: (struct thread_info): Renamed from
14254 `struct inferior_info'. Remove PID member. Use generic inferior
14255 list header. All uses updated.
14256 (inferiors, signal_pid): Removed.
14257 (all_threads): New variable.
14258 (get_thread): Define.
14259 (add_inferior_to_list): New function.
14260 (for_each_inferior): New function.
14261 (change_inferior_id): New function.
14262 (add_inferior): Removed.
14263 (remove_inferior): New function.
14264 (add_thread): New function.
14265 (free_one_thread): New function.
14266 (remove_thread): New function.
14267 (clear_inferiors): Use for_each_inferior and free_one_thread.
14268 (find_inferior): New function.
14269 (find_inferior_id): New function.
14270 (inferior_target_data): Update argument type.
14271 (set_inferior_target_data): Likewise.
14272 (inferior_regcache_data): Likewise.
14273 (set_inferior_regcache_data): Likewise.
14274 * linux-low.c (linux_bp_reinsert): Remove.
14275 (all_processes, stopping_threads, using_thrads)
14276 (struct pending_signals, debug_threads, pid_of): New.
14277 (inferior_pid): Replace with macro.
14278 (struct inferior_linux_data): Remove.
14279 (get_stop_pc, add_process): New functions.
14280 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14281 Use add_process and add_thread.
14282 (linux_attach_lwp): New function, based on old linux_attach. Use
14283 add_process and add_thread. Set stop_expected for new threads.
14284 (linux_attach): New function.
14285 (linux_kill_one_process): New function.
14286 (linux_kill): Kill all LWPs.
14287 (linux_thread_alive): Use find_inferior_id.
14288 (check_removed_breakpoints, status_pending_p): New functions.
14289 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14290 Update. Use WNOHANG. Wait for cloned processes also. Update process
14291 struct for the found process.
14292 (linux_wait_for_event): New function.
14293 (linux_wait): Use it. Support LWPs.
14294 (send_sigstop, wait_for_sigstop, stop_all_processes)
14295 (linux_resume_one_process, linux_continue_one_process): New functions.
14296 (linux_resume): Support LWPs.
14297 (REGISTER_RAW_SIZE): Remove.
14298 (fetch_register): Use register_size instead. Call supply_register.
14299 (usr_store_inferior_registers): Likewise. Call collect_register.
14300 Fix recursive case.
14301 (regsets_fetch_inferior_registers): Improve error message.
14302 (regsets_store_inferior_registers): Add debugging.
14303 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14304 (unstopped_p, linux_signal_pid): New functions.
14305 (linux_target_ops): Add linux_signal_pid.
14306 (linux_init_signals): New function.
14307 (initialize_low): Call it. Initialize using_threads.
14308 * regcache.c (inferior_regcache_data): Add valid
14309 flag.
14310 (get_regcache): Fetch registers lazily. Add fetch argument
14311 and update all callers.
14312 (regcache_invalidate_one, regcache_invalidate): New
14313 functions.
14314 (new_register_cache): Renamed from create_register_cache.
14315 Return the new regcache.
14316 (free_register_cache): Change argument to a void *.
14317 (registers_to_string, registers_from_string): Call get_regcache
14318 with fetch flag set.
14319 (register_data): Make static. Pass fetch flag to get_regcache.
14320 (supply_register): Call get_regcache with fetch flag clear.
14321 (collect_register): Call get_regcache with fetch flag set.
14322 (collect_register_as_string): New function.
14323 * regcache.h: Update.
14324 * remote-utils.c (putpkt): Flush after debug output and use
14325 stderr.
14326 Handle input interrupts while waiting for an ACK.
14327 (input_interrupt): Use signal_pid method.
14328 (getpkt): Flush after debug output and use stderr.
14329 (outreg): Use collect_register_as_string.
14330 (new_thread_notify, dead_thread_notify): New functions.
14331 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14332 and general_thread.
14333 (look_up_one_symbol): Flush after debug output.
14334 * server.c (step_thread, server_waiting): New variables.
14335 (start_inferior): Don't use signal_pid. Update call to mywait.
14336 (attach_inferior): Update call to mywait.
14337 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14338 (main): Don't fetch/store registers explicitly. Use
14339 set_desired_inferior. Support proposed ``Hs'' packet. Update
14340 calls to mywait.
14341 * server.h: Update.
14342 (struct inferior_list, struct_inferior_list_entry): New.
14343 * target.c (set_desired_inferior): New.
14344 (write_inferior_memory): Constify.
14345 (mywait): New function.
14346 * target.h: Update.
14347 (struct target_ops): New signal_pid method.
14348 (mywait): Removed macro, added prototype.
14349
14350 * linux-low.h (regset_func): Removed.
14351 (regset_fill_func, regset_store_func): New.
14352 (enum regset_type): New.
14353 (struct regset_info): Add type field. Use new operation types.
14354 (struct linux_target_ops): stop_pc renamed to get_pc.
14355 Add decr_pc_after_break and breakpoint_at.
14356 (get_process, get_thread_proess, get_process_thread)
14357 (strut process_info, all_processes, linux_attach_lwp)
14358 (thread_db_init): New.
14359
14360 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14361 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14362 (the_low_target): Add new members.
14363 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14364 (i386_store_fpxregset): Constify.
14365 (target_regsets): Add new kind identifier.
14366 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14367 (i386_set_pc): Add debugging.
14368 (i386_breakpoint_at): New function.
14369 (the_low_target): Add new members.
14370 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14371 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14372 (mips_breakpoint_at): New.
14373 (the_low_target): Add new members.
14374 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14375 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14376 (the_low_target): Add new members.
14377 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14378 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14379 (the_low_target): Add new members.
14380 * linux-x86-64-low.c (target_regsets): Add new kind
14381 identifier.
14382
143832002-05-15 Daniel Jacobowitz <drow@mvista.com>
14384
14385 From Martin Pool <mbp@samba.org>:
14386 * server.c (gdbserver_usage): New function.
14387 (main): Call it.
14388
143892002-05-14 Daniel Jacobowitz <drow@mvista.com>
14390
14391 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14392 stop_at -> stop_pc.
14393
143942002-05-04 Andrew Cagney <ac131313@redhat.com>
14395
14396 * Makefile.in: Remove obsolete code.
14397
143982002-04-24 Michal Ludvig <mludvig@suse.cz>
14399
14400 * linux-low.c (regsets_fetch_inferior_registers),
14401 (regsets_store_inferior_registers): Removed cast to int from
14402 ptrace() calls.
14403 * regcache.h: Added declaration of struct inferior_info.
14404
144052002-04-20 Daniel Jacobowitz <drow@mvista.com>
14406
14407 * inferiors.c (struct inferior_info): Add regcache_data.
14408 (add_inferior): Call create_register_cache.
14409 (clear_inferiors): Call free_register_cache.
14410 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14411 * regcache.c (struct inferior_regcache_data): New.
14412 (registers): Remove.
14413 (get_regcache): New function.
14414 (create_register_cache, free_register_cache): New functions.
14415 (set_register_cache): Don't initialize the register cache here.
14416 (registers_to_string, registers_from_string, register_data): Call
14417 get_regcache.
14418 * regcache.h: Add prototypes.
14419 * server.h: Likewise.
14420
144212002-04-20 Daniel Jacobowitz <drow@mvista.com>
14422
14423 * mem-break.c: New file.
14424 * mem-break.h: New file.
14425 * Makefile.in: Add mem-break.o rule; update server.h
14426 dependencies.
14427 * inferiors.c (struct inferior_info): Add target_data
14428 member.
14429 (clear_inferiors): Free target_data member if set.
14430 (inferior_target_data, set_inferior_target_data): New functions.
14431 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14432 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14433 * linux-low.c (linux_bp_reinsert): New variable.
14434 (struct inferior_linux_data): New.
14435 (linux_create_inferior): Use set_inferior_target_data.
14436 (linux_attach): Likewise. Call add_inferior.
14437 (linux_wait_for_one_inferior): New function.
14438 (linux_wait): Call it.
14439 (linux_write_memory): Add const.
14440 (initialize_low): Call set_breakpoint_data.
14441 * linux-low.h (struct linux_target_ops): Add breakpoint
14442 handling members.
14443 * server.c (attach_inferior): Remove extra add_inferior
14444 call.
14445 * server.h: Include mem-break.h. Update inferior.c
14446 prototypes.
14447 * target.c (read_inferior_memory)
14448 (write_inferior_memory): New functions.
14449 * target.h (read_inferior_memory)
14450 (write_inferior_memory): Change macros to prototypes.
14451 (struct target_ops): Update comments. Add const to write_memory
14452 definition.
14453
144542002-04-11 Daniel Jacobowitz <drow@mvista.com>
14455
14456 * linux-low.c (usr_store_inferior_registers): Support
14457 registers which are allowed to fail to store.
14458 * linux-low.h (linux_target_ops): Likewise.
14459 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14460 (ppc_cannot_store_register): FPSCR may not be storable.
14461
144622002-04-09 Daniel Jacobowitz <drow@mvista.com>
14463
14464 * server.h: Include <string.h> if HAVE_STRING_H.
14465 * ChangeLog: Correct paths in last ChangeLog entry.
14466
144672002-04-09 Daniel Jacobowitz <drow@mvista.com>
14468
14469 * linux-low.h: Remove obsolete prototypes.
14470 (struct linux_target_ops): New.
14471 (extern the_low_target): New.
14472 * linux-low.c (num_regs, regmap): Remove declarations.
14473 (register_addr): Use the_low_target explicitly.
14474 (fetch_register): Likewise.
14475 (usr_fetch_inferior_registers): Likewise.
14476 (usr_store_inferior_registers): Likewise.
14477 * linux-arm-low.c (num_regs): Remove.
14478 (arm_num_regs): Define.
14479 (arm_regmap): Renamed from regmap, made static.
14480 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14481 made static.
14482 (arm_cannot_store_register): Renamed from cannot_store_register,
14483 made static.
14484 (the_low_target): New.
14485 * linux-i386-low.c (num_regs): Remove.
14486 (i386_num_regs): Define.
14487 (i386_regmap): Renamed from regmap, made static.
14488 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14489 made static.
14490 (i386_cannot_store_register): Renamed from cannot_store_register,
14491 made static.
14492 (the_low_target): New.
14493 * linux-ia64-low.c (num_regs): Remove.
14494 (ia64_num_regs): Define.
14495 (ia64_regmap): Renamed from regmap, made static.
14496 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14497 made static.
14498 (ia64_cannot_store_register): Renamed from cannot_store_register,
14499 made static.
14500 (the_low_target): New.
14501 * linux-m68k-low.c (num_regs): Remove.
14502 (m68k_num_regs): Define.
14503 (m68k_regmap): Renamed from regmap, made static.
14504 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14505 made static.
14506 (m68k_cannot_store_register): Renamed from cannot_store_register,
14507 made static.
14508 (the_low_target): New.
14509 * linux-mips-low.c (num_regs): Remove.
14510 (mips_num_regs): Define.
14511 (mips_regmap): Renamed from regmap, made static.
14512 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14513 made static.
14514 (mips_cannot_store_register): Renamed from cannot_store_register,
14515 made static.
14516 (the_low_target): New.
14517 * linux-ppc-low.c (num_regs): Remove.
14518 (ppc_num_regs): Define.
14519 (ppc_regmap): Renamed from regmap, made static.
14520 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14521 made static.
14522 (ppc_cannot_store_register): Renamed from cannot_store_register,
14523 made static.
14524 (the_low_target): New.
14525 * linux-s390-low.c (num_regs): Remove.
14526 (s390_num_regs): Define.
14527 (s390_regmap): Renamed from regmap, made static.
14528 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14529 made static.
14530 (s390_cannot_store_register): Renamed from cannot_store_register,
14531 made static.
14532 (the_low_target): New.
14533 * linux-sh-low.c (num_regs): Remove.
14534 (sh_num_regs): Define.
14535 (sh_regmap): Renamed from regmap, made static.
14536 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14537 made static.
14538 (sh_cannot_store_register): Renamed from cannot_store_register,
14539 made static.
14540 (the_low_target): New.
14541 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14542 (the_low_target): New.
14543
145442002-04-09 Daniel Jacobowitz <drow@mvista.com>
14545
14546 * Makefile.in: Add stamp-h target.
14547 * configure.in: Create stamp-h.
14548 * configure: Regenerated.
14549
145502002-04-09 Daniel Jacobowitz <drow@mvista.com>
14551
14552 * inferiors.c: New file.
14553 * target.c: New file.
14554 * target.h: New file.
14555 * Makefile.in: Add target.o and inferiors.o. Update
14556 dependencies.
14557 * linux-low.c (inferior_pid): New static variable,
14558 moved from server.c.
14559 (linux_create_inferior): Renamed from create_inferior.
14560 Call add_inferior. Return 0 on success instead of a PID.
14561 (linux_attach): Renamed from myattach.
14562 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14563 (linux_thread_alive): Renamed from mythread_alive.
14564 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14565 child dies.
14566 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14567 (regsets_store_inferior_registers): Correct error message.
14568 Add missing ``return 0''.
14569 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14570 (linux_store_registers): Renamed from store_inferior_registers.
14571 (linux_read_memory): Renamed from read_inferior_memory.
14572 (linux_write_memory): Renamed from write_inferior_memory.
14573 (linux_target_ops): New structure.
14574 (initialize_low): Call set_target_ops ().
14575 * remote-utils.c (unhexify): New function.
14576 (hexify): New function.
14577 (input_interrupt): Send signals to ``signal_pid''.
14578 * server.c (inferior_pid): Remove.
14579 (start_inferior): Update create_inferior call.
14580 (attach_inferior): Call add_inferior.
14581 (handle_query): New function.
14582 (main): Call handle_query for `q' packets.
14583 * server.h: Include "target.h". Remove obsolete prototypes.
14584 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14585
145862002-04-09 Daniel Jacobowitz <drow@mvista.com>
14587
14588 * Makefile.in: Add WARN_CFLAGS. Update configury
14589 dependencies.
14590 * configure.in: Check for <string.h>
14591 * configure: Regenerate.
14592 * config.in: Regenerate.
14593 * gdbreplay.c: Include needed system headers.
14594 (remote_open): Remove strchr prototype.
14595 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14596 * regcache.c (supply_register): Change buf argument to const void *.
14597 (supply_register_by_name): Likewise.
14598 (collect_register): Change buf argument to void *.
14599 (collect_register_by_name): Likewise.
14600 * regcache.h: Add missing prototypes.
14601 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14602 * server.c (handle_query): New function.
14603 (attached): New static variable, moved out of main.
14604 (main): Quiet longjmp clobber warnings.
14605 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14606 * utils.c (error): Remove NORETURN.
14607 (fatal): Likewise.