]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
testsuite: Disable backslash_in_multi_line_command_test for old DejaGnus
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
1672e0d9
SDJ
12017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2
3 * Makefile.in (SFILES): Add "common/environ.c".
4 (OBJS): Add "common/environ.h".
5
239b6d10
WT
62017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7
8 * configure.ac: Check if the fs_base and gs_base members of
9 `struct user_regs_struct' exist.
10 * config.in: Regenerated.
11 * configure: Likewise.
12
694b382c
AT
132017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
14
15 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
16 target_read_memory.
17 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
18 (get_next_pcs_syscall_next_pc): Likewise.
19
7dc53023
LM
202016-12-23 Luis Machado <lgustavo@codesourcery.com>
21
22 * win32-i386-low.c: Fix incorrect reference to a couple source files.
23 * nto-x86-low.c: Likewise.
24
ad02e4fe
SM
252016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
26
27 * Makefile.in: Include disable-implicit-rules.mk.
28
dcb07cfa
PA
292016-11-23 Pedro Alves <palves@redhat.com>
30
31 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
32 (debug_vprintf): Use std::chrono::steady_clock instead of
33 gettimeofday. Use '.' instead of ':'.
34 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
35 (get_timestamp): Use std::chrono::steady_clock instead of
36 gettimeofday.
37
8629c02c
SM
382016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
39
40 * Makefile.in: Fix whitespace formatting.
41
b593ecca
SM
422016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
43
44 * Makefile.in (SFILES, OBS): Flatten list and order
45 alphabetically.
46
9986ba08
PA
472016-11-23 Pedro Alves <palves@redhat.com>
48
49 * event-loop.c (handle_file_event): Use warning.
50 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
51 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
52 Use warning.
53
4eefa7bc
PA
542016-11-23 Pedro Alves <palves@redhat.com>
55
56 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
57 output.
58 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
59 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
60 debug_printf and debug_flush for debug output.
61 * server.c (handle_general_set): Likewise.
62 * thread-db.c (try_thread_db_load): Use debug_printf for debug
63 output.
64
5443506e
SM
652016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
66
67 * Makefile.in (.c.o): Replace rule with ...
68 (%.o: %.c): ... this one.
69
3b165252
SM
702016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
71
72 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
73 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
74 make.
75 * configure.ac: Remove checks for the make program.
76 * configure: Re-generate.
77
0bcda685
PA
782016-10-28 Pedro Alves <palves@redhat.com>
79
80 * Makefile.in (CXX_DIALECT): Get from configure.
81 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
82 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
83 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
84 * config.in: Regenerate.
85 * configure: Regenerate.
86
c3805894
YQ
872016-10-27 Yao Qi <yao.qi@linaro.org>
88
89 * linux-low.c (linux_supports_range_stepping): Return true if
90 can_software_single_step return true.
91
89342618
YQ
922016-10-27 Yao Qi <yao.qi@linaro.org>
93
94 * inferiors.c (find_inferior_in_random): New function.
95 * inferiors.h (find_inferior_in_random): Declare.
96 * linux-low.c (linux_wait_for_event_filtered): Call
97 find_inferior_in_random instead of find_inferior.
98
e3652c84
YQ
992016-10-27 Yao Qi <yao.qi@linaro.org>
100
101 * linux-low.c (linux_wait_1): If single-step breakpoints are
102 inserted, remove them.
103
5a04c4cf
PA
1042016-10-26 Pedro Alves <palves@redhat.com>
105
106 * linux-low.c (handle_extended_wait): Link parent/child fork
107 threads.
108 (linux_wait_1): Unlink them.
109 (linux_set_resume_request): Ignore resume requests for
110 already-resumed and unhandled fork child threads.
111 * linux-low.h (struct lwp_info) <fork_relative>: New field.
112 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
113 New functions.
114 (handle_v_requests) <vCont>: Don't call require_running.
115 * server.h (in_queued_stop_replies): New declaration.
116
cb93dc7f
YQ
1172016-10-24 Yao Qi <yao.qi@linaro.org>
118
119 PR server/20733
120 * linux-aarch64-low.c (append_insns): Cast the return value to
121 'uint32_t *'.
122
a1078bea
YQ
1232016-10-10 Yao Qi <yao.qi@linaro.org>
124
125 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
126
1fb77080
SDJ
1272016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
128
129 * target.c (target_supports_multi_process): New function, moved
130 from...
131 * target.h (target_supports_multi_process): ... here. Remove
132 macro.
133
39b5a3b9
TT
1342016-10-05 Tom Tromey <tom@tromey.com>
135
136 PR remote/20655:
137 * tracepoint.c (handle_tracepoint_bkpts): Check
138 ipa_error_tracepoint, not ipa_stopping_tracepoint.
139
c1d0b70a
YQ
1402016-10-05 Yao Qi <yao.qi@linaro.org>
141
142 * configure.srv: Update the path of arm-*.xml files.
143
0a69eedb
YQ
1442016-10-05 Terry Guo <terry.guo@arm.com>
145 Yao Qi <yao.qi@linaro.org>
146
147 * Makefile.in: Adjust the path of rules.
148 * configure.srv: Update the path of xml files.
149 * regformats/arm-with-iwmmxt.dat: Regenerated.
150 * regformats/arm-with-neon.dat: Likewise.
151 * regformats/arm-with-vfpv2.dat: Likewise.
152 * regformats/arm-with-vfpv3.dat Likewise.
153
17e16485
YQ
1542016-09-30 Yao Qi <yao.qi@linaro.org>
155
156 PR gdbserver/20627
157 * target.c (target_stop_and_wait): Don't call
158 target_continue_no_signal, use resume_stop instead.
159
edeeb602
YQ
1602016-09-26 Yao Qi <yao.qi@linaro.org>
161
162 * linux-low.c (linux_wait_1): Call debug_exit.
163
503b1c39
PA
1642016-09-23 Pedro Alves <palves@redhat.com>
165
166 * Makefile.in (SFILES): Add common/new-op.c.
167 (OBS): Add common/new-op.o.
168 (new-op.o): New rule.
169
74172ecf
SM
1702016-09-21 Simon Marchi <simon.marchi@ericsson.com>
171
172 * .gitinore: Ignore more files.
173
fc6cda2e
YQ
1742016-09-21 Yao Qi <yao.qi@linaro.org>
175
176 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
177 23.
178
bc1e6c81
SDJ
1792016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
180
181 * server.c (start_inferior): Call target_mourn_inferior instead of
182 mourn_inferior; pass ptid_t argument to it.
183 (resume): Likewise.
184 (handle_target_event): Likewise.
185 * target.c (target_mourn_inferior): New function.
186 * target.h (mourn_inferior): Delete macro.
187
0e00e962
AA
1882016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
189
190 * linux-low.c (lwp_is_stepping): New function.
191
1d8cb77d
CL
1922016-09-06 Carl Love <cel@us.ibm.com>
193
194 * server.c (start_inferior): Fixed comment, requested comment change
195 didn't get updated correctly. Removed reference to ptrace () call as
196 it is only true on Linux systems.
197
7313bced
CL
1982016-09-06 Carl Love <cel@us.ibm.com>
199
200 * server.c (start_inferior): Do not call
201 function target_post_create_inferior () if the
202 inferior process has already exited.
203
cf6de44d
PA
2042016-09-05 Pedro Alves <palves@redhat.com>
205
206 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
207 (COMPILE.pre, CC_LD): Use CXX directly.
208 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
209 * acinclude.m4: Don't include build-with-cxx.m4.
210 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
211 * configure: Regenerate.
212
c1da6748
AT
2132016-09-02 Akash Trehan <akash.trehan123@gmail.com>
214
215 PR gdb/19495
216 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
217 call writing data to own_buf.
218
f2b9e3df
SDJ
2192016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
220
221 * target.c (mywait): Call target_wait instead of
222 the_target->wait.
223 (target_wait): New function.
224
049a8570
SDJ
2252016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
226
227 * server.c (start_inferior): New variable 'ptid'. Replace calls
228 to the_target->resume by target_continue{,_no_signal}, depending
229 on the case.
230 * target.c (target_stop_and_wait): Call target_continue_no_signal
231 instead of the_target->resume.
232 (target_continue): New function.
233
3aa5cfa0
AT
2342016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
235
236 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
237
754653a7
AZ
2382016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
239
240 PR server/20491
241 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
242 ps_prochandle.
243 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
244 * linux-arm-low.c (ps_get_thread_area): Likewise.
245 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
246 * linux-m68k-low.c (ps_get_thread_area): Likewise.
247 * linux-mips-low.c (ps_get_thread_area): Likewise.
248 * linux-nios2-low.c (ps_get_thread_area): Likewise.
249 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
250 * linux-x86-low.c (ps_get_thread_area): Likewise.
251 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
252
ed036b40
PA
2532016-08-19 Pedro Alves <palves@redhat.com>
254
255 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
256
c8ef42ee
PA
2572016-08-19 Pedro Alves <palves@redhat.com>
258
259 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
260 comment. Use memcpy instead of casting through unsigned long.
261
9c235a72
PA
2622016-08-19 Pedro Alves <palves@redhat.com>
263
264 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
265 allocating around 0x80000000.
266
201506da
PA
2672016-08-19 Pedro Alves <palves@redhat.com>
268
269 PR gdb/20415
270 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
271 (x32-avx512-linux-ipa.o): New rules.
272 * configure.ac (x86_64-*-linux*): New x32 check.
273 * configure.srv (ipa_x32_linux_regobj): New.
274 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
275 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
276 descriptions.
277 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
278 descriptions.
279 * configure: Regenerate.
280
f348d89a
PA
2812016-08-09 Pedro Alves <palves@redhat.com>
282
283 PR gdb/18653
284 * Makefile.in (OBS): Add signals-state-save-restore.o.
285 (signals-state-save-restore.o): New rule.
286 * config.in: Regenerate.
287 * configure: Regenerate.
288 * linux-low.c: Include "signals-state-save-restore.h".
289 (linux_create_inferior): Call
290 restore_original_signals_state.
291 * server.c: Include "dispositions-save-restore.h".
292 (captured_main): Call save_original_signals_state.
293
1baf5149
PA
2942016-08-05 Pedro Alves <palves@redhat.com>
295
296 * configure: Regenerate.
297
fcd4a73d
YQ
2982016-08-04 Yao Qi <yao.qi@linaro.org>
299
300 * linux-low.c (regsets_fetch_inferior_registers): Check
301 errno is ESRCH or not.
302
979659d0
YQ
3032016-08-02 Yao Qi <yao.qi@linaro.org>
304
305 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
306 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
307 (thread_db_load_search): Update.
308 (try_thread_db_load_1): Don't look for td_ta_event_addr,
309 td_ta_set_event and td_ta_event_getmsg.
310
6598661d
PA
3112016-07-26 Pedro Alves <palves@redhat.com>
312
313 PR server/20414
314 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
315 of unsigned long for 64-bit registers and use uint32_t instead of
316 unsigned int for 32-bit registers.
317
9cf12d57
PA
3182016-07-26 Pedro Alves <palves@redhat.com>
319
320 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
321 to 'ptrace'.
322
305450ed
TT
3232016-07-21 Tom Tromey <tom@tromey.com>
324
325 * configure: Rebuild.
326
2583da7c
YQ
3272016-07-21 Yao Qi <yao.qi@linaro.org>
328
329 * mem-break.c (find_gdb_breakpoint): Cast bp to
330 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
331
21536b36
YQ
3322016-07-21 Yao Qi <yao.qi@linaro.org>
333
334 * server.c (handle_v_requests): Support s and S actions
335 if target_supports_software_single_step return true.
336
8901d193
YQ
3372016-07-21 Yao Qi <yao.qi@linaro.org>
338
339 * linux-low.c (resume_stopped_resumed_lwps): If resume request
340 is resume_step, call maybe_hw_step.
341 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
342 and unstop them.
343 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
344 breakpoints or not.
345 (proceed_one_lwp): If resume request is resume_step, install
346 reinsert breakpoints and call maybe_hw_step.
347
0e9a339e
YQ
3482016-07-21 Yao Qi <yao.qi@linaro.org>
349
350 * linux-low.c (proceed_one_lwp): Declare.
351 (linux_resume_one_thread): Remove local variable 'step'.
352 Lift code enqueue signal. Call proceed_one_lwp instead of
353 linux_resume_one_lwp.
354
4281b351
YQ
3552016-07-21 Yao Qi <yao.qi@linaro.org>
356
357 * linux-low.c (linux_resume_one_thread): Call
358 enqueue_pending_signal.
359
984a2c04
YQ
3602016-07-21 Yao Qi <yao.qi@linaro.org>
361
362 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
363 * inferiors.c (do_restore_current_thread_cleanup): New function.
364 (make_cleanup_restore_current_thread): Likewise.
365 * linux-low.c (install_software_single_step_breakpoints): Call
366 make_cleanup_restore_current_thread. Switch current_thread to
367 thread.
368
bec903c9
YQ
3692016-07-21 Yao Qi <yao.qi@linaro.org>
370
371 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
372 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
373 (clone_one_breakpoint): Likewise.
374 (delete_reinsert_breakpoints): Change parameter to thread.
375 Callers updated.
376 (has_reinsert_breakpoints): Likewise.
377 (uninsert_reinsert_breakpoints): Likewise.
378 (reinsert_reinsert_breakpoints): Likewise.
379 * mem-break.h (set_reinsert_breakpoint): Update declaration.
380 (delete_reinsert_breakpoints): Likewise.
381 (reinsert_reinsert_breakpoints): Likewise.
382 (uninsert_reinsert_breakpoints): Likewise.
383 (has_reinsert_breakpoints): Likewise.
384
63c40ec7
YQ
3852016-07-21 Yao Qi <yao.qi@linaro.org>
386
387 * inferiors.c (get_thread_process): Make parameter const.
388 * inferiors.h (get_thread_process): Update declaration.
389 * mem-break.c (clone_all_breakpoints): Remove all parameters.
390 Add new parameters child_thread and parent_thread. Callers
391 updated.
392 * mem-break.h (clone_all_breakpoints): Update declaration.
393
9aa76cd0
YQ
3942016-07-21 Yao Qi <yao.qi@linaro.org>
395
396 * mem-break.c (struct breakpoint) <cond_list>: Remove.
397 <command_list, handler>: Remove.
398 (struct gdb_breakpoint): New.
399 (struct other_breakpoint): New.
400 (struct reinsert_breakpoint): New.
401 (is_gdb_breakpoint): New function.
402 (any_persistent_commands): Update command_list if
403 is_gdb_breakpoint returns true.
404 (set_breakpoint): Create breakpoints according to their types.
405 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
406 (set_gdb_breakpoint_1): Likewise.
407 (set_gdb_breakpoint): Likewise.
408 (clear_breakpoint_conditions): Change parameter type to
409 'struct gdb_breakpoint *'.
410 (clear_breakpoint_commands): Likewise.
411 (clear_breakpoint_conditions_and_commands): Likewise.
412 (add_condition_to_breakpoint): Likewise.
413 (add_breakpoint_condition): Likewise.
414 (add_commands_to_breakpoint): Likewise.
415 (check_breakpoints): Check other_breakpoint.
416 (clone_one_breakpoint): Clone breakpopint according to its type.
417 * mem-break.h (struct gdb_breakpoint): Declare.
418 (set_gdb_breakpoint): Update declaration.
419 (clear_breakpoint_conditions_and_commands): Likewise.
420 (add_breakpoint_condition): Likewise.
421 (add_breakpoint_commands): Likewise.
422 * server.c (process_point_options): Change parameter type to
423 'struct gdb_breakpoint *'.
424
811f8301
YQ
4252016-07-21 Yao Qi <yao.qi@linaro.org>
426
427 * mem-break.c (set_breakpoint_at): Rename it to ...
428 (set_breakpoint_type_at): ... it.
429 (set_breakpoint_at): Call set_breakpoint_type_at.
430 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
431 * mem-break.h (set_breakpoint_at): Update comments.
432
b1c51e36
CLT
4332016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
434
435 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
436 to buf parameter.
437 (nios2_store_gregset): Likewise.
438
ced2dffb
PA
4392016-07-01 Pedro Alves <palves@redhat.com>
440 Antoine Tremblay <antoine.tremblay@ericsson.com>
441
442 * linux-low.c: Change interface to take the target lwp_info
443 pointer directly and return void. Handle detaching from a zombie
444 thread.
445 (linux_detach_lwp_callback): New function.
446 (linux_detach): Detach from the leader thread after detaching from
447 the clone threads.
448
2ac09a5b
YQ
4492016-06-28 Yao Qi <yao.qi@linaro.org>
450
451 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
452 for variable new_offset.
453 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
454 (aarch64_ftrace_insn_reloc_cb): Likewise.
455 (aarch64_ftrace_insn_reloc_tb): Likewise.
456 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
457 PRIx64 instead of PRIx32.
458
79e7fd4f
YQ
4592016-06-28 Yao Qi <yao.qi@linaro.org>
460
461 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
462 (the_low_target): Install arm_get_syscall_trapinfo.
463
061fc021
YQ
4642016-06-28 Yao Qi <yao.qi@linaro.org>
465
466 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
467 function.
468 (the_low_target): Install aarch64_get_syscall_trapinfo.
469
4cc32bec
YQ
4702016-06-28 Yao Qi <yao.qi@linaro.org>
471
472 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
473 Callers updated.
474 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
475 Remove parameter sysno.
476 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
477 sysret.
478
782c1122
AA
4792016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
480
481 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
482 (s390_emit_ne_goto): Likewise.
483 (s390_emit_lt_goto): Likewise.
484 (s390_emit_le_goto): Likewise.
485 (s390_emit_gt_goto): Likewise.
486 (s390_emit_ge_goto): Likewise.
487 (s390x_emit_eq_goto): Likewise.
488 (s390x_emit_ne_goto): Likewise.
489 (s390x_emit_lt_goto): Likewise.
490 (s390x_emit_le_goto): Likewise.
491 (s390x_emit_gt_goto): Likewise.
492 (s390x_emit_ge_goto): Likewise.
493 (s390_emit_ops_impl): Mark variable static.
494 (s390x_emit_ops): Likewise.
495
2e7b624b
YQ
4962016-06-17 Yao Qi <yao.qi@linaro.org>
497
498 * linux-low.c (handle_extended_wait): Call
499 uninsert_reinsert_breakpoints for the parent process. Remove
500 reinsert breakpoints from the child process. Reinsert them to
501 the parent process when vfork is done.
502 * mem-break.c (uninsert_reinsert_breakpoints): New function.
503 (reinsert_reinsert_breakpoints): New function.
504 * mem-break.h (uninsert_reinsert_breakpoints): Declare
505 (reinsert_reinsert_breakpoints): Declare.
506
8a81c5d7
YQ
5072016-06-17 Yao Qi <yao.qi@linaro.org>
508
509 * linux-low.c (handle_extended_wait): If the parent is doing
510 step-over, remove the reinsert breakpoints from the forked child.
511
f50bf8e5
YQ
5122016-06-17 Yao Qi <yao.qi@linaro.org>
513
514 * linux-low.c (unsuspend_all_lwps): Declare.
515 (linux_low_filter_event): If thread exited, call finish_step_over.
516 If step-over is finished, unsuspend other threads.
517
8376a3cb
YQ
5182016-06-17 Yao Qi <yao.qi@linaro.org>
519
520 * linux-low.c (linux_resume_one_lwp_throw): Assert
521 has_reinsert_breakpoints returns false.
522 * mem-break.c (delete_disabled_breakpoints): Assert
523 bp type isn't reinsert_breakpoint.
524
f79b145d
YQ
5252016-06-17 Yao Qi <yao.qi@linaro.org>
526
527 * linux-low.c (maybe_hw_step): New function.
528 (linux_resume_one_lwp_throw): Call maybe_hw_step.
529 (finish_step_over): Switch current_thread to lwp temporarily,
530 and assert has_reinsert_breakpoints returns true.
531 (proceed_one_lwp): Call maybe_hw_step.
532 * mem-break.c (has_reinsert_breakpoints): New function.
533 * mem-break.h (has_reinsert_breakpoints): Declare.
534
0ae534d2
JT
5352016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
536
537 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
538
fcdad592
YQ
5392016-05-17 Yao Qi <yao.qi@linaro.org>
540
541 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
542 instead of find_inferior.
543
9e784964
YQ
5442016-05-05 Yao Qi <yao.qi@linaro.org>
545
546 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
547 Initialize res to zero.
548
cf2ebb6e
YQ
5492016-05-05 Yao Qi <yao.qi@linaro.org>
550
551 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
552 to uint32_t.
553
c1aebf87
UW
5542016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
555
556 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
557 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
558 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
559
35fd2deb 5602016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 561 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
562
563 * tracepoint.c (write_inferior_int8): New function.
564 (cmd_qtenable_disable): Write enable flag using
565 write_inferior_int8.
566
484b3c32
YQ
5672016-04-25 Yao Qi <yao.qi@linaro.org>
568
569 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
570 (need_step_over_p): Return zero if the LWP has pending signals
571 can be delivered on software single step target.
572
85ba7d86
YQ
5732016-04-25 Yao Qi <yao.qi@linaro.org>
574
575 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
576 return instead of error.
577
3539aa13
YQ
5782016-04-22 Yao Qi <yao.qi@linaro.org>
579
580 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
581 to 23.
582
5b061e98
YQ
5832016-04-22 Yao Qi <yao.qi@linaro.org>
584
585 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
586 signal when stepping over breakpoint with software single
587 step.
588
3451269c
PA
5892016-04-21 Pedro Alves <palves@redhat.com>
590
591 * linux-s390-low.c (s390_collect_ptrace_register)
592 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
593 add casts.
594 (s390_check_regset): Use void * instead of gdb_byte *.
595
a2358508
PA
5962016-04-20 Pedro Alves <palves@redhat.com>
597
598 * configure: Renegerate.
599
6885166d
YQ
6002016-04-20 Yao Qi <yao.qi@linaro.org>
601
602 * linux-aarch32-low.c: Include "arch/arm-linux.h".
603 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
604 number 16.
605 (arm_store_gregset): Likewise.
606
2b863f51
WT
6072016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
608
609 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
610 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
611 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
612 (amd64-avx-mpx-linux.c): New rules.
613 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
614 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
615 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
616 (srv_amd64_regobj): Add amd64-avx-mpx.o.
617 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
618 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
619 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
620 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
621 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
622 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
623 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
624 * linux-x86-low.c (x86_linux_read_description): Add case for
625 X86_XSTATE_AVX_MPX_MASK.
626 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
627 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
628 init_registers_i386_avx_mpx_linux.
629 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
630 (initialize_low_tracepoint): Call
631 init_registers_i386_avx_mpx_linux.
632 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
633 (initialize_low_tracepoint): Call
634 init_registers_amd64_avx_mpx_linux.
635 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
636 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
637 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
638 declarations.
639
9b30624b
PA
6402016-04-18 Pedro Alves <palves@redhat.com>
641
642 * configure: Regenerate.
643
45e3745e
AT
6442016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
645
646 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
647 (aarch64_emit_sub): Likewise.
648
2afc13ff
PA
6492016-04-12 Pedro Alves <palves@redhat.com>
650
651 * utils.c (prepare_to_throw_exception): Delete.
652
6e774b13
SM
6532016-04-05 Simon Marchi <simon.marchi@ericsson.com>
654
655 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
656
4dca19f8
MK
6572016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
658
659 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
660
d0a9981f
MK
6612016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
662
663 * linux-aarch64-ipa.c: Add <elf.h> include.
664 * linux-ppc-ipa.c: Add <elf.h> include.
665 * linux-s390-ipa.c: Add <elf.h> include.
666
252db07e
MK
6672016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
668
669 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
670 (get_raw_reg_ptr): Likewise.
671 (get_trace_state_variable_value_ptr): Likewise.
672 (set_trace_state_variable_value_ptr): Likewise.
673 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
674 char *.
675
14e2b6d9
MK
6762016-03-31 Wei-cheng Wang <cole945@gmail.com>
677 Marcin Kościelnicki <koriakin@0x04.net>
678
679 PR/17221
680 * linux-ppc-low.c (emit_insns): New function.
681 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
682 (ppc_emit_prologue): New function.
683 (ppc_emit_epilogue): New function.
684 (ppc_emit_add): New function.
685 (ppc_emit_sub): New function.
686 (ppc_emit_mul): New function.
687 (ppc_emit_lsh): New function.
688 (ppc_emit_rsh_signed): New function.
689 (ppc_emit_rsh_unsigned): New function.
690 (ppc_emit_ext): New function.
691 (ppc_emit_zero_ext): New function.
692 (ppc_emit_log_not): New function.
693 (ppc_emit_bit_and): New function.
694 (ppc_emit_bit_or): New function.
695 (ppc_emit_bit_xor): New function.
696 (ppc_emit_bit_not): New function.
697 (ppc_emit_equal): New function.
698 (ppc_emit_less_signed): New function.
699 (ppc_emit_less_unsigned): New function.
700 (ppc_emit_ref): New function.
701 (ppc_emit_const): New function.
702 (ppc_emit_reg): New function.
703 (ppc_emit_pop): New function.
704 (ppc_emit_stack_flush): New function.
705 (ppc_emit_swap): New function.
706 (ppc_emit_stack_adjust): New function.
707 (ppc_emit_call): New function.
708 (ppc_emit_int_call_1): New function.
709 (ppc_emit_void_call_2): New function.
710 (ppc_emit_if_goto): New function.
711 (ppc_emit_goto): New function.
712 (ppc_emit_eq_goto): New function.
713 (ppc_emit_ne_goto): New function.
714 (ppc_emit_lt_goto): New function.
715 (ppc_emit_le_goto): New function.
716 (ppc_emit_gt_goto): New function.
717 (ppc_emit_ge_goto): New function.
718 (ppc_write_goto_address): New function.
719 (ppc_emit_ops_impl): New static variable.
720 (ppc64v1_emit_prologue): New function.
721 (ppc64v2_emit_prologue): New function.
722 (ppc64_emit_epilogue): New function.
723 (ppc64_emit_add): New function.
724 (ppc64_emit_sub): New function.
725 (ppc64_emit_mul): New function.
726 (ppc64_emit_lsh): New function.
727 (ppc64_emit_rsh_signed): New function.
728 (ppc64_emit_rsh_unsigned): New function.
729 (ppc64_emit_ext): New function.
730 (ppc64_emit_zero_ext): New function.
731 (ppc64_emit_log_not): New function.
732 (ppc64_emit_bit_and): New function.
733 (ppc64_emit_bit_or): New function.
734 (ppc64_emit_bit_xor): New function.
735 (ppc64_emit_bit_not): New function.
736 (ppc64_emit_equal): New function.
737 (ppc64_emit_less_signed): New function.
738 (ppc64_emit_less_unsigned): New function.
739 (ppc64_emit_ref): New function.
740 (ppc64_emit_const): New function.
741 (ppc64v1_emit_reg): New function.
742 (ppc64v2_emit_reg): New function.
743 (ppc64_emit_pop): New function.
744 (ppc64_emit_stack_flush): New function.
745 (ppc64_emit_swap): New function.
746 (ppc64v1_emit_call): New function.
747 (ppc64v2_emit_call): New function.
748 (ppc64v1_emit_int_call_1): New function.
749 (ppc64v2_emit_int_call_1): New function.
750 (ppc64v1_emit_void_call_2): New function.
751 (ppc64v2_emit_void_call_2): New function.
752 (ppc64_emit_if_goto): New function.
753 (ppc64_emit_eq_goto): New function.
754 (ppc64_emit_ne_goto): New function.
755 (ppc64_emit_lt_goto): New function.
756 (ppc64_emit_le_goto): New function.
757 (ppc64_emit_gt_goto): New function.
758 (ppc64_emit_ge_goto): New function.
759 (ppc64v1_emit_ops_impl): New static variable.
760 (ppc64v2_emit_ops_impl): New static variable.
761 (ppc_emit_ops): New function.
762 (linux_low_target): Wire in ppc_emit_ops.
763
a2174ba4
MK
7642016-03-31 Wei-cheng Wang <cole945@gmail.com>
765 Marcin Kościelnicki <koriakin@0x04.net>
766
767 PR/17221
768 * Makefile.in: Add powerpc-*-ipa.o
769 * configure.srv: Add ipa_obj for powerpc*-linux.
770 * linux-ppc-ipa.c: New file.
771 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
772 includes.
773 (PPC_FIELD): New macro.
774 (PPC_SEXT): New macro.
775 (PPC_OP6): New macro.
776 (PPC_BO): New macro.
777 (PPC_LI): New macro.
778 (PPC_BD): New macro.
779 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
780 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
781 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
782 (ppc_get_thread_area): New function.
783 (is_elfv2_inferior): New function.
784 (gen_ds_form): New function.
785 (GEN_STD): New macro.
786 (GEN_STDU): New macro.
787 (GEN_LD): New macro.
788 (GEN_LDU): New macro.
789 (gen_d_form): New function.
790 (GEN_ADDI): New macro.
791 (GEN_ADDIS): New macro.
792 (GEN_LI): New macro.
793 (GEN_LIS): New macro.
794 (GEN_ORI): New macro.
795 (GEN_ORIS): New macro.
796 (GEN_LWZ): New macro.
797 (GEN_STW): New macro.
798 (GEN_STWU): New macro.
799 (gen_xfx_form): New function.
800 (GEN_MFSPR): New macro.
801 (GEN_MTSPR): New macro.
802 (GEN_MFCR): New macro.
803 (GEN_MTCR): New macro.
804 (GEN_SYNC): New macro.
805 (GEN_LWSYNC): New macro.
806 (gen_x_form): New function.
807 (GEN_OR): New macro.
808 (GEN_MR): New macro.
809 (GEN_LWARX): New macro.
810 (GEN_STWCX): New macro.
811 (GEN_CMPW): New macro.
812 (gen_md_form): New function.
813 (GEN_RLDICL): New macro.
814 (GEN_RLDICR): New macro.
815 (gen_i_form): New function.
816 (GEN_B): New macro.
817 (GEN_BL): New macro.
818 (gen_b_form): New function.
819 (GEN_BNE): New macro.
820 (GEN_LOAD): New macro.
821 (GEN_STORE): New macro.
822 (gen_limm): New function.
823 (gen_atomic_xchg): New function.
824 (gen_call): New function.
825 (ppc_relocate_instruction): New function.
826 (ppc_install_fast_tracepoint_jump_pad): New function.
827 (ppc_get_min_fast_tracepoint_insn_len): New function.
828 (ppc_get_ipa_tdesc_idx): New function.
829 (the_low_target): Wire in the new functions.
830 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
831 tdescs.
832 * linux-ppc-tdesc.h: New file.
833
a13c4696
MK
8342016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
835
836 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
837 (alloc_jump_pad_buffer): New function.
838 * linux-amd64-ipa.c: Add <sys/mman.h> include.
839 (alloc_jump_pad_buffer): New function.
840 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
841 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
842 (alloc_jump_pad_buffer): New function.
843 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
844 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
845 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
846 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
847
1cda1512
MK
8482016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
849
850 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
851 * linux-amd64-ipa.c: Likewise.
852 * linux-i386-ipa.c: Likewise.
853 * linux-s390-ipa.c: Likewise.
854 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
855 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
856 set_trace_state_variable_value_ptr.
857 (struct ipa_sym_addresses): Likewise.
858 (symbol_list): Likewise.
859 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
860 accessing gdb_collect directly.
861 (gdb_collect_ptr_type): New typedef.
862 (get_raw_reg_ptr_type): New typedef.
863 (get_trace_state_variable_value_ptr_type): New typedef.
864 (set_trace_state_variable_value_ptr_type): New typedef.
865 (gdb_collect_ptr): New global.
866 (get_raw_reg_ptr): New global.
867 (get_trace_state_variable_value_ptr): New global.
868 (set_trace_state_variable_value_ptr): New global.
869 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
870 accessing get_raw_reg directly.
871 (get_get_tsv_func_addr): Likewise for
872 get_trace_state_variable_value_ptr.
873 (get_set_tsv_func_addr): Likewise for
874 set_trace_state_variable_value_ptr.
875 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
876
72fb5488
SM
8772016-03-30 Simon Marchi <simon.marchi@ericsson.com>
878
879 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
880
28170b88
MK
8812016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
882
883 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
884 packets.
885 (relocate_instruction): Remove own_buf.
886 * server.c (own_buf): Make global.
887 (handle_v_requests): Make global.
888 * server.h (own_buf): New declaration.
889 (handle_v_requests): New prototype.
890
f39e8743
MK
8912016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
892
893 PR 18377
894 * linux-s390-low.c (add_insns): New function.
895 (s390_emit_prologue): New function.
896 (s390_emit_epilogue): New function.
897 (s390_emit_add): New function.
898 (s390_emit_sub): New function.
899 (s390_emit_mul): New function.
900 (s390_emit_lsh): New function.
901 (s390_emit_rsh_signed): New function.
902 (s390_emit_rsh_unsigned): New function.
903 (s390_emit_ext): New function.
904 (s390_emit_log_not): New function.
905 (s390_emit_bit_and): New function.
906 (s390_emit_bit_or): New function.
907 (s390_emit_bit_xor): New function.
908 (s390_emit_bit_not): New function.
909 (s390_emit_equal): New function.
910 (s390_emit_less_signed): New function.
911 (s390_emit_less_unsigned): New function.
912 (s390_emit_ref): New function.
913 (s390_emit_if_goto): New function.
914 (s390_emit_goto): New function.
915 (s390_write_goto_address): New function.
916 (s390_emit_litpool): New function.
917 (s390_emit_const): New function.
918 (s390_emit_call): New function.
919 (s390_emit_reg): New function.
920 (s390_emit_pop): New function.
921 (s390_emit_stack_flush): New function.
922 (s390_emit_zero_ext): New function.
923 (s390_emit_swap): New function.
924 (s390_emit_stack_adjust): New function.
925 (s390_emit_set_r2): New function.
926 (s390_emit_int_call_1): New function.
927 (s390_emit_void_call_2): New function.
928 (s390_emit_eq_goto): New function.
929 (s390_emit_ne_goto): New function.
930 (s390_emit_lt_goto): New function.
931 (s390_emit_le_goto): New function.
932 (s390_emit_gt_goto): New function.
933 (s390_emit_ge_goto): New function.
934 (s390x_emit_prologue): New function.
935 (s390x_emit_epilogue): New function.
936 (s390x_emit_add): New function.
937 (s390x_emit_sub): New function.
938 (s390x_emit_mul): New function.
939 (s390x_emit_lsh): New function.
940 (s390x_emit_rsh_signed): New function.
941 (s390x_emit_rsh_unsigned): New function.
942 (s390x_emit_ext): New function.
943 (s390x_emit_log_not): New function.
944 (s390x_emit_bit_and): New function.
945 (s390x_emit_bit_or): New function.
946 (s390x_emit_bit_xor): New function.
947 (s390x_emit_bit_not): New function.
948 (s390x_emit_equal): New function.
949 (s390x_emit_less_signed): New function.
950 (s390x_emit_less_unsigned): New function.
951 (s390x_emit_ref): New function.
952 (s390x_emit_if_goto): New function.
953 (s390x_emit_const): New function.
954 (s390x_emit_call): New function.
955 (s390x_emit_reg): New function.
956 (s390x_emit_pop): New function.
957 (s390x_emit_stack_flush): New function.
958 (s390x_emit_zero_ext): New function.
959 (s390x_emit_swap): New function.
960 (s390x_emit_stack_adjust): New function.
961 (s390x_emit_int_call_1): New function.
962 (s390x_emit_void_call_2): New function.
963 (s390x_emit_eq_goto): New function.
964 (s390x_emit_ne_goto): New function.
965 (s390x_emit_lt_goto): New function.
966 (s390x_emit_le_goto): New function.
967 (s390x_emit_gt_goto): New function.
968 (s390x_emit_ge_goto): New function.
969 (s390_emit_ops): New function.
970 (struct linux_target_ops): Fill in emit_ops hook.
971
abd9baf9
MK
9722016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
973
974 PR 18377
975 * Makefile.in: Add s390 IPA files.
976 * configure.srv: Build IPA for s390.
977 * linux-s390-ipa.c: New file.
978 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
979 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
980 (tdesc_s390_linux32): Likewise.
981 (init_registers_s390_linux32v1): Likewise.
982 (tdesc_s390_linux32v1): Likewise.
983 (init_registers_s390_linux32v2): Likewise.
984 (tdesc_s390_linux32v2): Likewise.
985 (init_registers_s390_linux64): Likewise.
986 (tdesc_s390_linux64): Likewise.
987 (init_registers_s390_linux64v1): Likewise.
988 (tdesc_s390_linux64v1): Likewise.
989 (init_registers_s390_linux64v2): Likewise.
990 (tdesc_s390_linux64v2): Likewise.
991 (init_registers_s390_te_linux64): Likewise.
992 (tdesc_s390_te_linux64): Likewise.
993 (init_registers_s390_vx_linux64): Likewise.
994 (tdesc_s390_vx_linux64): Likewise.
995 (init_registers_s390_tevx_linux64): Likewise.
996 (tdesc_s390_tevx_linux64): Likewise.
997 (init_registers_s390x_linux64): Likewise.
998 (tdesc_s390x_linux64): Likewise.
999 (init_registers_s390x_linux64v1): Likewise.
1000 (tdesc_s390x_linux64v1): Likewise.
1001 (init_registers_s390x_linux64v2): Likewise.
1002 (tdesc_s390x_linux64v2): Likewise.
1003 (init_registers_s390x_te_linux64): Likewise.
1004 (tdesc_s390x_te_linux64): Likewise.
1005 (init_registers_s390x_vx_linux64): Likewise.
1006 (tdesc_s390x_vx_linux64): Likewise.
1007 (init_registers_s390x_tevx_linux64): Likewise.
1008 (tdesc_s390x_tevx_linux64): Likewise.
1009 (have_hwcap_s390_vx): New static variable.
1010 (s390_arch_setup): Fill have_hwcap_s390_vx.
1011 (s390_get_thread_area): New function.
1012 (s390_ft_entry_gpr_esa): New const.
1013 (s390_ft_entry_gpr_zarch): New const.
1014 (s390_ft_entry_misc): New const.
1015 (s390_ft_entry_fr): New const.
1016 (s390_ft_entry_vr): New const.
1017 (s390_ft_main_31): New const.
1018 (s390_ft_main_64): New const.
1019 (s390_ft_exit_fr): New const.
1020 (s390_ft_exit_vr): New const.
1021 (s390_ft_exit_misc): New const.
1022 (s390_ft_exit_gpr_esa): New const.
1023 (s390_ft_exit_gpr_zarch): New const.
1024 (append_insns): New function.
1025 (s390_relocate_instruction): New function.
1026 (s390_install_fast_tracepoint_jump_pad): New function.
1027 (s390_get_min_fast_tracepoint_insn_len): New function.
1028 (s390_get_ipa_tdesc_idx): New function.
1029 (struct linux_target_ops): Wire in the above functions.
1030 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1031 * linux-s390-tdesc.h: New file.
1032
a4105d04
MK
10332016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
1034
1035 * linux-s390-low.c (s390_supports_tracepoints): New function.
1036 (struct linux_target_ops): Fill supports_tracepoints hook.
1037
35ac8b3e
YQ
10382016-03-18 Yao Qi <yao.qi@linaro.org>
1039
1040 * linux-low.c (lwp_signal_can_be_delivered): New function.
1041 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1042
94610ec4
YQ
10432016-03-18 Yao Qi <yao.qi@linaro.org>
1044
1045 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1046 0 if signal is enqueued. Remove 'signal' from one debugging
1047 message. Move one debugging message to some lines below.
1048 Remove code setting 'signal' to 0.
1049
80aea927
YQ
10502016-03-18 Yao Qi <yao.qi@linaro.org>
1051
1052 * linux-low.c (linux_low_filter_event): Remove redundant
1053 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1054
b04fd3be
MK
10552016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
1056
1057 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1058 (struct linux_target_ops): Wire in the above.
1059
c40c8d4b
YQ
10602016-03-03 Yao Qi <yao.qi@linaro.org>
1061
1062 * linux-low.c: Update comments to start_step_over.
1063
0f8288ae
YQ
10642016-03-03 Yao Qi <yao.qi@linaro.org>
1065
1066 PR server/19736
1067 * linux-low.c (handle_extended_wait): Set child suspended
1068 if event_lwp->bp_reinsert isn't zero.
1069
fdbd04a8
YQ
10702016-03-02 Yao Qi <yao.qi@linaro.org>
1071
1072 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1073 enqueue_pending_signal.
1074
6896a8fa
MK
10752016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
1076
1077 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1078 is actually loaded.
1079
ab503087
MK
10802016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1081
1082 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1083 (s390_regmap_3264) [!__s390x__]: New global.
1084 (s390_collect_ptrace_register): Skip map entries containing -1.
1085 (s390_supply_ptrace_register): Ditto.
1086 (s390_fill_gprs_high): New function.
1087 (s390_store_gprs_high): New function.
1088 (s390_regsets): Add NT_S390_HIGH_GPRS.
1089 (s390_get_hwcap): Enable on 31-bit.
1090 (have_hwcap_s390_high_gprs): Enable on 31-bit.
1091 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1092 Detect NT_S390_HIGH_GPRS.
1093 (s390_usrregs_info_3264): Enable on 31-bit.
1094 (s390_regs_info): Enable regs_info_3264 on 31-bit.
1095 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1096
ae91f625
MK
10972016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
1098
1099 PR gdb/13808
1100 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1101 * configure.srv: Ditto.
1102 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1103 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1104 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1105 (init_registers_amd64_linux): Remove prototype.
1106 (tdesc_amd64_linux): Remove declaration.
1107 (get_ipa_tdesc): New function.
1108 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1109 initialize remaining tdescs.
1110 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1111 (init_registers_i386_linux): Remove prototype.
1112 (tdesc_i386_linux): Remove declaration.
1113 (get_ipa_tdesc): New function.
1114 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1115 initialize remaining tdescs.
1116 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1117 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1118 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1119 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1120 (x86_get_ipa_tdesc_idx): New function.
1121 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1122 * linux-x86-tdesc.h: New file.
1123 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1124 (target_get_ipa_tdesc_idx): New macro.
1125 * tracepoint.c (ipa_tdesc_idx): New macro.
1126 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1127 (symbol_list): Add ipa_tdesc_idx.
1128 (cmd_qtstart): Write ipa_tdesc_idx in the target.
1129 (ipa_tdesc): Remove.
1130 (ipa_tdesc_idx): New variable.
1131 (get_context_regcache): Use get_ipa_tdesc.
1132 (gdb_collect): Ditto.
1133 (gdb_probe): Ditto.
1134 * tracepoint.h (get_ipa_tdesc): New prototype.
1135 (ipa_tdesc): Remove.
1136
e7ad2f14
PA
11372016-02-24 Pedro Alves <palves@redhat.com>
1138
1139 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1140 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
1141 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1142 Factor out common code between the USE_SIGTRAP_SIGINFO and
1143 !USE_SIGTRAP_SIGINFO blocks.
1144 (linux_low_filter_event): Call save_stop_reason instead of
1145 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1146 Update comments.
1147 (linux_wait_1): Update comments.
1148
657f9cde
WW
11492016-02-24 Wei-cheng Wang <cole945@gmail.com>
1150
1151 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1152 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1153 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1154 ppc_insert_point, ppc_remove_point.
1155
b00b61e1
MK
11562016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
1157
1158 * linux-s390-low.c (s390_supports_z_point_type): New function.
1159 (struct linux_target_ops): Wire s390_supports_z_point_type in.
1160
553cb527
YQ
11612016-02-16 Yao Qi <yao.qi@linaro.org>
1162
1163 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1164 PC. Get pc from regcache_read_pc.
1165
a5652c21
YQ
11662016-02-12 Yao Qi <yao.qi@linaro.org>
1167
1168 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1169 or linux_get_pc_32bit.
1170 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1171
ed443b61
YQ
11722016-02-12 Yao Qi <yao.qi@linaro.org>
1173
1174 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1175 arm_linux_get_next_pcs_fixup.
1176
020ecd38
MK
11772016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
1178
1179 * tracepoint.c (x_tracepoint_action_download): Change
1180 write_inferior_data_ptr to write_inferior_data_pointer.
1181 (cmd_qtstart): Likewise.
1182 (write_inferior_data_ptr): Remove.
1183 (download_agent_expr): Change write_inferior_data_ptr to
1184 write_inferior_data_pointer.
1185 (download_tracepoint_1): Likewise.
1186 (download_tracepoint): Likewise.
1187 (download_trace_state_variables): Likewise.
1188
7cae9051
WW
11892016-02-11 Wei-cheng Wang <cole945@gmail.com>
1190 Marcin Kościelnicki <koriakin@0x04.net>
1191
1192 * tracepoint.c (struct tracepoint_action_ops): Remove.
1193 (struct tracepoint_action): Remove ops.
1194 (m_tracepoint_action_download, r_tracepoint_action_download)
1195 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1196 size and offset accordingly.
1197 (m_tracepoint_action_ops, r_tracepoint_action_ops)
1198 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1199 (tracepoint_action_send, tracepoint_action_download): New functions.
1200 Helpers for trace action handlers.
1201 (add_tracepoint_action): Remove setup actions ops.
1202 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1203
9f6a71b4
YQ
12042016-02-10 Yao Qi <yao.qi@linaro.org>
1205
1206 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1207
1e94266c
SM
12082016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1209
1210 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1211 to AC_OUTPUT.
1212 * configure: Regenerate.
1213
8adce034
SM
12142016-02-09 Simon Marchi <simon.marchi@ericsson.com>
1215
1216 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1217 void * to gdb_byte *.
1218 * linux-low.c (siginfo_fixup): Likewise.
1219 (linux_xfer_siginfo): Likewise.
1220 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1221 Likewise.
1222 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1223
93813b37
WT
12242016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
1225
1226 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1227 to srv_tgtobj.
1228 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1229 to srv_tgtobj.
1230 * linux-x86-low.c [__x86_64__]: Include
1231 "nat/amd64-linux-siginfo.h".
1232 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1233 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1234 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1235 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1236 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1237 (cpt_si_fd, si_timerid, si_overrun): Move from
1238 nat/amd64-linux-siginfo.c.
1239 * Makefile.in (amd64-linux-siginfo.o:): New rule.
1240
8424cc97
SM
12412016-01-28 Simon Marchi <simon.marchi@ericsson.com>
1242
1243 * server.c (skip_to_semicolon): Remove.
1244 (process_point_options): Use strchrnul instead of
1245 skip_to_semicolon.
1246
4d18591b
YQ
12472016-01-26 Yao Qi <yao.qi@linaro.org>
1248
1249 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1250 * linux-low.c (install_software_single_step_breakpoints): Don't
1251 call regcache_read_pc.
1252 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1253 argument pc.
1254
d8020970
YQ
12552016-01-26 Yao Qi <yao.qi@linaro.org>
1256
1257 * linux-low.c (install_software_single_step_breakpoints): Call
1258 regcache_read_pc instead of get_pc.
1259
8b207339
YQ
12602016-01-26 Yao Qi <yao.qi@linaro.org>
1261
1262 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1263 (unblock_async_io): Rename to ...
1264 (block_unblock_async_io): ... it. New function.
1265 (enable_async_io): Don't install SIGIO handler. Unblock it
1266 instead.
1267 (disable_async_io): Don't ignore SIGIO. Block it instead.
1268 (initialize_async_io): Install SIGIO handler. Don't call
1269 unblock_async_io.
1270
18879fef
YQ
12712016-01-26 Yao Qi <yao.qi@linaro.org>
1272
1273 * remote-utils.c (getpkt): If the buffer isn't empty, and the
1274 first character is '\003', call *the_target->request_interrupt.
1275
a0f8e08a
YQ
12762016-01-25 Yao Qi <yao.qi@linaro.org>
1277
1278 * remote-utils.c (new_thread_notify): Remove.
1279 (dead_thread_notify): Likewise.
1280 * remote-utils.h (new_thread_notify): Remove declaration.
1281 (dead_thread_notify): Likewise.
1282
cc5fd9ab
MK
12832016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
1284
1285 * gdb.trace/pending.exp: Fix expected message on continue.
1286
99e8eb11
MK
12872016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
1288
1289 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1290 it works properly on big-endian machines where sizeof (CORE_ADDR)
1291 != sizeof (void *).
1292
a994041d
PA
12932016-01-21 Pedro Alves <palves@redhat.com>
1294
1295 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1296 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1297 * configure: Regenerate.
1298
f7a6a40d
YQ
12992016-01-21 Yao Qi <yao.qi@linaro.org>
1300
1301 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1302 is_thumb and set it according to CPSR saved on the stack.
1303 (get_next_pcs_syscall_next_pc): Pass is_thumb to
1304 arm_sigreturn_next_pc.
1305
6f69e520
YQ
13062016-01-18 Yao Qi <yao.qi@linaro.org>
1307
1308 * linux-low.c (linux_set_pc_64bit): New function.
1309 (linux_get_pc_64bit): New function.
1310 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1311 Declare.
1312 * linux-sparc-low.c (debug_threads): Remove declaration.
1313 (sparc_get_pc): Remove.
1314 (the_low_target): Use linux_get_pc_64bit instead of
1315 sparc_get_pc.
1316 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1317 (the_low_target): Use linux_get_pc_64bit and
1318 linux_set_pc_64bit.
1319
276d4552
YQ
13202016-01-18 Yao Qi <yao.qi@linaro.org>
1321
1322 * linux-arm-low.c (debug_threads): Remove declaration.
1323 (arm_get_pc, arm_set_pc): Remove.
1324 (the_low_target): Use linux_get_pc_32bit and
1325 linux_set_pc_32bit.
1326 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1327 (the_low_target): Use linux_get_pc_32bit and
1328 linux_set_pc_32bit.
1329 * linux-cris-low.c (debug_threads): Remove declaration.
1330 (cris_get_pc, cris_set_pc,): Remove.
1331 (the_low_target): Use linux_get_pc_32bit and
1332 linux_set_pc_32bit.
1333 * linux-crisv32-low.c (debug_threads): Remove declaration.
1334 (cris_get_pc, cris_set_pc): Remove.
1335 (the_low_target): Use linux_get_pc_32bit and
1336 linux_set_pc_32bit.
1337 * linux-low.c: Include inttypes.h.
1338 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1339 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1340 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1341 (the_low_target): Use linux_get_pc_32bit and
1342 linux_set_pc_32bit.
1343 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1344 (the_low_target): Use linux_get_pc_32bit and
1345 linux_set_pc_32bit.
1346 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1347 (the_low_target): Use linux_get_pc_32bit and
1348 linux_set_pc_32bit.
1349 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1350 (the_low_target): Use linux_get_pc_32bit and
1351 linux_set_pc_32bit.
1352 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1353 (the_low_target): Use linux_get_pc_32bit and
1354 linux_set_pc_32bit.
1355
eb0edac8
GB
13562016-01-18 Gary Benson <gbenson@redhat.com>
1357
1358 * configure.ac (AC_FUNC_FORK): New check.
1359 * config.in: Regenerate.
1360 * configure: Likewise.
1361
1b451dda
YQ
13622016-01-14 Yao Qi <yao.qi@linaro.org>
1363
1364 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1365 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1366 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1367 arm_get_next_pcs_ctor.
1368
82075af2
JS
13692016-01-12 Josh Stone <jistone@redhat.com>
1370 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1371
1372 * inferiors.h: Include "gdb_vecs.h".
1373 (struct process_info): Add syscalls_to_catch.
1374 * inferiors.c (remove_process): Free syscalls_to_catch.
1375 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1376 syscall_return stops.
1377 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1378 * server.c (handle_general_set): Handle QCatchSyscalls.
1379 (handle_query): Report support for QCatchSyscalls.
1380 * target.h (struct target_ops): Add supports_catch_syscall.
1381 (target_supports_catch_syscall): New macro.
1382 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1383 (struct lwp_info): Add syscall_state.
1384 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1385 Maintain syscall_state and syscalls_to_catch across exec.
1386 (get_syscall_trapinfo): New function, proxy to the_low_target.
1387 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1388 (linux_low_filter_event): Toggle syscall_state entry/return for
1389 syscall traps, and set it ignored for all others.
1390 (gdb_catching_syscalls_p): New function.
1391 (gdb_catch_this_syscall_p): New function.
1392 (linux_wait_1): Handle SYSCALL_SIGTRAP.
1393 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1394 (linux_supports_catch_syscall): New function.
1395 (linux_target_ops): Install it.
1396 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1397 (the_low_target): Install it.
1398
8f13a3ce
MF
13992016-01-12 Mike Frysinger <vapier@gentoo.org>
1400
1401 * acinclude.m4: Include new ../warning.m4 file.
1402 * configure: Regenerated.
1403 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1404
5b3da067
MF
14052016-01-12 Mike Frysinger <vapier@gentoo.org>
1406
1407 * ax.c (is_goto_target): Mark static.
1408 * linux-low.c (register_addr): Likewise.
1409 (linux_fetch_registers, linux_store_registers): Likewise.
1410 * mem-break.c (any_persistent_commands): Fix old prototype.
1411 (add_commands_to_breakpoint): Mark static.
1412 * regcache.c (find_register_by_name): Delete unused func.
1413 * remote-utils.c (hex_or_minus_one): Mark static.
1414 * server.c (monitor_show_help): Mark static.
1415 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1416 handle_v_requests): Likewise.
1417
bc504a31
PA
14182016-01-12 Pedro Alves <palves@redhat.com>
1419
1420 Remove use of the registered trademark symbol throughout.
1421
5a0dd67a
YQ
14222016-01-08 Yao Qi <yao.qi@linaro.org>
1423
1424 * remote-utils.c (getpkt): If c is '\003', call target hook
1425 request_interrupt.
1426
b2ca446f
YQ
14272016-01-06 Yao Qi <yao.qi@linaro.org>
1428
1429 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1430 linux-aarch32-low.c.
1431 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1432 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1433 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1434 (thumb2_breakpoint): Declare.
1435 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1436 linux-aarch32-low.h.
1437 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1438 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1439 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1440
edd88788
JB
14412016-01-01 Joel Brobecker <brobecker@adacore.com>
1442
1443 * gdbreplay.c (gdbreplay_version): Change copyright year in
1444 version message.
1445 * server.c (gdbserver_version): Likewise.
1446
65da7f14
PP
14472015-12-28 Patrick Palka <patrick@parcs.ath.cx>
1448
1449 * server.c (crc32_table): Delete.
1450 (crc32): Use libiberty's xcrc32 function.
1451
4abd5ed2
JB
14522015-12-22 Joel Brobecker <brobecker@adacore.com>
1453
1454 * lynx-low.c (lynx_delete_thread_callback): New function.
1455 (lynx_mourn): Properly delete our process and all of its
1456 threads. Remove call to clear_inferiors.
1457
0e50fe5c
JB
14582015-12-22 Joel Brobecker <brobecker@adacore.com>
1459
1460 * target.c (thread_search_callback): Add check that
1461 the thread_stopped target callback is not NULL before
1462 calling it.
1463
35adc03f
YQ
14642015-12-21 Yao Qi <yao.qi@linaro.org>
1465
1466 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1467 arm breakpoint.
1468
bd2b2909
AT
14692015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1470
1471 * server.c (handle_query): Call target_supports_software_single_step.
1472
7fe5e27e
AT
14732015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1474
1475 * linux-low.c (single_step): New function.
1476 (linux_resume_one_lwp_throw): Call single_step.
1477 (start_step_over): Likewise.
1478
d9311bfa
AT
14792015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1480
1481 * Makefile.in (SFILES): Append arch/arm-linux.c,
1482 arch/arm-get-next-pcs.c.
1483 (arm-linux.o): New rule.
1484 (arm-get-next-pcs.o): New rule.
1485 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1486 arm-linux.o.
1487 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
1488 to linux-aarch32-low.c.
1489 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1490 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1491 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1492 (thumb2_breakpoint_len): Likewise.
1493 (arm_is_thumb_mode): Make non-static.
1494 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
1495 from linux-aarch32-low.c.
1496 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1497 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1498 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1499 (thumb2_breakpoint_len): Likewise.
1500 (arm_is_thumb_mode): New declaration.
1501 * linux-arm-low.c: Include arch/arm-linux.h
1502 aarch/arm-get-next-pcs.h, sys/syscall.h.
1503 (get_next_pcs_ops): New struct.
1504 (get_next_pcs_addr_bits_remove): New function.
1505 (get_next_pcs_is_thumb): New function.
1506 (get_next_pcs_read_memory_unsigned_integer): Likewise.
1507 (arm_sigreturn_next_pc): Likewise.
1508 (get_next_pcs_syscall_next_pc): Likewise.
1509 (arm_gdbserver_get_next_pcs): Likewise.
1510 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1511 Initialize.
1512 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1513 * server.h: Include gdb_vecs.h.
1514
68ce2059
AT
15152015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1516
1517 * Makefile.in (SFILES): Append common/common-regcache.c.
1518 (OBS): Append common-regcache.o.
1519 (common-regcache.o): New rule.
1520 * regcache.c (init_register_cache): Initialize cache to
1521 REG_UNAVAILABLE.
1522 (regcache_raw_read_unsigned): New function.
1523 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1524 register_status enum.
1525
fa5308bd
AT
15262015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
1527
1528 * linux-aarch64-low.c (the_low_targets): Rename
1529 breakpoint_reinsert_addr to get_next_pcs.
1530 * linux-arm-low.c (the_low_targets): Likewise.
1531 * linux-bfin-low.c (the_low_targets): Likewise.
1532 * linux-cris-low.c (the_low_targets): Likewise.
1533 * linux-crisv32-low.c (the_low_targets): Likewise.
1534 * linux-low.c (can_software_single_step): Likewise.
1535 (install_software_single_step_breakpoints): New function.
1536 (start_step_over): Use install_software_single_step_breakpoints.
1537 * linux-low.h: New CORE_ADDR vector.
1538 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1539 get_next_pcs.
1540 * linux-mips-low.c (the_low_targets): Likewise.
1541 * linux-nios2-low.c (the_low_targets): Likewise.
1542 * linux-sparc-low.c (the_low_targets): Likewise.
1543
4a6ed09b
PA
15442015-12-17 Pedro Alves <palves@redhat.com>
1545
1546 * linux-low.c (linux_kill_one_lwp): Remove references to
1547 LinuxThreads.
1548 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
1549 to 'kill'.
1550 (linux_init_signals): Delete.
1551 (initialize_low): Adjust.
1552 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1553
7544db95
PA
15542015-12-16 Pedro Alves <palves@redhat.com>
1555
1556 * configure.ac (compiler warning flags): When testing a
1557 -Wno-foo option, check whether -Wfoo works instead.
1558 * configure: Regenerate.
1559
8020350c
DB
15602015-12-11 Don Breazeal <donb@codesourcery.com>
1561
1562 * server.c (process_serial_event): Don't exit from gdbserver
1563 in remote mode if there are still active inferiors.
1564
db91f502
YQ
15652015-12-11 Yao Qi <yao.qi@linaro.org>
1566
1567 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1568 arm_breakpoint_at if the process is 32-bit.
1569
b37a6290
YQ
15702015-12-11 Yao Qi <yao.qi@linaro.org>
1571
1572 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1573 arm breakpoint.
1574
17b1509a
YQ
15752015-12-07 Yao Qi <yao.qi@linaro.org>
1576
1577 * configure.srv: Append arm.o to srv_tgtobj for
1578 aarch64*-*-linux* target.
1579 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
1580 from linux-arm-low.c.
1581 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1582 (arm_breakpoint_len, thumb_breakpoint): Likewise.
1583 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1584 (thumb2_breakpoint_len): Likewise.
1585 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1586 (arm_breakpoint_kinds): Likewise.
1587 (arm_breakpoint_kind_from_pc): Likewise.
1588 (arm_sw_breakpoint_from_kind): Likewise.
1589 (arm_breakpoint_kind_from_current_state): Likewise.
1590 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1591 (arm_sw_breakpoint_from_kind): Declare.
1592 (arm_breakpoint_kind_from_current_state): Declare.
1593 (arm_breakpoint_at): Declare.
1594 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1595 arm_sw_breakpoint_from_kind if process is 32-bit.
1596 (aarch64_breakpoint_kind_from_pc): New function.
1597 (aarch64_breakpoint_kind_from_current_state): New function.
1598 (the_low_target): Initialize fields breakpoint_kind_from_pc
1599 and breakpoint_kind_from_current_state.
1600 * linux-arm-low.c (arm_breakpoint_kinds): Move to
1601 linux-aarch32-low.c.
1602 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1603 (arm_breakpoint, arm_breakpoint_len): Likewise.
1604 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1605 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1606 (arm_is_thumb_mode): Likewise.
1607 (arm_breakpoint_at): Likewise.
1608 (arm_breakpoint_kind_from_pc): Likewise.
1609 (arm_sw_breakpoint_from_kind): Likewise.
1610 (arm_breakpoint_kind_from_current_state): Likewise.
1611
1612 Revert:
1613 2015-08-04 Yao Qi <yao.qi@linaro.org>
1614
1615 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1616 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1617 * server.c (extended_protocol): Remove "static".
1618 * server.h (extended_protocol): Declare it.
1619
ece66d65
JS
16202015-12-04 Josh Stone <jistone@redhat.com>
1621
1622 * target.h (struct target_ops) <arch_setup>: Rename to ...
1623 (struct target_ops) <post_create_inferior>: ... this.
1624 (target_arch_setup): Rename to ...
1625 (target_post_create_inferior): ... this, calling post_create_inferior.
1626 * server.c (start_inferior): Update target_arch_setup calls to
1627 target_post_create_inferior.
1628 * linux-low.c (linux_low_ptrace_options): Forward declare.
1629 (linux_arch_setup): Update its comment for general use.
1630 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1631 (struct linux_target_ops): Use linux_post_create_inferior.
1632 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1633 to post_create_inferior.
1634 * nto-low.c (struct nto_target_ops): Likewise.
1635 * spu-low.c (struct spu_target_ops): Likewise.
1636 * win32-low.c (struct win32_target_ops): Likewise.
1637
e58c48b4
AT
16382015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
1639
1640 * linux-arm-low.c: Remove duplicate arch/arm.h include.
1641
fbec8956
AT
16422015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1643
1644 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1645 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1646 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1647 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1648 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1649 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1650 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1651 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1652 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1653 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1654 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1655 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1656
9b4c5f87
AT
16572015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1658
1659 * linux-low.c (linux_look_up_symbols): Don't call
1660 linux_supports_traceclone.
1661 * linux-low.h (thread_db_init): Remove use_events argument.
1662 * thread-db.c (thread_db_use_event): Remove global variable.
1663 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1664 (struct thread_db) <td_create_bp>: Remove field.
1665 (thread_db_create_event): Remove function.
1666 (thread_db_enable_reporting): Likewise.
1667 (find_one_thread): Don't check for thread_db_use_events.
1668 (attach_thread): Likewise.
1669 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1670 (try_thread_db_load_1): Don't check for thread_db_use_events.
1671 (thread_db_init): Remove use_events argument and thread events
1672 handling.
1673 (remove_thread_event_breakpoints): Remove function.
1674 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1675
7d00775e
AT
16762015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1677
1678 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1679 New function.
1680 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1681 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1682 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1683 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1684 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1685 Initialize.
1686 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1687 New function.
1688 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1689 * linux-low.c (can_hardware_single_step): Use
1690 supports_hardware_single_step.
1691 (can_software_single_step): New function.
1692 (start_step_over): Call can_software_single_step.
1693 (linux_supports_hardware_single_step): New function.
1694 (struct target_ops) <supports_software_single_step>: Initialize.
1695 * linux-low.h (struct linux_target_ops)
1696 <supports_hardware_single_step>: Initialize.
1697 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1698 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1699 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1700 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1701 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1702 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1703 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1704 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1705 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1706 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1707 Initialize.
1708 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1709 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1710 Initialize.
1711 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1712 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1713 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1714 New function.
1715 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1716 * target.h (struct target_ops): <supports_software_single_step>:
1717 New field.
1718 (target_supports_software_single_step): New macro.
1719
2d97cd35
AT
17202015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1721
1722 * linux-low.c (linux_wait_1): Fix pc advance condition.
1723 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1724 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1725
769ef81f
AT
17262015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1727
1728 * linux-arm-low.c (arm_is_thumb_mode): New function.
1729 (arm_breakpoint_at): Use arm_is_thumb_mode.
1730 (arm_breakpoint_kind_from_current_state): New function.
1731 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1732 Initialize.
1733 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1734 (linux_breakpoint_kind_from_current_state): New function.
1735 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1736 * linux-low.h (struct linux_target_ops)
1737 <breakpoint_kind_from_current_state>: New field.
1738 * target.h (struct target_ops): Likewise.
1739 (target_breakpoint_kind_from_current_state): New macro.
1740
1bebeeca
PA
17412015-11-30 Pedro Alves <palves@redhat.com>
1742
1743 * linux-low.c (linux_resume): Wake up the event loop before
1744 returning.
1745
a67a9fae
PA
17462015-11-30 Pedro Alves <palves@redhat.com>
1747
1748 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1749 check.
1750 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1751 to -1.
1752 * target.c (struct thread_search): New structure.
1753 (thread_search_callback): New function.
1754 (prev_general_thread): New global.
1755 (prepare_to_access_memory, done_accessing_memory): New functions.
1756 * target.h (prepare_to_access_memory, done_accessing_memory):
1757 Replace macros with function declarations.
1758
f2faf941
PA
17592015-11-30 Pedro Alves <palves@redhat.com>
1760
1761 PR 14618
1762 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1763 report TARGET_WAITKIND_NO_RESUMED.
1764 * remote-utils.c (prepare_resume_reply): Handle
1765 TARGET_WAITKIND_NO_RESUMED.
1766 * server.c (report_no_resumed): New global.
1767 (handle_query) <qSupported>: Handle "no-resumed+". Report
1768 "no-resumed+" support.
1769 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1770 return error if the client doesn't support no-resumed events.
1771 (push_stop_notification): New function.
1772 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1773 events if the client supports them.
1774
a681f9c9
PA
17752015-11-30 Pedro Alves <palves@redhat.com>
1776
1777 * linux-low.c (thread_still_has_status_pending_p): Don't check
1778 vCont;t here.
1779 (lwp_resumed): New function.
1780 (status_pending_p_callback): Return early if the LWP is not
1781 supposed to be resumed.
1782
65706a29
PA
17832015-11-30 Pedro Alves <palves@redhat.com>
1784
1785 * linux-low.c (handle_extended_wait): Assert that the LWP's
1786 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1787 thread create events, leave the new child's status pending.
1788 (linux_low_filter_event): If GDB wants to hear about thread exit
1789 events, leave the LWP marked dead and don't delete it.
1790 (linux_wait_for_event_filtered): Don't check for thread exit.
1791 (filter_exit_event): New function.
1792 (linux_wait_1): Use it, when returning an exit event.
1793 (linux_resume_one_lwp_throw): Assert that the LWP's
1794 waitstatus is TARGET_WAITKIND_IGNORE.
1795 * remote-utils.c (prepare_resume_reply): Handle
1796 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1797 * server.c (report_thread_events): New global.
1798 (handle_general_set): Handle QThreadEvents.
1799 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1800 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1801 TARGET_WAITKIND_THREAD_EXITED.
1802 * server.h (report_thread_events): Declare.
1803
56cf4bed
PA
18042015-11-30 Pedro Alves <palves@redhat.com>
1805
1806 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1807 the thread's last_resume_kind was resume_stop.
1808
500c1d85
PA
18092015-11-30 Pedro Alves <palves@redhat.com>
1810
1811 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1812 before returning.
1813
de979965
PA
18142015-11-30 Pedro Alves <palves@redhat.com>
1815
1816 * server.c (handle_v_requests): Handle vCtrlC.
1817
34c65914
PA
18182015-11-30 Pedro Alves <palves@redhat.com>
1819
1820 * gdbthread.h (find_any_thread_of_pid): Declare.
1821 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1822 functions.
1823 * server.c (handle_query): If current_thread is NULL, look for
1824 another thread of the selected process.
1825
79efa585 18262015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 1827 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
1828
1829 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1830 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1831 name in reply.
1832 * target.h (struct target_ops) <thread_name>: New field.
1833 (target_thread_name): New macro.
1834
80d82c19
JB
18352015-11-23 Joel Brobecker <brobecker@adacore.com>
1836
1837 * regcache.h (regcache_invalidate_pid): Add declaration.
1838 * regcache.c (regcache_invalidate_pid): New function, extracted
1839 from regcache_invalidate.
1840 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1841 Add trivial documentation comment.
1842 * lynx-low.c: Use regcache_invalidate_pid instead of
1843 regcache_invalidate.
1844
64da5dd5
JB
18452015-11-23 Joel Brobecker <brobecker@adacore.com>
1846
1847 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1848 and Elf64_auxv_t if the target is Android.
1849
37ce4055
DE
18502015-11-22 Doug Evans <xdje42@gmail.com>
1851
1852 * target.h: #include <sys/types.h>.
1853
06e03fff
PA
18542015-11-19 Pedro Alves <palves@redhat.com>
1855
1856 * linux-low.c (linux_process_qsupported): Change prototype.
1857 Adjust.
1858 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1859 Change prototype.
1860 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1861 and adjust to loop over all features.
1862 * server.c (handle_query) <qSupported>: Adjust to call
1863 target_process_qsupported once, passing it a vector of unprocessed
1864 features.
1865 * target.h (struct target_ops) <process_qsupported>: Change
1866 prototype.
1867 (target_process_qsupported): Adjust.
1868
9a084706
PA
18692015-11-19 Pedro Alves <palves@redhat.com>
1870
1871 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1872 mode.
1873 * configure: Regenerate.
1874
dad44a1f
PA
18752015-11-19 Pedro Alves <palves@redhat.com>
1876
1877 * configure: Regenerate.
1878
231c0592
YQ
18792015-11-19 Yao Qi <yao.qi@linaro.org>
1880
1881 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1882 type to uint32_t.
1883
6c1c9a8b
YQ
18842015-11-19 Yao Qi <yao.qi@linaro.org>
1885
1886 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1887 (struct aarch64_operand): Move enum out.
1888
9caa3311
YQ
18892015-11-19 Yao Qi <yao.qi@linaro.org>
1890
1891 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1892 struct user_fpsimd_state *.
1893 (aarch64_store_fpregset): Likewise.
1894
6a69a054
YQ
18952015-11-19 Yao Qi <yao.qi@linaro.org>
1896
1897 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1898 struct user_pt_regs *.
1899 (aarch64_store_gregset): Likewise.
1900
1798301e
PA
19012015-11-18 Pedro Alves <palves@redhat.com>
1902
1903 * Makefile.in (all_object_files): Add $IPA_OBJS.
1904
ce7715e2
PA
19052015-11-17 Pedro Alves <palves@redhat.com>
1906
1907 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1908 GDB_SIGNAL_0 and gdb_signal_to_string.
1909
c0879059
PA
19102015-11-17 Pedro Alves <palves@redhat.com>
1911
1912 * win32-low.c (handle_output_debug_string): Remove parameter.
1913 (win32_kill): Remove our_status local and adjust call to
1914 handle_output_debug_string.
1915 (get_child_debug_event): Adjust call to
1916 handle_output_debug_string.
1917
1996e237
SM
19182015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1919
1920 * linux-mips-low.c (mips_fill_gregset): Add cast.
1921 (mips_store_gregset): Likewise.
1922 (mips_fill_fpregset): Likewise.
1923 (mips_store_fpregset): Likewise.
1924
cbec665b
SM
19252015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1926
1927 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1928 priv.
1929
eb3e3c67
SM
19302015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1931
1932 * linux-mips-low.c (mips_linux_new_thread): Change type of
1933 watch_type to enum target_hw_bp_type.
1934
171de4b8
SM
19352015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1936
1937 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1938 Change return type to arm_hwbp_type.
1939
04248ead
SM
19402015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1941
1942 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1943 (arm_store_gregset): Likewise.
1944 * linux-arm-low.c (arm_get_hwcap): Likewise.
1945 (arm_read_description): Likewise.
1946
04b3479c
SM
19472015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1948
1949 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1950
2bc84e8a
SM
19512015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1952
1953 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1954 (ppc_fill_vsxregset): Likewise.
1955 (ppc_store_vsxregset): Likewise.
1956 (ppc_fill_vrregset): Likewise.
1957 (ppc_store_vrregset): Likewise.
1958 (ppc_fill_evrregset): Likewise.
1959 (ppc_store_evrregset): Likewise.
1960
e6c5bb05
SM
19612015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1962
1963 * linux-ppc-low.c (ppc_usrregs_info): Remove
1964 forward-declaration.
1965 (ppc_arch_setup): Move lower in file.
1966
7ea45d72
SM
19672015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1968
1969 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1970 (ps_pdwrite): Likewise.
1971
69291610
HW
19722015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1973
1974 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1975 to after assert checks.
1976
b42945fd
SM
19772015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1978
1979 * proc-service.c (ps_pdread): Add/adjust casts.
1980 (ps_pdwrite): Add/adjust casts.
1981
d6f85c84
SM
19822015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1983
1984 * server.c (handle_search_memory_1): Cast return value of
1985 memmem.
1986
f98cd059
SM
19872015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1988
1989 * server.c (write_qxfer_response): Change type of data to
1990 gdb_byte *.
1991
d2412fa5
PA
19922015-10-29 Pedro Alves <palves@redhat.com>
1993
1994 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1995
c17414a2
PA
19962015-10-29 Pedro Alves <palves@redhat.com>
1997
1998 * tracepoint.c (clear_installed_tracepoints): Add casts.
1999
e053fbc4
PA
20002015-10-29 Pedro Alves <palves@redhat.com>
2001
2002 * server.c (handle_v_cont, process_serial_event): Add enum
2003 gdb_signal casts to signal parsing code.
2004
add67df8
PA
20052015-10-29 Pedro Alves <palves@redhat.com>
2006
2007 * linux-low.h (NULL_REGSET): Define.
2008 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2009 * linux-arm-low.c (arm_regsets): Likewise.
2010 * linux-crisv32-low.c (cris_regsets): Likewise.
2011 * linux-m68k-low.c (m68k_regsets): Likewise.
2012 * linux-mips-low.c (mips_regsets): Likewise.
2013 * linux-nios2-low.c (nios2_regsets): Likewise.
2014 * linux-ppc-low.c (ppc_regsets): Likewise.
2015 * linux-s390-low.c (s390_regsets): Likewise.
2016 * linux-sh-low.c (sh_regsets): Likewise.
2017 * linux-sparc-low.c (sparc_regsets): Likewise.
2018 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2019 * linux-tile-low.c (tile_regsets): Likewise.
2020 * linux-x86-low.c (x86_regsets): Likewise.
2021 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2022
50bc912a
PA
20232015-10-29 Pedro Alves <palves@redhat.com>
2024
2025 * linux-low.h (NULL_REGSET): Define.
2026 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2027 * linux-arm-low.c (arm_regsets): Likewise.
2028 * linux-crisv32-low.c (cris_regsets): Likewise.
2029 * linux-m68k-low.c (m68k_regsets): Likewise.
2030 * linux-mips-low.c (mips_regsets): Likewise.
2031 * linux-nios2-low.c (nios2_regsets): Likewise.
2032 * linux-ppc-low.c (ppc_regsets): Likewise.
2033 * linux-s390-low.c (s390_regsets): Likewise.
2034 * linux-sh-low.c (sh_regsets): Likewise.
2035 * linux-sparc-low.c (sparc_regsets): Likewise.
2036 * linux-tic6x-low.c (tic6x_regsets): Likewise.
2037 * linux-tile-low.c (tile_regsets): Likewise.
2038 * linux-x86-low.c (x86_regsets): Likewise.
2039 * linux-xtensa-low.c (xtensa_regsets): Likewise.
2040
682b2546
DE
20412015-10-26 Doug Evans <dje@google.com>
2042
2043 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2044
963843d4
DE
20452015-10-26 Doug Evans <dje@google.com>
2046
2047 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2048
d41401ac
DE
20492015-10-26 Doug Evans <dje@google.com>
2050
2051 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2052 for debug_printf.
2053 (attach_thread, find_new_threads_callback): Ditto.
2054
3db28855
AT
20552015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2056
2057 * mem-break.h (set_breakpoint_data): Remove.
2058
fb78e89c
AT
20592015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2060
2061 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2062 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2063 (initialize_low): Remove set_breakpoint_data call.
2064 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2065 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2066 (initialize_low): Remove set_breakpoint_data call.
2067 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2068 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2069 (initialize_low): Remove set_breakpoint_data call.
2070
2e6ee069
AT
20712015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
2072
2073 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2074 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2075 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2076 * target.h (target_breakpoint_kind_from_pc): New macro.
2077
1652a986
AT
20782015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
2079
2080 * linux-low.c (default_breakpoint_kind_from_pc): New function.
2081 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2082 the default breakpoint kind.
2083
abeead09
AT
20842015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2085
2086 * linux-arm-low.c (arm_supports_z_point_type): Add software
2087 breakpoint support.
2088
b0b4b501
AT
20892015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2090
2091 * linux-arm-low.c: Refactor breakpoint definitions.
2092 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2093 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2094
8689682c
AT
20952015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2096
2097 * Makefile.in: Add arm.c/o.
2098 * configure.srv: Likewise.
2099 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2100 (arm_breakpoint_kind_from_pc): New function.
2101 (arm_sw_breakpoint_from_kind): Return proper kind.
2102 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2103
27165294
AT
21042015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2105
2106 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2107 removal.
2108 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2109 (struct raw_breakpoint) <size>: Remove.
2110 (struct raw_breakpoint) <kind>: Add.
2111 (bp_size): New function.
2112 (bp_opcode): Likewise.
2113 (find_raw_breakpoint_at): Adjust for kind.
2114 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2115 (remove_memory_breakpoint): Adjust for kind call bp_size.
2116 (set_raw_breakpoint_at): Adjust for kind.
2117 (set_breakpoint): Likewise.
2118 (set_breakpoint_at): Call breakpoint_kind_from_pc.
2119 (delete_raw_breakpoint): Adjust for kind.
2120 (delete_breakpoint): Likewise.
2121 (find_gdb_breakpoint): Likewise.
2122 (set_gdb_breakpoint_1): Likewise.
2123 (set_gdb_breakpoint): Likewise.
2124 (delete_gdb_breakpoint_1): Likewise.
2125 (delete_gdb_breakpoint): Likewise.
2126 (uninsert_raw_breakpoint): Likewise.
2127 (reinsert_raw_breakpoint): Likewise.
2128 (set_breakpoint_data): Remove.
2129 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2130 (check_mem_read): Adjust for kind call bp_size.
2131 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2132 (clone_one_breakpoint): Adjust for kind.
2133 * mem-break.h (set_gdb_breakpoint): Likewise.
2134 (delete_gdb_breakpoint): Likewise.
2135 * server.c (process_serial_event): Likewise.
2136
dd373349
AT
21372015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2138
2139 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2140 (struct linux_target_ops) <breakpoint>: Remove.
2141 (struct linux_target_ops) <breakpoint_len>: Remove.
2142 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2143 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2144 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2145 (arm_sw_breakpoint_from_kind): New function.
2146 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2147 (struct linux_target_ops) <breakpoint>: Remove.
2148 (struct linux_target_ops) <breakpoint_len>: Remove.
2149 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2150 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2151 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2152 (struct linux_target_ops) <breakpoint>: Remove.
2153 (struct linux_target_ops) <breakpoint_len>: Remove.
2154 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2155 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2156 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2157 (struct linux_target_ops) <breakpoint>: Remove.
2158 (struct linux_target_ops) <breakpoint_len>: Remove.
2159 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2160 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2161 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2162 and sw_breakpoint_from_kind to increment the pc.
2163 (linux_breakpoint_kind_from_pc): New function.
2164 (linux_sw_breakpoint_from_kind): New function.
2165 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2166 (initialize_low): Call breakpoint_kind_from_pc and
2167 sw_breakpoint_from_kind to replace breakpoint_data/len.
2168 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2169 New field.
2170 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2171 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2172 (struct linux_target_ops) <breakpoint>: Remove.
2173 (struct linux_target_ops) <breakpoint_len>: Remove.
2174 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2175 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2176 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2177 (struct linux_target_ops) <breakpoint>: Remove.
2178 (struct linux_target_ops) <breakpoint_len>: Remove.
2179 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2180 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2181 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2182 (struct linux_target_ops) <breakpoint>: Remove.
2183 (struct linux_target_ops) <breakpoint_len>: Remove.
2184 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2185 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2186 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2187 (struct linux_target_ops) <breakpoint>: Remove.
2188 (struct linux_target_ops) <breakpoint_len>: Remove.
2189 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2190 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2191 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2192 (struct linux_target_ops) <breakpoint>: Remove.
2193 (struct linux_target_ops) <breakpoint_len>: Remove.
2194 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2195 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2196 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2197 (struct linux_target_ops) <breakpoint>: Remove.
2198 (struct linux_target_ops) <breakpoint_len>: Remove.
2199 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2200 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2201 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2202 (struct linux_target_ops) <breakpoint>: Remove.
2203 (struct linux_target_ops) <breakpoint_len>: Remove.
2204 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2205 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2206 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2207 (struct linux_target_ops) <breakpoint>: Remove.
2208 (struct linux_target_ops) <breakpoint_len>: Remove.
2209 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2210 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2211 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2212 (struct linux_target_ops) <breakpoint>: Remove.
2213 (struct linux_target_ops) <breakpoint_len>: Remove.
2214 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2215 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2216 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2217 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2218 (struct linux_target_ops) <breakpoint>: Remove.
2219 (struct linux_target_ops) <breakpoint_len>: Remove.
2220 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2221 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2222 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2223 (struct linux_target_ops) <breakpoint>: Remove.
2224 (struct linux_target_ops) <breakpoint_len>: Remove.
2225 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2226 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2227
4cd98a19
AT
22282015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
2229
2230 * linux-cris-low.c (cris_get_pc): Remove void arg.
2231
774ee6d2
AR
22322015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2233
2234 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2235 variable name.
2236
833dcd29
AR
22372015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
2238
2239 * inferiors.c (thread_pid_matches_callback): New function.
2240 (find_thread_process): New function.
2241 (remove_thread): Reset current_thread.
2242 (remove_process): Assert threads have been removed first.
2243
8d689ee5
YQ
22442015-10-15 Yao Qi <yao.qi@linaro.org>
2245
2246 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2247 if it is 3.
2248 (aarch64_remove_point): Likewise.
2249 * regcache.c (regcache_register_size): New function.
2250
1c2e1515
YQ
22512015-10-12 Yao Qi <yao.qi@linaro.org>
2252
2253 * linux-aarch64-low.c: Update all callers as emit_load_store
2254 is renamed to aarch64_emit_load_store.
2255
e1c587c3
YQ
22562015-10-12 Yao Qi <yao.qi@linaro.org>
2257
2258 * linux-aarch64-low.c: Update all callers of function renaming
2259 from emit_insn to aarch64_emit_insn.
2260
b6542f81
YQ
22612015-10-12 Yao Qi <yao.qi@linaro.org>
2262
2263 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2264 arch/aarch64-insn.h.
2265 (struct aarch64_memory_operand): Likewise.
2266 (ENCODE): Likewise.
2267 (emit_insn): Move to arch/aarch64-insn.c.
2268 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2269 (emit_load_store): Move to arch/aarch64-insn.c.
2270 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2271 (can_encode_int32): Remove.
2272
246994ce
YQ
22732015-10-12 Yao Qi <yao.qi@linaro.org>
2274
2275 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2276 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2277 (aarch64_relocate_instruction): Likewise.
2278 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2279 (struct aarch64_insn_visitor): Likewise.
2280
0badd99f
YQ
22812015-10-12 Yao Qi <yao.qi@linaro.org>
2282
2283 * linux-aarch64-low.c (struct aarch64_insn_data): New.
2284 (struct aarch64_insn_visitor): New.
2285 (struct aarch64_insn_relocation_data): New.
2286 (aarch64_ftrace_insn_reloc_b): New function.
2287 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2288 (aarch64_ftrace_insn_reloc_cb): Likewise.
2289 (aarch64_ftrace_insn_reloc_tb): Likewise.
2290 (aarch64_ftrace_insn_reloc_adr): Likewise.
2291 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2292 (aarch64_ftrace_insn_reloc_others): Likewise.
2293 (visitor): New.
2294 (aarch64_relocate_instruction): Use visitor.
2295
dfaffe9d
YQ
22962015-10-12 Yao Qi <yao.qi@linaro.org>
2297
2298 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2299 int. Add argument buf.
2300 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2301 aarch64_relocate_instruction.
2302
70b439f0
YQ
23032015-10-12 Yao Qi <yao.qi@linaro.org>
2304
2305 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2306 argument insn. Remove local variable insn. Don't call
2307 target_read_uint32.
2308 (aarch64_install_fast_tracepoint_jump_pad): Call
2309 target_read_uint32.
2310
7781c06f
YQ
23112015-09-30 Yao Qi <yao.qi@linaro.org>
2312
2313 * linux-aarch64-low.c (emit_movk): Shorten a long line.
2314 (emit_load_store_pair): Likewise.
2315
9a3c8263
SM
23162015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2317
2318 * dll.c (match_dll): Add cast(s).
2319 (unloaded_dll): Likewise.
2320 * linux-low.c (second_thread_of_pid_p): Likewise.
2321 (delete_lwp_callback): Likewise.
2322 (count_events_callback): Likewise.
2323 (select_event_lwp_callback): Likewise.
2324 (linux_set_resume_request): Likewise.
2325 * server.c (accumulate_file_name_length): Likewise.
2326 (emit_dll_description): Likewise.
2327 (handle_qxfer_threads_worker): Likewise.
2328 (visit_actioned_threads): Likewise.
2329 * thread-db.c (any_thread_of): Likewise.
2330 * tracepoint.c (same_process_p): Likewise.
2331 (match_blocktype): Likewise.
2332 (build_traceframe_info_xml): Likewise.
2333
224c3ddb
SM
23342015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2335
2336 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2337 assignment.
2338 (gdb_unparse_agent_expr): Likewise.
2339 * hostio.c (require_data): Likewise.
2340 (handle_pread): Likewise.
2341 * linux-low.c (disable_regset): Likewise.
2342 (fetch_register): Likewise.
2343 (store_register): Likewise.
2344 (get_dynamic): Likewise.
2345 (linux_qxfer_libraries_svr4): Likewise.
2346 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2347 (set_fast_tracepoint_jump): Likewise.
2348 (uninsert_fast_tracepoint_jumps_at): Likewise.
2349 (reinsert_fast_tracepoint_jumps_at): Likewise.
2350 (validate_inserted_breakpoint): Likewise.
2351 (clone_agent_expr): Likewise.
2352 * regcache.c (init_register_cache): Likewise.
2353 * remote-utils.c (putpkt_binary_1): Likewise.
2354 (decode_M_packet): Likewise.
2355 (decode_X_packet): Likewise.
2356 (look_up_one_symbol): Likewise.
2357 (relocate_instruction): Likewise.
2358 (monitor_output): Likewise.
2359 * server.c (handle_search_memory): Likewise.
2360 (handle_qxfer_exec_file): Likewise.
2361 (handle_qxfer_libraries): Likewise.
2362 (handle_qxfer): Likewise.
2363 (handle_query): Likewise.
2364 (handle_v_cont): Likewise.
2365 (handle_v_run): Likewise.
2366 (captured_main): Likewise.
2367 * target.c (write_inferior_memory): Likewise.
2368 * thread-db.c (try_thread_db_load_from_dir): Likewise.
2369 * tracepoint.c (init_trace_buffer): Likewise.
2370 (add_tracepoint_action): Likewise.
2371 (add_traceframe): Likewise.
2372 (add_traceframe_block): Likewise.
2373 (cmd_qtdpsrc): Likewise.
2374 (cmd_qtdv): Likewise.
2375 (cmd_qtstatus): Likewise.
2376 (response_source): Likewise.
2377 (response_tsv): Likewise.
2378 (cmd_qtnotes): Likewise.
2379 (gdb_collect): Likewise.
2380 (initialize_tracepoint): Likewise.
2381
afbe19f8
PL
23822015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2383
2384 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2385 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2386 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2387 <NOP>: New.
2388 (enum aarch64_condition_codes): New enum.
2389 (w0): New static global.
2390 (fp): Likewise.
2391 (lr): Likewise.
2392 (struct aarch64_memory_operand) <type>: New
2393 MEMORY_OPERAND_POSTINDEX type.
2394 (postindex_memory_operand): New helper function.
2395 (emit_ret): New function.
2396 (emit_load_store_pair): New function, factored out of emit_stp
2397 with support for MEMORY_OPERAND_POSTINDEX.
2398 (emit_stp): Rewrite using emit_load_store_pair.
2399 (emit_ldp): New function.
2400 (emit_load_store): Likewise.
2401 (emit_ldr): Mention post-index instruction in comment.
2402 (emit_ldrh): New function.
2403 (emit_ldrb): New function.
2404 (emit_ldrsw): Mention post-index instruction in comment.
2405 (emit_str): Likewise.
2406 (emit_subs): New function.
2407 (emit_cmp): Likewise.
2408 (emit_and): Likewise.
2409 (emit_orr): Likewise.
2410 (emit_orn): Likewise.
2411 (emit_eor): Likewise.
2412 (emit_mvn): Likewise.
2413 (emit_lslv): Likewise.
2414 (emit_lsrv): Likewise.
2415 (emit_asrv): Likewise.
2416 (emit_mul): Likewise.
2417 (emit_sbfm): Likewise.
2418 (emit_sbfx): Likewise.
2419 (emit_ubfm): Likewise.
2420 (emit_ubfx): Likewise.
2421 (emit_csinc): Likewise.
2422 (emit_cset): Likewise.
2423 (emit_nop): Likewise.
2424 (emit_ops_insns): New helper function.
2425 (emit_pop): Likewise.
2426 (emit_push): Likewise.
2427 (aarch64_emit_prologue): New function.
2428 (aarch64_emit_epilogue): Likewise.
2429 (aarch64_emit_add): Likewise.
2430 (aarch64_emit_sub): Likewise.
2431 (aarch64_emit_mul): Likewise.
2432 (aarch64_emit_lsh): Likewise.
2433 (aarch64_emit_rsh_signed): Likewise.
2434 (aarch64_emit_rsh_unsigned): Likewise.
2435 (aarch64_emit_ext): Likewise.
2436 (aarch64_emit_log_not): Likewise.
2437 (aarch64_emit_bit_and): Likewise.
2438 (aarch64_emit_bit_or): Likewise.
2439 (aarch64_emit_bit_xor): Likewise.
2440 (aarch64_emit_bit_not): Likewise.
2441 (aarch64_emit_equal): Likewise.
2442 (aarch64_emit_less_signed): Likewise.
2443 (aarch64_emit_less_unsigned): Likewise.
2444 (aarch64_emit_ref): Likewise.
2445 (aarch64_emit_if_goto): Likewise.
2446 (aarch64_emit_goto): Likewise.
2447 (aarch64_write_goto_address): Likewise.
2448 (aarch64_emit_const): Likewise.
2449 (aarch64_emit_call): Likewise.
2450 (aarch64_emit_reg): Likewise.
2451 (aarch64_emit_pop): Likewise.
2452 (aarch64_emit_stack_flush): Likewise.
2453 (aarch64_emit_zero_ext): Likewise.
2454 (aarch64_emit_swap): Likewise.
2455 (aarch64_emit_stack_adjust): Likewise.
2456 (aarch64_emit_int_call_1): Likewise.
2457 (aarch64_emit_void_call_2): Likewise.
2458 (aarch64_emit_eq_goto): Likewise.
2459 (aarch64_emit_ne_goto): Likewise.
2460 (aarch64_emit_lt_goto): Likewise.
2461 (aarch64_emit_le_goto): Likewise.
2462 (aarch64_emit_gt_goto): Likewise.
2463 (aarch64_emit_ge_got): Likewise.
2464 (aarch64_emit_ops_impl): New static global variable.
2465 (aarch64_emit_ops): New target function, return
2466 &aarch64_emit_ops_impl.
2467 (struct linux_target_ops): Install it.
2468
bb903df0
PL
24692015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2470
2471 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2472 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2473 aarch64-ipa.o.
2474 * linux-aarch64-ipa.c: New file.
2475 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2476 and endian.h.
2477 (aarch64_get_thread_area): New target method.
2478 (extract_signed_bitfield): New helper function.
2479 (aarch64_decode_ldr_literal): New function.
2480 (enum aarch64_opcodes): New enum.
2481 (struct aarch64_register): New struct.
2482 (struct aarch64_operand): New struct.
2483 (x0): New static global.
2484 (x1): Likewise.
2485 (x2): Likewise.
2486 (x3): Likewise.
2487 (x4): Likewise.
2488 (w2): Likewise.
2489 (ip0): Likewise.
2490 (sp): Likewise.
2491 (xzr): Likewise.
2492 (aarch64_register): New helper function.
2493 (register_operand): Likewise.
2494 (immediate_operand): Likewise.
2495 (struct aarch64_memory_operand): New struct.
2496 (offset_memory_operand): New helper function.
2497 (preindex_memory_operand): Likewise.
2498 (enum aarch64_system_control_registers): New enum.
2499 (ENCODE): New macro.
2500 (emit_insn): New helper function.
2501 (emit_b): New function.
2502 (emit_bcond): Likewise.
2503 (emit_cb): Likewise.
2504 (emit_tb): Likewise.
2505 (emit_blr): Likewise.
2506 (emit_stp): Likewise.
2507 (emit_ldp_q_offset): Likewise.
2508 (emit_stp_q_offset): Likewise.
2509 (emit_load_store): Likewise.
2510 (emit_ldr): Likewise.
2511 (emit_ldrsw): Likewise.
2512 (emit_str): Likewise.
2513 (emit_ldaxr): Likewise.
2514 (emit_stxr): Likewise.
2515 (emit_stlr): Likewise.
2516 (emit_data_processing_reg): Likewise.
2517 (emit_data_processing): Likewise.
2518 (emit_add): Likewise.
2519 (emit_sub): Likewise.
2520 (emit_mov): Likewise.
2521 (emit_movk): Likewise.
2522 (emit_mov_addr): Likewise.
2523 (emit_mrs): Likewise.
2524 (emit_msr): Likewise.
2525 (emit_sevl): Likewise.
2526 (emit_wfe): Likewise.
2527 (append_insns): Likewise.
2528 (can_encode_int32_in): New helper function.
2529 (aarch64_relocate_instruction): New function.
2530 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2531 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2532 (struct linux_target_ops): Install aarch64_get_thread_area,
2533 aarch64_install_fast_tracepoint_jump_pad and
2534 aarch64_get_min_fast_tracepoint_insn_len.
2535
787749ea
PL
25362015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2537
2538 * Makefile.in (aarch64-insn.o): New rule.
2539 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2540
9812b2e6
YQ
25412015-09-21 Yao Qi <yao.qi@linaro.org>
2542
2543 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2544
18fe412b
YQ
25452015-09-21 Yao Qi <yao.qi@linaro.org>
2546
2547 * tracepoint.c (max_jump_pad_size): Remove.
2548
a0cc84cd
YQ
25492015-09-18 Yao Qi <yao.qi@linaro.org>
2550
2551 * linux-aarch64-low.c: Don't include sys/uio.h.
2552 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2553
d78908cf
WW
25542015-09-16 Wei-cheng Wang <cole945@gmail.com>
2555
2556 * tracepoint.c (eval_result_type): Change prototype.
2557 (condition_true_at_tracepoint): Fix argument to compiled_cond.
2558
d57e0d50
PA
25592015-09-15 Pedro Alves <palves@redhat.com>
2560
2561 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2562 Check whether to report exec events instead of checking whether
2563 multiprocess is enabled.
2564
5a676acc
PA
25652015-09-15 Pedro Alves <palves@redhat.com>
2566
2567 PR remote/18965
2568 * remote-utils.c (prepare_resume_reply): Merge
2569 TARGET_WAITKIND_VFORK_DONE switch case with the
2570 TARGET_WAITKIND_FORKED case.
2571
7c5d0fad
YQ
25722015-09-15 Yao Qi <yao.qi@linaro.org>
2573
2574 * server.c (handle_query): Check string comparison using
2575 "else if" instead of "if".
2576
750ce8d1
YQ
25772015-09-15 Yao Qi <yao.qi@linaro.org>
2578
2579 * server.c (vCont_supported): New global variable.
2580 (handle_query): Set vCont_supported to 1 if "vContSupported+"
2581 matches. Append ";vContSupported+" to own_buf.
2582 (handle_v_requests): Append ";s;S" to own_buf if target supports
2583 hardware single step or vCont_supported is false.
2584 (capture_main): Set vCont_supported to zero.
2585
70b90b91
YQ
25862015-09-15 Yao Qi <yao.qi@linaro.org>
2587
2588 * linux-low.c (linux_supports_conditional_breakpoints): Rename
2589 it to ...
2590 (linux_supports_hardware_single_step): ... New function.
2591 (linux_target_ops): Update.
2592 * lynx-low.c (lynx_target_ops): Set field
2593 supports_hardware_single_step to target_can_do_hardware_single_step.
2594 * nto-low.c (nto_target_ops): Likewise.
2595 * spu-low.c (spu_target_ops): Likewise.
2596 * win32-low.c (win32_target_ops): Likewise.
2597 * target.c (target_can_do_hardware_single_step): New function.
2598 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2599 Remove. <supports_hardware_single_step>: New field.
2600 (target_supports_conditional_breakpoints): Remove.
2601 (target_supports_hardware_single_step): New macro.
2602 (target_can_do_hardware_single_step): Declare.
2603 * server.c (handle_query): Use target_supports_hardware_single_step
2604 instead of target_supports_conditional_breakpoints.
2605
ade90bde
YQ
26062015-09-15 Yao Qi <yao.qi@linaro.org>
2607
2608 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2609 function.
2610 (struct linux_target_ops the_low_target): Install
2611 aarch64_linux_siginfo_fixup.
2612
94585166
DB
26132015-09-11 Don Breazeal <donb@codesourcery.com>
2614 Luis Machado <lgustavo@codesourcery.com>
2615
2616 * linux-low.c (linux_mourn): Static declaration.
2617 (linux_arch_setup): Move in front of
2618 handle_extended_wait.
2619 (linux_arch_setup_thread): New function.
2620 (handle_extended_wait): Handle exec events. Call
2621 linux_arch_setup_thread. Make event_lwp argument a
2622 pointer-to-a-pointer.
2623 (check_zombie_leaders): Do not check stopped threads.
2624 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2625 (linux_low_filter_event): Add lwp and thread for exec'ing
2626 non-leader thread if leader thread has been deleted.
2627 Refactor code into linux_arch_setup_thread and call it.
2628 Pass child lwp pointer by reference to handle_extended_wait.
2629 (linux_wait_for_event_filtered): Update comment.
2630 (linux_wait_1): Prevent clobbering exec event status.
2631 (linux_supports_exec_events): New function.
2632 (linux_target_ops) <supports_exec_events>: Initialize new member.
2633 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2634 new member.
2635 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2636 * server.c (report_exec_events): New global variable.
2637 (handle_query): Handle qSupported query for exec-events feature.
2638 (captured_main): Initialize report_exec_events.
2639 * server.h (report_exec_events): Declare new global variable.
2640 * target.h (struct target_ops) <supports_exec_events>: New
2641 member.
2642 (target_supports_exec_events): New macro.
2643 * win32-low.c (win32_target_ops) <supports_exec_events>:
2644 Initialize new member.
2645
0568462b
MM
26462015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2647
2648 * linux-low.c (linux_low_enable_btrace): Remove.
2649 (linux_target_ops): Replace linux_low_enable_btrace with
2650 linux_enable_btrace.
2651
39edd165
YQ
26522015-09-03 Yao Qi <yao.qi@linaro.org>
2653
2654 * linux-aarch64-low.c (aarch64_insert_point): Call
2655 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2656 returns true.
2657
1db33b5a
UW
26582015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2659
2660 * linux-low.c (check_stopped_by_breakpoint): Use
2661 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2662
ab290430
PA
26632015-08-27 Pedro Alves <palves@redhat.com>
2664
2665 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2666
8d749320
SM
26672015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2668
6711b7f8
SM
2669 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2670 the XNEW-family equivalent.
8d749320
SM
2671 (compile_bytecodes): Likewise.
2672 * dll.c (loaded_dll): Likewise.
2673 * event-loop.c (append_callback_event): Likewise.
2674 (create_file_handler): Likewise.
2675 (create_file_event): Likewise.
2676 * hostio.c (handle_open): Likewise.
2677 * inferiors.c (add_thread): Likewise.
2678 (add_process): Likewise.
2679 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2680 * linux-arm-low.c (arm_new_process): Likewise.
2681 (arm_new_thread): Likewise.
2682 * linux-low.c (add_to_pid_list): Likewise.
2683 (linux_add_process): Likewise.
2684 (handle_extended_wait): Likewise.
2685 (add_lwp): Likewise.
2686 (enqueue_one_deferred_signal): Likewise.
2687 (enqueue_pending_signal): Likewise.
2688 (linux_resume_one_lwp_throw): Likewise.
2689 (linux_resume_one_thread): Likewise.
2690 (linux_read_memory): Likewise.
2691 (linux_write_memory): Likewise.
2692 * linux-mips-low.c (mips_linux_new_process): Likewise.
2693 (mips_linux_new_thread): Likewise.
2694 (mips_add_watchpoint): Likewise.
2695 * linux-x86-low.c (initialize_low_arch): Likewise.
2696 * lynx-low.c (lynx_add_process): Likewise.
2697 * mem-break.c (set_raw_breakpoint_at): Likewise.
2698 (set_breakpoint): Likewise.
2699 (add_condition_to_breakpoint): Likewise.
2700 (add_commands_to_breakpoint): Likewise.
2701 (clone_agent_expr): Likewise.
2702 (clone_one_breakpoint): Likewise.
2703 * regcache.c (new_register_cache): Likewise.
2704 * remote-utils.c (look_up_one_symbol): Likewise.
2705 * server.c (queue_stop_reply): Likewise.
2706 (start_inferior): Likewise.
2707 (queue_stop_reply_callback): Likewise.
2708 (handle_target_event): Likewise.
2709 * spu-low.c (fetch_ppc_memory): Likewise.
2710 (store_ppc_memory): Likewise.
2711 * target.c (set_target_ops): Likewise.
2712 * thread-db.c (thread_db_load_search): Likewise.
2713 (try_thread_db_load_1): Likewise.
2714 * tracepoint.c (add_tracepoint): Likewise.
2715 (add_tracepoint_action): Likewise.
2716 (create_trace_state_variable): Likewise.
2717 (cmd_qtdpsrc): Likewise.
2718 (cmd_qtro): Likewise.
2719 (add_while_stepping_state): Likewise.
2720 * win32-low.c (child_add_thread): Likewise.
2721 (get_image_name): Likewise.
2722
ed8b7b42
YQ
27232015-08-25 Yao Qi <yao.qi@linaro.org>
2724
2725 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2726
db3cb7cb
YQ
27272015-08-25 Yao Qi <yao.qi@linaro.org>
2728
2729 * Makefile.in (aarch64-linux.o): New rule.
2730 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2731 srv_tgtobj.
2732 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2733 (aarch64_init_debug_reg_state): Make it extern.
2734 (aarch64_linux_prepare_to_resume): Remove.
2735
f6011a1c
YQ
27362015-08-25 Yao Qi <yao.qi@linaro.org>
2737
2738 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2739 lwp_arch_private_info and ptid_of_lwp.
2740
88e2cf7e
YQ
27412015-08-25 Yao Qi <yao.qi@linaro.org>
2742
2743 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2744 Find proc_info by find_process_pid. All callers updated.
2745
5e35436e
YQ
27462015-08-25 Yao Qi <yao.qi@linaro.org>
2747
2748 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2749 Remove.
2750 (debug_reg_change_callback): Remove.
2751 (aarch64_notify_debug_reg_change): Remove.
2752
4a8a7965
YQ
27532015-08-25 Yao Qi <yao.qi@linaro.org>
2754
2755 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2756 Call current_lwp_ptid.
2757
32a271ee
YQ
27582015-08-25 Yao Qi <yao.qi@linaro.org>
2759
2760 * linux-aarch64-low.c (debug_reg_change_callback): Use
2761 debug_printf.
2762
0d51c8d7
YQ
27632015-08-25 Yao Qi <yao.qi@linaro.org>
2764
2765 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2766
31a43dd5
YQ
27672015-08-25 Yao Qi <yao.qi@linaro.org>
2768
2769 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2770
8ee52567
YQ
27712015-08-25 Yao Qi <yao.qi@linaro.org>
2772
2773 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2774 the code.
2775
ff3f0f45
YQ
27762015-08-25 Yao Qi <yao.qi@linaro.org>
2777
2778 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2779 Remove.
2780 (debug_reg_change_callback): Remove argument entry and add argument
2781 lwp. Remove local variable thread. Don't print thread id in the
2782 debugging output. Don't check whether pid of thread equals to pid.
2783 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2784 iterate_over_lwps instead find_inferior.
2785
3d40fbb5
PA
27862015-08-24 Pedro Alves <palves@redhat.com>
2787
2788 * inferiors.c (get_first_process): New function.
2789 * inferiors.h (get_first_process): New declaration.
2790 * remote-utils.c (read_ptid): Default to the first process in the
2791 list, instead of to the current thread's process.
2792
438e1e42
PA
27932015-08-24 Pedro Alves <palves@redhat.com>
2794
2795 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2796 * event-loop.c: Likewise.
2797 * remote-utils.c: Likewise.
2798 * tracepoint.c: Likewise.
2799
a8c6d4fc
PA
28002015-08-24 Pedro Alves <palves@redhat.com>
2801
2802 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2803 ptid_get_lwp.
2804
99b0bb12
PA
28052015-08-21 Pedro Alves <palves@redhat.com>
2806
2807 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2808 instead of literal 1.
2809
f8904751
PA
28102015-08-21 Pedro Alves <palves@redhat.com>
2811
2812 * tdesc.c (default_description): Explicitly zero-initialize.
2813
465a859e
PA
28142015-08-21 Pedro Alves <palves@redhat.com>
2815
2816 PR gdb/18749
2817 * inferiors.c (remove_thread): Discard any pending stop reply for
2818 this thread.
2819 * server.c (remove_all_on_match_pid): Rename to ...
2820 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2821 instead of a pid.
2822 (discard_queued_stop_replies): Change parameter to a ptid. Now
2823 extern.
2824 (handle_v_kill, kill_inferior_callback, captured_main)
2825 (process_serial_event): Adjust.
2826 * server.h (discard_queued_stop_replies): Declare.
2827
f0db101d
PA
28282015-08-21 Pedro Alves <palves@redhat.com>
2829
2830 * linux-low.c (wait_for_sigstop): Always switch to no thread
2831 selected if the previously current thread dies.
2832 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2833 process instead of the current thread's.
2834 * remote-utils.c (input_interrupt): Don't check if there's no
2835 current thread.
2836 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2837 current thread to the general thread fails, error out.
2838 (handle_qxfer_auxv, handle_qxfer_libraries)
2839 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2840 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2841 (handle_query): Check if there's a thread selected instead of
2842 checking whether there's any thread in the thread list.
2843 (handle_qxfer_threads, handle_qxfer_btrace)
2844 (handle_qxfer_btrace_conf): Don't error out early if there's no
2845 thread in the thread list.
2846 (handle_v_cont, myresume): Don't set the current thread to the
2847 continue thread.
2848 (process_serial_event) <Hg handling>: Also set thread_id if the
2849 previous general thread is still alive.
2850 (process_serial_event) <g/G handling>: If setting the current
2851 thread to the general thread fails, error out.
2852 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2853 thread's lwp instead of the current thread's.
2854 * target.c (set_desired_thread): If the desired thread was not
2855 found, leave the current thread pointing to NULL. Return an int
2856 (boolean) indicating success.
2857 * target.h (set_desired_thread): Change return type to int.
2858
40045d91
MF
28592015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2860
2861 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2862 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2863 #includes.
2864 (ps_get_thread_area): New function.
2865
45face3b
GB
28662015-08-19 Gary Benson <gbenson@redhat.com>
2867
2868 * hostio.c (handle_pread): Do not attempt to read more data
2869 than hostio_reply_with_data can fit in a packet.
2870
16d5f642
JB
28712015-08-18 Joel Brobecker <brobecker@adacore.com>
2872
2873 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2874
a738da3a
MF
28752015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2876
2877 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2878
33ebda9d
PA
28792015-08-06 Pedro Alves <palves@redhat.com>
2880
2881 * tracepoint.c (expr_eval_result): Now an int.
2882
a44892be
PA
28832015-08-06 Pedro Alves <palves@redhat.com>
2884
2885 * gdbthread.h (struct regcache): Forward declare.
2886 (struct thread_info) <regcache_data>: Now a struct regcache
2887 pointer.
2888 * inferiors.c (inferior_regcache_data)
2889 (set_inferior_regcache_data): Now work with struct regcache
2890 pointers.
2891 * inferiors.h (struct regcache): Forward declare.
2892 (inferior_regcache_data, set_inferior_regcache_data): Now work
2893 with struct regcache pointers.
2894 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2895 (free_register_cache_thread): Remove struct regcache pointer
2896 casts.
2897
608a1e46
PA
28982015-08-06 Pedro Alves <palves@redhat.com>
2899
2900 * server.c (captured_main): On error, print the exception message
2901 to stderr, and if run_once is set, throw a quit.
2902
f0ce0d3a
PA
29032015-08-06 Pedro Alves <palves@redhat.com>
2904
2905 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2906 the current thread.
2907
bf47e248
PA
29082015-08-06 Pedro Alves <palves@redhat.com>
2909
2910 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2911 reading beyond the passed in buffer length.
2912
b6b9ffcc
PL
29132015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2914
2915 * tracepoint.c (symbol_list) <required>: Remove.
2916
863d01bd
PA
29172015-08-06 Pedro Alves <palves@redhat.com>
2918
2919 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2920 count if stopping and suspending threads.
2921 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2922 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2923 (linux_detach): Complete an ongoing step-over.
2924 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2925 throughout.
2926 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2927 (linux_wait_1): If passing a signal to the inferior after
2928 finishing a step-over, unsuspend and re-resume all lwps. If we
2929 see a single-step event but the thread should be continuing, don't
2930 pass the trap to gdb.
2931 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2932 internal_error instead of gdb_assert.
2933 (enqueue_pending_signal): New function.
2934 (check_ptrace_stopped_lwp_gone): Add debug output.
2935 (start_step_over): Use internal_error instead of gdb_assert.
2936 (complete_ongoing_step_over): New function.
2937 (linux_resume_one_thread): Don't resume a suspended thread.
2938 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2939 it stepping.
2940
00db26fa
PA
29412015-08-06 Pedro Alves <palves@redhat.com>
2942
2943 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2944 (linux_thread_alive): Use lwp_is_marked_dead.
2945 (extended_event_reported): Delete.
2946 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2947 instead of extended_event_reported.
2948 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2949 as well.
2950 (lwp_is_marked_dead): New function.
2951 (lwp_running): Use lwp_is_marked_dead.
2952 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2953 comment.
2954
ad071a30
PA
29552015-08-06 Pedro Alves <palves@redhat.com>
2956
2957 * linux-low.c (linux_wait_1): Move fork event output out of the
2958 !report_to_gdb check. Pass event_child->waitstatus to
2959 target_waitstatus_to_string instead of ourstatus.
2960
524b57e6
YQ
29612015-08-04 Yao Qi <yao.qi@linaro.org>
2962
2963 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2964 if current_thread is 32 bit.
2965
6085d6f6
YQ
29662015-08-04 Yao Qi <yao.qi@linaro.org>
2967
2968 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2969 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2970 * server.c (extended_protocol): Remove "static".
2971 * server.h (extended_protocol): Declare it.
2972
8a7e4587
YQ
29732015-08-04 Yao Qi <yao.qi@linaro.org>
2974
2975 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2976 both aarch64 and aarch32.
2977 (aarch64_set_pc): Likewise.
2978
3b53ae99
YQ
29792015-08-04 Yao Qi <yao.qi@linaro.org>
2980
2981 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2982 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2983 arm-with-neon.xml to srv_xmlfiles.
2984 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2985 (is_64bit_tdesc): New function.
2986 (aarch64_linux_read_description): New function.
2987 (aarch64_arch_setup): Call aarch64_linux_read_description.
2988 (regs_info): Rename to regs_info_aarch64.
2989 (aarch64_regs_info): Return right regs_info.
2990 (initialize_low_arch): Call initialize_low_arch_aarch32.
2991
bd9e6534
YQ
29922015-08-04 Yao Qi <yao.qi@linaro.org>
2993
2994 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2995 * linux-aarch32-low.c: New file.
2996 * linux-aarch32-low.h: New file.
2997 * linux-arm-low.c (arm_fill_gregset): Move it to
2998 linux-aarch32-low.c.
2999 (arm_store_gregset): Likewise.
3000 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3001 (arm_store_vfpregset): Call arm_store_vfpregset_num.
3002 (arm_arch_setup): Check if PTRACE_GETREGSET works.
3003 (regs_info): Rename to regs_info_arm.
3004 (arm_regs_info): Return regs_info_aarch32 if
3005 have_ptrace_getregset is 1 and target description is
3006 arm_with_neon or arm_with_vfpv3.
3007 (initialize_low_arch): Don't call init_registers_arm_with_neon.
3008 Call initialize_low_arch_aarch32 instead.
3009
ded48a5e
YQ
30102015-08-04 Yao Qi <yao.qi@linaro.org>
3011
3012 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3013 * linux-low.c: ... here.
3014 * linux-low.h (have_ptrace_getregset): Declare it.
3015
96e9210f
PA
30162015-08-04 Pedro Alves <palves@redhat.com>
3017
3018 * thread-db.c (struct thread_db): Use new typedefs.
3019 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3020 CHK calls.
3021 (disable_thread_event_reporting): Cast result of dlsym to
3022 destination function pointer type.
3023 (thread_db_mourn): Use td_ta_delete_ftype.
3024
af60a1ef
SL
30252015-08-03 Sandra Loosemore <sandra@codesourcery.com>
3026
3027 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3028 arch variant.
3029 (CDX_BREAKPOINT): Define for R2.
3030 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3031 (the_low_target): Add comments.
3032
e8b41681
YQ
30332015-07-30 Yao Qi <yao.qi@linaro.org>
3034
3035 * linux-arm-low.c (arm_hwcap): Remove it.
3036 (arm_read_description): New local variable arm_hwcap. Don't
3037 set arm_hwcap to zero.
3038
89abb039
YQ
30392015-07-30 Yao Qi <yao.qi@linaro.org>
3040
3041 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3042 Use regcache->tdesc instead.
3043 (arm_store_wmmxregset): Likewise.
3044 (arm_fill_vfpregset): Likewise.
3045 (arm_store_vfpregset): Likewise.
3046
deca266c
YQ
30472015-07-30 Yao Qi <yao.qi@linaro.org>
3048
3049 * linux-arm-low.c: Include arch/arm.h.
3050 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3051 (arm_store_gregset): Likewise.
3052
aa58a496
SM
30532015-07-29 Simon Marchi <simon.marchi@ericsson.com>
3054
3055 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3056 ptrace's 4th parameter.
3057
50904b25
YQ
30582015-07-27 Yao Qi <yao.qi@linaro.org>
3059
3060 * configure.srv (case aarch64*-*-linux*): Don't set
3061 srv_linux_usrregs.
3062
5826e159
PA
30632015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
3064
3065 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3066 sys/ptrace.h.
3067 * linux-arm-low.c: Likewise.
3068 * linux-cris-low.c: Likewise.
3069 * linux-crisv32-low.c: Likewise.
3070 * linux-low.c: Likewise.
3071 * linux-m68k-low.c: Likewise.
3072 * linux-mips-low.c: Likewise.
3073 * linux-nios2-low.c: Likewise.
3074 * linux-s390-low.c: Likewise.
3075 * linux-sparc-low.c: Likewise.
3076 * linux-tic6x-low.c: Likewise.
3077 * linux-tile-low.c: Likewise.
3078 * linux-x86-low.c: Likewise.
3079
54019719
PA
30802015-07-24 Pedro Alves <palves@redhat.com>
3081
3082 * config.in: Regenerate.
3083 * configure: Regenerate.
3084
eb7aa561
PA
30852015-07-24 Pedro Alves <palves@redhat.com>
3086
3087 * acinclude.m4: Include ../ptrace.m4.
3088 * configure.ac: Call GDB_AC_PTRACE.
3089 * config.in, configure: Regenerate.
3090
55d7b841
YQ
30912015-07-24 Yao Qi <yao.qi@linaro.org>
3092
3093 * linux-low.c (linux_create_inferior): Remove setting to
3094 proc->priv->new_inferior.
3095 (linux_attach): Likewise.
3096 (linux_low_filter_event): Likewise.
3097 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3098
c06cbd92
YQ
30992015-07-24 Yao Qi <yao.qi@linaro.org>
3100
3101 * linux-low.c (linux_arch_setup): New function.
3102 (linux_low_filter_event): If proc->tdesc is NULL and
3103 proc->attached is true, call the_low_target.arch_setup.
3104 Otherwise, keep status pending, and return.
3105 (linux_resume_one_lwp_throw): Don't call get_pc if
3106 thread->while_stepping isn't NULL. Don't call
3107 get_thread_regcache if proc->tdesc is NULL.
3108 (need_step_over_p): Return 0 if proc->tdesc is NULL.
3109 (linux_target_ops): Install arch_setup.
3110 * server.c (start_inferior): Call the_target->arch_setup.
3111 * target.h (struct target_ops) <arch_setup>: New field.
3112 (target_arch_setup): New marco.
3113 * lynx-low.c (lynx_target_ops): Update.
3114 * nto-low.c (nto_target_ops): Update.
3115 * spu-low.c (spu_target_ops): Update.
3116 * win32-low.c (win32_target_ops): Update.
3117
5ae3ebba
YQ
31182015-07-24 Yao Qi <yao.qi@linaro.org>
3119
3120 * linux-low.c (linux_add_process): Don't set
3121 proc->priv->new_inferior.
3122 (linux_create_inferior): Set proc->priv->new_inferior to 1.
3123 (linux_attach): Likewise.
3124
eb97750b
YQ
31252015-07-24 Yao Qi <yao.qi@linaro.org>
3126
3127 * server.c (start_inferior): Code refactor.
3128
51aee833
YQ
31292015-07-24 Yao Qi <yao.qi@linaro.org>
3130
3131 * server.c (process_serial_event): Set general_thread.
3132
af1b22f3
YQ
31332015-07-21 Yao Qi <yao.qi@linaro.org>
3134
3135 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3136 aarch64_linux_get_debug_reg_capacity.
3137
554717a3
YQ
31382015-07-17 Yao Qi <yao.qi@linaro.org>
3139
3140 * Makefile.in (aarch64-linux-hw-point.o): New rule.
3141 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3142 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3143 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3144 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3145 (AARCH64_HWP_ALIGNMENT): Likewise.
3146 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3147 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3148 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3149 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3150 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3151 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3152 (struct aarch64_debug_reg_state): Likewise.
3153 (struct arch_lwp_info): Likewise.
3154 (aarch64_align_watchpoint): Likewise.
3155 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3156 (aarch64_watchpoint_length): Likewise.
3157 (aarch64_point_encode_ctrl_reg): Likewise
3158 (aarch64_point_is_aligned): Likewise.
3159 (aarch64_align_watchpoint): Likewise.
3160 (aarch64_linux_set_debug_regs):
3161 (aarch64_dr_state_insert_one_point): Likewise.
3162 (aarch64_dr_state_remove_one_point): Likewise.
3163 (aarch64_handle_breakpoint): Likewise.
3164 (aarch64_handle_aligned_watchpoint): Likewise.
3165 (aarch64_handle_unaligned_watchpoint): Likewise.
3166 (aarch64_handle_watchpoint): Likewise.
3167
c67ca4de
YQ
31682015-07-17 Yao Qi <yao.qi@linaro.org>
3169
3170 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3171 and don't aarch64_get_debug_reg_state. All callers update.
3172 (aarch64_handle_aligned_watchpoint): Likewise.
3173 (aarch64_handle_unaligned_watchpoint): Likewise.
3174 (aarch64_handle_watchpoint): Likewise.
3175 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3176 (aarch64_remove_point): Likewise.
3177
25abf979
YQ
31782015-07-17 Yao Qi <yao.qi@linaro.org>
3179
3180 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3181 debug_printf.
3182 (aarch64_handle_unaligned_watchpoint): Likewise.
3183
db1ff28b
JK
31842015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3185
3186 Revert the previous 3 commits:
3187 Move gdb_regex* to common/
3188 Move linux_find_memory_regions_full & co.
3189 gdbserver build-id attribute generator
3190
700ca40f
JK
31912015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3192 Jan Kratochvil <jan.kratochvil@redhat.com>
3193
3194 gdbserver build-id attribute generator.
3195 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3196 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3197 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3198 (find_phdr): New.
3199 (get_dynamic): Use find_pdhr to traverse program headers.
3200 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3201 (compare_mapping_entry_range, struct find_memory_region_callback_data)
3202 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3203 (get_hex_build_id): New.
3204 (linux_qxfer_libraries_svr4): Add optional build-id attribute
3205 to reply XML document.
3206
9904185c
JK
32072015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3208 Jan Kratochvil <jan.kratochvil@redhat.com>
3209
3210 * target.c: Include target/target-utils.h and fcntl.h.
3211 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3212 (target_fileio_read_stralloc): New functions.
3213
6e5b4429
JK
32142015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3215
3216 * Makefile.in (OBS): Add gdb_regex.o.
3217 (gdb_regex.o): New.
3218 * config.in: Rebuilt.
3219 * configure: Rebuilt.
3220
ddc98fbf
JK
32212015-07-15 Aleksandar Ristovski <aristovski@qnx.com
3222 Jan Kratochvil <jan.kratochvil@redhat.com>
3223
3224 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3225 * Makefile.in (OBS): Add target-utils.o.
3226 (linux-maps.o, target-utils.o): New.
3227 * configure.srv (srv_linux_obj): Add linux-maps.o.
3228
e57bb7a0
PL
32292015-07-15 Pierre Langlois <pierre.langlois@arm.com>
3230
3231 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3232 function, return 1.
3233 (the_low_target): Install it.
3234
586b02a9
PA
32352015-07-14 Pedro Alves <palves@redhat.com>
3236
3237 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3238 Instead, ignore ECHILD, and throw an error for other errnos.
3239
58c1b36c
PA
32402015-07-10 Pedro Alves <palves@redhat.com>
3241
3242 * event-loop.c (struct callback_event) <data>: Change type to
3243 gdb_client_data instance instead of gdb_client_data pointer.
3244 (append_callback_event): Adjust.
3245
421530db
PL
32462015-07-10 Pierre Langlois <pierre.langlois@arm.com>
3247
3248 * linux-aarch64-low.c: Add comments for each linux_target_ops
3249 method. Remove comments already covered in target_ops and
3250 linux_target_ops definitions.
3251 (the_low_target): Add comments for each unimplemented method.
3252
c2d65f38
YQ
32532015-07-09 Yao Qi <yao.qi@linaro.org>
3254
3255 * linux-aarch64-low.c (aarch64_regmap): Remove.
3256 (aarch64_usrregs_info): Remove.
3257 (regs_info): Set field usrregs to NULL.
3258
b20a6524
MM
32592015-07-02 Markus Metzger <markus.t.metzger@intel.com>
3260
3261 * linux-low.c: Include "rsp-low.h"
3262 (linux_low_encode_pt_config, linux_low_encode_raw): New.
3263 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3264 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3265 (handle_btrace_enable_pt): New.
3266 (handle_btrace_general_set): Support "pt".
3267 (handle_btrace_conf_general_set): Support "pt:size".
3268
96c97461
PL
32692015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3270
3271 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3272 Z_PACKET_SW_BP.
3273
37d66942
PL
32742015-06-29 Pierre Langlois <pierre.langlois@arm.com>
3275
3276 * linux-aarch64-low.c: Remove comment about endianness.
3277 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
3278 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
3279 memcmp.
3280
dc06243f
GB
32812015-06-24 Gary Benson <gbenson@redhat.com>
3282
3283 * linux-i386-ipa.c (stdint.h): Do not include.
3284 * lynx-i386-low.c (stdint.h): Likewise.
3285 * lynx-ppc-low.c (stdint.h): Likewise.
3286 * mem-break.c (stdint.h): Likewise.
3287 * thread-db.c (stdint.h): Likewise.
3288 * tracepoint.c (stdint.h): Likewise.
3289 * win32-low.c (stdint.h): Likewise.
3290
124e13d9
SM
32912015-06-18 Simon Marchi <simon.marchi@ericsson.com>
3292
3293 * server.c (write_qxfer_response): Update call to
3294 remote_escape_output.
3295
909c2cda
JK
32962015-06-15 Aleksandar Ristovski <aristovski@qnx.com
3297 Jan Kratochvil <jan.kratochvil@redhat.com>
3298
3299 Merge multiple hex conversions.
3300 * gdbreplay.c (tohex): Rename to 'fromhex'.
3301 (logchar): Use fromhex.
3302
24c05f46
JK
33032015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
3304
3305 * server.c (handle_qxfer_libraries): Set `version' attribute for
3306 <library-list>.
3307
14d2069a
GB
33082015-06-10 Gary Benson <gbenson@redhat.com>
3309
3310 * target.h (struct target_ops) <multifs_open>: New field.
3311 <multifs_unlink>: Likewise.
3312 <multifs_readlink>: Likewise.
3313 * linux-low.c (nat/linux-namespaces.h): New include.
3314 (linux_target_ops): Initialize the_target->multifs_open,
3315 the_target->multifs_unlink and the_target->multifs_readlink.
3316 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3317 * hostio.c (hostio_fs_pid): New static variable.
3318 (hostio_handle_new_gdb_connection): New function.
3319 (handle_setfs): Likewise.
3320 (handle_open): Use the_target->multifs_open as appropriate.
3321 (handle_unlink): Use the_target->multifs_unlink as appropriate.
3322 (handle_readlink): Use the_target->multifs_readlink as
3323 appropriate.
3324 (handle_vFile): Handle vFile:setfs packets.
3325 * server.c (handle_query): Call hostio_handle_new_gdb_connection
3326 after target_handle_new_gdb_connection.
3327
4b8b5e72
GB
33282015-06-10 Gary Benson <gbenson@redhat.com>
3329
3330 * configure.ac (AC_CHECK_FUNCS): Add setns.
3331 * config.in: Regenerate.
3332 * configure: Likewise.
3333 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3334 (linux-namespaces.o): New rule.
3335 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3336
3ac2e371
GB
33372015-06-09 Gary Benson <gbenson@redhat.com>
3338
3339 * hostio.c (handle_open): Process mode argument with
3340 fileio_to_host_mode.
3341
ca9b78ce
YQ
33422015-06-01 Yao Qi <yao.qi@linaro.org>
3343
3344 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3345 * linux-x86-low.c: Likewise.
3346
bfacd19d
DB
33472015-05-28 Don Breazeal <donb@codesourcery.com>
3348
3349 * linux-low.c (handle_extended_wait): Initialize
3350 thread_info.last_resume_kind for new fork children.
3351
452003ef
PA
33522015-05-15 Pedro Alves <palves@redhat.com>
3353
3354 * target.h (target_handle_new_gdb_connection): Rewrite using if
3355 wrapped in do/while.
3356
1041a03c
JB
33572015-05-14 Joel Brobecker <brobecker@adacore.com>
3358
3359 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3360 * configure, config.in: Regenerate.
3361 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3362 Declare typedef.
3363
c269dbdb
DB
33642015-05-12 Don Breazeal <donb@codesourcery.com>
3365
3366 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3367 PTRACE_EVENT_VFORK_DONE.
3368 (linux_low_ptrace_options, extended_event_reported): Add vfork
3369 events.
3370 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3371 and "vforkdone" for RSP 'T' Stop Reply Packet.
3372 * server.h (report_vfork_events): Declare
3373 global variable.
3374
3a8a0396
DB
33752015-05-12 Don Breazeal <donb@codesourcery.com>
3376
3377 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3378 (the_low_target) <new_fork>: Initialize new member.
3379 * linux-arm-low.c (arm_new_fork): New function.
3380 (the_low_target) <new_fork>: Initialize new member.
3381 * linux-low.c (handle_extended_wait): Call new target function
3382 new_fork.
3383 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3384 * linux-mips-low.c (mips_add_watchpoint): New function
3385 extracted from mips_insert_point.
3386 (the_low_target) <new_fork>: Initialize new member.
3387 (mips_linux_new_fork): New function.
3388 (mips_insert_point): Call mips_add_watchpoint.
3389 * linux-x86-low.c (x86_linux_new_fork): New function.
3390 (the_low_target) <new_fork>: Initialize new member.
3391
de0d863e
DB
33922015-05-12 Don Breazeal <donb@codesourcery.com>
3393
3394 * linux-low.c (handle_extended_wait): Implement return value,
3395 rename argument 'event_child' to 'event_lwp', handle
3396 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3397 (linux_low_ptrace_options): New function.
3398 (linux_low_filter_event): Call linux_low_ptrace_options,
3399 use different argument fo linux_enable_event_reporting,
3400 use return value from handle_extended_wait.
3401 (extended_event_reported): New function.
3402 (linux_wait_1): Call extended_event_reported and set
3403 status to report fork events.
3404 (linux_write_memory): Add pid to debug message.
3405 (reset_lwp_ptrace_options_callback): New function.
3406 (linux_handle_new_gdb_connection): New function.
3407 (linux_target_ops): Initialize new structure member.
3408 * linux-low.h (struct lwp_info) <waitstatus>: New member.
3409 * lynx-low.c: Initialize new structure member.
3410 * remote-utils.c (prepare_resume_reply): Implement stop reason
3411 "fork" for "T" stop message.
3412 * server.c (handle_query): Call handle_new_gdb_connection.
3413 * server.h (report_fork_events): Declare global flag.
3414 * target.h (struct target_ops) <handle_new_gdb_connection>:
3415 New member.
3416 (target_handle_new_gdb_connection): New macro.
3417 * win32-low.c: Initialize new structure member.
3418
ddcbc397
DB
34192015-05-12 Don Breazeal <donb@codesourcery.com>
3420
3421 * mem-break.c (APPEND_TO_LIST): Define macro.
3422 (clone_agent_expr): New function.
3423 (clone_one_breakpoint): New function.
3424 (clone_all_breakpoints): New function.
3425 * mem-break.h: Declare new functions.
3426
89245bc0
DB
34272015-05-12 Don Breazeal <donb@codesourcery.com>
3428
3429 * linux-low.c (linux_supports_fork_events): New function.
3430 (linux_supports_vfork_events): New function.
3431 (linux_target_ops): Initialize new structure members.
3432 (initialize_low): Call linux_check_ptrace_features.
3433 * lynx-low.c (lynx_target_ops): Initialize new structure
3434 members.
3435 * server.c (report_fork_events, report_vfork_events):
3436 New global flags.
3437 (handle_query): Add new features to qSupported packet and
3438 response.
3439 (captured_main): Initialize new global variables.
3440 * target.h (struct target_ops) <supports_fork_events>:
3441 New member.
3442 <supports_vfork_events>: New member.
3443 (target_supports_fork_events): New macro.
3444 (target_supports_vfork_events): New macro.
3445 * win32-low.c (win32_target_ops): Initialize new structure
3446 members.
3447
835205d0
GB
34482015-05-12 Gary Benson <gbenson@redhat.com>
3449
3450 * server.c (handle_qxfer_exec_file): Use current process
3451 if annex is empty.
3452
21e94bd9
SL
34532015-05-08 Sandra Loosemore <sandra@codesourcery.com>
3454
3455 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
3456 Remove HAVE_PTRACE_GETREGS conditionals.
3457 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3458 instead of PTRACE_GETREGS and PTRACE_SETREGS.
3459
45614f15
YQ
34602015-05-08 Yao Qi <yao.qi@linaro.org>
3461
3462 * linux-low.c (linux_supports_conditional_breakpoints): New
3463 function.
3464 (linux_target_ops): Install new target method.
3465 * lynx-low.c (lynx_target_ops): Install NULL hook for
3466 supports_conditional_breakpoints.
3467 * nto-low.c (nto_target_ops): Likewise.
3468 * spu-low.c (spu_target_ops): Likewise.
3469 * win32-low.c (win32_target_ops): Likewise.
3470 * server.c (handle_query): Check
3471 target_supports_conditional_breakpoints.
3472 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3473 New field.
3474 (target_supports_conditional_breakpoints): New macro.
3475
80ad801e
PA
34762015-05-06 Pedro Alves <palves@redhat.com>
3477
3478 PR server/18081
3479 * server.c (start_inferior): If the process exits, mourn it.
3480
819843c7
GB
34812015-04-21 Gary Benson <gbenson@redhat.com>
3482
3483 * hostio.c (fileio_open_flags_to_host): Factored out to
3484 fileio_to_host_openflags in common/fileio.c. Single use
3485 updated.
3486
a2d5a9d7
MF
34872015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3488
3489 * linux-xtensa-low.c (xtensa_fill_gregset)
3490 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3491 XCHAL_HAVE_LOOP.
3492
deb44829
MF
34932015-04-17 Max Filippov <jcmvbkbc@gmail.com>
3494
3495 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3496 (regs_info): Replace usrregs pointer with NULL.
3497
e57f1de3
GB
34982015-04-17 Gary Benson <gbenson@redhat.com>
3499
3500 * target.h (struct target_ops) <pid_to_exec_file>: New field.
3501 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3502 * server.c (handle_qxfer_exec_file): New function.
3503 (qxfer_packets): Add exec-file entry.
3504 (handle_query): Report qXfer:exec-file:read as supported packet.
3505
62828379
RN
35062015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
3507
3508 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3509
b88bb450
GB
35102015-04-09 Gary Benson <gbenson@redhat.com>
3511
3512 * hostio-errno.c (errno_to_fileio_error): Remove function.
3513 Update caller to use remote_fileio_to_fio_error.
3514
c8f4bfdd
YQ
35152015-04-09 Yao Qi <yao.qi@linaro.org>
3516
3517 * linux-low.c (linux_insert_point): Call
3518 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3519 (linux_remove_point): Call remove_memory_breakpoint if type is
3520 raw_bkpt_type_sw.
3521 * linux-x86-low.c (x86_insert_point): Don't call
3522 insert_memory_breakpoint.
3523 (x86_remove_point): Don't call remove_memory_breakpoint.
3524
41f98f02
PA
35252015-04-01 Pedro Alves <palves@redhat.com>
3526 Cleber Rosa <crosa@redhat.com>
3527
3528 * server.c (gdbserver_usage): Reorganize and extend the usage
3529 message.
3530
2bf6fb9d
PA
35312015-03-24 Pedro Alves <palves@redhat.com>
3532
3533 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3534 output. Also dump TRAP_TRACE.
3535 (linux_low_filter_event): In debug output, distinguish a
3536 resume_stop SIGSTOP from a delayed SIGSTOP.
3537
369f6daa
GB
35382015-03-24 Gary Benson <gbenson@redhat.com>
3539
3540 * linux-x86-low.c (x86_linux_new_thread): Moved to
3541 nat/x86-linux.c.
3542 (x86_linux_prepare_to_resume): Likewise.
3543
8e5d4070
GB
35442015-03-24 Gary Benson <gbenson@redhat.com>
3545
3546 * Makefile.in (x86-linux-dregs.o): New rule.
3547 * configure.srv: Add x86-linux-dregs.o to relevant targets.
3548 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3549 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3550 (x86_linux_dr_get): Likewise.
3551 (x86_linux_dr_set): Likewise.
3552 (update_debug_registers_callback): Likewise.
3553 (x86_linux_dr_set_addr): Likewise.
3554 (x86_linux_dr_get_addr): Likewise.
3555 (x86_linux_dr_set_control): Likewise.
3556 (x86_linux_dr_get_control): Likewise.
3557 (x86_linux_dr_get_status): Likewise.
3558 (x86_linux_update_debug_registers): Likewise.
3559
2b95d440
GB
35602015-03-24 Gary Benson <gbenson@redhat.com>
3561
3562 * linux-x86-low.c (x86_linux_update_debug_registers):
3563 New function, factored out from...
3564 (x86_linux_prepare_to_resume): ...this.
3565
14b0bc68
GB
35662015-03-24 Gary Benson <gbenson@redhat.com>
3567
3568 * linux-x86-low.c (x86_linux_dr_get): Update comments.
3569 (x86_linux_dr_set): Likewise.
3570 (update_debug_registers_callback): Likewise.
3571 (x86_linux_dr_set_addr): Likewise.
3572 (x86_linux_dr_get_addr): Likewise.
3573 (x86_linux_dr_set_control): Likewise.
3574 (x86_linux_dr_get_control): Likewise.
3575 (x86_linux_dr_get_status): Likewise.
3576 (x86_linux_prepare_to_resume): Likewise.
3577
5dfe6ca8
GB
35782015-03-24 Gary Benson <gbenson@redhat.com>
3579
3580 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3581 Use perror_with_name. Pass string through gettext.
3582 (x86_linux_dr_set): Likewise.
3583
d33472ad
GB
35842015-03-24 Gary Benson <gbenson@redhat.com>
3585
3586 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3587 (x86_linux_dr_set_addr): ...this.
3588 (x86_dr_low_get_addr): Rename to...
3589 (x86_linux_dr_get_addr): ...this.
3590 (x86_dr_low_set_control): Rename to...
3591 (x86_linux_dr_set_control): ...this.
3592 (x86_dr_low_get_control): Rename to...
3593 (x86_linux_dr_get_control): ...this.
3594 (x86_dr_low_get_status): Rename to...
3595 (x86_linux_dr_get_status): ...this.
3596 (x86_dr_low): Update with new function names.
3597
4b134ca1
GB
35982015-03-24 Gary Benson <gbenson@redhat.com>
3599
3600 * Makefile.in (x86-linux.o): New rule.
3601 * configure.srv: Add x86-linux.o to relevant targets.
3602 * linux-low.c (lwp_set_arch_private_info): New function.
3603 (lwp_arch_private_info): Likewise.
3604 * linux-x86-low.c: Include nat/x86-linux.h.
3605 (arch_lwp_info): Removed structure.
3606 (update_debug_registers_callback):
3607 Use lwp_set_debug_registers_changed.
3608 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3609 and lwp_set_debug_registers_changed.
3610 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3611
34c703da
GB
36122015-03-24 Gary Benson <gbenson@redhat.com>
3613
3614 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3615 * linux-arm-low.c (arm_new_thread): Likewise.
3616 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3617 * linux-mips-low.c (mips_linux_new_thread): Likewise.
3618 * linux-x86-low.c (x86_linux_new_thread): Likewise.
3619 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3620
cff068da
GB
36212015-03-24 Gary Benson <gbenson@redhat.com>
3622
3623 * linux-low.c (ptid_of_lwp): New function.
3624 (lwp_is_stopped): Likewise.
3625 (lwp_stop_reason): Likewise.
3626 * linux-x86-low.c (update_debug_registers_callback):
3627 Use lwp_is_stopped.
3628 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3629 lwp_stop_reason.
3630
b2f7c7e8
GB
36312015-03-24 Gary Benson <gbenson@redhat.com>
3632
3633 * linux-low.h (linux_stop_lwp): Remove declaration.
3634
6d4ee8c6
GB
36352015-03-24 Gary Benson <gbenson@redhat.com>
3636
3637 * linux-low.h: Include nat/linux-nat.h.
3638 * linux-low.c (iterate_over_lwps_args): New structure.
3639 (iterate_over_lwps_filter): New function.
3640 (iterate_over_lwps): Likewise.
3641 * linux-x86-low.c (update_debug_registers_callback):
3642 Update signature to what iterate_over_lwps expects.
3643 Remove PID check that iterate_over_lwps now performs.
3644 (x86_dr_low_set_addr): Use iterate_over_lwps.
3645 (x86_dr_low_set_control): Likewise.
3646
70a0bb6b
GB
36472015-03-24 Gary Benson <gbenson@redhat.com>
3648
3649 * linux-x86-low.c (x86_debug_reg_state): New function.
3650 (x86_linux_prepare_to_resume): Use the above.
3651
7b669087
GB
36522015-03-24 Gary Benson <gbenson@redhat.com>
3653
3654 * linux-low.c (current_lwp_ptid): New function.
3655 * linux-x86-low.c: Include nat/linux-nat.h.
3656 (x86_dr_low_get_addr): Use current_lwp_ptid.
3657 (x86_dr_low_get_control): Likewise.
3658 (x86_dr_low_get_status): Likewise.
3659
eef49a3d
PA
36602015-03-20 Pedro Alves <palves@redhat.com>
3661
3662 * tracepoint.c (cmd_qtstatus): Make "str" const.
3663
b2333d22
PA
36642015-03-20 Pedro Alves <palves@redhat.com>
3665
3666 * server.c (handle_general_set): Make "req_str" const.
3667
23f238d3
PA
36682015-03-19 Pedro Alves <palves@redhat.com>
3669
3670 * linux-low.c (linux_resume_one_lwp): Rename to ...
3671 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3672 instead call perror_with_name.
3673 (check_ptrace_stopped_lwp_gone): New function.
3674 (linux_resume_one_lwp): Reimplement as wrapper around
3675 linux_resume_one_lwp_throw that swallows errors if the LWP is
3676 gone.
3677
91baf43f
PA
36782015-03-19 Pedro Alves <palves@redhat.com>
3679
3680 * linux-low.c (count_events_callback, select_event_lwp_callback):
3681 No longer check whether the thread has resume_stop as last resume
3682 kind.
3683
8bf3b159
PA
36842015-03-19 Pedro Alves <palves@redhat.com>
3685
3686 * linux-low.c (count_events_callback, select_event_lwp_callback):
3687 Use the lwp's status_pending_p field, not the thread's.
3688
b90fc188
PA
36892015-03-19 Pedro Alves <palves@redhat.com>
3690
3691 * linux-low.c (select_event_lwp_callback): Update comments to
3692 no longer mention SIGTRAP.
3693
464b0089
GB
36942015-03-18 Gary Benson <gbenson@redhat.com>
3695
3696 * server.c (handle_query): Do not report vFile:fstat as supported.
3697
aa9e327f
GB
36982015-03-11 Gary Benson <gbenson@redhat.com>
3699
3700 * hostio.c (sys/types.h): New include.
3701 (sys/stat.h): Likewise.
3702 (common-remote-fileio.h): Likewise.
3703 (handle_fstat): New function.
3704 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 3705
791c0056
GB
37062015-03-11 Gary Benson <gbenson@redhat.com>
3707
3708 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3709 struct stat.st_blocks and struct stat.st_blksize.
3710 * configure: Regenerate.
3711 * config.in: Likewise.
3712 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3713 (OBS): Add common-remote-fileio.o.
3714 (common-remote-fileio.o): New rule.
3715
9a9df970
PA
37162015-03-09 Pedro Alves <palves@redhat.com>
3717
3718 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3719 'struct sockaddr' pointer in 'accept' call.
3720
9eb1356e
PA
37212015-03-09 Pedro Alves <palves@redhat.com>
3722
3723 Revert:
3724 2015-03-07 Pedro Alves <palves@redhat.com>
3725 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3726 or <winsock2.h> here. Instead include "gdb_socket.h".
3727 (remote_open): Use union gdb_sockaddr_u.
3728 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3729 or <winsock2.h> here. Instead include "gdb_socket.h".
3730 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3731 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3732 or <sys/un.h>.
3733 (init_named_socket, gdb_agent_helper_thread): Use union
3734 gdb_sockaddr_u.
3735
aac331e4
PA
37362015-03-07 Pedro Alves <palves@redhat.com>
3737
3738 * configure.ac (build_warnings): Move
3739 -Wdeclaration-after-statement to the C-specific set.
3740 * configure: Regenerate.
3741
366c75fc
PA
37422015-03-07 Pedro Alves <palves@redhat.com>
3743
3744 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3745 or <winsock2.h> here. Instead include "gdb_socket.h".
3746 (remote_open): Use union gdb_sockaddr_u.
3747 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3748 or <winsock2.h> here. Instead include "gdb_socket.h".
3749 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3750 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3751 or <sys/un.h>.
3752 (init_named_socket, gdb_agent_helper_thread): Use union
3753 gdb_sockaddr_u.
3754
492d29ea
PA
37552015-03-07 Pedro Alves <palves@redhat.com>
3756
3757 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3758 instead.
3759
60a191ed
YQ
37602015-03-06 Yao Qi <yao.qi@linaro.org>
3761
3762 * linux-aarch64-low.c (aarch64_insert_point): Use
3763 show_debug_regs as a boolean.
3764 (aarch64_remove_point): Likewise.
3765
f5771b1d
PA
37662015-03-05 Pedro Alves <palves@redhat.com>
3767
3768 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3769 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3770 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3771 * nto-low.c (nto_target_ops): Likewise.
3772 * spu-low.c (spu_target_ops): Likewise.
3773 * win32-low.c (win32_target_ops): Likewise.
3774
3e572f71
PA
37752015-03-04 Pedro Alves <palves@redhat.com>
3776
72f4393d 3777 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
3778 Decide whether a breakpoint triggered based on the SIGTRAP's
3779 siginfo.si_code.
72f4393d
L
3780 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3781 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
3782 (linux_low_filter_event): Check for breakpoints before checking
3783 watchpoints.
3784 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3785 siginfo.si_code.
72f4393d
L
3786 (linux_stopped_by_sw_breakpoint)
3787 (linux_supports_stopped_by_sw_breakpoint)
3788 (linux_stopped_by_hw_breakpoint)
3789 (linux_supports_stopped_by_hw_breakpoint): New functions.
3790 (linux_target_ops): Install new target methods.
3e572f71 3791
1ec68e26
PA
37922015-03-04 Pedro Alves <palves@redhat.com>
3793
3794 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3795 * server.c (swbreak_feature, hwbreak_feature): New globals.
3796 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3797 (captured_main): Clear swbreak_feature and hwbreak_feature.
3798 * server.h (swbreak_feature, hwbreak_feature): Declare.
3799 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3800 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3801 supports_stopped_by_hw_breakpoint>: New fields.
3802 (target_supports_stopped_by_sw_breakpoint)
3803 (target_stopped_by_sw_breakpoint)
3804 (target_supports_stopped_by_hw_breakpoint)
3805 (target_stopped_by_hw_breakpoint): Declare.
3806
15c66dd6
PA
38072015-03-04 Pedro Alves <palves@redhat.com>
3808
3809 enum lwp_stop_reason -> enum target_stop_reason
3810 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3811 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3812 (linux_wait_1, stuck_in_jump_pad_callback)
3813 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3814 (linux_stopped_by_watchpoint):
3815 * linux-low.h (enum lwp_stop_reason): Delete.
3816 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3817 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3818
98fc70d6
YQ
38192015-03-04 Yao Qi <yao.qi@linaro.org>
3820
3821 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3822
dd2ac174
GB
38232015-03-03 Gary Benson <gbenson@redhat.com>
3824
3825 * hostio.c (handle_vFile): Fix prefix lengths.
3826
d68e53f4
MM
38272015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3828
3829 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3830 ptr_bits.
3831
bf2d68ab
AA
38322015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3833
3834 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3835 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3836 (clean): Add "rm -f" for above C files.
3837 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3838 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3839 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3840 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3841 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3842 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3843 (init_registers_s390x_vx_linux64)
3844 (init_registers_s390x_tevx_linux64)
3845 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3846 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3847 declarations.
3848 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3849 (s390_store_vxrs_high): New functions.
3850 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3851 NT_S390_VXRS_HIGH.
3852 (s390_arch_setup): Add logic for selecting one of the new target
3853 descriptions. Activate the new vector regsets if applicable.
3854 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3855 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3856 and init_registers_s390x_tevx_linux64.
3857
c966a859
PA
38582015-03-01 Pedro Alves <palves@redhat.com>
3859
3860 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3861 parameter.
3862
4180215b
PA
38632015-02-27 Pedro Alves <palves@redhat.com>
3864
3865 * linux-x86-low.c (u_debugreg_offset): New function.
3866 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3867
749bab01
PA
38682015-02-27 Pedro Alves <palves@redhat.com>
3869
3870 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3871 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3872 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3873 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3874 (ps_lsetfpregs, ps_getpid)
3875 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3876 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3877 (ps_lsetxregs, ps_plog): Declare.
3878
3c14e5a3
PA
38792015-02-27 Pedro Alves <palves@redhat.com>
3880
3881 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3882 IP_AGENT_EXPORT_FUNC.
3883 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3884 IP_AGENT_EXPORT_FUNC.
3885 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3886 (IP_AGENT_EXPORT): Delete.
3887 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3888 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3889 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3890 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3891 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3892 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3893 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3894 (traceframe_read_count, traceframe_write_count)
3895 (traceframes_created, trace_state_variables, get_raw_reg)
3896 (get_trace_state_variable_value, set_trace_state_variable_value)
3897 (ust_loaded, helper_thread_id, cmd_buf): Use
3898 IPA_SYM_EXPORTED_NAME.
3899 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3900 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3901 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3902 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3903 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3904 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3905 EXTERN_C_PUSH/EXTERN_C_POP.
3906 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3907 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3908 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3909 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3910 (traceframe_write_count, traceframe_read_count)
3911 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3912 (about_to_request_buffer_space, get_trace_state_variable_value)
3913 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3914 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3915 EXTERN_C_PUSH/EXTERN_C_POP.
3916 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3917 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3918 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3919 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3920 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3921 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3922 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3923 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3924 Define.
3925 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3926 (IP_AGENT_EXPORT_VAR_DECL): Define.
3927 (tracing): Declare.
3928 (gdb_agent_get_raw_reg): Declare.
3929
fe978cb0
PA
39302015-02-27 Tom Tromey <tromey@redhat.com>
3931 Pedro Alves <palves@redhat.com>
3932
3933 Rename symbols whose names are reserved C++ keywords throughout.
3934
3bc3d82a
PA
39352015-02-27 Pedro Alves <palves@redhat.com>
3936
3937 * Makefile.in (COMPILER): New, get it from autoconf.
3938 (CXX): Get from autoconf instead.
3939 (COMPILE.pre): Use COMPILER.
3940 (CC-LD): Rename to ...
3941 (CC_LD): ... this. Use COMPILER.
3942 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3943 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3944 * acinclude.m4: Include build-with-cxx.m4.
3945 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3946 Disable -Werror by default if building in C++ mode.
3947 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3948 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3949 the C++ compiler. Save/restore CXXFLAGS too.
3950 * configure: Regenerate.
3951
07697489
PA
39522015-02-27 Pedro Alves <palves@redhat.com>
3953
3954 * acinclude.m4: Include libiberty.m4.
3955 * configure.ac: Call libiberty_INIT.
3956 * config.in, configure: Regenerate.
3957
9beb7c4e
PA
39582015-02-26 Pedro Alves <palves@redhat.com>
3959
3960 * linux-low.c (linux_wait_1): When incrementing the PC past a
3961 program breakpoint always use the_low_target.breakpoint_len as
3962 increment, rather than the maximum between that and
3963 the_low_target.decr_pc_after_break.
3964
8090aef2
PA
39652015-02-23 Pedro Alves <palves@redhat.com>
3966
3967 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3968 thread was doing a step-over; always adjust the PC if
3969 we stepped over a permanent breakpoint.
3970 (linux_wait_1): If we stepped over breakpoint that was on top of a
3971 permanent breakpoint, manually advance the PC past it.
3972
bc9540e8
PA
39732015-02-23 Pedro Alves <palves@redhat.com>
3974
3975 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3976 modes.
3977 (x86_fill_gregset, x86_store_gregset): Use it when handling
3978 $orig_eax.
3979
2db9a427
PA
39802015-02-20 Pedro Alves <palves@redhat.com>
3981
3982 * thread-db.c: Include "nat/linux-procfs.h".
3983 (thread_db_init): Skip listing new threads if the kernel supports
3984 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3985
afa8d396
PA
39862015-02-20 Pedro Alves <palves@redhat.com>
3987
3988 * linux-low.c (status_pending_p_callback): Use ptid_match.
3989
c9587f88
AT
39902015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3991
3992 PR breakpoints/16812
3993 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3994 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3995 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3996
b05ec7a5
AT
39972015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3998
3999 PR breakpoints/15956
4000 * tracepoint.c (cmd_qtinit): Add check for current_thread.
4001
d33501a5
MM
40022015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4003
4004 * linux-low.c (linux_low_btrace_conf): Print size.
4005 * server.c (handle_btrace_conf_general_set): New.
4006 (hanle_general_set): Call handle_btrace_conf_general_set.
4007 (handle_query): Report Qbtrace-conf:bts:size as supported.
4008
f4abbc16
MM
40092015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4010
4011 * linux-low.c (linux_low_enable_btrace): Update parameters.
4012 (linux_low_btrace_conf): New.
4013 (linux_target_ops)<to_btrace_conf>: Initialize.
4014 * server.c (current_btrace_conf): New.
4015 (handle_btrace_enable): Rename to ...
4016 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
4017 to target_enable_btrace. Update comment. Update users.
4018 (handle_qxfer_btrace_conf): New.
4019 (qxfer_packets): Add btrace-conf entry.
4020 (handle_query): Report qXfer:btrace-conf:read as supported packet.
4021 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4022 (target_ops)<read_btrace_conf>: New.
4023 (target_enable_btrace): Update parameters.
4024 (target_read_btrace_conf): New.
4025
043c3577
MM
40262015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4027
4028 * server.c (handle_btrace_general_set): Remove call to
4029 target_supports_btrace.
4030 (supported_btrace_packets): New.
4031 (handle_query): Call supported_btrace_packets.
4032 * target.h: include btrace-common.h.
4033 (btrace_target_info): Removed.
4034 (supports_btrace, target_supports_btrace): Update parameters.
4035
734b0e4b
MM
40362015-02-09 Markus Metzger <markus.t.metzger@intel.com>
4037
4038 * Makefile.in (SFILES): Add common/btrace-common.c.
4039 (OBS): Add common/btrace-common.o.
4040 (btrace-common.o): Add build rules.
4041 * linux-low: Include btrace-common.h.
4042 (linux_low_read_btrace): Use struct btrace_data. Call
4043 btrace_data_init and btrace_data_fini.
4044
d6c146e9
PA
40452015-02-06 Pedro Alves <palves@redhat.com>
4046
4047 * thread-db.c (find_new_threads_callback): Add debug output.
4048
20ba1ce6
PA
40492015-02-04 Pedro Alves <palves@redhat.com>
4050
4051 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4052 (resume_stopped_resumed_lwps): New function.
4053 (linux_wait_for_event_filtered): Use it.
4054
8cc73a39
SDJ
40552015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4056
4057 * Makefile.in (SFILES): Add linux-personality.c.
4058 (linux-personality.o): New rule.
4059 * configure.srv (srv_linux_obj): Add linux-personality.o to the
4060 list of objects to be built.
4061 * linux-low.c: Include nat/linux-personality.h.
4062 (linux_create_inferior): Remove code to disable address space
4063 randomization (moved to ../nat/linux-personality.c). Create
4064 cleanup to disable address space randomization.
4065
fb23d554
SDJ
40662015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
4067
4068 * Makefile.in (posix-strerror.o): New rule.
4069 (mingw-strerror.o): Likewise.
4070 * configure: Regenerated.
4071 * configure.ac: Source file ../common/common.host. Initialize new
4072 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
4073
cdf43629
YQ
40742015-01-14 Yao Qi <yao@codesourcery.com>
4075
4076 * Makefile.in (SFILES): Add nat/ppc-linux.c.
4077 (ppc-linux.o): New rule.
4078 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4079 * configure.ac: AC_CHECK_FUNCS(getauxval).
4080 * config.in: Re-generated.
4081 * configure: Re-generated.
4082 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4083 ppc64_64bit_inferior_p
4084
514c5338
YQ
40852015-01-14 Yao Qi <yao@codesourcery.com>
4086
4087 * linux-ppc-low.c: Include "nat/ppc-linux.h".
4088 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4089 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
4090 (PT_ORIG_R3, PT_TRAP): Likewise.
4091 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4092 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4093 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4094
3368c1e5
JB
40952015-01-10 Joel Brobecker <brobecker@adacore.com>
4096
4097 * i387-fp.c (i387_cache_to_xsave): In look over
4098 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4099 zmmh_low_space field by use of zmmh_high_space.
4100
582511be
PA
41012015-01-09 Pedro Alves <palves@redhat.com>
4102
4103 * linux-low.c (step_over_bkpt): Move higher up in the file.
4104 (handle_extended_wait): Don't store the stop_pc here.
4105 (get_stop_pc): Adjust comments and rename to ...
4106 (check_stopped_by_breakpoint): ... this. Record whether the LWP
4107 stopped for a software breakpoint or hardware breakpoint.
4108 (thread_still_has_status_pending_p): New function.
4109 (status_pending_p_callback): Use
4110 thread_still_has_status_pending_p. If the event is no longer
4111 interesting, resume the LWP.
4112 (handle_tracepoints): Add assert.
4113 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4114 (wstatus_maybe_breakpoint): New function.
4115 (cancel_breakpoint): Delete function.
4116 (check_stopped_by_watchpoint): New function, factored out from
4117 linux_low_filter_event.
4118 (lp_status_maybe_breakpoint): Delete function.
4119 (linux_low_filter_event): Remove filter_ptid argument.
4120 Leave thread group exits pending here. Store the LWP's stop PC.
4121 Always leave events pending.
4122 (linux_wait_for_event_filtered): Pull all events out of the
4123 kernel, and leave them all pending.
4124 (count_events_callback, select_event_lwp_callback): Consider all
4125 events.
4126 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4127 (select_event_lwp): Only give preference to the stepping LWP in
4128 all-stop mode. Adjust comments.
4129 (ignore_event): New function.
4130 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
4131 references to cancel_breakpoints. Adjust to renames. Also give
4132 equal priority to all LWPs that have had events in non-stop mode.
4133 If reporting a software breakpoint event, unadjust the LWP's PC.
4134 (linux_wait): If linux_wait_1 returned an ignored event, retry.
4135 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4136 Adjust.
4137 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
4138 (resume_status_pending_p): Use thread_still_has_status_pending_p.
4139 (linux_stopped_by_watchpoint): Adjust.
4140 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4141 * linux-low.h (enum lwp_stop_reason): New.
4142 (struct lwp_info) <stop_pc>: Adjust comment.
4143 <stopped_by_watchpoint>: Delete field.
4144 <stop_reason>: New field.
4145 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4146 * mem-break.c (software_breakpoint_inserted_here)
4147 (hardware_breakpoint_inserted_here): New function.
4148 * mem-break.h (software_breakpoint_inserted_here)
4149 (hardware_breakpoint_inserted_here): Declare.
4150 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4151 (cancel_breakpoints): Delete.
4152 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4153 (upload_fast_traceframes): Remove references to
4154 cancel_breakpoints.
4155
a33e3959
PA
41562015-01-09 Pedro Alves <palves@redhat.com>
4157
4158 * thread-db.c (find_new_threads_callback): Ignore thread if the
4159 kernel thread ID is -1.
4160
8784d563
PA
41612015-01-09 Pedro Alves <palves@redhat.com>
4162
4163 * linux-low.c (linux_attach_fail_reason_string): Move to
4164 nat/linux-ptrace.c, and rename.
4165 (linux_attach_lwp): Update comment.
4166 (attach_proc_task_lwp_callback): New function.
4167 (linux_attach): Adjust to rename and use
4168 linux_proc_attach_tgid_threads.
4169 (linux_attach_fail_reason_string): Delete declaration.
4170
76f2b779
JB
41712015-01-01 Joel Brobecker <brobecker@adacore.com>
4172
4173 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4174 * server.c (gdbserver_version): Likewise.
4175
fafcc06a
SDJ
41762014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
4177
4178 * remote-utils.c: Include ctype.h.
4179 (input_interrupt): Explicitly handle the case when the char
4180 received is the NUL byte. Improve the printing of non-ASCII
4181 characters.
4182
beed38b8
JB
41832014-12-16 Joel Brobecker <brobecker@adacore.com>
4184
4185 * linux-low.c (linux_low_filter_event): Update call to
4186 linux_enable_event_reporting following the addition of
4187 a new parameter to that function.
4188
bf330350
CU
41892014-12-16 Catalin Udma <catalin.udma@freescale.com>
4190
4191 PR server/17457
4192 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4193 (AARCH64_FPCR_REGNO): Likewise.
4194 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4195 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4196 (aarch64_store_fpregset): Likewise.
4197
5227d625
JB
41982014-12-15 Joel Brobecker <brobecker@adacore.com>
4199
4200 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4201 Remove FIXME comment about assumption about N.
4202
f93b65a0
JB
42032014-12-13 Joel Brobecker <brobecker@adacore.com>
4204
4205 * configure.ac: If large-file support is disabled in GDBserver,
4206 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4207 * configure: Regenerate.
4208
e5a9158d
AA
42092014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4210
4211 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4212 warning upon ENODATA from ptrace.
4213 * linux-s390-low.c (s390_store_tdb): New.
4214 (s390_regsets): Add regset for NT_S390_TDB.
4215
feea5f36
AA
42162014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4217
4218 * linux-low.c (regsets_store_inferior_registers): Skip regsets
4219 without a fill_function.
4220 * linux-s390-low.c (s390_fill_last_break): Remove.
4221 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4222 (s390_arch_setup): Use regset's size instead of fill_function for
4223 loop end condition.
4224
098dbe61
AA
42252014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4226
4227 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4228 the regset's store function when ptrace returned an error.
4229 * regcache.c (get_thread_regcache): Invalidate register cache
4230 before fetching inferior's registers.
4231
28eef672
AA
42322014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
4233
4234 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4235 while-loop as for-loop.
4236 (regsets_store_inferior_registers): Likewise.
4237
bdca27a2
YQ
42382014-11-28 Yao Qi <yao@codesourcery.com>
4239
4240 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4241 * config.in, configure: Re-generate.
4242 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4243 is defined.
4244
9c232dda
YQ
42452014-11-21 Yao Qi <yao@codesourcery.com>
4246
4247 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4248 (AC_CHECK_HEADERS): Remove malloc.h.
4249 * configure: Re-generated.
4250 * config.in: Re-generated.
4251 * server.h: Don't include alloca.h and malloc.h.
4252 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4253 Don't include malloc.h.
4254
43968415
JB
42552014-11-17 Joel Brobecker <brobecker@adacore.com>
4256
4257 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4258 corresponding ERRNO check in same block.
4259
40e91bc7
PA
42602014-11-12 Pedro Alves <palves@redhat.com>
4261
4262 * server.c (cont_thread): Update comment.
4263 (start_inferior, attach_inferior): No longer clear cont_thread.
4264 (handle_v_cont): No longer set cont_thread.
4265 (captured_main): Clear cont_thread each time a GDB connects.
4266
c2c118cf
PA
42672014-11-12 Pedro Alves <palves@redhat.com>
4268
4269 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4270 thread, and don't resume all threads if the Hc thread has exited.
4271
78708b7c
PA
42722014-11-12 Pedro Alves <palves@redhat.com>
4273
4274 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4275 the process group instead of to a specific LWP.
4276
a2abc7de
PA
42772014-10-15 Pedro Alves <palves@redhat.com>
4278
4279 PR server/17487
4280 * win32-arm-low.c (arm_set_thread_context): Remove current_event
4281 parameter.
4282 (arm_set_thread_context): Delete.
4283 (the_low_target): Adjust.
4284 * win32-i386-low.c (debug_registers_changed)
4285 (debug_registers_used): Delete.
4286 (update_debug_registers_callback): New function.
4287 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4288 needing to update their debug registers.
4289 (win32_get_current_dr): New function.
4290 (x86_dr_low_get_addr, x86_dr_low_get_control)
4291 (x86_dr_low_get_status): Fetch the debug register from the thread
4292 record's context.
4293 (i386_initial_stuff): Adjust.
4294 (i386_get_thread_context): Remove current_event parameter. Don't
4295 clear debug_registers_changed nor copy DR values to
4296 debug_reg_state.
4297 (i386_set_thread_context): Delete.
4298 (i386_prepare_to_resume): New function.
4299 (i386_thread_added): Mark the thread as needing to update irs
4300 debug registers.
4301 (the_low_target): Remove i386_set_thread_context and install
4302 i386_prepare_to_resume.
4303 * win32-low.c (win32_get_thread_context): Adjust.
4304 (win32_set_thread_context): Use SetThreadContext
4305 directly.
4306 (win32_prepare_to_resume): New function.
4307 (win32_require_context): New function, factored out from ...
4308 (thread_rec): ... this.
4309 (continue_one_thread): Call win32_prepare_to_resume on each thread
4310 we're about to continue.
4311 (win32_resume): Call win32_prepare_to_resume on the event thread.
4312 * win32-low.h (struct win32_thread_info)
4313 <debug_registers_changed>: New field.
4314 (struct win32_target_ops): Change prototype of set_thread_context,
4315 delete set_thread_context and add prepare_to_resume.
4316 (win32_require_context): New declaration.
4317
a442d071
GB
43182014-10-08 Gary Benson <gbenson@redhat.com>
4319
4320 * server.h: Do not include common-exceptions.h.
4321
6f1947e8
GB
43222014-10-08 Gary Benson <gbenson@redhat.com>
4323
4324 * server.h: Do not include cleanups.h.
4325
63b434a4
JH
43262014-09-30 James Hogan <james.hogan@imgtec.com>
4327
4328 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4329 mips64-dsp-linux.c.
4330
c4d9ceb6
YQ
43312014-09-23 Yao Qi <yao@codesourcery.com>
4332
4333 * linux-low.c (lp_status_maybe_breakpoint): New function.
4334 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4335 (count_events_callback): Likewise.
4336 (select_event_lwp_callback): Likewise.
4337 (cancel_breakpoints_callback): Likewise.
4338
89a5711c
DB
43392014-09-19 Don Breazeal <donb@codesourcery.com>
4340
4341 * linux-low.c (handle_extended_wait): Call
4342 linux_ptrace_get_extended_event.
4343 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4344 linux_is_extended_waitstatus.
4345
bffc0964
JB
43462014-09-16 Joel Brobecker <brobecker@adacore.com>
4347
4348 * Makefile.in (CPPFLAGS): Define.
4349 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4350 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4351
0bfdf32f
GB
43522014-09-16 Gary Benson <gbenson@redhat.com>
4353
4354 * inferiors.h (current_inferior): Renamed as...
4355 (current_thread): New variable. All uses updated.
4356 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4357 (maybe_move_out_of_jump_pad): Likewise.
4358 (cancel_breakpoint): Likewise.
4359 (linux_low_filter_event): Likewise.
4360 (wait_for_sigstop): Likewise.
4361 (linux_resume_one_lwp): Likewise.
4362 (need_step_over_p): Likewise.
4363 (start_step_over): Likewise.
4364 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4365 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4366 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4367 and save_inferior as saved_thread.
4368 * regcache.c (get_thread_regcache): Renamed saved_inferior as
4369 saved_thread.
4370 (regcache_invalidate_thread): Likewise.
4371 * remote-utils.c (prepare_resume_reply): Likewise.
4372 * thread-db.c (thread_db_get_tls_address): Likewise.
4373 (disable_thread_event_reporting): Likewise.
4374 (remove_thread_event_breakpoints): Likewise.
4375 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4376 as saved_thread.
4377 * target.h (set_desired_inferior): Renamed as...
4378 (set_desired_thread): New declaration. All uses updated.
4379 * server.c (myresume): Updated comment to reference thread instead
4380 of inferior.
4381 (handle_serial_event): Likewise.
4382 (handle_target_event): Likewise.
4383
361c8ade
GB
43842014-09-12 Tom Tromey <tromey@redhat.com>
4385 Gary Benson <gbenson@redhat.com>
4386
4387 * regcache.h: Include common-regcache.h.
4388 (regcache_read_pc): Don't declare.
4389 * regcache.c (get_thread_regcache_for_ptid): New function.
4390
bd9269f7
GB
43912014-09-11 Tom Tromey <tromey@redhat.com>
4392 Gary Benson <gbenson@redhat.com>
4393
4394 * symbol.c: New file.
4395 * Makefile.in (SFILES): Add symbol.c.
4396 (OBS): Add symbol.o.
4397
f8c1d06b
GB
43982014-09-11 Gary Benson <gbenson@redhat.com>
4399
4400 * target.c (target_stop_ptid, target_continue_ptid): New
4401 functions.
4402
721ec300
GB
44032014-09-11 Tom Tromey <tromey@redhat.com>
4404 Gary Benson <gbenson@redhat.com>
4405
4406 * target.h: Include target/target.h.
4407 * target.c (target_read_memory, target_read_uint32)
4408 (target_write_memory): New functions.
4409
c5e92cca
GB
44102014-09-11 Gary Benson <gbenson@redhat.com>
4411
4412 * server.h (debug_hw_points): Don't declare.
4413 * server.c (debug_hw_points): Don't define. Replace all uses
4414 with show_debug_regs.
4415 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
4416 all uses with show_debug_regs.
4417
2e4bb98a
EBM
44182014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
4419
4420 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4421 endianness into account.
4422 (ppc_supply_ptrace_register): Likewise.
4423
ac740bc7
JH
44242014-09-03 James Hogan <james.hogan@imgtec.com>
4425
4426 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4427 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4428
97ea6506
GB
44292014-09-03 Gary Benson <gbenson@redhat.com>
4430
4431 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4432 ALL_DEBUG_ADDRESS_REGISTERS.
4433
df7e5265
GB
44342014-09-02 Gary Benson <gbenson@redhat.com>
4435
4436 * i386-low.h: Renamed as...
4437 * x86-low.h: New file. All type, function and variable name
4438 prefixes changed from "i386_" to "x86_". All references updated.
4439 * i386-low.c: Renamed as...
4440 * x86-low.c: New file. All type, function and variable name
4441 prefixes changed from "i386_" to "x86_". All references updated.
4442
ed859da7
GB
44432014-09-02 Gary Benson <gbenson@redhat.com>
4444
4445 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4446 (x86_linux_new_thread): Likewise.
4447
860789c7
GB
44482014-08-29 Gary Benson <gbenson@redhat.com>
4449
4450 * server.h (setjmp.h): Do not include.
4451 (toplevel): Do not declare.
4452 (common-exceptions.h): Include.
4453 (cleanups.h): Likewise.
4454 * server.c (toplevel): Do not define.
4455 (exit_code): New static global.
4456 (detach_or_kill_for_exit_cleanup): New function.
4457 (main): New function. Original main renamed to...
4458 (captured_main): New function.
4459 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4460
ff55e1b5
GB
44612014-08-29 Gary Benson <gbenson@redhat.com>
4462
4463 * Makefile.in (SFILES): Add common/common-exceptions.c.
4464 (OBS): Add common-exceptions.o.
4465 (common-exceptions.o): New rule.
4466 * utils.c (prepare_to_throw_exception): New function.
4467
e9bcb658
GB
44682014-08-29 Gary Benson <gbenson@redhat.com>
4469
4470 * config.in: Regenerate.
4471 * configure: Likewise.
4472
e3180625
GB
44732014-08-29 Gary Benson <gbenson@redhat.com>
4474
4475 * Makefile.in (SFILES): Add common/cleanups.c.
4476 (OBS): cleanups.o.
4477 (cleanups.o): New rule.
4478
e3d6ba5d
GB
44792014-08-29 Gary Benson <gbenson@redhat.com>
4480
4481 * utils.c (internal_vwarning): New function.
4482
7096e886
GB
44832014-08-28 Gary Benson <gbenson@redhat.com>
4484
4485 * utils.h (fatal): Remove declaration.
4486 * utils.c (fatal): Remove function.
4487
14ce3192
GB
44882014-08-28 Gary Benson <gbenson@redhat.com>
4489
4490 * tracepoint.c (gdb_agent_init): Replace fatal with
4491 perror_with_name.
4492 (initialize_tracepoint): Likewise.
4493
50278d59
GB
44942014-08-28 Gary Benson <gbenson@redhat.com>
4495
4496 * remote-utils.c (remote_prepare): Replace fatal with error.
4497
aa96c426
GB
44982014-08-28 Gary Benson <gbenson@redhat.com>
4499
4500 * linux-low.c (linux_async): Replace fatal with warning.
4501 Tidy up and return.
4502 (linux_start_non_stop): Return -1 if linux_async failed.
4503
f7160e97
GB
45042014-08-28 Gary Benson <gbenson@redhat.com>
4505
4506 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4507 gdb_assert.
4508 (i386_dr_low_get_addr): Remove vague comment.
4509 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4510 gdb_assert.
4511
38e08fca
GB
45122014-08-28 Gary Benson <gbenson@redhat.com>
4513
4514 * inferiors.c (get_thread_process): Replace check with gdb_assert.
4515 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4516 internal_error.
4517 (linux_resume_one_lwp): Likewise.
4518 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4519 gdb_assert.
4520 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4521 with internal_error.
4522 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4523 (init_register_cache): Replace fatal with gdb_assert_not_reached.
4524 (find_register_by_name): Replace fatal with internal_error.
4525 (find_regno): Likewise.
4526 * tdesc.c (init_target_desc): Replace check with gdb_assert.
4527 * thread-db.c (thread_db_create_event): Likewise.
4528 (thread_db_load_search): Likewise.
4529 (try_thread_db_load_1): Likewise.
4530 * tracepoint.c (get_jump_space_head): Replace fatal with
4531 internal_error.
4532 (claim_trampoline_space): Likewise.
4533 (have_fast_tracepoint_trampoline_buffer): Likewise.
4534 (cmd_qtstart): Likewise.
4535 (stop_tracing): Likewise.
4536 (fast_tracepoint_collecting): Likewise.
4537 (target_malloc): Likewise.
4538 (download_tracepoint): Likewise.
4539 (download_trace_state_variables): Replace check with gdb_assert.
4540 (upload_fast_traceframes): Replace fatal with internal_error.
4541
34abf635
GB
45422014-08-19 Tom Tromey <tromey@redhat.com>
4543 Gary Benson <gbenson@redhat.com>
4544
4545 * Makefile.in (SFILES): Add common/common-debug.c.
4546 (OBS): Add common-debug.o.
4547 (common-debug.o): New rule.
4548 * debug.h (debug_printf): Don't declare.
4549 * debug.c (debug_printf): Renamed and rewritten as...
4550 (debug_vprintf): New function.
4551
f6e94d78
GB
45522014-08-19 Gary Benson <gbenson@redhat.com>
4553
4554 * utils.h: Do not include print-utils.h.
4555
9239eeab
GB
45562014-08-19 Tom Tromey <tromey@redhat.com>
4557 Gary Benson <gbenson@redhat.com>
4558
4559 * server.h: Add static assertion.
4560 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4561
ef87c8bb
GB
45622014-08-19 Tom Tromey <tromey@redhat.com>
4563 Gary Benson <gbenson@redhat.com>
4564
4565 * Makefile.in (SFILES): Add common/errors.c.
4566 (OBS): Add errors.o.
4567 (IPA_OBS): Add errors-ipa.o.
4568 (errors.o): New rule.
4569 (errors-ipa.o): Likewise.
4570 * utils.h (perror_with_name, error, warning): Don't declare.
4571 * utils.c (warning): Renamed and rewritten as...
4572 (vwarning): New function.
4573 (error): Renamed and rewritten as...
4574 (verror): New function.
4575 (internal_error): Renamed and rewritten as...
4576 (internal_verror): New function.
4577
bb974a24
GB
45782014-08-07 Gary Benson <gbenson@redhat.com>
4579
4580 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4581 * configure: Regenerate.
4582 * config.in: Likewise.
4583 * server.h: Do not include errno.h.
4584 * event-loop.c: Likewise.
4585 * hostio-errno.c: Likewise.
4586 * linux-low.c: Likewise.
4587 * remote-utils.c: Likewise.
4588 * spu-low.c: Likewise.
4589 * utils.c: Likewise.
4590 * gdbreplay.c: Unconditionally include errno.h.
4591
6d3d12eb
GB
45922014-08-07 Gary Benson <gbenson@redhat.com>
4593
4594 * server.h: Do not include string.h.
4595 * event-loop.c: Likewise.
4596 * linux-low.c: Likewise.
4597 * regcache.c: Likewise.
4598 * remote-utils.c: Likewise.
4599 * spu-low.c: Likewise.
4600 * utils.c: Likewise.
4601
dccbb609
GB
46022014-08-07 Gary Benson <gbenson@redhat.com>
4603
4604 * server.h: Do not include gdb_assert.h.
4605
e76df0d0
GB
46062014-08-07 Gary Benson <gbenson@redhat.com>
4607
4608 * server.h: Do not include common-utils.h.
4609
4cb9c816
GB
46102014-08-07 Gary Benson <gbenson@redhat.com>
4611
4612 * server.h: Do not include ptid.h.
4613 * notif.h: Likewise.
4614
3995eeee
GB
46152014-08-07 Gary Benson <gbenson@redhat.com>
4616
4617 * server.h: Do not include gdb_locale.h.
4618
cb9f1a9b
GB
46192014-08-07 Gary Benson <gbenson@redhat.com>
4620
4621 * server.h: Do not include gdb/signals.h.
4622 * win32-low.c: Likewise.
4623
a5fceff8
GB
46242014-08-07 Gary Benson <gbenson@redhat.com>
4625
4626 * server.h: Do not include pathmax.h.
4627
b9391142
GB
46282014-08-07 Gary Benson <gbenson@redhat.com>
4629
4630 * server.h: Do not include libiberty.h.
4631 * linux-bfin-low.c: Likewise.
4632
0e443c87
GB
46332014-08-07 Gary Benson <gbenson@redhat.com>
4634
4635 * server.h: Do not include ansidecl.h.
4636
8ebb3f56
GB
46372014-08-07 Gary Benson <gbenson@redhat.com>
4638
4639 * linux-x86-low.c: Do not include stddef.h.
4640 * lynx-ppc-low.c: Likewise.
4641 * tracepoint.c: Likewise.
4642
8980bdf6
GB
46432014-08-07 Gary Benson <gbenson@redhat.com>
4644
4645 * server.h: Do not include stdarg.h.
4646 * nto-low.c: Likewise.
4647
d7096f71
GB
46482014-08-07 Gary Benson <gbenson@redhat.com>
4649
4650 * server.h: Do not include stdlib.h.
4651 * inferiors.c: Likewise.
4652 * linux-low.c: Likewise.
4653 * regcache.c: Likewise.
4654 * spu-low.c: Likewise.
4655 * tracepoint.c: Likewise.
4656 * utils.c: Likewise.
4657
d02f550d
GB
46582014-08-07 Gary Benson <gbenson@redhat.com>
4659
4660 * server.h: Do not include stdio.h.
4661 * linux-low.c: Likewise.
4662 * remote-utils.c: Likewise.
4663 * spu-low.c: Likewise.
4664 * utils.c: Likewise.
4665 * wincecompat.c: Likewise.
4666
87f6c4e3
GB
46672014-08-06 Gary Benson <gbenson@redhat.com>
4668
4669 * regcache.c (init_register_cache): Move conditionals inside if.
4670
7089dca4
GB
46712014-08-06 Gary Benson <gbenson@redhat.com>
4672
4673 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4674
462f517e
GB
46752014-07-31 Gary Benson <gbenson@redhat.com>
4676
4677 * ax.h: Do not include server.h.
4678 * gdbthread.h: Likewise.
4679 * lynx-low.h: Likewise.
4680 * notif.h: Likewise.
4681
976411d6
GB
46822014-07-30 Gary Benson <gbenson@redhat.com>
4683
4684 * server.h: Include common-defs.h.
4685 Do not include config.h or build-gnulib-gdbserver/config.h.
4686
d41f6d8e
GB
46872014-07-30 Gary Benson <gbenson@redhat.com>
4688
4689 * hostio-errno.c: Move server.h to top of includes list.
4690 * inferiors.c: Likewise.
4691 * linux-x86-low.c: Likewise.
4692 * notif.c: Include server.h.
4693
314c6a35
TT
46942014-07-24 Tom Tromey <tromey@redhat.com>
4695 Gary Benson <gbenson@redhat.com>
4696
4697 * server.h (CORE_ADDR): Now unsigned.
4698
69ff6be5
PA
46992014-07-16 Pedro Alves <palves@redhat.com>
4700
4701 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4702
ce9e3fe7
PA
47032014-07-15 Pedro Alves <palves@redhat.com>
4704
4705 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4706 copy.
4707
e76126e8
PA
47082014-07-11 Pedro Alves <palves@redhat.com>
4709
4710 * linux-low.c (kill_wait_lwp): New function, based on
4711 kill_one_lwp_callback, but use my_waitpid directly.
4712 (kill_one_lwp_callback, linux_kill): Use it.
4713
8e9db26e
PA
47142014-06-23 Pedro Alves <palves@redhat.com>
4715
4716 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4717 before setting DR0..DR3.
4718
698b3e08
GB
47192014-06-20 Gary Benson <gbenson@redhat.com>
4720
4721 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4722 * configure: Regenerated.
4723 * config.in: Likewise.
4724
125f8a3d
GB
47252014-06-20 Gary Benson <gbenson@redhat.com>
4726
4727 * Makefile.in (SFILES): Update locations for files moved
4728 from common to nat.
4729 (object file files): Reordered.
4730
42995dbd
GB
47312014-06-20 Gary Benson <gbenson@redhat.com>
4732
4733 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4734 (i386_dr_low_set_addr): Likewise.
4735 (i386_dr_low_get_addr): Likewise.
4736 (i386_dr_low_can_set_control): Likewise.
4737 (i386_dr_low_set_control): Likewise.
4738 (i386_dr_low_get_control): Likewise.
4739 (i386_dr_low_get_status): Likewise.
4740 (i386_get_debug_register_length): Likewise.
4741 * linux-x86-low.c (i386_dr_low_set_addr):
4742 Changed signature. Made static.
4743 (i386_dr_low_get_addr): Likewise.
4744 (i386_dr_low_set_control): Likewise.
4745 (i386_dr_low_get_control): Likewise.
4746 (i386_dr_low_get_status): Likewise.
4747 (i386_dr_low): New global variable.
4748 * win32-i386-low.c (i386_dr_low_set_addr):
4749 Changed signature. Made static.
4750 (i386_dr_low_get_addr): Likewise.
4751 (i386_dr_low_set_control): Likewise.
4752 (i386_dr_low_get_control): Likewise.
4753 (i386_dr_low_get_status): Likewise.
4754 (i386_dr_low): New global variable.
4755
e1d2394b
MS
47562014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4757
4758 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4759 * Makefile.in (AR, AR_FLAGS): Define.
4760 * configure: Regenerate.
4761
3a8ee006
GB
47622014-06-19 Gary Benson <gbenson@redhat.com>
4763
4764 * Makefile.in (i386-dregs.o): New rule.
4765 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4766 * i386-low.c (target.h): Remove include.
4767 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4768 (DR_CONTROL_SHIFT): Likewise.
4769 (DR_CONTROL_SIZE): Likewise.
4770 (DR_RW_EXECUTE): Likewise.
4771 (DR_RW_WRITE): Likewise.
4772 (DR_RW_READ): Likewise.
4773 (DR_RW_IORW): Likewise.
4774 (DR_LEN_1): Likewise.
4775 (DR_LEN_2): Likewise.
4776 (DR_LEN_4): Likewise.
4777 (DR_LEN_8): Likewise.
4778 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4779 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4780 (DR_ENABLE_SIZE): Likewise.
4781 (DR_LOCAL_SLOWDOWN): Likewise.
4782 (DR_GLOBAL_SLOWDOWN): Likewise.
4783 (DR_CONTROL_RESERVED): Likewise.
4784 (I386_DR_CONTROL_MASK): Likewise.
4785 (I386_DR_VACANT): Likewise.
4786 (I386_DR_LOCAL_ENABLE): Likewise.
4787 (I386_DR_GLOBAL_ENABLE): Likewise.
4788 (I386_DR_DISABLE): Likewise.
4789 (I386_DR_SET_RW_LEN): Likewise.
4790 (I386_DR_GET_RW_LEN): Likewise.
4791 (I386_DR_WATCH_HIT): Likewise.
4792 (i386_wp_op_t): Likewise.
4793 (i386_show_dr): Likewise.
4794 (i386_length_and_rw_bits): Likewise.
4795 (i386_insert_aligned_watchpoint): Likewise.
4796 (i386_remove_aligned_watchpoint): Likewise.
4797 (i386_handle_nonaligned_watchpoint): Likewise.
4798 i386_update_inferior_debug_regs(): Likewise.
4799 (i386_dr_insert_watchpoint): Likewise.
4800 (i386_dr_remove_watchpoint): Likewise.
4801 (i386_dr_region_ok_for_watchpoint): Likewise.
4802 (i386_dr_stopped_data_address): Likewise.
4803 (i386_dr_stopped_by_watchpoint): Likewise.
4804
8f26655c
GB
48052014-06-19 Gary Benson <gbenson@redhat.com>
4806
4807 * i386-low.c (i386_dr_show): Renamed to
4808 i386_show_dr and made static. All uses updated.
4809 (i386_dr_length_and_rw_bits): Renamed to
4810 i386_length_and_rw_bits and made static.
4811 All uses updated.
4812 (i386_dr_insert_aligned_watchpoint): Renamed to
4813 i386_insert_aligned_watchpoint and made static.
4814 All uses updated.
4815 (i386_dr_remove_aligned_watchpoint): Renamed to
4816 i386_remove_aligned_watchpoint and made static.
4817 All uses updated.
4818 (i386_dr_update_inferior_debug_regs): Renamed to
4819 i386_update_inferior_debug_regs and made static.
4820 All uses updated.
4821
b9228891
GB
48222014-06-18 Gary Benson <gbenson@redhat.com>
4823
5171def3
GB
4824 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4825 (i386_dr_low_can_set_control): Likewise.
4826 (i386_get_debug_register_length): Likewise.
4827 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4828 (i386_dr_low_can_set_control): Likewise.
4829 (i386_get_debug_register_length): Likewise.
4830
48312014-06-17 Gary Benson <gbenson@redhat.com>
4832
b9228891
GB
4833 * i386-low.h (i386-dregs.h): New include.
4834 (DR_FIRSTADDR): Now in i386-dregs.h.
4835 (DR_LASTADDR): Likewise.
4836 (DR_NADDR): Likewise.
4837 (DR_STATUS): Likewise.
4838 (DR_CONTROL): Likewise.
4839 (i386_debug_reg_state): Likewise.
4840 (i386_dr_insert_watchpoint): Likewise.
4841 (i386_dr_remove_watchpoint): Likewise.
4842 (i386_dr_region_ok_for_watchpoint): Likewise.
4843 (i386_dr_stopped_data_address): Likewise.
4844 (i386_dr_stopped_by_watchpoint): Likewise.
4845 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4846
4be83cc2
GB
48472014-06-18 Gary Benson <gbenson@redhat.com>
4848
4849 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4850 i386_dr_insert_watchpoint.
4851 (i386_low_remove_watchpoint): Renamed to
4852 i386_dr_remove_watchpoint.
4853 (i386_low_region_ok_for_watchpoint): Renamed to
4854 i386_dr_region_ok_for_watchpoint.
4855 (i386_low_stopped_data_address): Renamed to
4856 i386_dr_stopped_data_address.
4857 (i386_low_stopped_by_watchpoint): Renamed to
4858 i386_dr_stopped_by_watchpoint.
4859 * i386-low.c (i386_show_dr): Renamed to
4860 i386_dr_show and made nonstatic. All uses updated.
4861 (i386_length_and_rw_bits): Renamed to
4862 i386_dr_length_and_rw_bits and made nonstatic.
4863 All uses updated.
4864 (i386_insert_aligned_watchpoint): Renamed to
4865 i386_dr_insert_aligned_watchpoint and made nonstatic.
4866 All uses updated.
4867 (i386_remove_aligned_watchpoint): Renamed to
4868 i386_dr_remove_aligned_watchpoint and made nonstatic.
4869 All uses updated.
4870 (i386_update_inferior_debug_regs): Renamed to
4871 i386_dr_update_inferior_debug_regs and made nonstatic.
4872 All uses updated.
4873 (i386_low_insert_watchpoint): Renamed to
4874 i386_dr_insert_watchpoint. All uses updated.
4875 (i386_low_remove_watchpoint): Renamed to
4876 i386_dr_remove_watchpoint. All uses updated.
4877 (i386_low_region_ok_for_watchpoint): Renamed to
4878 i386_dr_region_ok_for_watchpoint. All uses updated.
4879 (i386_low_stopped_data_address): Renamed to
4880 i386_dr_stopped_data_address. All uses updated.
4881 (i386_low_stopped_by_watchpoint): Renamed to
4882 i386_dr_stopped_by_watchpoint. All uses updated.
4883
131aa0d4
GB
48842014-06-18 Gary Benson <gbenson@redhat.com>
4885
4886 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4887 (i386_dr_low_can_set_control): Likewise.
4888 (i386_insert_aligned_watchpoint): New check.
4889
d9305f7f
GB
48902014-06-18 Gary Benson <gbenson@redhat.com>
4891
4892 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4893 Renamed to state.
4894
e927c9fc
GB
48952014-06-18 Gary Benson <gbenson@redhat.com>
4896
4897 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4898 instead of fatal and error.
4899 (i386_handle_nonaligned_watchpoint): Likewise.
4900
1b6d4134
GB
49012014-06-18 Gary Benson <gbenson@redhat.com>
4902
4903 * i386-low.c (i386_get_debug_register_length): New macro.
4904 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4905 (i386_show_dr): Use debug_printf instead of fprintf. Use
4906 phex to format values.
4907
6e62758f
GB
49082014-06-18 Gary Benson <gbenson@redhat.com>
4909
4910 * i386-low.h: Comment changes.
4911 * i386-low.c: Likewise.
4912
fc6e2f03
GB
49132014-06-18 Gary Benson <gbenson@redhat.com>
4914
4915 * i386-low.c: Whitespace changes.
4916
f9d1eeed
TT
49172014-06-12 Tom Tromey <tromey@redhat.com>
4918
4919 * utils.c (freeargv): Remove.
4920
0b04e523
TT
49212014-06-12 Tom Tromey <tromey@redhat.com>
4922
4923 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4924 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4925 (parse_debug_format_options): Likewise.
4926 (gdbserver_usage): Likewise.
4927 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4928 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4929 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4930 against libiberty.
4931 ($(LIBGNU)): Depend on libiberty.
4932 (all-lib): Recurse into all subdirs.
4933 (install-only): Invoke "install" target in subdirs.
4934 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4935 targets.
4936 * configure: Rebuild.
4937 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4938 for vasprintf, vsnprintf, or gettimeofday.
4939 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4940 srv_tgtobj.
4941
270c9937
JB
49422014-06-05 Joel Brobecker <brobecker@adacore.com>
4943
4944 * development.sh: Delete.
4945 * Makefile.in (config.status): Adjust dependency on development.sh.
4946 * configure.ac: Adjust development.sh source call.
4947 * configure: Regenerate.
4948
0a261ed8
PA
49492014-06-02 Pedro Alves <palves@redhat.com>
4950
4951 * ax.c (gdb_free_agent_expr): New function.
4952 * ax.h (gdb_free_agent_expr): New declaration.
4953 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4954 list.
4955 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4956 static.
4957 (clear_breakpoint_conditions_and_commands): New function.
4958 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4959 (clear_breakpoint_conditions_and_commands): New declaration.
4960
e9dae05e
RR
49612014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4962
4963 * linux-aarch64-low.c (asm/ptrace.h): Include.
4964
5876f503
JK
49652014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4966
4967 Fix TLS access for -static -pthread.
4968 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4969 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4970 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4971
802e8e6d
PA
49722014-05-20 Pedro Alves <palves@redhat.com>
4973
4974 * linux-aarch64-low.c (aarch64_insert_point)
4975 (aarch64_remove_point): No longer check whether the type is
4976 supported here. Adjust to new interface.
4977 (the_low_target): Install aarch64_supports_z_point_type as
4978 supports_z_point_type method.
4979 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4980 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4981 instead of a Z packet char. Adjust.
4982 (arm_supports_z_point_type): New function.
4983 (arm_insert_point, arm_remove_point): Adjust to new interface.
4984 (the_low_target): Install arm_supports_z_point_type.
4985 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4986 (cris_insert_point, cris_remove_point): Adjust to new interface.
4987 Don't check whether the type is supported here.
4988 (the_low_target): Install cris_supports_z_point_type.
4989 * linux-low.c (linux_supports_z_point_type): New function.
4990 (linux_insert_point, linux_remove_point): Adjust to new interface.
4991 * linux-low.h (struct linux_target_ops) <insert_point,
4992 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4993 raw_breakpoint pointer parameter.
4994 <supports_z_point_type>: New method.
4995 * linux-mips-low.c (mips_supports_z_point_type): New function.
4996 (mips_insert_point, mips_remove_point): Adjust to new interface.
4997 Use mips_supports_z_point_type.
4998 (the_low_target): Install mips_supports_z_point_type.
4999 * linux-ppc-low.c (the_low_target): Install NULL as
5000 supports_z_point_type method.
5001 * linux-s390-low.c (the_low_target): Install NULL as
5002 supports_z_point_type method.
5003 * linux-sparc-low.c (the_low_target): Install NULL as
5004 supports_z_point_type method.
5005 * linux-x86-low.c (x86_supports_z_point_type): New function.
5006 (x86_insert_point): Adjust to new insert_point interface. Use
5007 insert_memory_breakpoint. Adjust to new
5008 i386_low_insert_watchpoint interface.
5009 (x86_remove_point): Adjust to remove_point interface. Use
5010 remove_memory_breakpoint. Adjust to new
5011 i386_low_remove_watchpoint interface.
5012 (the_low_target): Install x86_supports_z_point_type.
5013 * lynx-low.c (lynx_target_ops): Install NULL as
5014 supports_z_point_type callback.
5015 * nto-low.c (nto_supports_z_point_type): New.
5016 (nto_insert_point, nto_remove_point): Adjust to new interface.
5017 (nto_target_ops): Install nto_supports_z_point_type.
5018 * mem-break.c: Adjust intro comment.
5019 (struct raw_breakpoint) <raw_type, size>: New fields.
5020 <inserted>: Update comment.
5021 <shlib_disabled>: Delete field.
5022 (enum bkpt_type) <gdb_breakpoint>: Delete value.
5023 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5024 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5025 (raw_bkpt_type_to_target_hw_bp_type): New function.
5026 (find_enabled_raw_code_breakpoint_at): New function.
5027 (find_raw_breakpoint_at): New type and size parameters. Use them.
5028 (insert_memory_breakpoint): New function, based off
5029 set_raw_breakpoint_at.
5030 (remove_memory_breakpoint): New function.
5031 (set_raw_breakpoint_at): Reimplement.
5032 (set_breakpoint): New, based on set_breakpoint_at.
5033 (set_breakpoint_at): Reimplement.
5034 (delete_raw_breakpoint): Go through the_target->remove_point
5035 instead of assuming memory breakpoints.
5036 (find_gdb_breakpoint_at): Delete.
5037 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5038 (find_gdb_breakpoint): New function.
5039 (set_gdb_breakpoint_at): Delete.
5040 (z_type_supported): New function.
5041 (set_gdb_breakpoint_1): New function, loosely based off
5042 set_gdb_breakpoint_at.
5043 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5044 (delete_gdb_breakpoint_at): Delete.
5045 (delete_gdb_breakpoint_1): New function, loosely based off
5046 delete_gdb_breakpoint_at.
5047 (delete_gdb_breakpoint): New function.
5048 (clear_gdb_breakpoint_conditions): Rename to ...
5049 (clear_breakpoint_conditions): ... this. Don't handle a NULL
5050 breakpoint.
5051 (add_condition_to_breakpoint): Make static.
5052 (add_breakpoint_condition): Take a struct breakpoint pointer
5053 instead of an address. Adjust.
5054 (gdb_condition_true_at_breakpoint): Rename to ...
5055 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5056 z_type parameter.
5057 (gdb_condition_true_at_breakpoint): Reimplement.
5058 (add_breakpoint_commands): Take a struct breakpoint pointer
5059 instead of an address. Adjust.
5060 (gdb_no_commands_at_breakpoint): Rename to ...
5061 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
5062 parameter. Return true if no breakpoint was found. Change debug
5063 output.
5064 (gdb_no_commands_at_breakpoint): Reimplement.
5065 (run_breakpoint_commands): Rename to ...
5066 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
5067 and change return type to boolean.
5068 (run_breakpoint_commands): New function.
5069 (gdb_breakpoint_here): Also check for Z1 breakpoints.
5070 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5071 breakpoint. Go through the_target->remove_point instead of
5072 assuming memory breakpoint.
5073 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5074 software and hardware breakpoints.
5075 (reinsert_raw_breakpoint): Go through the_target->insert_point
5076 instead of assuming memory breakpoint.
5077 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5078 software and hardware breakpoints.
5079 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5080 Check both software and hardware breakpoints.
5081 (validate_inserted_breakpoint): Assert the breakpoint is a
5082 software breakpoint. Set the inserted flag to -1 instead of
5083 setting shlib_disabled.
5084 (delete_disabled_breakpoints): Adjust.
5085 (validate_breakpoints): Only validate software breakpoints.
5086 Adjust to inserted flag change.
5087 (check_mem_read, check_mem_write): Skip breakpoint types other
5088 than software breakpoints. Adjust to inserted flag change.
5089 * mem-break.h (enum raw_bkpt_type): New enum.
5090 (raw_breakpoint, struct process_info): Forward declare.
5091 (Z_packet_to_target_hw_bp_type): Delete declaration.
5092 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5093 (set_gdb_breakpoint, delete_gdb_breakpoint)
5094 (clear_breakpoint_conditions): New declarations.
5095 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5096 (breakpoint_inserted_here): Update comment.
5097 (add_breakpoint_condition, add_breakpoint_commands): Replace
5098 address parameter with a breakpoint pointer parameter.
5099 (gdb_breakpoint_here): Update comment.
5100 (delete_gdb_breakpoint_at): Delete.
5101 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5102 * server.c (process_point_options): Take a struct breakpoint
5103 pointer instead of an address. Adjust.
5104 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5105 delete_gdb_breakpoint.
5106 * spu-low.c (spu_target_ops): Install NULL as
5107 supports_z_point_type method.
5108 * target.h: Include mem-break.h.
5109 (struct target_ops) <prepare_to_access_memory>: Update comment.
5110 <supports_z_point_type>: New field.
5111 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5112 instead of a char. Also take a raw breakpoint pointer.
5113 * win32-arm-low.c (the_low_target): Install NULL as
5114 supports_z_point_type.
5115 * win32-i386-low.c (i386_supports_z_point_type): New function.
5116 (i386_insert_point, i386_remove_point): Adjust to new interface.
5117 (the_low_target): Install i386_supports_z_point_type.
5118 * win32-low.c (win32_supports_z_point_type): New function.
5119 (win32_insert_point, win32_remove_point): Adjust to new interface.
5120 (win32_target_ops): Install win32_supports_z_point_type.
5121 * win32-low.h (struct win32_target_ops):
5122 <supports_z_point_type>: New method.
5123 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5124 instead of a char. Also take a raw breakpoint pointer.
5125
932539e3
PA
51262014-05-20 Pedro Alves <palves@redhat.com>
5127
5128 * mem-break.h: Include break-common.h.
5129 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5130 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5131 (Z_packet_to_target_hw_bp_type): New declaration.
5132 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5133 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5134 (Z_PACKET_ACCESS_WP): Delete macros.
5135 (Z_packet_to_hw_type): Delete function.
5136 * i386-low.h: Don't include break-common.h here.
5137 (Z_packet_to_hw_type): Delete declaration.
5138 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5139 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5140 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5141 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5142 * linux-aarch64-low.c: Don't include break-common.h here.
5143 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5144 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5145 (Z_packet_to_target_hw_bp_type): Delete function.
5146 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5147 function.
5148 (mips_insert_point, mips_remove_point): Use
5149 Z_packet_to_target_hw_bp_type.
5150
4ff0d3d8
PA
51512014-05-20 Pedro Alves <palves@redhat.com>
5152
5153 * linux-aarch64-low.c: Include break-common.h.
5154 (enum target_point_type): Delete.
5155 (Z_packet_to_point_type): Rename to ...
5156 (Z_packet_to_target_hw_bp_type): ... this, and return a
5157 target_hw_bp_type instead.
5158 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5159 instead of an enum target_point_type.
5160 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
5161 breakpoint type.
5162 (aarch64_dr_state_insert_one_point)
5163 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5164 (aarch64_handle_aligned_watchpoint)
5165 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5166 Take an enum target_hw_bp_type instead of an enum
5167 target_point_type.
5168 (aarch64_supports_z_point_type): New function.
5169 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
5170 use Z_packet_to_target_hw_bp_type.
5171
786dc519
JB
51722014-05-20 Joel Brobecker <brobecker@adacore.com>
5173
5174 * configure.ac: Only use -Werror by default when DEVELOPMENT
5175 is true.
5176 * configure: Regenerate.
5177
9e0aa64f
JK
51782014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
5179
5180 Fix gdbserver qGetTLSAddr for x86_64 -m32.
5181 * linux-x86-low.c (X86_64_USER_REGS): New.
5182 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5183
2b577b92
YQ
51842014-04-28 Yao Qi <yao@codesourcery.com>
5185
5186 * Makefile.in (i386-avx512.c): Fix the typo of generated file
5187 name.
5188
94611da2
PA
51892014-04-25 Pedro Alves <palves@redhat.com>
5190
5191 PR server/16255
5192 * linux-low.c (linux_attach_fail_reason_string): New function.
5193 (linux_attach_lwp): Delete.
5194 (linux_attach_lwp_1): Rename to ...
5195 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
5196 argument. Remove "initial" parameter. Return int instead of
5197 void. Don't error or warn here.
5198 (linux_attach): Adjust to call linux_attach_lwp. Call error on
5199 failure to attach to the tgid. Call warning when failing to
5200 attach to an lwp.
5201 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5202 argument. Remove "initial" parameter. Return int instead of
5203 void. Don't error or warn here.
5204 (linux_attach_fail_reason_string): New declaration.
5205 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5206 interface change. Use linux_attach_fail_reason_string.
5207
01f9f808
MS
52082014-04-24 Michael Sturm <michael.sturm@mintel.com>
5209 Walfred Tedeschi <walfred.tedeschi@intel.com>
5210
5211 * Makefile.in: Added rules to handle new files
5212 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5213 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5214 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5215 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5216 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5217 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5218 x32-avx512-linux.o.
5219 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5220 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5221 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5222 i386/x32-avx512.xml.
5223 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5224 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5225 i386/x32-avx512-linux.xml.
5226 * i387-fp.c (num_avx512_k_registers): New constant for number
5227 of K registers.
5228 (num_avx512_zmmh_low_registers): New constant for number of
5229 lower ZMM registers (0-15).
5230 (num_avx512_zmmh_high_registers): New constant for number of
5231 higher ZMM registers (16-31).
5232 (num_avx512_ymmh_registers): New contant for number of higher
5233 YMM registers (ymm16-31 added by avx521 on x86_64).
5234 (num_avx512_xmm_registers): New constant for number of higher
5235 XMM registers (xmm16-31 added by AVX512 on x86_64).
5236 (struct i387_xsave): Add space for AVX512 registers.
5237 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5238 Add code to handle AVX512 registers.
5239 (i387_xsave_to_cache): Add code to handle AVX512 registers.
5240 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5241 prototypei from generated file.
5242 (tdesc_amd64_avx512_linux): Likewise.
5243 (init_registers_x32_avx512_linux): Likewise.
5244 (tdesc_x32_avx512_linux): Likewise.
5245 (init_registers_i386_avx512_linux): Likewise.
5246 (tdesc_i386_avx512_linux): Likewise.
5247 (x86_64_regmap): Add AVX512 registers.
5248 (x86_linux_read_description): Add code to handle AVX512 XSTATE
5249 mask.
5250 (initialize_low_arch): Add code to initialize AVX512 registers.
5251
51aa91f9
PA
52522014-04-23 Pedro Alves <palves@redhat.com>
5253
5254 * mem-break.c (find_gdb_breakpoint_at): Make static.
5255 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5256
a4165e94
PA
52572014-04-23 Pedro Alves <palves@redhat.com>
5258
5259 * i386-low.c: Don't include break-common.h here.
5260 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5261 prototype to take target_hw_bp_type as argument instead of a Z
5262 packet char.
5263 * i386-low.h: Include break-common.h here.
5264 (Z_packet_to_hw_type): Declare.
5265 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5266 prototypes.
5267 * linux-x86-low.c (x86_insert_point): Convert the packet number to
5268 a target_hw_bp_type before calling i386_low_insert_watchpoint.
5269 (x86_remove_point): Convert the packet number to a
5270 target_hw_bp_type before calling i386_low_remove_watchpoint.
5271 * win32-i386-low.c (i386_insert_point): Convert the packet number
5272 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5273 (i386_remove_point): Convert the packet number to a
5274 target_hw_bp_type before calling i386_low_remove_watchpoint.
5275
b8acf843
PA
52762014-04-23 Pedro Alves <palves@redhat.com>
5277
5278 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5279
d708bcd1
PA
52802014-04-10 Pedro Alves <palves@redhat.com>
5281
5282 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5283 Check if the condition or command is NULL before checking if the
5284 breakpoint is known. On success, return true.
5285 * mem-break.h (add_breakpoint_condition): Document return.
5286 (add_breakpoint_commands): Add describing comment.
5287 * server.c (skip_to_semicolon): New function.
5288 (process_point_options): Use it.
5289
2eec7d5b
PA
52902014-04-09 Pedro Alves <palves@redhat.com>
5291
5292 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5293 to lwpid_of.
5294
fa96cb38
PA
52952014-02-27 Pedro Alves <palves@redhat.com>
5296
5297 PR 12702
5298 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5299 macros.
5300 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5301 output.
5302 (last_thread_of_process_p): Take a PID argument instead of a
5303 thread pointer.
5304 (linux_wait_for_lwp): Delete.
5305 (num_lwps, check_zombie_leaders, not_stopped_callback): New
5306 functions.
5307 (linux_low_filter_event): New function, party factored out from
5308 linux_wait_for_event.
5309 (linux_wait_for_event): Rename to ...
5310 (linux_wait_for_event_filtered): ... this. Add new filter ptid
5311 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
5312 sigsuspend. Check for zombie leaders.
5313 (linux_wait_for_event): Reimplement as wrapper around
5314 linux_wait_for_event_filtered.
5315 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
5316 a normal or signal exit is seen, it's the whole process exiting.
5317 (wait_for_sigstop): No longer a for_each_inferior callback.
5318 Rewrite on top of linux_wait_for_event_filtered.
5319 (stop_all_lwps): Call wait_for_sigstop directly.
5320 * server.c (resume, handle_target_event): Handle
5321 TARGET_WAITKIND_NO_RESUMED.
5322
d763de10
JB
53232014-02-26 Joel Brobecker <brobecker@adacore.com>
5324
5325 * win32-low.c (psapi_get_dll_name,
5326 * win32_CreateToolhelp32Snapshot): Delete.
5327 (win32_CreateToolhelp32Snapshot, win32_Module32First)
5328 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5329 Delete.
5330 (handle_load_dll): Add function description.
5331 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5332
850a0f76
JB
53332014-02-26 Joel Brobecker <brobecker@adacore.com>
5334
5335 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5336 Add comment.
5337 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5338 base address when calling win32_add_one_solib.
5339 (handle_load_dll): Delete local variable load_addr.
5340 Remove 0x1000 offset applied to DLL base address when calling
5341 win32_add_one_solib.
5342 (handle_unload_dll): Add comment.
5343
f25b3fc3
JB
53442014-02-26 Joel Brobecker <brobecker@adacore.com>
5345
5346 * win32-low.c (win32_add_all_dlls): Renames
5347 win32_ensure_ntdll_loaded. Rewrite function documentation.
5348 Adjust implementation to always load all DLLs.
5349 Add 0x1000 offset to DLL base address when calling
5350 win32_add_one_solib.
5351 (child_initialization_done): New static global.
5352 (do_initial_child_stuff): Set child_initialization_done to
5353 zero during child initialization, and 1 after. Replace call
5354 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5355 Add comment.
5356 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5357 (handle_unload_dll): Add function documentation.
5358 (get_child_debug_event): Ignore load and unload DLL events
5359 during child initialization.
5360
d86d4aaf
DE
53612014-02-20 Doug Evans <dje@google.com>
5362
3bc32da3 5363 Remove global all_lwps.
d86d4aaf
DE
5364 * inferiors.h (ptid_of): Move here from linux-low.h.
5365 (pid_of, lwpid_of): Ditto.
5366 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5367 parameter is a struct thread_info * now.
5368 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5369 directly. Pass &all_threads to find_inferior instead of &all_lwps.
5370 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5371 directly.
5372 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5373 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5374 * linux-arm-low.c (update_registers_callback): Update, "entry"
5375 parameter is a struct thread_info * now.
5376 Fetch lwpid from current_inferior directly.
5377 (arm_insert_point): Pass &all_threads to find_inferior instead of
5378 &all_lwps.
5379 (arm_remove_point): Ditto.
5380 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5381 (arm_prepare_to_resume): Fetch pid from thread.
5382 (arm_read_description): Fetch lwpid from current_inferior directly.
5383 * linux-low.c (all_lwps): Delete.
5384 (delete_lwp): Delete call to remove_inferior.
5385 (handle_extended_wait): Fetch lwpid from thread.
5386 (add_lwp): Don't set lwp->entry.id. Remove call to
5387 add_inferior_to_list.
5388 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5389 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5390 (kill_one_lwp_callback): Ditto.
5391 (linux_kill): Don't dereference NULL pointer.
5392 Fetch ptid,lwpid from thread.
5393 (get_detach_signal): Fetch ptid from thread.
5394 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5395 Simplify call to regcache_invalidate_thread.
5396 (delete_lwp_callback): Update, "entry" parameter is a
5397 struct thread_info * now. Fetch pid from thread.
5398 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5399 (status_pending_p_callback): Update, "entry" parameter is a
5400 struct thread_info * now. Fetch ptid from thread.
5401 (find_lwp_pid): Update, "entry" parameter is a
5402 struct thread_info * now.
5403 (linux_wait_for_lwp): Fetch pid from thread.
5404 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5405 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5406 (enqueue_one_deferred_signal): Fetch lwpid from thread.
5407 (dequeue_one_deferred_signal): Ditto.
5408 (cancel_breakpoint): Fetch ptid from current_inferior.
5409 (linux_wait_for_event): Pass &all_threads to find_inferior,
5410 not &all_lwps. Fetch ptid, lwpid from thread.
5411 (count_events_callback): Update, "entry" parameter is a
5412 struct thread_info * now.
5413 (select_singlestep_lwp_callback): Ditto.
5414 (select_event_lwp_callback): Ditto.
5415 (cancel_breakpoints_callback): Ditto.
5416 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5417 not &all_lwps.
5418 (select_event_lwp): Ditto. Fetch ptid from event_thread.
5419 (unsuspend_one_lwp): Update, "entry" parameter is a
5420 struct thread_info * now.
5421 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5422 not &all_lwps.
5423 (linux_stabilize_threads): Ditto. And for for_each_inferior.
5424 Fetch lwpid from thread, not lwp.
5425 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5426 Pass &all_threads to find_inferior, not &all_lwps.
5427 (send_sigstop): Fetch lwpid from thread, not lwp.
5428 (send_sigstop_callback): Update, "entry" parameter is a
5429 struct thread_info * now.
5430 (suspend_and_send_sigstop_callback): Ditto.
5431 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
5432 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5433 struct thread_info * now.
5434 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
5435 from thread, lwp.
5436 (lwp_running): Update, "entry" parameter is a
5437 struct thread_info * now.
5438 (stop_all_lwps): Fetch ptid from thread.
5439 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5440 (linux_resume_one_lwp): Fetch lwpid from thread.
5441 (linux_set_resume_request): Update, "entry" parameter is a
5442 struct thread_info * now. Fetch pid, lwpid from thread.
5443 (resume_status_pending_p): Update, "entry" parameter is a
5444 struct thread_info * now.
5445 (need_step_over_p): Ditto. Fetch lwpid from thread.
5446 (start_step_over): Fetch lwpid from thread.
5447 (linux_resume_one_thread): Update, "entry" parameter is a
5448 struct thread_info * now. Fetch lwpid from thread.
5449 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5450 (proceed_one_lwp): Update, "entry" parameter is a
5451 struct thread_info * now. Fetch lwpid from thread.
5452 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5453 struct thread_info * now.
5454 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5455 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
5456 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5457 directly.
5458 (regsets_store_inferior_registers): Ditto.
5459 (fetch_register, store_register): Ditto.
5460 (linux_read_memory, linux_write_memory): Ditto.
5461 (linux_request_interrupt): Ditto.
5462 (linux_read_auxv): Ditto.
5463 (linux_xfer_siginfo): Ditto.
5464 (linux_qxfer_spu): Ditto.
5465 (linux_qxfer_libraries_svr4): Ditto.
5466 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5467 moved to inferiors.h.
5468 (get_lwp): Delete.
5469 (get_thread_lwp): Update.
5470 (struct lwp_info): Delete member "entry". Simplify comment for
5471 member "thread".
5472 (all_lwps): Delete.
5473 * linux-mips-low.c (mips_read_description): Fetch lwpid from
5474 current_inferior directly.
5475 (update_watch_registers_callback): Update, "entry" parameter is a
5476 struct thread_info * now. Fetch pid from thread.
5477 (mips_linux_prepare_to_resume): Fetch ptid from thread.
5478 (mips_insert_point): Fetch lwpid from current_inferior.
5479 Pass &all_threads to find_inferior, not &all_lwps.
5480 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5481 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5482 directly.
5483 (mips_stopped_data_address): Ditto.
5484 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5485 directly.
5486 * linux-tile-low.c (tile_arch_setup): Ditto.
5487 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5488 (update_debug_registers_callback): Update, "entry" parameter is a
5489 struct thread_info * now. Fetch pid from thread.
5490 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5491 Pass &all_threads to find_inferior, not &all_lwps.
5492 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5493 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5494 Pass &all_threads to find_inferior, not &all_lwps.
5495 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5496 (i386_dr_low_get_status): Ditto.
5497 (x86_linux_prepare_to_resume): Fetch ptid from thread.
5498 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5499 (x86_linux_read_description): Ditto.
5500 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5501
3b8361aa
DE
55022014-02-20 Doug Evans <dje@google.com>
5503
5504 * inferiors.c (get_first_inferior): Fix buglet.
5505
f7667f0d
DE
55062014-02-19 Doug Evans <dje@google.com>
5507
5508 * gdbthread.h (add_thread): Change result type to struct thread_info *.
5509 * inferiors.c (add_thread): Change result type to struct thread_info *.
5510 All callers updated.
5511 (add_lwp): Call add_thread here instead of in callers.
5512 All callers updated.
5513 * linux-low.h (get_lwp_thread): Rewrite.
5514 (struct lwp_info): New member "thread".
5515
b3312d80
DE
55162014-02-19 Doug Evans <dje@google.com>
5517
5518 * linux-low.c (add_lwp): Change result to struct lwp_info *.
5519 All callers updated.
5520
ecc6f45c
DE
55212014-02-19 Doug Evans <dje@google.com>
5522
5523 * inferiors.c (add_thread): Fix whitespace.
5524
649ebbca
DE
55252014-02-19 Doug Evans <dje@google.com>
5526
5527 * dll.c (clear_dlls): Replace accessing list implemention details
5528 with API function.
5529 * gdbthread.h (get_first_thread): Declare.
5530 * inferiors.c (for_each_inferior_with_data): New function.
5531 (get_first_thread): New function.
5532 (find_thread_ptid): Simplify.
5533 (get_first_inferior): New function.
5534 (clear_list): Delete.
5535 (one_inferior_p): New function.
5536 (clear_inferior_list): New function.
5537 (clear_inferiors): Update.
5538 * inferiors.h (for_each_inferior_with_data): Declare.
5539 (clear_inferior_list): Declare.
5540 (one_inferior_p): Declare.
5541 (get_first_inferior): Declare.
5542 * linux-low.c (linux_wait_for_event): Replace accessing list
5543 implemention details with API function.
5544 * server.c (target_running): Ditto.
5545 (accumulate_file_name_length): New function.
5546 (emit_dll_description): New function.
5547 (handle_qxfer_libraries): Replace accessing list implemention
5548 details with API function.
5549 (handle_qxfer_threads_worker): New function.
5550 (handle_qxfer_threads_proper): Replace accessing list implemention
5551 details with API function.
5552 (handle_query): Ditto.
5553 (visit_actioned_threads_callback_ftype): New typedef.
5554 (visit_actioned_threads_data): New struct.
5555 (visit_actioned_threads): Rewrite to be find_inferior callback.
5556 (resume): Call find_inferior.
5557 (handle_status): Replace accessing list implemention
5558 details with API function.
5559 (process_serial_event): Replace accessing list implemention details
5560 with API function.
5561 * target.c (set_desired_inferior): Replace accessing list implemention
5562 details with API function.
5563 * tracepoint.c (same_process_p): New function.
5564 (gdb_agent_about_to_close): Replace accessing list implemention
5565 details with API function.
5566 * win32-low.c (child_delete_thread): Replace accessing list
5567 implemention details with API function.
5568 (match_dll_by_basename): New function.
5569 (dll_is_loaded_by_basename): New function.
5570 (win32_ensure_ntdll_loaded): Replace accessing list implemention
5571 details call to dll_is_loaded_by_basename.
5572
80894984
DE
55732014-02-19 Doug Evans <dje@google.com>
5574
5575 * dll.h (struct dll_info): Add comment.
5576 * gdbthread.h (struct thread_info): Add comment.
5577 (current_ptid): Simplify.
5578 * inferiors.c (add_process): Update.
5579 (remove_process): Update.
5580 * inferiors.h (struct process_info): Rename member "head" to "entry".
5581 * linux-low.c (delete_lwp): Update.
5582 (add_lwp): Update.
5583 (last_thread_of_process_p): Update.
5584 (kill_one_lwp_callback, linux_kill): Update.
5585 (status_pending_p_callback): Update.
5586 (wait_for_sigstop): Update. Simplify read of ptid.
5587 (start_step_over): Update.
5588 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5589 (get_lwp_thread): Update.
5590 (struct lwp_info): Rename member "head" to "entry".
5591 * regcache.h (inferior_list_entry): Delete.
5592 * server.c (kill_inferior_callback): Update.
5593 (detach_or_kill_inferior_callback): Update.
5594 (print_started_pid): Update.
5595 (print_attached_pid): Update.
5596 (process_serial_event): Simplify read of ptid.
5597 * thread-db.c (thread_db_create_event): Update.
5598 (thread_db_get_tls_address): Update.
5599 * win32-low.c (current_inferior_ptid): Simplify.
5600
46917d26
TT
56012014-02-19 Tom Tromey <tromey@redhat.com>
5602
5603 * target.h (struct target_ops) <supports_btrace>: Add target_ops
5604 argument.
5605 (target_supports_btrace): Update.
5606
0759a81e
YQ
56072014-02-14 Yao Qi <yao@codesourcery.com>
5608
5609 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5610 (rsp-low-ipa.o): New target.
5611
a7191e8b
TT
56122014-02-12 Tom Tromey <tromey@redhat.com>
5613
5614 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5615 convert_ascii_to_int.
5616 * regcache.c (registers_to_string): Likewise.
5617 * remote-utils.c (decode_M_packet): Likewise.
5618 * server.c (process_serial_event): Likewise.
5619
ff0e980e
TT
56202014-02-12 Tom Tromey <tromey@redhat.com>
5621
5622 * server.c (handle_query, handle_v_run): Use hex2bin, not
5623 unhexify.
5624 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5625
e9371aff
TT
56262014-02-12 Tom Tromey <tromey@redhat.com>
5627
5628 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5629 convert_int_to_ascii.
5630 * regcache.c (registers_to_string, collect_register_as_string):
5631 Likewise.
5632 * remote-utils.c (look_up_one_symbol, relocate_instruction):
5633 Likewise.
5634 * server.c (process_serial_event): Likewise.
5635 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5636 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5637
971dc0b8
TT
56382014-02-12 Tom Tromey <tromey@redhat.com>
5639
5640 * remote-utils.c (look_up_one_symbol, monitor_output): Use
5641 bin2hex, not hexify.
5642 * tracepoint.c (cmd_qtstatus): Likewise.
5643
0a822afb
TT
56442014-02-12 Tom Tromey <tromey@redhat.com>
5645
5646 * remote-utils.c (monitor_output): Pass explicit length to
5647 hexify.
5648
9c3d6531
TT
56492014-02-12 Tom Tromey <tromey@redhat.com>
5650
5651 * tracepoint.c: Include rsp-low.h.
5652 * server.c: Include rsp-low.h.
5653 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5654 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5655 declare.
5656 * remote-utils.c: Include rsp-low.h.
5657 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5658 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5659 (convert_int_to_ascii, convert_ascii_to_int): Move to
5660 common/rsp-low.c.
5661 * regcache.c: Include rsp-low.h.
5662 * ax.c: Include rsp-low.h.
5663 * Makefile.in (SFILES): Add common/rsp-low.c.
5664 (OBS): Add rsp-low.o.
5665 (rsp-low.o): New target.
5666
01fd3ea5
TT
56672014-02-12 Tom Tromey <tromey@redhat.com>
5668
5669 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5670 Include print-utils.h.
5671 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5672 (plongest, thirty_two, phex_nz): Remove.
5673 * Makefile.in (SFILES): Add common/print-utils.c.
5674 (OBS): Add print-utils.o.
5675 (print-utils-ipa.o): New target.
5676 (print-utils.o): New target.
5677 (IPA_OBJS): Add print-utils-ipa.o.
5678
e99dc820
TT
56792014-02-06 Tom Tromey <tromey@redhat.com>
5680
5681 * Makefile.in (SFILES): Fix indentation.
5682
ee1e2d4f
DE
56832014-02-05 Doug Evans <dje@google.com>
5684
5685 * linux-low.c (linux_wait_for_event): Improve comment.
5686 (linux_wait_1): Keep current_inferior in sync with event_child.
5687
f5a02773
DE
56882014-01-22 Doug Evans <dje@google.com>
5689
5690 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5691
87ce2a04
DE
56922014-01-22 Doug Evans <dje@google.com>
5693
5694 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5695 * configure: Regenerate.
5696 * config.in: Regenerate.
5697 * Makefile.in (SFILES): Add debug.c.
5698 (OBS): Add debug.o.
5699 * debug.c: New file.
5700 * debug.h: New file.
5701 * linux-aarch64-low.c (*): Update all debugging printfs to use
5702 debug_printf instead of fprintf.
5703 * linux-arm-low.c (*): Ditto.
5704 * linux-cris-low.c (*): Ditto.
5705 * linux-crisv32-low.c (*): Ditto.
5706 * linux-m32r-low.c (*): Ditto.
5707 * linux-sparc-low.c (*): Ditto.
5708 * linux-x86.c (*): Ditto.
5709 * linux-low.c (*): Ditto.
5710 (linux_wait_1): Add calls to debug_enter, debug_exit.
5711 (linux_wait): Remove redundant debugging printf.
5712 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5713 (linux_resume, unstop_all_lwps): Ditto.
5714 * mem-break.c (*): Update all debugging printfs to use
5715 debug_printf instead of fprintf.
5716 * remote-utils.c (*): Ditto.
5717 * thread-db.c (*): Ditto.
5718 * server.c #include <ctype.h>, "gdb_vecs.h".
5719 (debug_threads): Moved to debug.c.
5720 (*): Update all debugging printfs to use debug_printf instead of
5721 fprintf.
5722 (start_inferior): Replace call to fflush with call to debug_flush.
5723 (monitor_show_help): Mention set debug-format.
5724 (parse_debug_format_options): New function.
5725 (handle_monitor_command): Handle "monitor set debug-format".
5726 (gdbserver_usage): Mention --debug-format.
5727 (main): Parse --debug-format.
5728 * server.h (debug_threads): Declaration moved to debug.h.
5729 #include "debug.h".
5730 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5731 trace_debug_1 that uses debug_printf.
5732 (tracepoint_look_up_symbols): Update all debugging printfs to use
5733 debug_printf instead of fprintf.
5734
e671835b
BS
57352014-01-20 Baruch Siach <baruch@tkos.co.il>
5736
5737 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5738 sys/ptrace.h.
5739
b5737fa9
PA
57402014-01-17 Pedro Alves <palves@redhat.com>
5741
ea38d2a9 5742 PR build/16445
c7faa97a
PA
5743 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5744 defined after including gdb_proc_service.h.
b5737fa9 5745
40ed484e
DE
57462014-01-16 Doug Evans <dje@google.com>
5747
5748 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5749 (match_dll): Use it.
5750
969c39fb
MM
57512014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5752
5753 * target.h (target_ops) <read_btrace>: Change parameters and
5754 return type to allow error reporting.
5755 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5756 trace reading errors on.
5757 * linux-low.c (linux_low_read_btrace): Pass trace reading
5758 errors on.
5759 (linux_low_disable_btrace): New.
5760
ab7f45ba
DE
57612014-01-15 Doug Evans <dje@google.com>
5762
5763 * inferiors.c (thread_id_to_gdb_id): Delete.
5764 * inferiors.h (thread_id_to_gdb_id): Delete.
5765
66af0f44
EZ
57662014-01-13 Eli Zaretskii <eliz@gnu.org>
5767
5768 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5769 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5770 versions.
5771
9939e131
PA
57722014-01-08 Pedro Alves <palves@redhat.com>
5773
5774 * server.c (handle_status): Don't discard previous queued stop
5775 replies or thread's pending status here.
5776 (main) <disconnection>: Do it here instead.
5777
b7ea362b
PA
57782014-01-08 Pedro Alves <palves@redhat.com>
5779
5780 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5781 * server.c (visit_actioned_threads, handle_pending_status): New
5782 function.
5783 (handle_v_cont): Factor out parts to ...
5784 (resume): ... this new function. If in all-stop, and a thread
5785 being resumed has a pending status, report it without actually
5786 resuming.
5787 (myresume): Adjust to use the new 'resume' function.
5788 (clear_pending_status_callback, set_pending_status_callback)
5789 (find_status_pending_thread_callback): New functions.
5790 (handle_status): Handle the case of multiple threads having
5791 interesting statuses to report. Report threads' real last signal
5792 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5793 with an interesting thread to report the status for, instead of
5794 always reporting the status of the first thread.
5795
28498c42
JB
57962014-01-01 Joel Brobecker <brobecker@adacore.com>
5797
5798 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5799 * gdbreplay.c (gdbreplay_version): Likewise.
5800
f45c82da
YZ
58012013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5802
5803 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5804 iov.iov_len with the real length in use.
5805
379a5e2d
JB
58062013-12-13 Joel Brobecker <brobecker@adacore.com>
5807
5808 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5809 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5810 for all targets that use win32-low.c.
5811 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5812 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5813
4210d83e
PA
58142013-12-13 Pedro Alves <palves@redhat.com>
5815
5816 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5817 if equal to TARGET_WAITKIND_LOADED.
5818 * win32-low.c (cached_status): New static global.
5819 (win32_wait): Add declaration.
5820 (do_initial_child_stuff): Flush all initial pending debug events
5821 up to the initial breakpoint.
5822 (win32_wait): If CACHED_STATUS was set, return that instead
5823 of doing a real wait. Remove the code resuming the execution
5824 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5825 during the initial phase. Also remove the code changing
5826 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5827 TARGET_WAITKIND_STOPPED.
5828
e7f0d979
YQ
58292013-12-11 Yao Qi <yao@codesourcery.com>
5830
5831 * notif.c (handle_notif_ack): Return 0 if no notification
5832 matches.
5833
ebcf782c
DE
58342013-11-20 Doug Evans <dje@google.com>
5835
5836 * linux-low.c (linux_set_resume_request): Fix comment.
5837
20ad9378
DE
58382013-11-20 Doug Evans <dje@google.com>
5839
5840 * linux-low.c (resume_status_pending_p): Tweak comment.
5841
a196ebeb
WT
58422013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5843
5844 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5845 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5846 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5847 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5848 (srv_amd64_regobj): Add amd64-mpx.o.
5849 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5850 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5851 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5852 * i387-fp.c (num_pl_bnd_register) Added constant.
5853 (num_pl_bnd_cfg_registers) Added constant.
5854 (struct i387_xsave) Added reserved area and MPX fields.
5855 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5856 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5857 function.
5858 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5859 (init_registers_amd64_mpx_linux): Declare new function.
5860 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5861 (x86_64_regmap): Add MPX registers.
5862 (x86_linux_read_description): Add MPX case.
5863 (initialize_low_arch): Initialize MPX targets.
5864
0080a2f6
TT
58652013-11-18 Tom Tromey <tromey@redhat.com>
5866
5867 * configure: Rebuild.
5868 * configure.ac: Don't check for stdlib.h.
5869 * gdbreplay.c: Unconditionally include stdlib.h.
5870
2978b111
TT
58712013-11-18 Tom Tromey <tromey@redhat.com>
5872
5873 * config.in: Rebuild.
5874 * configure: Rebuild.
5875 * configure.ac: Don't use AC_HEADER_DIRENT.
5876
a3d08894
TT
58772013-11-18 Tom Tromey <tromey@redhat.com>
5878
5879 * server.h: Don't check HAVE_STRING_H.
5880 * gdbreplay.c: Don't check HAVE_STRING_H.
5881 * configure: Rebuild.
5882
0a5dd17d
TT
58832013-11-18 Tom Tromey <tromey@redhat.com>
5884
5885 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5886 LIBGNU.
5887
1bd2f0ba
TT
58882013-11-08 Tom Tromey <tromey@redhat.com>
5889
5890 * configure, config.in: Rebuild.
5891 * configure.ac: Remove unused configury.
5892
3266f10b
TT
58932013-11-08 Tom Tromey <tromey@redhat.com>
5894
5895 * acinclude.m4: Include common.m4, codeset.m4.
5896 * configure, config.in: Rebuild.
5897 * configure.ac: Use GDB_AC_COMMON.
5898
6682d959
AA
58992013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5900
5901 * linux-s390-low.c (HWCAP_S390_TE): New define.
5902 (s390_arch_setup): Consider the TE field in the HWCAP for
5903 determining 'have_regset_tdb'.
5904
fd0a4d76
SDJ
59052013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5906
5907 PR gdb/16014
5908 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5909 call to sizeof.
5910
1a3d890b
PA
59112013-10-02 Pedro Alves <palves@redhat.com>
5912
5913 * server.c (process_serial_event): Don't output "GDBserver
5914 exiting" if GDB is connected through stdio.
5915 * target.c (mywait): Likewise, be silent if GDB is connected
5916 through stdio.
5917
97ad4581
JB
59182013-10-01 Joel Brobecker <brobecker@adacore.com>
5919
5920 * lynx-low.c (lynx_add_threads_after_attach): New function.
5921 (lynx_attach): Remove call to add_thread. Add call to
5922 lynx_add_threads_after_attach instead.
5923
5b4e221c
MF
59242013-09-28 Mike Frysinger <vapier@gentoo.org>
5925
5926 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5927 * config.in, configure: Regenerated.
5928
ee47b2f8
YQ
59292013-09-18 Yao Qi <yao@codesourcery.com>
5930
5931 PR server/15959
5932 * server.c (start_inferior): Clear 'resume_info'.
5933
d6707650 59342013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5935
d6707650
JW
5936 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5937 for each register.
5938
9243dd0e 59392013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5940
9243dd0e
JW
5941 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5942 linux-tile-low.o to srv_tgtobj.
5943
c623a6ef
WN
59442013-09-16 Will Newton <will.newton@linaro.org>
5945
5946 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5947 out regs.
5948
fb71d39e
PA
59492013-09-06 Pedro Alves <palves@redhat.com>
5950
5951 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5952 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5953 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5954 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5955 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5956 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5957
8e7e9910
PA
59582013-09-06 Pedro Alves <palves@redhat.com>
5959
5960 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5961 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5962
7c3a12ca
PA
59632013-09-06 Pedro Alves <palves@redhat.com>
5964
5965 * linux-amd64-ipa.c: Include tracepoint.h.
5966 * linux-i386-ipa.c: Include tracepoint.h.
5967
8eb3d7b6
RW
59682013-09-06 Ricard Wanderlof <ricardw@axis.com>
5969
5970 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5971 (ps_get_thread_area): New function.
5972
eddddb9d
RW
59732013-09-06 Ricard Wanderlof <ricardw@axis.com>
5974
5975 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5976 (initialize_low_arch): Call init_registers_crisv32 rather than
5977 init_register_crisv32.
5978
533b0600
PA
59792013-09-05 Pedro Alves <palves@redhat.com>
5980
5981 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5982 to ...
5983 * hostio.h: ... this new file.
5984 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5985 win32-low.c: Include hostio.h.
5986
0ce3d3b5
PA
59872013-09-05 Pedro Alves <palves@redhat.com>
5988
5989 * server.h (gdb_client_data, handler_func, callback_handler_func)
5990 (delete_file_handler, add_file_handler, append_callback_event)
5991 (delete_callback_event, start_event_loop, initialize_event_loop):
5992 Move to event-loop.h and include it.
5993 * event-loop.h: New file.
5994
799cdc37
PA
59952013-09-05 Pedro Alves <palves@redhat.com>
5996
5997 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5998 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5999 (loaded_dll, unloaded_dll): Move to ...
6000 * dll.h: ... this new file.
6001 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6002
6a6bbd9d
PA
60032013-09-05 Pedro Alves <palves@redhat.com>
6004
6005 * server.h (current_process, get_thread_process, all_processes)
6006 (add_inferior_to_list, for_each_inferior, current_inferior)
6007 (remove_inferior, add_process, remove_process, find_process_pid)
6008 (have_started_inferiors_p, have_attached_inferiors_p)
6009 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6010 (clear_inferiors, find_inferior, find_inferior_id)
6011 (inferior_target_data, set_inferior_target_data)
6012 (inferior_regcache_data, set_inferior_regcache_data): Move to
6013 inferiors.h, and include it.
6014 * inferiors.h: New file.
6015
f699aaba
PA
60162013-09-05 Pedro Alves <palves@redhat.com>
6017
6018 * server.h (struct emit_ops, current_insn_ptr, emit_error):
6019 Move ...
72f4393d 6020 * ax.h: ... here.
f699aaba 6021
c144c7a0
PA
60222013-09-05 Pedro Alves <palves@redhat.com>
6023
6024 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6025 tracepoint.h.
6026 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6027 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6028 (handle_tracepoint_general_set, handle_tracepoint_query)
6029 (tracepoint_finished_step, tracepoint_was_hit)
6030 (release_while_stepping_state_list, current_traceframe)
6031 (in_readonly_region, traceframe_read_mem)
6032 (fetch_traceframe_registers, traceframe_read_sdata)
6033 (traceframe_read_info, struct fast_tpoint_collect_status)
6034 (fast_tracepoint_collecting, force_unlock_trace_buffer)
6035 (handle_tracepoit_bkpts, initialize_low_tracepoint)
6036 (supply_fast_tracepoint_registers)
6037 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6038 (ipa_tdesc, claim_trampoline_space)
6039 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6040 (agent_mem_read, agent_get_trace_state_variable_value)
6041 (agent_set_trace_state_variable_value, agent_tsv_read)
6042 (agent_mem_read_string, get_raw_reg_func_addr)
6043 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6044 * tracepoint.h: ... this new file.
6045
ff42e6ab
PA
60462013-09-05 Pedro Alves <palves@redhat.com>
6047
6048 * server.h (perror_with_name, error, fatal, warning, paddress)
6049 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6050 include it.
6051 * utils.h: New file.
6052
541af0f4
PA
60532013-09-05 Pedro Alves <palves@redhat.com>
6054
6055 * server.h (remote_debug, noack_mode, transport_is_reliable)
6056 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6057 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6058 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6059 (write_enn, initialize_async_io, enable_async_io)
6060 (disable_async_io, check_remote_input_interrupt_request)
6061 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6062 (dead_thread_notify, prepare_resume_reply)
6063 (decode_address_to_semicolon, decode_address, decode_m_packet)
6064 (decode_M_packet, decode_X_packet, decode_xfer_write)
6065 (decode_search_memory_packet, unhexify, hexify)
6066 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6067 (look_up_one_symbol, relocate_instruction)
6068 (monitor_output): Move to remote-utils.h, and include it.
6069 * remote-utils.h: New file.
6070
eebdf26b
PA
60712013-09-05 Pedro Alves <palves@redhat.com>
6072
6073 * server.h (_): Delete.
6074
3aafd2ff
PA
60752013-09-02 Pedro Alves <palves@redhat.com>
6076
6077 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6078 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6079 allocated.
6080 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6081
cee83bcb
PM
60822013-09-02 Pierre Muller <muller@sourceware.org>
6083
6084 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6085 or WriteProcessMemory complete successfully and handle
6086 ERROR_PARTIAL_COPY error.
6087
9a13b2fa
PA
60882013-09-02 Pedro Alves <palves@redhat.com>
6089
6090 * server.c (gdb_read_memory): Return -1 on traceframe memory read
6091 error instead of EIO.
6092
602e3198
JK
60932013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6094
6095 PR server/15604
6096 * linux-low.c: Include filestuff.h.
6097 (linux_create_inferior) <pid == 0>: Call close_most_fds.
6098 * lynx-low.c: Include filestuff.h.
6099 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6100 * server.c: Include filestuff.h.
6101 (main): Call notice_open_fds.
6102 * spu-low.c: Include filestuff.h.
6103 (spu_create_inferior) <pid == 0>: Call close_most_fds.
6104
96d7229d
LM
61052013-08-22 Luis Machado <lgustavo@codesourcery.com>
6106
6107 * Makefile.in: Explain why ../target and ../nat are not
6108 listed as include file search paths.
6109 (linux-waitpid.o): New object file rule.
6110 * configure.srv (srv_native_linux_obj): New variable.
6111 Replace all occurrences of linux native object files with
6112 $srv_native_linux_obj.
6113 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6114 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6115 (linux_enable_event_reporting): Remove declaration.
6116 (my_waitpid): Moved to common/linux-waitpid.c.
6117 (linux_wait_for_event): Pass ptid when calling
6118 linux_enable_event_reporting.
6119 (linux_supports_tracefork_flag): Remove.
6120 (linux_enable_event_reporting): Likewise.
6121 (linux_tracefork_grandchild): Remove.
6122 (STACK_SIZE): Moved to common/linux-ptrace.c.
6123 (linux_tracefork_child): Remove.
6124 (linux_test_for_tracefork): Remove.
6125 (linux_look_up_symbols): Call linux_supports_traceclone.
6126 (initialize_low): Remove call to linux_test_for_tracefork.
6127 * linux-low.h (PTRACE_TYPE_ARG3): Move to
6128 common/linux-ptrace.h.
6129 (PTRACE_TYPE_ARG4): Likewise.
6130 Include linux-ptrace.h.
6131
32940073
PA
61322013-08-21 Pedro Alves <palves@redhat.com>
6133
6134 * config.in: Renegerate.
6135
33b60d58 61362013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 6137
33b60d58
LM
6138 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6139 (SFILES): Remove $(srcdir)/common/target-common.c and
6140 add $(srcdir)/target/waitstatus.c.
6141 (OBS): Remove target-common.o and add waitstatus.o.
6142 (server_h): Remove $(srcdir)/../common/target-common.h and
6143 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6144 and $(srcdir)/../target/waitstatus.h.
6145 (target-common.o): Remove.
6146 (waitstatus.o): New target object file.
6147 * target.h: Do not include target-common.h and
6148 include target/resume.h, target/wait.h and
6149 target/waitstatus.h.
6150
b8e1b30e
LM
61512013-08-13 Luis Machado <lgustavo@codesourcery.com>
6152
6153 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6154 to PTRACE_TYPE_ARG3.
6155 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6156 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6157 PTRACE_TYPE_ARG4.
6158 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6159 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6160
7a60ad40
YQ
61612013-07-27 Jie Zhang <jie@codesourcery.com>
6162 Daniel Jacobowitz <dan@codesourcery.com>
6163 Yao Qi <yao@codesourcery.com>
6164
6165 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6166 (mips-linux-watch.o): New rule.
6167 (mips_linux_watch_h): New variable.
6168 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6169 srv_tgtobj.
6170 * linux-mips-low.c: Include mips-linux-watch.h.
6171 (struct arch_process_info, struct arch_lwp_info): New.
6172 (update_watch_registers_callback): New function.
6173 (mips_linux_new_process, mips_linux_new_thread) New functions.
6174 (mips_linux_prepare_to_resume, mips_insert_point): New
6175 functions.
6176 (mips_remove_point, mips_stopped_by_watchpoint): New
6177 functions.
6178 (rsp_bp_type_to_target_hw_bp_type): New function.
6179 (mips_stopped_data_address): New function.
6180 (the_low_target): Add watchpoint support functions.
6181
de6f69ad
YQ
61822013-07-27 Yao Qi <yao@codesourcery.com>
6183
6184 * i386-low.c: Include break-common.h.
6185 (enum target_hw_bp_type): Remove.
6186
3360c0bf
LM
61872013-07-24 Luis Machado <lgustavo@codesourcery.com>
6188
6189 * Makefile.in (SFILES): /common/target-common.c.
6190 (OBS): Add target-common.o.
6191 (server_h): Add $(srcdir)/../common/target-common.h.
6192 (target-common.o): New target.
6193 * server.c (queue_stop_reply_callback): Free
6194 status string after use.
6195 * target.c (target_waitstatus_to_string): Remove.
6196 * target.h: Include target-common.h.
6197 (resume_kind): Likewise.
6198 (target_waitkind): Likewise.
6199 (target_waitstatus): Likewise.
6200 (TARGET_WNOHANG): Likewise.
6201
bd885420
YQ
62022013-07-04 Yao Qi <yao@codesourcery.com>
6203
6204 * Makefile.in (host_alias): Use @host_noncanonical@.
6205 (target_alias): Use @target_noncanonical@.
6206 * configure.ac: Use ACX_NONCANONICAL_TARGET and
6207 ACX_NONCANONICAL_HOST.
6208 * configure: Regenerated.
6209
6210 Revert:
6211 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6212
6213 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6214 * configure: Rebuild.
6215 * Makefile.in (version_host, version_target): Get from configure.
6216 (version.c): Use $(version_host) and $(version_target).
6217
17ef446e
PA
62182013-07-03 Pedro Alves <palves@redhat.com>
6219
6220 * Makefile.in (config.status): Depend on development.sh.
6221 * acinclude.m4: Include libmcheck.m4.
6222 * configure: Regenerate.
6223
7a9a7487
MG
62242013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6225
6226 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6227 attribute inside the parentheses.
6228 (winapi_DebugSetProcessKillOnExit): Ditto.
6229 (winapi_DebugBreakProcess): Ditto.
6230 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 6231
49b64de6
MG
62322013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
6233
6234 * notif.h (notif_event): Add a dummy member to avoid compiler
6235 errors.
6236
d5749ee7
PA
62372013-07-01 Pedro Alves <palves@redhat.com>
6238
6239 * hostio.c (HOSTIO_PATH_MAX): Define.
6240 (require_filename, handle_open, handle_unlink, handle_readlink):
6241 Use it.
6242
d8d2a3ee
PA
62432013-07-01 Pedro Alves <palves@redhat.com>
6244
6245 * server.h: Include "pathmax.h".
6246 * linux-low.c: Don't include sys/param.h.
6247 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6248 MAXPATHLEN.
6249 * win32-low.c: Don't include sys/param.h.
6250 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6251
bc7dea8d
PA
62522013-07-01 Pedro Alves <palves@redhat.com>
6253
6254 * event-loop.c: Don't check HAVE_UNISTD_H before including
6255 <unistd.h>.
6256 * gdbreplay.c: Likewise.
6257 * remote-utils.c: Likewise.
6258 * server.c: Likewise.
6259 * configure.ac: Don't check for unistd.h.
6260 * configure: Regenerate.
6261
d6c2da54
TT
62622013-06-28 Tom Tromey <tromey@redhat.com>
6263
6264 * Makefile.in (version.c): Use version.in, not
6265 common/version.in.
6266
257b6bec
MG
62672013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
6268
6269 * configure.ac (version_host, version_target): Set and AC_SUBST them.
6270 * configure: Rebuild.
6271 * Makefile.in (version_host, version_target): Get from configure.
6272 (version.c): Use $(version_host) and $(version_target).
6273
86ebe149
DK
62742013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6275
6276 Fix trace-status to output user name without trailing colon.
6277 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6278
f30aa5af
DK
62792013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
6280
6281 Fix trace-status to output proper start-time and stop-time.
6282 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6283 output start time and stop time in hex as gdb expects.
6284
28a93511
YQ
62852013-06-26 Pedro Alves <pedro@codesourcery.com>
6286
6287 * tracepoint.c (build_traceframe_info_xml): Output trace state
6288 variables present in the trace buffer.
6289
01208463
TT
62902013-06-24 Tom Tromey <tromey@redhat.com>
6291
6292 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6293 create-version.sh.
6294 (version.o): Remove.
6295 * gdbreplay.c: Include version.h.
6296 (version, host_name): Don't declare.
6297 * server.h: Include version.h.
6298 (version, host_name): Don't declare.
6299
760256f9
PA
63002013-06-12 Pedro Alves <palves@redhat.com>
6301
6302 * linux-x86-low.c (linux_is_elf64): Delete global.
6303 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6304 with local linux_pid_exe_is_elf_64_file use.
6305
030031ee
PA
63062013-06-11 Pedro Alves <palves@redhat.com>
6307
6308 * linux-low.c (regset_disabled, disable_regset): New functions.
6309 (regsets_fetch_inferior_registers)
6310 (regsets_store_inferior_registers): Use them.
6311 (initialize_regsets_info); Don't allocate the disabled_regsets
6312 array here.
6313 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6314 comment.
6315
5da6eb0a
PA
63162013-06-11 Pedro Alves <palves@redhat.com>
6317
6318 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6319 xmalloc.
6320
7e5aaa09
PA
63212013-06-11 Pedro Alves <palves@redhat.com>
6322
6323 * linux-x86-low.c (initialize_low_arch): Call
6324 init_registers_x32_avx_linux.
6325
d878444c
JK
63262013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
6327
6328 Fix compatibility with Android Bionic.
6329 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6330 it is not empty.
6331
3aee8918
PA
63322013-06-07 Pedro Alves <palves@redhat.com>
6333
5f2b57b5 6334 PR server/14823
3aee8918
PA
6335 * Makefile.in (OBS): Add tdesc.o.
6336 (IPA_OBJS): Add tdesc-ipa.o.
6337 (tdesc-ipa.o): New rule.
6338 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6339 interface.
6340 * linux-low.c (new_inferior): Delete.
6341 (disabled_regsets, num_regsets): Delete.
6342 (linux_add_process): Adjust to set the new per-process
6343 new_inferior flag.
6344 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6345 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
6346 was a stop. When calling arch_setup, switch the current inferior
6347 to the thread that got an event.
6348 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6349 (regsets_fetch_inferior_registers)
6350 (regsets_store_inferior_registers): New regsets_info parameter.
6351 Adjust to use it.
6352 (linux_register_in_regsets): New regs_info parameter. Adjust to
6353 use it.
6354 (register_addr, fetch_register, store_register): New usrregs_info
6355 parameter. Adjust to use it.
6356 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6357 parameter regs_info. Adjust to use it.
6358 (linux_fetch_registers): Get the current inferior's regs_info, and
6359 adjust to use it.
6360 (linux_store_registers): Ditto.
6361 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6362 (initialize_low): Don't initialize the target_regsets here. Call
6363 initialize_low_arch.
6364 * linux-low.h (target_regsets): Delete declaration.
6365 (struct regsets_info): New.
6366 (struct usrregs_info): New.
6367 (struct regs_info): New.
6368 (struct process_info_private) <new_inferior>: New field.
6369 (struct linux_target_ops): Delete the num_regs, regmap, and
6370 regset_bitmap fields. New field regs_info.
6371 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6372 * i387-fp.c (num_xmm_registers): Delete.
6373 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6374 calls to new interface.
6375 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6376 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6377 Infer the number of xmm registers from the regcache's target
6378 description.
6379 * i387-fp.h (num_xmm_registers): Delete.
6380 * inferiors.c (add_thread): Don't install the thread's regcache
6381 here.
6382 * proc-service.c (gregset_info): Fetch the current inferior's
6383 regs_info. Adjust to use it.
6384 * regcache.c: Include tdesc.h.
6385 (register_bytes, reg_defs, num_registers)
6386 (gdbserver_expedite_regs): Delete.
6387 (get_thread_regcache): If the thread doesn't have a regcache yet,
6388 create one, instead of aborting gdbserver.
6389 (regcache_invalidate_one): Rename to ...
6390 (regcache_invalidate_thread): ... this.
6391 (regcache_invalidate_one): New.
6392 (regcache_invalidate): Only invalidate registers of the current
6393 process.
6394 (init_register_cache): Add target_desc parameter, and use it.
6395 (new_register_cache): Ditto. Assert the target description has a
6396 non zero registers_size.
6397 (regcache_cpy): Add assertions. Adjust.
6398 (realloc_register_cache, set_register_cache): Delete.
6399 (registers_to_string, registers_from_string): Adjust.
6400 (find_register_by_name, find_regno, find_register_by_number)
6401 (register_cache_size): Add target_desc parameter, and use it.
6402 (free_register_cache_thread, free_register_cache_thread_one)
6403 (regcache_release, register_cache_size): New.
6404 (register_size): Add target_desc parameter, and use it.
6405 (register_data, supply_register, supply_register_zeroed)
6406 (supply_regblock, supply_register_by_name, collect_register)
6407 (collect_register_as_string, collect_register_by_name): Adjust.
6408 * regcache.h (struct target_desc): Forward declare.
6409 (struct regcache) <tdesc>: New field.
6410 (init_register_cache, new_register_cache): Add target_desc
6411 parameter.
6412 (regcache_invalidate_thread): Declare.
6413 (regcache_invalidate_one): Delete declaration.
6414 (regcache_release): Declare.
6415 (find_register_by_number, register_cache_size, register_size)
6416 (find_regno): Add target_desc parameter.
6417 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6418 declarations.
6419 * remote-utils.c: Include tdesc.h.
6420 (outreg, prepare_resume_reply): Adjust.
6421 * server.c: Include tdesc.h.
6422 (gdbserver_xmltarget): Delete declaration.
6423 (get_features_xml, process_serial_event): Adjust.
6424 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6425 declare.
6426 (struct process_info) <tdesc>: New field.
6427 (ipa_tdesc): Declare.
6428 * tdesc.c: New file.
6429 * tdesc.h: New file.
6430 * tracepoint.c: Include tdesc.h.
6431 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6432 (get_context_regcache): Adjust to pass ipa_tdesc down.
6433 (do_action_at_tracepoint): Adjust to get the register cache size
6434 from the context regcache's description.
6435 (traceframe_walk_blocks): Adjust to get the register cache size
6436 from the current trace frame's description.
6437 (traceframe_get_pc): Adjust to get current trace frame's
6438 description and pass it down.
6439 (gdb_collect): Adjust to get the register cache size from the
6440 IPA's description.
6441 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6442 (gdbserver_xmltarget): Delete.
6443 (initialize_low_tracepoint): Set the ipa's target description.
6444 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6445 (initialize_low_tracepoint): Set the ipa's target description.
6446 * linux-x86-low.c: Include tdesc.h.
6447 [__x86_64__] (is_64bit_tdesc): New.
6448 (ps_get_thread_area, x86_get_thread_area): Use it.
6449 (i386_cannot_store_register): Rename to ...
6450 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
6451 (i386_cannot_fetch_register): Rename to ...
6452 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
6453 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6454 to new interface.
6455 (target_regsets): Rename to ...
6456 (x86_regsets): ... this.
6457 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6458 interface.
6459 (x86_siginfo_fixup): Use is_64bit_tdesc.
6460 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6461 (tdesc_x32_avx_linux, tdesc_x32_linux)
6462 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6463 Declare.
6464 (x86_linux_update_xmltarget): Delete.
6465 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6466 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6467 (AMD64_LINUX_USER64_CS): New.
6468 (x86_linux_read_description): New, based on
6469 x86_linux_update_xmltarget.
6470 (same_process_callback): New.
6471 (x86_arch_setup_process_callback): New.
6472 (x86_linux_update_xmltarget): New.
6473 (x86_regsets_info): New.
6474 (amd64_linux_regs_info): New.
6475 (i386_linux_usrregs_info): New.
6476 (i386_linux_regs_info): New.
6477 (x86_linux_regs_info): New.
6478 (x86_arch_setup): Reimplement.
6479 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6480 (x86_emit_ops): Ditto.
6481 (the_low_target): Adjust. Install x86_linux_regs_info,
6482 x86_cannot_fetch_register, and x86_cannot_store_register.
6483 (initialize_low_arch): New.
6484 * linux-ia64-low.c (tdesc_ia64): Declare.
6485 (ia64_fetch_register): Adjust.
6486 (ia64_usrregs_info, regs_info): New globals.
6487 (ia64_regs_info): New function.
6488 (the_low_target): Adjust.
6489 (initialize_low_arch): New function.
6490 * linux-sparc-low.c (tdesc_sparc64): Declare.
6491 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6492 Adjust.
6493 (sparc_arch_setup): New function.
6494 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6495 (the_low_target): Adjust.
6496 (initialize_low_arch): New function.
6497 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6498 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6499 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6500 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6501 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6502 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6503 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6504 (tdesc_powerpc_isa205_vsx64l): Declare.
6505 (ppc_cannot_store_register, ppc_collect_ptrace_register)
6506 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6507 (ppc_set_pc, ppc_get_hwcap): Adjust.
6508 (ppc_usrregs_info): Forward declare.
6509 (!__powerpc64__) ppc_regmap_adjusted: New global.
6510 (ppc_arch_setup): Adjust to the current process'es target
6511 description.
6512 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6513 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6514 (ppc_store_evrregset): Adjust.
6515 (target_regsets): Rename to ...
6516 (ppc_regsets): ... this, and make static.
6517 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6518 (ppc_regs_info): New function.
6519 (the_low_target): Adjust.
6520 (initialize_low_arch): New function.
6521 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6522 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6523 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6524 (tdesc_s390x_linux64v2): Declare.
6525 (s390_collect_ptrace_register, s390_supply_ptrace_register)
6526 (s390_fill_gregset, s390_store_last_break): Adjust.
6527 (target_regsets): Rename to ...
6528 (s390_regsets): ... this, and make static.
6529 (s390_get_pc, s390_set_pc): Adjust.
6530 (s390_get_hwcap): New target_desc parameter, and use it.
6531 [__s390x__] (have_hwcap_s390_high_gprs): New global.
6532 (s390_arch_setup): Adjust to set the current process'es target
6533 description. Don't adjust the regmap.
6534 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6535 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6536 (regs_info_3264): New globals.
6537 (s390_regs_info): New function.
6538 (the_low_target): Adjust.
6539 (initialize_low_arch): New function.
6540 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6541 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6542 [__mips64] (init_registers_mips_linux)
6543 (init_registers_mips_dsp_linux): Delete defines.
6544 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6545 (have_dsp): New global.
6546 (mips_read_description): New, based on mips_arch_setup.
6547 (mips_arch_setup): Reimplement.
6548 (get_usrregs_info): New function.
6549 (mips_cannot_fetch_register, mips_cannot_store_register)
6550 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6551 (mips_fill_fpregset, mips_store_fpregset): Adjust.
6552 (target_regsets): Rename to ...
6553 (mips_regsets): ... this, and make static.
6554 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6555 (dsp_regs_info, regs_info): New globals.
6556 (mips_regs_info): New function.
6557 (the_low_target): Adjust.
6558 (initialize_low_arch): New function.
6559 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6560 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6561 Declare.
6562 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6563 (arm_read_description): New, with bits factored from
6564 arm_arch_setup.
6565 (arm_arch_setup): Reimplement.
6566 (target_regsets): Rename to ...
6567 (arm_regsets): ... this, and make static.
6568 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6569 (arm_regs_info): New function.
6570 (the_low_target): Adjust.
6571 (initialize_low_arch): New function.
6572 * linux-m68k-low.c (tdesc_m68k): Declare.
6573 (target_regsets): Rename to ...
6574 (m68k_regsets): ... this, and make static.
6575 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6576 (m68k_regs_info): New function.
6577 (m68k_arch_setup): New function.
6578 (the_low_target): Adjust.
6579 (initialize_low_arch): New function.
6580 * linux-sh-low.c (tdesc_sharch): Declare.
6581 (target_regsets): Rename to ...
6582 (sh_regsets): ... this, and make static.
6583 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6584 (sh_regs_info, sh_arch_setup): New functions.
6585 (the_low_target): Adjust.
6586 (initialize_low_arch): New function.
6587 * linux-bfin-low.c (tdesc_bfin): Declare.
6588 (bfin_arch_setup): New function.
6589 (bfin_usrregs_info, regs_info): New globals.
6590 (bfin_regs_info): New function.
6591 (the_low_target): Adjust.
6592 (initialize_low_arch): New function.
6593 * linux-cris-low.c (tdesc_cris): Declare.
6594 (cris_arch_setup): New function.
6595 (cris_usrregs_info, regs_info): New globals.
6596 (cris_regs_info): New function.
6597 (the_low_target): Adjust.
6598 (initialize_low_arch): New function.
6599 * linux-cris-low.c (tdesc_crisv32): Declare.
6600 (cris_arch_setup): New function.
6601 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6602 (cris_regs_info): New function.
6603 (the_low_target): Adjust.
6604 (initialize_low_arch): New function.
6605 * linux-m32r-low.c (tdesc_m32r): Declare.
6606 (m32r_arch_setup): New function.
6607 (m32r_usrregs_info, regs_info): New globals.
6608 (m32r_regs_info): Adjust.
6609 (initialize_low_arch): New function.
6610 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6611 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6612 (tic6x_usrregs_info): Forward declare.
6613 (tic6x_read_description): New function, based on ...
6614 (tic6x_arch_setup): ... this. Reimplement.
6615 (target_regsets): Rename to ...
6616 (tic6x_regsets): ... this, and make static.
6617 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6618 (tic6x_regs_info): New function.
6619 (the_low_target): Adjust.
6620 (initialize_low_arch): New function.
6621 * linux-xtensa-low.c (tdesc_xtensa): Declare.
6622 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6623 (target_regsets): Rename to ...
6624 (xtensa_regsets): ... this, and make static.
6625 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6626 globals.
6627 (xtensa_arch_setup, xtensa_regs_info): New functions.
6628 (the_low_target): Adjust.
6629 (initialize_low_arch): New function.
6630 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6631 (nios2_arch_setup): Set the current process'es tdesc.
6632 (target_regsets): Rename to ...
6633 (nios2_regsets): ... this.
6634 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6635 (nios2_regs_info): New function.
6636 (the_low_target): Adjust.
6637 (initialize_low_arch): New function.
a261b8f5
PA
6638 * linux-aarch64-low.c (tdesc_aarch64): Declare.
6639 (aarch64_arch_setup): Set the current process'es tdesc.
6640 (target_regsets): Rename to ...
6641 (aarch64_regsets): ... this.
6642 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6643 (aarch64_regs_info): New function.
6644 (the_low_target): Adjust.
6645 (initialize_low_arch): New function.
3aee8918
PA
6646 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6647 globals.
6648 (target_regsets): Rename to ...
6649 (tile_regsets): ... this.
6650 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6651 (tile_regs_info): New function.
6652 (tile_arch_setup): Set the current process'es tdesc.
6653 (the_low_target): Adjust.
6654 (initialize_low_arch): New function.
6655 * spu-low.c (tdesc_spu): Declare.
6656 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6657 * win32-arm-low.c (tdesc_arm): Declare.
6658 (arm_arch_setup): New function.
6659 (the_low_target): Install arm_arch_setup instead of
6660 init_registers_arm.
6661 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6662 (init_windows_x86): Rename to ...
6663 (i386_arch_setup): ... this. Set `win32_tdesc'.
6664 (the_low_target): Adjust.
6665 * win32-low.c (win32_tdesc): New global.
6666 (child_add_thread): Don't create the thread cache here.
6667 (do_initial_child_stuff): Set the new process'es tdesc.
6668 * win32-low.h (struct target_desc): Forward declare.
6669 (win32_tdesc): Declare.
6670 * lynx-i386-low.c (tdesc_i386): Declare global.
6671 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6672 * lynx-low.c (lynx_tdesc): New global.
6673 (lynx_add_process): Set the new process'es tdesc.
6674 * lynx-low.h (struct target_desc): Forward declare.
6675 (lynx_tdesc): Declare global.
6676 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6677 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6678 * nto-low.c (nto_tdesc): New global.
6679 (do_attach): Set the new process'es tdesc.
6680 * nto-low.h (struct target_desc): Forward declare.
6681 (nto_tdesc): Declare.
6682 * nto-x86-low.c (tdesc_i386): Declare.
6683 (nto_x86_arch_setup): Set `nto_tdesc'.
6684
b1fbec62
GB
66852013-06-04 Gary Benson <gbenson@redhat.com>
6686
6687 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6688 to qSupported response when appropriate.
6689 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6690 with nonzero-length annex.
6691 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6692 arguments supplied in annex.
6693
d1ec4ce7
DE
66942013-05-31 Doug Evans <dje@google.com>
6695
ac44adcb 6696 PR server/15594
d1ec4ce7
DE
6697 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6698 64 bits in 64-cross-32 environment.
6699
9b25f2d3
PA
67002013-05-28 Pedro Alves <palves@redhat.com>
6701
6702 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6703 (aarch64-without-fpu.c): Delete rule.
6704 * configure.srv (aarch64*-*-linux*): Remove references to
6705 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6706 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6707 declaration.
6708
6740dc9c
PA
67092013-05-24 Pedro Alves <palves@redhat.com>
6710
6711 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6712 instead of strchr/decode_address. Error if the range isn't split
6713 with a ','. Don't assume there's be a ':' in the action.
6714
c2d6af84
PA
67152013-05-23 Yao Qi <yao@codesourcery.com>
6716 Pedro Alves <palves@redhat.com>
6717
6718 * linux-low.c (lwp_in_step_range): New function.
6719 (linux_wait_1): If the thread was range stepping and stopped
6720 outside the stepping range, report the stop to GDB. Otherwise,
6721 continue stepping. Add range stepping debug output.
6722 (linux_set_resume_request): Copy the step range from the resume
6723 request to the lwp.
6724 (linux_supports_range_stepping): New.
6725 (linux_target_ops) <supports_range_stepping>: Set to
6726 linux_supports_range_stepping.
6727 * linux-low.h (struct linux_target_ops)
6728 <supports_range_stepping>: New field.
6729 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6730 * linux-x86-low.c (x86_supports_range_stepping): New.
6731 (the_low_target) <supports_range_stepping>: Set to
6732 x86_supports_range_stepping.
6733 * server.c (handle_v_cont): Handle 'r' action.
6734 (handle_v_requests): Append ";r" if the target supports range
6735 stepping.
6736 * target.h (struct thread_resume) <step_range_start,
6737 step_range_end>: New fields.
6738 (struct target_ops) <supports_range_stepping>:
6739 New field.
6740 (target_supports_range_stepping): New macro.
6741
58794e1a
JB
67422013-05-17 Joel Brobecker <brobecker@adacore.com>
6743
6744 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6745 confusion in comment.
6746
d631c5a7
JB
67472013-05-17 Joel Brobecker <brobecker@adacore.com>
6748
6749 * lynx-low.c (struct process_info_private): New type.
6750 (lynx_add_process): New function.
6751 (lynx_create_inferior, lynx_attach): Replace calls to
6752 add_process by calls to lynx_add_process.
6753 (lynx_resume): If PTID is null, then try using
6754 current_process()->private->last_wait_event_ptid.
6755 Add comments.
6756 (lynx_clear_inferiors): Delete. The contents of that function
6757 has been inlined in lynx_mourn;
6758 (lynx_wait_1): Save the ptid in the process's private data.
6759 (lynx_mourn): Free the process' private data. Replace call
6760 to lynx_clear_inferiors by call to clear_inferiors.
6761
96f7a20f
YQ
67622013-05-17 Yao Qi <yao@codesourcery.com>
6763
6764 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6765 the right place.
6766
db0dfaa0
LM
67672013-05-16 Luis Machado <lgustavo@codesourcery.com>
6768
6769 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6770 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6771 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6772 PT_TEXT_END_ADDR guards. Update comments.
6773 (linux_target_op) <read_offsets>: Conditionally define to
6774 linux_read_offsets if the target is UCLIBC and if it defines
6775 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6776
68f5f838
SL
67772013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6778 Andrew Jenner <andrew@codesourcery.com>
6779
6780 * Makefile.in (SFILES): Add linux-nios2-low.c.
6781 (clean): Add action to delete nios2-linux.c.
6782 (nios2-linux.c): New rule.
6783 * configure.srv: Add nios2*-*-linux*.
6784 * linux-nios2-low.c: New.
6785
1ebff1fd
HAQ
67862013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6787
6788 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6789
f6150862
HZ
67902013-04-25 Hui Zhu <hui@codesourcery.com>
6791
6792 PR gdb/15186
f6150862
HZ
6793 * ax.c (ax_printf): Add fflush.
6794
614c279d
TT
67952013-04-22 Tom Tromey <tromey@redhat.com>
6796
6797 * Makefile.in (SFILES): Add filestuff.c.
6798 (OBS): Add filestuff.o.
6799 (filestuff.o): New target.
6800 * config.in, configure: Rebuild.
6801 * configure.ac: Check for fdwalk, pipe2.
6802
7d4e5717
PA
68032013-04-17 Pedro Alves <palves@redhat.com>
6804
6805 * configure.ac (USE_THREAD_DB): Delete variable.
6806 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6807 Don't AC_SUBST USE_THREAD_DB.
6808 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6809 * config.in, configure: Regenerate.
6810
d5c93e41
PA
68112013-04-16 Pedro Alves <palves@redhat.com>
6812
6813 * linux-low.h (struct lwp_info) <thread_known>: Move under
6814 the USE_THREAD_DB #ifdef.
6815
04f5fe89
PA
68162013-04-16 Pedro Alves <palves@redhat.com>
6817
6818 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6819 (linux-low.o): Delete rule.
6820 * linux-low.h: Always include "gdb_thread_db.h" instead of
6821 conditionally including thread_db.h.
6822 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6823 HAVE_THREAD_DB_H.
6824
480b27bf
JK
68252013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6826
6827 * Makefile.in (install-only): Fix make install regression.
6828
43662968
JK
68292013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6830
6831 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6832 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6833 installation.
6834 * gdbserver.1: Remove.
6835
3e74e146
PA
68362013-03-22 Pedro Alves <palves@redhat.com>
6837
6838 * linux-low.c (handle_extended_wait): Don't call
6839 linux_enable_event_reporting.
6840
a8347a2a
TT
68412013-03-15 Tony Theodore <tonyt@logyst.com>
6842
6843 PR build/9098:
6844 * Makefile.in (SHELL): Use @SHELL@.
6845
eeb56fa7
SDJ
68462013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6847
6848 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6849 compiler warning.
6850
4fa7e2ff
JB
68512013-03-13 Joel Brobecker <brobecker@adacore.com>
6852
6853 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6854 Remove extraneous NULL element.
6855
8ddb1965
YQ
68562013-03-13 Yao Qi <yao@codesourcery.com>
6857
6858 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6859 'V' block in trace frame.
6860
9accd112
MM
68612013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6862
6863 * target.h (struct target_ops): Add btrace ops.
6864 (target_supports_btrace): New macro.
6865 (target_enable_btrace): New macro.
6866 (target_disable_btrace): New macro.
6867 (target_read_btrace): New macro.
6868 * gdbthread.h (struct thread_info): Add btrace field.
6869 * server.c: Include btrace-common.h.
6870 (handle_btrace_general_set): New function.
6871 (handle_btrace_enable): New function.
6872 (handle_btrace_disable): New function.
6873 (handle_general_set): Call handle_btrace_general_set.
6874 (handle_qxfer_btrace): New function.
6875 (struct qxfer qxfer_packets[]): Add btrace entry.
6876 * inferiors.c (remove_thread): Disable btrace.
6877 * linux-low: Include linux-btrace.h.
6878 (linux_low_enable_btrace): New function.
6879 (linux_low_read_btrace): New function.
6880 (linux_target_ops): Add btrace ops.
6881 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6882 Add srv_linux_btrace=yes.
6883 (x86_64-*-linux*): Add linux-btrace.o.
6884 Add srv_linux_btrace=yes.
6885 * configure.ac: Define HAVE_LINUX_BTRACE.
6886 * config.in: Regenerated.
6887 * configure: Regenerated.
6888
5cc22e4c
MM
68892013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6890
6891 * server.c (handle_qxfer): Preserve error message if -3 is
6892 returned.
6893 (qxfer): Document the -3 return value.
6894
7c97f91e
MM
68952013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6896
6897 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6898 (linux_btrace_h): New variable.
6899 (linux-btrace.o): New rule.
6900
be9a119c 69012013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
6902 Hafiz Abid Qadeer <abidh@codesourcery.com>
6903
6904 * tracepoint.c (trace_buffer_size): New global.
6905 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6906 (init_trace_buffer): Change to one-argument function. Allocate
6907 trace buffer memory.
6908 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6909 handle QTBuffer:size packet.
6910 (cmd_bigqtbuffer_size): New function.
6911 (initialize_tracepoint): Call init_trace_buffer with
6912 DEFAULT_TRACE_BUFFER_SIZE.
6913 * server.c (handle_query): Add QTBuffer:size in the
6914 supported packets.
6915
e64f7499
YQ
69162013-03-07 Yao Qi <yao@codesourcery.com>
6917
6918 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6919 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6920 of -1.
6921 (cmd_qtsp): Adjust condition. Do post increment.
6922 Set cur_action and cur_step_action back to 0.
6923
f0ae6fc3
PA
69242013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6925
6926 PR server/15236
6927 * linux-low.c (linux_write_memory): Return early success if LEN is
6928 zero.
6929
b5b0b0af
CV
69302013-03-05 Corinna Vinschen <vinschen@redhat.de>
6931
334ad4a8 6932 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 6933
589bc927
TT
69342013-02-28 Tom Tromey <tromey@redhat.com>
6935
6936 * configure.ac: Invoke AC_SYS_LARGEFILE.
6937 * configure, config.in: Rebuild.
6938
dfe07582
CV
69392013-02-28 Corinna Vinschen <vinschen@redhat.com>
6940
6941 * win32-low.c: Throughout, fix format strings and casts of
6942 printf-like functions to avoid type related warnings on all
6943 platforms.
6944 (get_child_debug_event): Print dwDebugEventCode as hex since
6945 that's how it's usually documented.
6946
736cd585
YQ
69472013-02-28 Yao Qi <yao@codesourcery.com>
6948
6949 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6950 pulongest.
6951
e1f58301
JW
69522013-02-27 Jiong Wang <jiwang@tilera.com>
6953
6954 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6955 (reg-tilegx32.c): New rule.
6956 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6957 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6958 different register info initializer according to elf class.
6959 (init_registers_tilgx32): New function. The tilegx32 register info
6960 initializer.
6961 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6962 (tile_store_gregset): Likewise.
6963
d171ca78
YQ
69642013-02-27 Yao Qi <yao@codesourcery.com>
6965
6966 * server.c (process_point_options): Print debug message when
6967 debug_threads is true.
6968
282bbdf3
YQ
69692013-02-26 Yao Qi <yao@codesourcery.com>
6970
6971 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6972
aca22551
PA
69732013-02-19 Pedro Alves <palves@redhat.com>
6974 Kai Tietz <ktietz@redhat.com>
6975
6976 PR gdb/15161
6977
6978 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6979 instead of strtoul to extract address from packet.
6980 (process_serial_event) <'z'>: Likewise.
6981
4f3cee1c
YQ
69822013-02-18 Yao Qi <yao@codesourcery.com>
6983
6984 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6985
8e1d55a3
PA
69862013-02-14 Pedro Alves <palves@redhat.com>
6987
6988 Plug memory leak.
6989
6990 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6991 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6992
458820da
PA
69932013-02-14 Pedro Alves <palves@redhat.com>
6994
6995 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6996
baea0dae
PA
69972013-02-14 Pedro Alves <palves@redhat.com>
6998
6999 * tracepoint.c (save_string): Delete.
7000 (add_tracepoint_action): Use savestring instead of save_string.
7001
0b1afbb3
PA
70022013-02-12 Pedro Alves <palves@redhat.com>
7003
7004 * linux-xtensa-low.c: Ditto.
7005 * xtensa-xtregs.c: Ditto.
7006
8a4ac37e
PA
70072013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
7008
7009 * thread-db.c (thread_db_get_tls_address): NULL pointer check
7010 thread_db.
7011
148de6bb
MS
70122013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7013
7014 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7015 aarch64_num_wp_regs and aarch64_num_bp_regs to
7016 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7017
55fac6e0
MS
70182013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
7019
7020 * linux-aarch64-low.c (ps_get_thread_area): Replace
7021 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7022
176eb98c
MS
70232013-02-04 Jim MacArthur <jim.macarthur@arm.com>
7024 Marcus Shawcroft <marcus.shawcroft@arm.com>
7025 Nigel Stephens <nigel.stephens@arm.com>
7026 Yufeng Zhang <yufeng.zhang@arm.com>
7027
7028 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7029 (aarch64.c, aarch64-without-fpu.c): New targets.
7030 * configure.srv (aarch64*-*-linux*): New.
7031 * linux-aarch64-low.c: New file.
7032
56f7af9c
MS
70332013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
7034
43aaf8b6 7035 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
7036 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7037 (dequeue_one_deferred_signal, linux_resume_one_thread)
7038 (fetch_register, linux_write_memory, linux_enable_event_reporting)
7039 (linux_tracefork_grandchild, linux_test_for_tracefork)
7040 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7041 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7042 where the argument is 0.
7043
60f662b0
YQ
70442013-01-25 Yao Qi <yao@codesourcery.com>
7045
7046 * event-loop.c: Include "queue.h".
7047 (gdb_event_p): New typedef.
7048 (struct gdb_event) <next_event>: Remove.
7049 (event_queue): Change to QUEUE(gdb_event_p).
7050 (async_queue_event): Remove.
7051 (gdb_event_xfree): New.
7052 (initialize_event_loop): New.
7053 (process_event): Use API from QUEUE.
7054 (wait_for_event): Likewise.
7055 * server.c (main): Call initialize_event_loop.
7056 * server.h (initialize_event_loop): Declare.
7057
5ae4861a
YQ
70582013-01-18 Yao Qi <yao@codesourcery.com>
7059
7060 * ax.h (struct eval_agent_expr_context): New.
7061 (gdb_eval_agent_expr): Update declaration.
7062 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7063 TFRAME. Add new argument CTX.
7064 * server.h (struct eval_agent_expr_context): Declare.
7065 (agent_mem_read, agent_tsv_read): Update declaration.
7066 (agent_mem_read_string): Likewise.
7067 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7068 (add_traceframe_block): Add new argument TPOINT.
7069 Increase TPOINT->traceframe_usage.
7070 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7071 eval_tracepoint_agent_expr.
7072 (condition_true_at_tracepoint): Likewise.
7073 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
7074 (agent_mem_read_string, agent_tsv_read): Likewise.
7075
85e00e85
YQ
70762013-01-16 Yao Qi <yao@codesourcery.com>
7077
7078 * linux-low.c (linux_resume_one_lwp): Don't check
7079 'lwp->bp_reinsert != 0'.
7080
4039cf45
JB
70812013-01-07 Joel Brobecker <brobecker@adacore.com>
7082 Pedro Alves <palves@redhat.com>
7083
7084 * lynx-low.c (ptrace_request_to_str): Define a temporary
7085 macro and use it to simplify this function's implementation.
7086
9044dee2
JB
70872013-01-07 Joel Brobecker <brobecker@adacore.com>
7088
7089 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7090 sets errno.
7091
e6352c8f
JB
70922013-01-07 Joel Brobecker <brobecker@adacore.com>
7093
7094 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7095
50681a27
JB
70962013-01-07 Joel Brobecker <brobecker@adacore.com>
7097
7098 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7099
3f6e77ef
JB
71002013-01-07 Joel Brobecker <brobecker@adacore.com>
7101
7102 * lynx-low.c (lynx_resume): Use the resume_info parameter
7103 to determine the ptid for the lynx_ptrace call, unless
7104 it is equal to minus_one_ptid, in which case we use the
7105 ptid of the current_inferior.
7106 (lynx_wait_1): After having received a thread create/exit
7107 event, resume the inferior's execution using the signaling
7108 thread's ptid, rather than the old ptid.
7109
7fda33ae
JB
71102013-01-07 Joel Brobecker <brobecker@adacore.com>
7111
7112 * lynx-low.c (lynx_resume): Delete variable ret.
7113
b9786c74
JB
71142013-01-01 Joel Brobecker <brobecker@adacore.com>
7115
7116 * gdbreplay.c (gdbreplay_version): Update copyright year.
7117 * server.c (gdbserver_version): Likewise.
7118
8b93d60f
JB
71192012-12-17 Joel Brobecker <brobecker@adacore.com>
7120
7121 * lynx-low.c (lynx_wait_1): Add debug trace before adding
7122 new thread.
7123
037335a7
JB
71242012-12-17 Joel Brobecker <brobecker@adacore.com>
7125
7126 * lynx-low.c (ptrace_request_to_str): Add handling for
7127 PTRACE_GETTRACESIG.
7128
52d4cbd8
JB
71292012-12-17 Joel Brobecker <brobecker@adacore.com>
7130
7131 * lynx-low.c (lynx_attach): Delete variable new_process.
7132
ab8f6ca9
JB
71332012-12-17 Joel Brobecker <brobecker@adacore.com>
7134
7135 * lynx-low.c (lynx_create_inferior): Delete variable
7136 new_process.
7137
78cbc024
JB
71382012-12-17 Joel Brobecker <brobecker@adacore.com>
7139
7140 * lynx-low.c (ptrace_request_to_str): Do not handle
7141 PTRACE_GETTHREADLIST if this macro does not exist.
7142
14a00470
YQ
71432012-12-15 Yao Qi <yao@codesourcery.com>
7144
7145 * Makefile.in (OBS): Add notif.o.
7146 * notif.c, notif.h: New.
7147 * server.c: Include "notif.h".
7148 (struct vstop_notif) <next>: Remove.
7149 <base>: New field.
7150 (queue_stop_reply): Update.
7151 (push_event, send_next_stop_reply): Remove.
7152 (discard_queued_stop_replies): Update.
7153 (notif_stop): New variable.
7154 (handle_v_stopped): Remove.
7155 (handle_v_requests): Don't call handle_v_stopped. Call
7156 handle_ack_notif instead.
7157 (queue_stop_reply_callback): Call notif_event_enque instead
7158 of queue_stop_reply.
7159 (handle_status): Don't call send_next_stop_reply, call
7160 notif_write_event instead.
7161 (kill_inferior_callback): Likewise.
7162 (detach_or_kill_inferior_callback): Likewise.
7163 (main): Call initialize_notif.
7164 (process_serial_event): Call QUEUE_is_empty.
7165 (handle_target_event): Call notif_push instead of push event.
7166 * server.h (push_event): Remove declaration.
7167
61c125b9
TT
71682012-12-10 Tom Tromey <tromey@redhat.com>
7169
7170 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7171 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7172 macros.
7173 (.c.o): Rewrite.
7174 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7175 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7176 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7177 (amd64-linux-ipa.o, ax.o): Rewrite.
7178 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7179 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7180 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7181 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7182 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7183 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7184 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7185 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7186 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7187 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7188 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7189 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7190 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7191 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7192 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7193 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7194 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7195 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7196 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7197 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7198 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7199 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7200 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7201 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7202 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7203 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7204 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7205 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7206 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7207 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7208 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7209 (reg-tilegx.o): Remove.
7210 (all_object_files): New macro.
7211 Include .deps files.
7212 * aclocal.m4, configure: Rebuild.
7213 * acinclude.m4: Include depstand.m4, lead-dot.m4.
7214 * configure.ac: Invoke ZW_CREATE_DEPDIR,
7215 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
7216
e90e9ad9
TT
72172012-12-05 Tom Tromey <tromey@redhat.com>
7218
7219 PR gdb/14917:
7220 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7221
02d403bf 72222012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
7223
7224 * configure.ac: Check for linux/perf_event.h.
7225 * config.in: Regenerated.
7226 * configure: Regenerated.
7227
0270a750
PA
72282012-11-26 Maxime Villard <rustyBSD@gmx.fr>
7229
7230 * hostio.c (handle_readlink): Decrease buffer size
7231 parameter passed to readlink by one byte.
7232
8c29b58e
YQ
72332012-11-26 Yao Qi <yao@codesourcery.com>
7234
7235 * configure.ac (build_warnings): Append '-Wempty-body'.
7236 * configure: Regenerated.
7237 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7238 body.
7239
8bdce1ff
PM
72402012-11-15 Pierre Muller <muller@sourceware.org>
7241
7242 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7243 * config.in: Regenerate.
7244 * configure: Regenerate.
7245 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7246 Use "gdb_wait.h" header instead of <sys/wait.h> header.
7247 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7248 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7249 header.
7250 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
7251 instead of <sys/wait.h> header.
7252 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7253
02d403bf 72542012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
7255
7256 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7257 (various make rules): Remove -DGDBSERVER
7258
fbd5db48
YQ
72592012-11-09 Yao Qi <yao@codesourcery.com>
7260
7261 * spu-low.c (current_ptid): Move it to ..
7262 * gdbthread.h: ... here. New.
7263 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7264 * server.c (myresume, process_serial_event): Likewise.
7265 * thread-db.c (thread_db_find_new_threads): Likewise.
7266 * tracepoint.c (run_inferior_command): Likewise.
7267
b3dc46ff
AB
72682012-10-01 Andrew Burgess <aburgess@broadcom.com>
7269
7270 * server.c (handle_search_memory_1): Include access length in
7271 warning message.
7272
07c04788
HPN
72732012-09-05 Michael Brandt <michael.brandt@axis.com>
7274
7275 * linux-crisv32-low.c: Fix compile errors.
7276
918d227b
YQ
72772012-09-04 Yao Qi <yao@codesourcery.com>
7278
7279 * tracepoint.c (cmd_qtsv): Adjust debug message.
7280 Don't check CUR_TPOINT.
7281
18c1b81a
YQ
72822012-08-28 Yao Qi <yao@codesourcery.com>
7283
7284 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7285 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7286 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7287 Remove declarations of xmalloc, xreallloc, xstrdup and
7288 freeargv.
7289 * Makefile.in (libiberty_h): New.
7290 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7291 (linux-bfin-low.o): Append dependency 'libiberty.h'.
7292
dc82f37b
YQ
72932012-08-23 Yao Qi <yao@codesourcery.com>
7294
7295 * server.h: Remove declaration of 'xsnprintf'.
7296
406b1477
KS
72972012-08-22 Keith Seitz <keiths@redhat.com>
7298
7299 * server.h: Include build-gnulib-gbserver/config.h.
7300 * gdbreplay.c: Likewise.
7301
e6712ff1
DE
73022012-08-08 Doug Evans <dje@google.com>
7303
7304 * Makefile.in (SFILES): Add gdb_vecs.c.
7305 (OBS): Add gdb_vecs.o.
7306 (gdb_vecs_h, host_defs_h): New variables.
7307 (thread-db.o): Add $(gdb_vecs_h) dependency.
7308 (gdb_vecs.o): New rule.
7309 * thread-db.c: #include "gdb_vecs.h".
7310 (thread_db_load_search): Use a vector to iterate over path elements.
7311 Handle text appearing after "$pdir".
7312
7313 * configure.ac: Add check for strstr.
7314 * config.in: Regenerate.
7315 * configure: Regenerate.
7316
7c3270ae
UW
73172012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
7318
7319 * hostio.c (handle_pread): If pread fails, fall back to attempting
7320 lseek/read.
7321 (handle_pwrite): Likewise for pwrite.
7322
b62e2b27
UW
73232012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
7324
7325 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7326 between unsupported TYPE and unimplementable ADDR/LEN combination.
7327 (arm_insert_point): Act on new return value.
7328
78a99e91
PA
73292012-07-31 Pedro Alves <palves@redhat.com>
7330
7331 * server.c (process_point_options): Only skip tokens if we find
7332 one that is unrecognized. Don't treat 'X' specially while
7333 skipping unrecognized tokens.
7334
fcf303ab
UW
73352012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
7336
7337 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7338 to 4-byte-align HW breakpoint addresses for Thumb.
7339
7255706c
YQ
73402012-07-27 Yao Qi <yao@codesourcery.com>
7341
7342 PR remote/14161.
7343
7344 * server.h: Declare gdb_agent_about_to_close.
7345 * target.c (kill_inferior): Include "agent.h".
7346 New. Send command 'kill'.
7347 * target.h (kill_inferior): Removed macro.
7348 * tracepoint.c (gdb_agent_about_to_close): New.
7349 (gdb_agent_helper_thread): Handle command 'close'.
7350 Wait endlessly until the inferior stops.
7351 Install gdb_agent_remove_socket to atexit hook.
7352 (agent_socket_name): New static variable.
7353 (gdb_agent_socket_init): Replace local variable 'name' with
7354 'agent_socket_name'.
7355 (gdb_agent_remove_socket): New.
7356
5a3f286f
YQ
73572012-07-27 Yao Qi <yao@codesourcery.com>
7358
7359 * server.c (process_point_options): Stop at 'X' when parsing.
7360
961bd387
ME
73612012-07-19 Michael Eager <eager@eagercon.com>
7362
a261b8f5 7363 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
7364 to hw_execute.
7365 * linux-x86-low.c (x86_insert_point, x86_remove_point):
7366 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7367 hardware breakpoint.
7368
aa7c7447
JK
73692012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7370
7371 * gdbserver/linux-low.c (initialize_low): Call
7372 linux_ptrace_init_warnings.
7373
7f216e7c
DE
73742012-07-02 Doug Evans <dje@google.com>
7375
7376 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7377 pointer to int.
7378
d3ce09f5
SS
73792012-07-02 Stan Shebs <stan@codesourcery.com>
7380
7381 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7382 (ax.o): Add it to build rule.
7383 (ax-ipa.o): Ditto.
7384 (OBS): Add format.o.
7385 (IPA_OBS): Add format.o.
7386 * server.c (handle_query): Claim support for breakpoint commands.
7387 (process_point_options): Add command case.
7388 (process_serial_event): Leave running if there are printfs in
7389 effect.
7390 * mem-break.h (any_persistent_commands): Declare.
7391 (add_breakpoint_commands): Declare.
7392 (gdb_no_commands_at_breakpoint): Declare.
7393 (run_breakpoint_commands): Declare.
7394 * mem-break.c (struct point_command_list): New struct.
7395 (struct breakpoint): New field command_list.
7396 (any_persistent_commands): New function.
7397 (add_commands_to_breakpoint): New function.
7398 (add_breakpoint_commands): New function.
7399 (gdb_no_commands_at_breakpoint): New function.
7400 (run_breakpoint_commands): New function.
7401 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7402 locally.
7403 * ax.c: Include format.h.
7404 (ax_printf): New function.
7405 (gdb_eval_agent_expr): Add printf opcode.
7406
2f8f6aed
YQ
74072012-06-13 Yao Qi <yao@codesourcery.com>
7408
7409 * server.c (start_inferior): Remove duplicated writes to fields
7410 'last_resume_kind' and 'last_status' of 'current_inferior'.
7411
0c9070b3
YQ
74122012-06-12 Yao Qi <yao@codesourcery.com>
7413 Pedro Alves <palves@redhat.com>
7414
7415 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
7416 comment.
7417 * server.c (handle_v_cont): Extend comment.
7418
c52daf70
YQ
74192012-06-11 Yao Qi <yao@codesourcery.com>
7420
7421 * linux-low.c (linux_attach): Add 'static'.
7422
d38bbb0a
YQ
74232012-06-06 Yao Qi <yao@codesourcery.com>
7424
7425 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7426
89dc0afd
JK
74272012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
7428
7429 Fix gcc -flto compilation warning.
7430 * server.c (main): Make variable multi_mode and attach volatile.
7431
75f62ce7
TJB
74322012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7433
7434 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7435 if the platform doesn't know about it.
7436
65f479b6
PA
74372012-05-30 Jeff Kenton <jkenton@tilera.com>
7438
7439 * Makefile.in (SFILES): Add linux-tile-low.c.
7440 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7441 * configure.srv: Handle tilegx-*-linux*.
7442 * linux-tile-low.c: New file.
7443
0c5bf5a9
JK
74442012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7445
7446 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7447
a493e3e2
PA
74482012-05-24 Pedro Alves <palves@redhat.com>
7449
7450 PR gdb/7205
7451
43aaf8b6 7452 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 7453
2ea28649
PA
74542012-05-24 Pedro Alves <palves@redhat.com>
7455
7456 PR gdb/7205
7457
7458 Replace target_signal with gdb_signal throughout.
7459
8d409d16
MR
74602012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
7461
7462 * linux-low.c (linux_store_registers): Avoid the copying sequence
7463 when no data has been retrieved by ptrace.
7464
23512c01
MGD
74652012-05-22 Will Deacon <will.deacon@arm.com>
7466
7467 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7468 Include asm/ptrace.h.
7469 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7470 already defined.
7471
4934b29e
MR
74722012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
7473
7474 * linux-low.c (linux_store_registers): Don't re-retrieve data
7475 with ptrace that has already been obtained from /proc. Always
7476 copy any data retrieved with ptrace to the buffer supplied.
7477
bde24c0a
PA
74782012-05-11 Yao Qi <yao@codesourcery.com>
7479 Pedro Alves <palves@redhat.com>
7480
7481 * linux-low.c (enum stopping_threads_kind): New.
7482 (stopping_threads): Change type to `enum stopping_threads_kind'.
7483 (handle_extended_wait): If stopping and suspending threads, leave
7484 the new_lwp suspended too.
7485 (linux_wait_for_event): Adjust.
7486 (stop_all_lwps): Set `stopping_threads' to
7487 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7488 whether we're suspending threads or just stopping them. Assert no
7489 recursion happens.
7490
623b6bdf
YQ
74912012-04-29 Yao Qi <yao@codesourcery.com>
7492
7493 * server.h: Move some code to ...
7494 * gdbthread.h: ... here. New.
7495 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7496 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7497 (nto-low.o, win32-low.o): Likewise.
7498 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7499 * regcache.c, remote-utils.c, server.c: Likewise.
7500 * target.c, tracepoint.c, win32-low.c: Likewise.
7501
f15f9948
TJB
75022012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7503
7504 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7505 (PTRACE_ARG4_TYPE): Likewise.
7506 (PTRACE_XFER_TYPE): Likewise.
7507 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7508 ptrace to PTRACE_ARG3_TYPE.
7509 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7510 (PTRACE_ARG4_TYPE): Likewise.
7511 (PTRACE_XFER_TYPE): Likewise.
7512 (linux_detach_one_lwp): Cast fourth argument of
7513 ptrace to long then PTRACE_ARG4_TYPE.
7514 (regsets_fetch_inferior_registers): Cast third argument of
7515 ptrace to long then PTRACE_ARG3_TYPE.
7516 (regsets_store_inferior_registers): Likewise.
7517
38ea300a
PA
75182012-04-20 Pedro Alves <palves@redhat.com>
7519
7520 * configure: Regenerate.
7521
c971b7fa
PA
75222012-04-19 Pedro Alves <palves@redhat.com>
7523
43aaf8b6 7524 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 7525 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
7526 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7527 (all, install-only, uninstall, clean-info, all-lib, clean): No
7528 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
7529 (maintainer-clean realclean distclean): Use subdir_do.
7530 (subdir_do): New.
7531 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 7532 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
7533 * acinclude.m4: Include acx_configure_dir.m4.
7534 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7535 calls. Call AC_PROG_RANLIB. Configure gnulib using
7536 ACX_CONFIGURE_DIR.
7537 (GNULIB): New.
7538 (GNULIB_STDINT_H): Adjust.
7539 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7540 * gdbreplay.c: Include build-gnulib/config.h.
7541 * server.h: Likewise.
7542 * aclocal.m4: Regenerate.
7543 * config.in: Regenerate.
7544 * configure: Regenerate.
c971b7fa 7545
809277f8
PA
75462012-04-19 Pedro Alves <palves@redhat.com>
7547
7548 * Makefile.in (LIBGNU, INCGNU): Adjust.
7549 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7550 (all, install-only, uninstall, clean-info, all-lib, clean)
7551 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7552 * configure.ac: Adjust AC_OUTPUT output.
7553 * aclocal.m4: Regenerate.
7554 * configure: Regenerate.
7555
fd9bb8b8
PA
75562012-04-19 Pedro Alves <palves@redhat.com>
7557
7558 * Makefile.in (generated_files): New.
7559 (server_h): Remove the explicit dependency on config.h, and depend
7560 on $generated_files.
7561
1c298c66
PA
75622012-04-19 Pedro Alves <palves@redhat.com>
7563
7564 * Makefile.in (INCGNU): Add -Ignulib.
7565
57c4b50b
PA
75662012-04-19 Pedro Alves <palves@redhat.com>
7567
7568 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7569 (INCGNU): ... this, and spell out -I here.
7570 (GNULIB_LIB): Rename to ...
7571 (LIBGNU): ... this.
7572 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7573
1030e047
PA
75742012-04-19 Pedro Alves <palves@redhat.com>
7575
7576 * config.in: Regenerate.
7577
447d4319
PA
75782012-04-19 Pedro Alves <palves@redhat.com>
7579
7580 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7581 * server.h (memmem): Remove declaration.
7582 * config.in: Regenerate.
7583 * configure: Regenerate.
7584
aad9eab9
YQ
75852012-04-19 Yao Qi <yao@codesourcery.com>
7586
7587 * Makefile.in (SFILES): Add common/vec.c.
7588 (OBS): Add vec.o.
7589 (vec.o): New rule.
7590
3e10640f
YQ
75912012-04-19 Yao Qi <yao@codesourcery.com>
7592
7593 * remote-utils.c (prepare_resume_reply): Replace with macro
7594 target_core_of_thread.
7595 * server.c (handle_qxfer_threads_proper): Likewise.
7596 * target.h (traget_core_of_thread): New macro.
7597
71622373
PA
75982012-04-18 Pedro Alves <palves@redhat.com>
7599
7600 * aclocal.m4: Regenerate.
7601 * configure: Regenerate.
7602
80d26939
YQ
76032012-04-16 Yao Qi <yao@codesourcery.com>
7604
7605 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7606 duplicated on address.
7607
42476b70
YQ
76082012-04-16 Yao Qi <yao@codesourcery.com>
7609
7610 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7611 (struct tracepoint_action_ops) <send>: New field.
7612 (m_tracepoint_action_send, r_tracepoint_action_send): New.
7613 (agent_expr_send, x_tracepoint_action_send): New.
7614 (l_tracepoint_action_send): New.
7615 (cmd_qtdp): Download and install tracepoint
7616 according to `use_agent'.
7617 (run_inferior_command): Add one more parameter `len'.
7618 Update callers.
7619 (tracepoint_send_agent): New.
7620 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7621
7bc83639
YQ
76222012-04-16 Yao Qi <yao@codesourcery.com>
7623
7624 * tracepoint.c (download_tracepoints): Moved to ...
7625 (cmd_qtstart): ... here.
7626
5f18041e
YQ
76272012-04-14 Yao Qi <yao@codesourcery.com>
7628
7629 * tracepoint.c: Include inttypes.h.
7630 (struct collect_memory_action): Use sized types.
7631 (struct tracepoint): Likewise.
7632 (cmd_qtdp, stop_tracing): Update print specifiers.
7633 (cmd_qtp, response_tracepoint): Likewise.
7634 (collect_data_at_tracepoint): Likewise.
7635 (collect_data_at_step): Likewise.
7636
55a8c076
YQ
76372012-04-14 Yao Qi <yao@codesourcery.com>
7638
7639 Import gnulib module inttypes.
7640 * aclocal.m4, config.in, configure: Regenerated.
7641
dc750257
YQ
76422012-04-14 Yao Qi <yao@codesourcery.com>
7643
7644 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7645 Makefile and config.status at last.
7646
0ab5faf9
YQ
76472012-04-13 Yao Qi <yao@codesourcery.com>
7648
7649 * tracepoint.c: Include stdint.h unconditionally.
7650
18f5fd81
TJB
76512012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7652
7653 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7654 on BFD_HAVE_SYS_PROCFS_TYPE.
7655 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7656 * configure: Regenerate.
7657 * config.in: Likewise.
7658
4d47af5c
L
76592012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7660
7661 * Makefile.in (clean): Also remove x32.c x32-linux.c
7662 x32-avx.c x32-avx-linux.c.
7663 (x32.o): New target.
7664 (x32.c): Likewise.
7665 (x32-linux.o): Likewise.
7666 (x32-linux.c): Likewise.
7667 (x32-avx.o): Likewise.
7668 (x32-avx.c): Likewise.
7669 (x32-avx-linux.o): Likewise.
7670 (x32-avx-linux.c): Likewise.
7671
7672 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7673 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7674 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7675 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7676 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7677 i386/x32-avx-linux.xml.
7678
7679 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7680 (init_registers_x32_avx_linux): Likwise.
7681 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7682 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7683
ecedbe58
PA
76842012-04-13 Pedro Alves <palves@redhat.com>
7685
7686 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7687 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7688 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7689 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7690 the sub-make.
7691
c92b5177
L
76922012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7693
7694 * linux-x86-low.c (compat_x32_clock_t): New.
7695 (compat_x32_siginfo_t): Likewise.
7696 (compat_x32_siginfo_from_siginfo): Likewise.
7697 (siginfo_from_compat_x32_siginfo): Likewise.
7698 (linux_is_elf64): Likewise.
7699 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7700 and siginfo_from_compat_x32_siginfo for x32.
7701 (x86_arch_setup): Set linux_is_elf64.
7702
214d508e
L
77032012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7704
7705 PR gdb/13969
7706 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7707 e_machine field.
7708 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7709 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7710 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7711 compatible with process.
7712
c9a1864a
YQ
77132012-04-12 Yao Qi <yao@codesourcery.com>
7714
7715 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7716 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7717 (install-only, install-info, clean): Handle sub dir gnulib.
7718 (all-lib, am--refresh): New targets.
7719 (memmem.o): Remove target.
7720 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7721 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7722 (AC_REPLACE_FUNCS): Remove memmem.
7723 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7724 (AC_OUTPUT): Generate Makefile in gnulib/.
7725 * aclocal.m4, config.in, configure: Regenerated.
7726
367ba2c2
MR
77272012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7728
7729 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7730
9d236627
PA
77312012-04-05 Pedro Alves <palves@redhat.com>
7732
7733 -Werror=strict-aliasing
7734
7735 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7736 pointer.
7737
111217b3
PA
77382012-04-04 Pedro Alves <palves@redhat.com>
7739
7740 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7741 (sparc_store_gregset_from_stack, sparc_store_gregset)
7742 (sparc_breakpoint_at): Fix formatting.
7743
8365dcf5
TJB
77442012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7745
7746 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7747 are available.
7748 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7749 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7750 * config.in: Regenerate.
7751 * configure: Likewise.
7752
689cc2ae
PA
77532012-03-29 Pedro Alves <palves@redhat.com>
7754
7755 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7756 Correct ptrace arguments.
7757
c14dfd32
PA
77582012-03-28 Pedro Alves <palves@redhat.com>
7759
7760 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7761 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7762 (IA64_FR1_REGNUM): New defines.
7763 (ia64_fetch_register): New.
7764 (the_low_target): Install it.
7765 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7766 field.
7767 * linux-low.c (linux_fetch_registers): Try the
7768 the_low_target.fetch_register hook first.
7769
7770 * linux-arm-low.c (the_low_target): Adjust.
7771 * linux-bfin-low.c (the_low_target): Adjust.
7772 * linux-cris-low.c (the_low_target): Adjust.
7773 * linux-crisv32-low.c (the_low_target): Adjust.
7774 * linux-m32r-low.c (the_low_target): Adjust.
7775 * linux-m68k-low.c (the_low_target): Adjust.
7776 * linux-mips-low.c (the_low_target): Adjust.
7777 * linux-ppc-low.c (the_low_target): Adjust.
7778 * linux-s390-low.c (the_low_target): Adjust.
7779 * linux-sh-low.c (the_low_target): Adjust.
7780 * linux-sparc-low.c (the_low_target): Adjust.
7781 * linux-tic6x-low.c (the_low_target): Adjust.
7782 * linux-x86-low.c (the_low_target): Adjust.
7783 * linux-xtensa-low.c (the_low_target): Adjust.
7784
63c88e13
PA
77852012-03-26 Pedro Alves <palves@redhat.com>
7786
7787 * server.c (handle_qxfer_libraries): Don't bail early if
7788 the_target->qxfer_libraries_svr4 is not NULL.
7789
fb723180
PA
77902012-03-26 Pedro Alves <palves@redhat.com>
7791
7792 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7793
0afae3cf
PA
77942012-03-23 Pedro Alves <palves@redhat.com>
7795
7796 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7797 "library-list-svr4" element's start tag when the the DSO list is
7798 empty.
7799
485f1ee4
PA
78002012-03-23 Pedro Alves <palves@redhat.com>
7801
7802 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7803 a variable whose type size is the same as the inferior's pointer
7804 size.
7805
a5362b9a
TS
78062012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7807
7808 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7809 struct siginfo.
7810 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7811 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7812 * linux-low.h: Include <signal.h>.
7813 (struct siginfo): Remove forward declaration.
7814 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7815 struct siginfo.
7816
d226c142
MF
78172012-03-21 Mike Frysinger <vapier@gentoo.org>
7818
7819 * .gitignore: Ignore more files.
7820
122f36ef
PA
78212012-03-19 Pedro Alves <palves@redhat.com>
7822 Jan Kratochvil <jan.kratochvil@redhat.com>
7823
7824 * server.c (cont_thread, general_thread): Add describing comments.
7825 (start_inferior): Clear `cont_thread'.
7826 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7827 of a process.
7828
fc3e5175
YQ
78292012-03-15 Yao Qi <yao@codesourcery.com>
7830
7831 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7832 handling to ...
7833 (cmd_qtdp): ... here.
7834
8d0d92cd
YQ
78352012-03-15 Yao Qi <yao@codesourcery.com>
7836
7837 * tracepoint.c (struct tracepoint_action_ops): New.
7838 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7839 (m_tracepoint_action_download): New.
7840 (r_tracepoint_action_download): New.
7841 (x_tracepoint_action_download): New.
7842 (l_tracepoint_action_download): New.
7843 (add_tracepoint_action): Install `action->ops' according type.
7844 (download_tracepoint_1): Move code `download' function pointer
7845 of various tracepoint_action_ops.
7846
87b0bb13
JK
78472012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7848
7849 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7850 linux_ptrace_attach_warnings.
7851
5f572dec
JK
78522012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7853
7854 * Makefile.in (linux-ptrace.o): New.
7855 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7856 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7857 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7858 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7859 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7860 of these targets.
7861 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7862
f4647387
YQ
78632012-03-08 Yao Qi <yao@codesourcery.com>
7864 Pedro Alves <palves@redhat.com>
7865
7866 Fix PR server/13392.
7867 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7868 offset of JMP insn.
7869 * tracepoint.c (remove_tracepoint): New.
7870 (cmd_qtdp): Call remove_tracepoint when failed to install.
7871
9b224c5e
PA
78722012-03-07 Pedro Alves <palves@redhat.com>
7873
7874 * linux-low.c (get_detach_signal): New.
7875 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7876 Pass on pending signals to PTRACE_DETACH. Check the result of the
7877 ptrace call.
7878 * server.c (program_signals, program_signals_p): New.
7879 (handle_general_set): Handle QProgramSignals.
7880 * server.h (program_signals, program_signals_p): Declare.
7881
e237a7e2
JK
78822012-03-05 Pedro Alves <palves@redhat.com>
7883 Jan Kratochvil <jan.kratochvil@redhat.com>
7884
7885 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7886 New comment why.
7887
5808517f
YQ
78882012-03-03 Yao Qi <yao@codesourcery.com>
7889
7890 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7891 agent_look_up_symbols.
7892
58b4daa5
YQ
78932012-03-03 Yao Qi <yao@codesourcery.com>
7894
7895 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7896 (linux-x86-low.o): Likewise.
7897 * server.h: Remove in_process_agent_loaded.
7898 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7899 common/agent.c.
7900 Update callers.
7901
8ffcbaaf
YQ
79022012-03-03 Yao Qi <yao@codesourcery.com>
7903
7904 * tracepoint.c (gdb_agent_capability): New global.
7905 (in_process_agent_loaded_ust): Renamed to
7906 `in_process_agent_supports_ust'.
7907 Update callers.
7908 (in_process_agent_supports_ust): Call agent_capability_check.
7909 (clear_installed_tracepoints): Assert that agent supports
7910 agent.
7911
d1feda86
YQ
79122012-03-03 Yao Qi <yao@codesourcery.com>
7913
7914 * linux-low.c (linux_supports_agent): New.
7915 (linux_target_ops): Initialize field `supports_agent' with
7916 linux_supports_agent.
7917 * target.h (struct target_ops) <supports_agent>: New.
7918 (target_supports_agent): New macro.
7919 * server.c (handle_general_set): Handle packet 'QAgent'.
7920 (handle_query): Send `QAgent+'.
7921 * Makefile.in (server.o): Depends on agent.h.
7922
2fa291ac
YQ
79232012-03-03 Yao Qi <yao@codesourcery.com>
7924
7925 * Makefile.in (OBS): Add agent.o.
7926 Add new rule for agent.o.
7927 Track dependence of tracepoint.c on agent.h.
7928 * tracepoint.c (run_inferior_command_1):
7929 (run_inferior_command): Call agent_run_command.
7930 (gdb_ust_connect_sync_socket): Deleted. Move it to
7931 common/agent.c.
7932 (resume_thread, stop_thread): Likewise.
7933 (gdb_ust_socket_init): Renamed to ...
7934 (gdb_agent_socket_init): ... New.
7935 (gdb_ust_thread): Renamed to ...
7936 (gdb_agent_helper_thread): ... New.
7937 (gdb_ust_init): Move some code to ...
7938 (gdb_agent_init): ... here. New.
7939 [HAVE_UST]: Call gdb_ust_init.
7940 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7941 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7942 * config.in, configure: Regenerated.
7943
05044653
PA
79442012-03-02 Pedro Alves <palves@redhat.com>
7945
7946 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7947 * linux-low.c (struct simple_pid_list): New.
7948 (stopped_pids): New a struct simple_pid_list pointer.
7949 (add_to_pid_list, pull_pid_from_list): New.
7950 (handle_extended_wait): Don't assume the first signal new children
7951 report is SIGSTOP. Adjust call to pull_pid_from_list.
7952 (linux_wait_for_lwp): Adjust.
7953
8d00225b
YQ
79542012-03-02 Yao Qi <yao@codesourcery.com>
7955
7956 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7957 debug log.
7958
19560ba5
YQ
79592012-03-02 Yao Qi <yao@codesourcery.com>
7960
7961 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7962 `stop_pc' and `tpoint'. Update caller.
7963
1faeff08
MR
79642012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7965
7966 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7967 * linux-low.c (use_linux_regsets): New macro.
7968 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7969 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7970 (linux_register_in_regsets): New function.
7971 (usr_fetch_inferior_registers): Skip registers covered by
7972 regsets.
7973 (usr_store_inferior_registers): Likewise.
7974 (usr_fetch_inferior_registers): New macro.
7975 (usr_store_inferior_registers): Likewise.
7976 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7977 (linux_store_registers): Likewise.
7978 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7979 prototype.
7980 (init_registers_mips64_dsp_linux): Likewise.
7981 (init_registers_mips_linux): New macro.
7982 (init_registers_mips_dsp_linux): Likewise.
7983 (mips_dsp_num_regs): Likewise.
7984 (DSP_BASE, DSP_CONTROL): New fallback macros.
7985 (mips_base_regs): New macro.
7986 (mips_regmap): Use it. Fix the size.
7987 (mips_dsp_regmap): New variable.
7988 (mips_dsp_regset_bitmap): Likewise.
7989 (mips_arch_setup): New function.
7990 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7991 than mips_regmap.
7992 (mips_cannot_store_register): Likewise.
7993 (the_low_target): Update .arch_setup, .num_regs and .regmap
7994 initializers. Add .regset_bitmap initializer.
7995 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7996 initializer.
7997 * linux-bfin-low.c (the_low_target): Likewise.
7998 * linux-cris-low.c (the_low_target): Likewise.
7999 * linux-crisv32-low.c (the_low_target): Likewise.
8000 * linux-ia64-low.c (the_low_target): Likewise.
8001 * linux-m32r-low.c (the_low_target): Likewise.
8002 * linux-m68k-low.c (the_low_target): Likewise.
8003 * linux-ppc-low.c (the_low_target): Likewise.
8004 * linux-s390-low.c (the_low_target): Likewise.
8005 * linux-sh-low.c (the_low_target): Likewise.
8006 * linux-sparc-low.c (the_low_target): Likewise.
8007 * linux-tic6x-low.c (the_low_target): Likewise.
8008 * linux-x86-low.c (the_low_target): Likewise.
8009 * linux-xtensa-low.c (the_low_target): Likewise.
8010 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8011 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
8012 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8013 srv_xmlfiles.
8014 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8015 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8016
c03e6ccc
YQ
80172012-02-29 Yao Qi <yao@codesourcery.com>
8018 Pedro Alves <palves@redhat.com>
8019
8020 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8021 `step_over_finished' is true.
8022
644cebc9
PA
80232012-02-27 Pedro Alves <palves@redhat.com>
8024
8025 * linux-low.c (pid_is_stopped): Delete, moved to common/.
8026 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8027
c14d7ab2
PA
80282012-02-27 Pedro Alves <palves@redhat.com>
8029
8030 PR server/9684
8031 * linux-low.c (pid_is_stopped): New.
8032 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8033
412c89dd
LM
80342012-02-25 Luis Machado <lgustavo@codesourcery.com>
8035
8036 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8037 of conditions.
8038
b745defe
MR
80392012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
8040
8041 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8042
9f3a5c85
LM
80432012-02-24 Luis Machado <lgustavo@codesourcery>
8044
8045 * server.c (handle_query): Advertise support for target-side
8046 breakpoint condition evaluation.
8047 (process_point_options): New function.
8048 (process_serial_event): When inserting a breakpoint, check for
8049 a target-side condition that should be evaluated.
8050
8051 * mem-break.c: Include regcache.h and ax.h.
8052 (point_cond_list_t): New data structure.
8053 (breakpoint) <cond_list>: New field.
8054 (find_gdb_breakpoint_at): Make non-static.
8055 (delete_gdb_breakpoint_at): Clear any target-side
8056 conditions.
8057 (clear_gdb_breakpoint_conditions): New function.
8058 (add_condition_to_breakpoint): Likewise.
8059 (add_breakpoint_condition): Likewise.
8060 (gdb_condition_true_at_breakpoint): Likewise.
8061 (gdb_breakpoint_here): Return result directly instead
8062 of going through a local variable.
8063
8064 * mem-break.h (find_gdb_breakpoint_at): New prototype.
8065 (clear_gdb_breakpoint_conditions): Likewise.
8066 (add_breakpoint_condition): Likewise.
8067 (gdb_condition_true_at_breakpoint): Likewise.
8068
8069 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8070 (need_step_over_p): Take target-side breakpoint condition into
8071 consideration.
8072
5e1dc496
LM
80732012-02-24 Luis Machado <lgustavo@codesourcery>
8074
8075 * server.h: Include tracepoint.h.
8076 (agent_mem_read, agent_get_trace_state_variable_value,
8077 agent_set_trace_state_variable_value,
8078 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8079 get_set_tsv_func_addr): New prototypes.
8080
8081 * ax.h: New include file.
8082 * ax.c: New source file.
8083
8084 * tracepoint.c: Include ax.h.
8085 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8086 agent_expr, eval_result_type): Move to ax.h.
8087 (parse_agent_expr): Rename to ...
8088 (gdb_parse_agent_expr): ... this, make it non-static and move
8089 to ax.h.
8090 (unparse_agent_expr) Rename to ...
8091 (gdb_unparse_agent_expr): ... this, make it non-static and move
8092 to ax.h.
8093 (eval_agent_expr): Rename to ...
8094 (eval_tracepoint_agent_expr): ... this.
8095 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8096 forward declarations.
8097 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8098 (agent_get_trace_state_variable_value): New function.
8099 (agent_set_trace_state_variable_value): New function.
8100 (cmd_qtdp): Call gdb_parse_agent_expr (...).
8101 (response_tracepoint): Call gdb_unparse_agent_expr (...).
8102 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8103 (condition_true_at_tracepoint): Likewise.
8104 (parse_agent_expr): Rename to ...
8105 (gdb_parse_agent_expr): ... this and move to ax.c.
8106 (unparse_agent_expr): Rename to ...
8107 (gdb_unparse_agent_expr): ... this and move to ax.c.
8108 (gdb_agent_op_name): Move to ax.c.
8109 (eval_agent_expr): Rename to ...
8110 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8111 and move to ax.c.
8112 (eval_tracepoint_agent_expr): New function.
8113 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 8114 non-static.
5e1dc496
LM
8115 (current_insn_ptr, emit_error, struct bytecode_address): Move to
8116 ax.c.
8117 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8118 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8119 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8120 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8121 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8122 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8123 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8124 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8125 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8126 (compile_bytecodes): Remove forward declaration.
8127 (is_goto_target): Move to ax.c.
8128 (compile_bytecodes): Move to ax.c and call
8129 agent_get_trace_state_variable_value (...) and
8130 agent_set_trace_state_variable_value (...).
8131
8132 * Makefile.in: Update ax.c and IPA dependencies.
8133
277e4e52
PA
81342012-02-24 Pedro Alves <palves@redhat.com>
8135
8136 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8137 (cmd_bigqtbuffer_circular): ... this. Only handle
8138 'QTBuffer:circular:'.
8139 (handle_tracepoint_general_set): Adjust.
8140
bf4c19f7
YQ
81412012-02-16 Yao Qi <yao@codesourcery.com>
8142
8143 * inferiors.c: Move code to ...
8144 * dll.c: .... here. New.
8145 * server.h: Declare clear_dlls.
8146 * Makefile.in (SFILES): Add dll.c.
8147 (OBS): Add dll.o
8148 (dll.o): New rule.
8149
d73f2619
YQ
81502012-02-11 Yao Qi <yao@codesourcery.com>
8151
8152 * server.c: (handle_monitor_command): Add a new parameter
8153 `own_buf'.
8154 (handle_query): Update caller.
8155
f8255c2a
JB
81562012-02-09 Joel Brobecker <brobecker@adacore.com>
8157
8158 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8159 * configure, config.in: Regenerate.
8160 * hostio.c: Provide an alternate implementation if HAVE_READLINK
8161 is not defined.
8162
da84f473
PA
81632012-02-02 Pedro Alves <palves@redhat.com>
8164
8165 Try SIGKILL first, then PTRACE_KILL.
8166 * linux-low.c (linux_kill_one_lwp): New.
8167 (linux_kill_one_lwp): Rename to ...
8168 (kill_one_lwp_callback): ... this. Use the new
8169 linux_kill_one_lwp.
8170
e886a173
PA
81712012-02-02 Pedro Alves <palves@redhat.com>
8172
8173 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8174 inferior.
8175
be07f1a2
PA
81762012-01-27 Pedro Alves <palves@redhat.com>
8177
8178 * linux-low.c (linux_child_pid_to_exec_file): Delete.
8179 (elf_64_file_p): Make static.
8180 (linux_pid_exe_is_elf_64_file): New.
8181 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8182 Delete declarations.
8183 (linux_pid_exe_is_elf_64_file): Declare.
8184 * linux-x86-low.c (x86_arch_setup): Use
8185 linux_pid_exe_is_elf_64_file.
8186
d8301ad1
JK
81872012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8188
8189 * linux-low.c (linux_wait_for_event_1): Rename to ...
8190 (linux_wait_for_event): ... here and merge it with former
8191 linux_wait_for_event - new variable wait_ptid, use it.
8192 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8193
01b17894
PA
81942012-01-23 Pedro Alves <palves@redhat.com>
8195
8196 * server.c (main): Avoid yet another case of infinite loop while
8197 detaching/killing after a longjmp.
8198
e825046f
JK
81992012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
8200
8201 Code cleanup.
8202 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8203
b9e7b9c3
UW
82042012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
8205
8206 * hostio.c (handle_readlink): New function.
8207 (handle_vFile): Call it to handle "vFile:readlink" packets.
8208
901f9912
UW
82092012-01-20 Pedro Alves <palves@redhat.com>
8210 Ulrich Weigand <ulrich.weigand@linaro.org>
8211
8212 * server.c (handle_v_requests): Only support vAttach and vRun to
8213 start multiple processes when in extended protocol mode.
8214
fc1ab1a0
PA
82152012-01-17 Pedro Alves <palves@redhat.com>
8216
8217 * tracepoint.c (initialize_tracepoint): Use mmap instead of
8218 memalign plus mprotect to allocate the scratch buffer.
8219
7d5d4e98
PA
82202012-01-13 Pedro Alves <palves@redhat.com>
8221
8222 * server.c (attach_inferior): Clear `cont_thread'.
8223
f128d5e9
PA
82242012-01-13 Pedro Alves <palves@redhat.com>
8225
8226 * server.c (main): Avoid infinite loop while detaching/killing
8227 after a longjmp.
8228
06db92f0
DE
82292012-01-09 Doug Evans <dje@google.com>
8230
8231 * server.c (start_inferior): Set last_ptid in --wrapper case.
8232
32d92999
YQ
82332012-01-06 Yao Qi <yao@codesourcery.com>
8234
8235 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8236 defined.
8237 [IN_PROCESS_AGENT] (debug_agent): New global variable.
8238
5e0a92a9
YQ
82392012-01-04 Yao Qi <yao@codesourcery.com>
8240
8241 * tracepoint.c (cmd_qtdp): Print debug message
8242 for static tracepoint.
8243
ae639e8c
YQ
82442012-01-04 Yao Qi <yao@codesourcery.com>
8245
8246 * tracepoint.c (trace_vdebug): Differentiate debug message
8247 between gdbserver and IPA.
8248
f72429c5
YQ
82492012-01-03 Yao Qi <yao@codesourcery.com>
8250
8251 * tracepoint.c (tracepoint_was_hit): Don't collect for
8252 static tracepoint.
8253
12c3e59c
JB
82542012-01-02 Joel Brobecker <brobecker@adacore.com>
8255
8256 * terminal.h: Reformat copyright header.
8257
67827812
JB
82582012-01-02 Joel Brobecker <brobecker@adacore.com>
8259
8260 * server.c (gdbserver_version): Update copyright year.
8261 * gdbreplay.c (gdbreplay_version): Likewise.
8262
3e52c33d
JK
82632011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
8264
8265 * linux-low.c (linux_create_inferior): Put empty if clause for write.
8266
8267 Revert:
8268 2011-12-18 Hui Zhu <teawater@gmail.com>
8269 * linux-low.c (linux_create_inferior): Save return value to ret.
8270
66f1260e
HZ
82712011-12-18 Hui Zhu <teawater@gmail.com>
8272
8273 * linux-low.c (linux_create_inferior): Save return value to ret.
8274
e77616d7
DE
82752011-12-16 Doug Evans <dje@google.com>
8276
e7b06c57
DE
8277 * linux-low.c (linux_create_inferior): If stdio connection,
8278 redirect stdin from /dev/null, stdout to stderr.
8279 * remote-utils.c (remote_is_stdio): New static global.
8280 (remote_connection_is_stdio): New function.
8281 (remote_prepare): Handle stdio connection.
8282 (remote_open): Ditto.
8283 (remote_close): Don't close stdin for stdio connections.
8284 (read_prim,write_prim): New functions. Replace all calls to
8285 read/write to these.
8286 * server.c (main): Watch for "-" argument. Move call to
8287 remote_prepare before start_inferior.
8288 * server.h (STDIO_CONNECTION_NAME): New macro.
8289 (remote_connection_is_stdio): Declare.
8290
e77616d7
DE
8291 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8292 in debugging output.
8293
82067193
YQ
82942011-12-15 Yao Qi <yao@codesourcery.com>
8295
8296 * tracepoint.c: Include sys/syscall.h.
8297 (gdb_ust_thread): Remove preprocessor conditional.
8298
82bfbe7e
PA
82992011-12-14 Pedro Alves <pedro@codesourcery.com>
8300
8301 * linux-low.c (linux_detach_one_lwp): Call
8302 the_low_target.prepare_to_resume before detaching.
8303
712c6575
YQ
83042011-12-14 Yao Qi <yao@codesourcery.com>
8305
8306 * tracepoint.c (gdb_ust_thread): Don't ignore return value
8307 of write.
8308
d54d1edf
YQ
83092011-12-14 Yao Qi <yao@codesourcery.com>
8310
8311 * i386-low.c (i386_low_stopped_data_address): Initialize local
8312 variable `control'.
8313
6210a125
PA
83142011-12-13 Pedro Alves <pedro@codesourcery.com>
8315
8316 PR remote/13492
8317
8318 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8319 DR_CONTROL unless necessary. Extend comments.
8320 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8321 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
8322
2ece8244
YQ
83232011-12-13 Yao Qi <yao@codesourcery.com>
8324
8325 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8326 macros.
8327 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8328
784867a5
JK
83292011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
8330
8331 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8332 Print new debug message for such case.
8333
6bf36717
JK
83342011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8335
8336 Fix overlapping memcpy.
8337 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
8338 the read_inferior_memory transfer.
8339 (delete_fast_tracepoint_jump): New variable buf. Use it for the
8340 write_inferior_memory transfer.
8341 (set_fast_tracepoint_jump): New variable buf. Use it for the
8342 read_inferior_memory and write_inferior_memory transfers.
8343 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8344 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8345 Use it for the write_inferior_memory transfer.
8346 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8347 buffers.
8348
50275556
MR
83492011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8350
8351 * linux-low.c (fetch_register, store_register): Make code
8352 consistent, fix formatting.
8353
7325beb4
MR
83542011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
8355
8356 * linux-low.c (usr_store_inferior_registers): Factor out code
8357 to handle individual registers into...
8358 (store_register): ... this new function.
8359
c642a434
UW
83602011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
8361
8362 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8363 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8364 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8365 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8366 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8367 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8368 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8369 (srv_xmlfiles): Add new XML files.
8370
8371 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8372 and <sys/uio.h>.
8373 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8374 (init_registers_s390_linux32v1): Add prototype.
8375 (init_registers_s390_linux32v2): Likewise.
8376 (init_registers_s390_linux64v1): Likewise.
8377 (init_registers_s390_linux64v2): Likewise.
8378 (init_registers_s390x_linux64v1): Likewise.
8379 (init_registers_s390x_linux64v2): Likewise.
8380 (s390_num_regs): Increment to 52.
8381 (s390_regmap): Add orig_r2 register.
8382 (s390_num_regs_3264): Increment to 68.
8383 (s390_regmap_3264): Add orig_r2 register.
8384 (s390_collect_ptrace_register): Handle orig_r2 register.
8385 (s390_supply_ptrace_register): Likewise.
8386 (s390_fill_last_break): New function.
8387 (s390_store_last_break): Likewise.
8388 (s390_fill_system_call): New function.
8389 (s390_store_system_call): Likewise.
8390 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8391 register sets.
8392 (s390_check_regset): New function.
8393 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8394 NT_S390_SYSTEM_CALL regsets and use appropriate description.
8395 Update target_regsets for available register sets.
8396
2268b414
JK
83972011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
8398 Jan Kratochvil <jan.kratochvil@redhat.com>
8399
8400 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8401 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8402 New.
8403 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8404 * linux-low.h (struct process_info_private): New member r_debug.
8405 * server.c (handle_qxfer_libraries): Call
8406 the_target->qxfer_libraries_svr4.
8407 (handle_qxfer_libraries_svr4): New function.
8408 (qxfer_packets): New entry "libraries-svr4".
8409 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8410 * target.h (struct target_ops): New member qxfer_libraries_svr4.
8411 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8412 PACKET_qXfer_libraries_svr4.
8413
d6db1fab
UW
84142011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
8415
8416 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8417 PSW address/mask between 8-byte and 16-byte formats.
8418 (s390_supply_ptrace_register): Likewise.
8419 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8420 basic addressing mode bit.
8421
242f5f1c
SS
84222011-11-24 Stan Shebs <stan@codesourcery.com>
8423
8424 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8425
f196051f
SS
84262011-11-17 Stan Shebs <stan@codesourcery.com>
8427
8428 * tracepoint.c (struct tracepoint): New field traceframe_usage.
8429 (tracing_start_time): New global.
8430 (tracing_stop_time): New global.
8431 (tracing_user_name): New global.
8432 (tracing_notes): New global.
8433 (tracing_stop_note): New global.
8434 (cmd_qtstart): Set traceframe_usage, start_time.
8435 (stop_tracing): Set stop_time.
8436 (cmd_qtstatus): Report additional status.
8437 (cmd_qtp): New function.
8438 (handle_tracepoint_query): Call it.
8439 (cmd_qtnotes): New function.
8440 (handle_tracepoint_general_set): Call it.
8441 (get_timestamp): Rename from tsv_get_timestamp.
8442
405f8e94
SS
84432011-11-14 Stan Shebs <stan@codesourcery.com>
8444 Kwok Cheung Yeung <kcy@codesourcery.com>
8445
8446 * linux-x86-low.c (small_jump_insn): New.
8447 (i386_install_fast_tracepoint_jump_pad): Add arguments for
8448 trampoline and error message, build a trampoline and issue a small
8449 jump instruction to it.
8450 (x86_install_fast_tracepoint_jump_pad): Add arguments for
8451 trampoline and error message.
8452 (x86_get_min_fast_tracepoint_insn_len): New.
8453 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8454 * linux-low.h (struct linux_target_ops): Add arguments to
8455 install_fast_tracepoint_jump_pad operation, add new operation.
8456 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8457 arguments.
8458 (linux_get_min_fast_tracepoint_insn_len): New function.
8459 (linux_target_op): Add new operation.
8460 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8461 (gdb_trampoline_buffer_end): Ditto.
8462 (gdb_trampoline_buffer_error): Ditto.
8463 (struct ipa_sym_addresses): Add fields for new IPA variables.
8464 (symbol_list): Add entries for new IPA variables.
8465 (struct tracepoint): Add fields to hold the address range of the
8466 trampoline used by the tracepoint.
8467 (trampoline_buffer_head): New static variable.
8468 (trampoline_buffer_tail): Ditto.
8469 (claim_trampoline_space): New function.
8470 (have_fast_tracepoint_trampoline_buffer): New function.
8471 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8472 structure.
8473 (install_fast_tracepoint): Ditto, also add error buffer argument.
8474 (cmd_qtminftpilen): New function.
8475 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8476 (fast_tracepoint_from_trampoline_address): New function.
8477 (fast_tracepoint_collecting): Handle trampoline as part of jump
8478 pad space.
8479 (set_trampoline_buffer_space): New function.
8480 (initialize_tracepoint): Initialize new IPA variables.
8481 * target.h (struct target_ops): Add arguments to
8482 install_fast_tracepoint_jump_pad operation, add new
8483 get_min_fast_tracepoint_insn_len operation.
8484 (target_get_min_fast_tracepoint_insn_len): New.
8485 (install_fast_tracepoint_jump_pad): Add arguments.
8486 * server.h (IPA_BUFSIZ): Define.
8487 * linux-i386-ipa.c: Include extra header files.
8488 (initialize_fast_tracepoint_trampoline_buffer): New function.
8489 (initialize_low_tracepoint): Call it.
8490 * server.h (set_trampoline_buffer_space): Declare.
8491 (claim_trampoline_space): Ditto.
8492 (have_fast_tracepoint_trampoline_buffer): Ditto.
8493
1e4d1764
YQ
84942011-11-14 Yao Qi <yao@codesourcery.com>
8495
8496 * server.c (handle_query): Handle InstallInTrace for qSupported.
8497 * tracepoint.c (add_tracepoint): Sort list.
8498 (install_tracepoint, download_tracepoint): New.
8499 (cmd_qtdp): Call them to install and download tracepoints.
8500 (sort_tracepoints): Removed.
8501 (cmd_qtstart): Update.
8502
5c73ff4e
YQ
85032011-11-14 Yao Qi <yao@codesourcery.com>
8504
8505 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8506 * mem-break.h: Declare.
8507 * tracepoint.c (cmd_qtstart): Move some code to ...
8508 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8509 New.
8510 (download_tracepoints): Move some code to ...
8511 (download_tracepoint_1): ... here. New.
8512
86a30030
YQ
85132011-11-08 Yao Qi <yao@codesourcery.com>
8514
8515 * remote-utils.c (relocate_instruction): A comment fix.
8516
8d26e50c
JB
85172011-11-07 Joel Brobecker <brobecker@adacore.com>
8518
8519 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8520 (i386_dr_low_get_control, i386_dr_low_get_status): Use
8521 dr_status_mirror and dr_control_mirror from debug_reg_state.
8522 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8523 (i386_initial_stuff): Remove use of deleted globals.
8524 (i386_get_thread_context, i386_set_thread_context,
8525 i386_thread_added): Use dr_status_mirror and dr_control_mirror
8526 from debug_reg_state.
8527
a59306a3
YQ
85282011-11-05 Yao Qi <yao@codesourcery.com>
8529
8530 * tracepoint.c (gdb_collect): Loop over tracepoints of same
8531 address as TPOINT's.
8532
3065dfb6
SS
85332011-11-02 Stan Shebs <stan@codesourcery.com>
8534
8535 * tracepoint.c (agent_mem_read_string): New function.
8536 (eval_agent_expr): Call it for tracenz.
8537 * server.c (handle_query): Report support for tracenz.
8538
fd0d8c7c
YQ
85392011-11-02 Yao Qi <yao@codesourcery.com>
8540
8541 * tracepoint.c (cmd_qtstart): Remove unused local variables.
8542
609086b1
YQ
85432011-11-02 Yao Qi <yao@codesourcery.com>
8544
8545 * target.h: Fix a typo in comment.
8546
b9fd1791
PA
85472011-10-31 Pedro Alves <pedro@codesourcery.com>
8548
8549 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
8550 clobber the breakpoints' shadows with fast tracepoint jumps.
8551 * mem-break.h (check_mem_write): Add `myaddr' parameter.
8552 * target.c (write_inferior_memory): Also pass MYADDR down to
8553 check_mem_write.
8554
03583c20
UW
85552011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
8556
8557 * configure.ac: Check support for personality routine.
8558 * configure: Regenerate.
8559 * config.in: Likewise.
8560 * linux-low.c: Include <sys/personality.h>.
8561 Define ADDR_NO_RANDOMIZE if necessary.
8562 (linux_create_inferior): Disable address space randomization when
8563 forking inferior, if requested.
8564 (linux_supports_disable_randomization): New function.
8565 (linux_target_ops): Install it.
8566 * server.h (disable_randomization): Declare.
8567 * server.c (disable_randomization): New global variable.
8568 (handle_general_set): Handle QDisableRandomization.
8569 (handle_query): Likewise for qSupported.
8570 (main): Support --disable-randomization and --no-disable-randomization
8571 command line arguments.
8572 * target.h (struct target_ops): Add supports_disable_randomization.
8573 (target_supports_disable_randomization): New macro.
8574
723b724b
MF
85752011-09-29 Mike Frysinger <vapier@gentoo.org>
8576
8577 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8578 ifdef check.
8579 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8580 [!PT_GETDSBT] (target_loadmap): New definition.
8581 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8582 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8583 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8584 and PT_GETDSBT to LINUX_LOADMAP.
8585 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8586 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8587
55329a5c 85882011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
8589
8590 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8591 (arm_linux_hwbp_cap): New static variable.
8592 (arm_linux_get_hwbp_cap): Replace by ...
8593 (arm_linux_init_hwbp_cap): ... this new function.
8594 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8595 (arm_linux_get_hw_watchpoint_count): Likewise.
8596 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8597 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8598 (arm_prepare_to_resume): Use perror_with_name instead of error.
8599
55329a5c 86002011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
8601
8602 * linux-arm-low.c: Include <signal.h>.
8603 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8604 (struct arm_linux_hwbp_cap): New data type.
8605 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8606 (struct arm_linux_hw_breakpoint): New data type.
8607 (MAX_BPTS, MAX_WPTS): Define.
8608 (struct arch_process_info, struct arch_lwp_info): New data types.
8609 (arm_linux_get_hwbp_cap): New function.
8610 (arm_linux_get_hw_breakpoint_count): Likewise.
8611 (arm_linux_get_hw_watchpoint_count): Likewise.
8612 (arm_linux_get_hw_watchpoint_max_length): Likewise.
8613 (arm_hwbp_control_initialize): Likewise.
8614 (arm_hwbp_control_is_enabled): Likewise.
8615 (arm_hwbp_control_is_initialized): Likewise.
8616 (arm_hwbp_control_disable): Likewise.
8617 (arm_linux_hw_breakpoint_equal): Likewise.
8618 (arm_linux_hw_point_initialize): Likewise.
8619 (struct update_registers_data): New data structure.
8620 (update_registers_callback: New function.
8621 (arm_insert_point): Likewise.
8622 (arm_remove_point): Likewise.
8623 (arm_stopped_by_watchpoint): Likewise.
8624 (arm_stopped_data_address): Likewise.
8625 (arm_new_process): Likewise.
8626 (arm_new_thread): Likewise.
8627 (arm_prepare_to_resume): Likewise.
8628 (the_low_target): Register arm_insert_point, arm_remove_point,
8629 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8630 arm_new_thread, and arm_prepare_to_resume.
8631
6b9801d4
SS
86322011-09-15 Stan Shebs <stan@codesourcery.com>
8633
8634 * server.h (struct emit_ops): Add compare-goto fields.
8635 * tracepoint.c (gdb_agent_op_sizes): New table.
8636 (emit_eq_goto): New function.
8637 (emit_ne_goto): New function.
8638 (emit_lt_goto): New function.
8639 (emit_le_goto): New function.
8640 (emit_gt_goto): New function.
8641 (emit_ge_goto): New function.
8642 (is_goto_target): New function.
8643 (compile_bytecodes): Recognize special cases of compare-goto
8644 combinations and call specialized emitters for them.
8645 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8646 (amd64_emit_ne_goto): New function.
8647 (amd64_emit_lt_goto): New function.
8648 (amd64_emit_le_goto): New function.
8649 (amd64_emit_gt_goto): New function.
8650 (amd64_emit_ge_goto): New function.
8651 (amd64_emit_ops): Add the new functions.
8652 (i386_emit_eq_goto): New function.
8653 (i386_emit_ne_goto): New function.
8654 (i386_emit_lt_goto): New function.
8655 (i386_emit_le_goto): New function.
8656 (i386_emit_gt_goto): New function.
8657 (i386_emit_ge_goto): New function.
8658 (i386_emit_ops): Add the new functions.
8659
bf15cbda
SS
86602011-09-08 Stan Shebs <stan@codesourcery.com>
8661
8662 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8663 (i386_emit_epilogue): Restore %ebx.
8664
943ca1dd
JZ
86652011-08-31 Jie Zhang <jzhang918@gmail.com>
8666
8667 * server.c (step_thread): Remove definition.
8668 (process_serial_event): Don't handle Hs.
8669 * server.h (step_thread): Remove declaration.
8670 * target.c (set_desired_inferior): Remove use of step_thread.
8671
e3deef73
LM
86722011-08-24 Luis Machado <lgustavo@codesourcery.com>
8673
8674 * linux-low.c: Include linux-procfs.h.
8675 (linux_attach_lwp_1): Update comments.
8676 (linux_attach): Scan for existing threads when attaching to a
8677 process that is the tgid.
8678 * Makefile.in: Update dependencies.
8679
13da1c97
LM
86802011-08-24 Luis Machado <lgustavo@codesourcery.com>
8681
8682 * configure.srv: Add linux-procfs.o dependencies.
8683
881127c9
YQ
86842011-08-14 Yao Qi <yao@codesourcery.com>
8685
8686 * target.h (struct target_ops): Fix indent.
8687 * win32-low.c (win32_target_ops): Fix comment.
8688
58dbd541
YQ
86892011-08-14 Andrew Jenner <andrew@codesourcery.com>
8690 Yao Qi <yao@codesourcery.com>
8691
8692 * Makefile.in (clean): Remove tic6x-*.c files.
8693 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8694 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8695 (tic6x-c64xp-linux.c): Likewise.
8696 * configure.srv: Add support for tic6x-*-uclinux.
8697 * linux-tic6x-low.c: New.
8698 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8699
78d85199
YQ
87002011-08-14 Andrew Stubbs <ams@codesourcery.com>
8701 Yao Qi <yao@codesourcery.com>
8702
8703 * target.h (struct target_ops): Add read_loadmap.
8704 * linux-low.c (struct target_loadseg): New type.
8705 (struct target_loadmap): New type.
8706 (linux_read_loadmap): New function.
8707 (linux_target_ops): Add linux_read_loadmap.
8708 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
8709 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8710 to NULL.
78d85199 8711
a959a88d
EZ
87122011-08-05 Eli Zaretskii <eliz@gnu.org>
8713
8714 * win32-low.c: Include <stdint.h>.
8715
1ced966e
PA
87162011-07-22 Pedro Alves <pedro@codesourcery.com>
8717
8718 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8719 to the inferior here.
8720 (i386_remove_aligned_watchpoint): Ditto.
8721 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8722 fit part of the watchpoint in the debug registers.
8723 (i386_update_inferior_debug_regs): New.
8724 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8725 registers, and only update the inferior on success.
8726 (i386_low_remove_watchpoint): Ditto.
8727
d26e3629
KY
87282011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8729
8730 * linux-low.c (compare_ints, unique, list_threads, show_process,
8731 linux_core_of_thread): Delete.
8732 (linux_target_ops): Change linux_core_of_thread to
8733 linux_common_core_of_thread.
8734 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8735 * utils.c (malloc_failure): Change type of argument.
8736 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8737 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8738 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8739 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8740 (IPA_OBJS): Add common-utils-ipa.o.
8741 (ptid_h, linux_osdata_h): New macros.
8742 (server_h): Add common/common-utils.h, common/xml-utils.h,
8743 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8744 common/ptid.h.
8745 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8746 ptid.o, buffer.o): New rules.
8747 (linux-low.o): Add common/linux-osdata.h as a dependency.
8748 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8749 * configure.ac: Add AC_HEADER_DIRENT check.
8750 * config.in: Regenerate.
8751 * configure: Regenerate.
8752 * remote-utils.c (xml_escape_text): Delete.
8753 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8754 buffer_xml_printf): Move to common/buffer.c.
8755 * server.c (main): Remove call to initialize_inferiors.
8756 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8757 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8758 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8759 internal_error, gdb_assert, gdb_assert_fail): Delete.
8760 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8761 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8762 common/buffer.h.
8763 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8764 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8765 initialize_inferiors): Delete.
8766
2275a1a7
PA
87672011-07-20 Pedro Alves <pedro@codesourcery.com>
8768
8769 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8770 symbol error.
8771
0a5b1e09
PA
87722011-05-31 Pedro Alves <pedro@codesourcery.com>
8773
8774 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8775 assertion.
8776 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8777
6938fd34
YQ
87782011-05-26 Yao Qi <yao@codesourcery.com>
8779
8780 * Makefile.in (thread-db.o): Track dependence to
8781 common/gdb_thread_db.h.
8782 * thread-db.c: include gdb_thread_db.h from right place.
8783
b481f9e0
TT
87842011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8785
8786 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8787 __FILE__ and __LINE__ to internal_error.
8788
98a5dd13
DE
87892011-05-13 Doug Evans <dje@google.com>
8790
8791 * thread-db.c (try_thread_db_load_from_sdir): New function.
8792 (try_thread_db_load_from_dir): New function.
8793 (thread_db_load_search): Handle $sdir, ignore $pdir.
8794 Remove trying of system directories if search of
8795 libthread-db-search-path fails, that is now done via $sdir.
8796
d248b706
KY
87972011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8798
8799 * server.c (handle_query): Add EnableDisableTracepoints to the list
8800 of supported features.
43aaf8b6 8801 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 8802 tracepoints.
43aaf8b6
PA
8803 (cmd_qtenable_disable): New.
8804 (cmd_qtstart): Install tracepoints even if disabled.
8805 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8806 receiving a QTEnable or QTDisable packet.
8807 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8808 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8809 tracepoints.
8810 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 8811
84e578fb
DE
88122011-05-10 Doug Evans <dje@google.com>
8813
8814 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8815
71f55dd8
DE
88162011-05-04 Doug Evans <dje@google.com>
8817
8818 * linux-low.c (linux_join): Skip process lookup.
8819 * spu-low.c (spu_join): Ditto.
8820 * server.c (join_inferiors_callback): Delete.
8821 (process_serial_event): For 'D' packet (detach) call join_inferior
8822 directly.
8823
4d393d60
JM
88242011-05-04 Joseph Myers <joseph@codesourcery.com>
8825
8826 * README: Don't mention xscale*-*-linux*.
8827 * configure.srv (xscale*-*-linux*): Don't handle target.
8828
b00ad6ff
NF
88292011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8830
8831 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8832 casting pointers.
8833 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8834 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8835 (i386_emit_void_call_2): Likewise.
8836
af96c192
YQ
88372011-04-26 Yao Qi <yao@codesourcery.com>
8838
43aaf8b6
PA
8839 * linux-low.c: Move common macros to linux-ptrace.h.
8840 Include linux-ptrace.h.
af96c192
YQ
8841 * Makefile.in (linux_ptrace_h): New.
8842 (linux-low.o): Depends on linux-ptrace.h.
8843
03f2bd59
JK
88442011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8845
8846 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8847 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8848 (remote_prepare): New function with most of the TCP code from ...
8849 (remote_open): ... here. Detect PORT here unconditionally. Move also
8850 setting transport_is_reliable.
8851 * server.c (run_once): New variable.
8852 (gdbserver_usage): Document it.
8853 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8854 the first run if RUN_ONCE.
8855 * server.h (run_once, remote_prepare): New declarations.
8856
7a9dd1b2
TT
88572011-04-19 Tom Tromey <tromey@redhat.com>
8858
8859 * win32-low.c (handle_load_dll): Remove duplicate "the".
8860
81239425
PM
88612011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8862
8863 Remove support for old Cygwin 1.5 versions.
8864 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8865 function to avoid warning.
8866 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8867 warning.
8868
9e0627f1
PM
88692011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8870
8871 * gdbserver/server.h (Macro _): Define it if not available.
8872
588eebee
MS
88732011-03-14 Michael Snyder <msnyder@vmware.com>
8874
348af9f7 8875 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 8876
43f70d4c
JB
88772011-03-10 Joel Brobecker <brobecker@adacore.com>
8878
8879 * Makefile.in (maintainer-clean realclean distclean): Remove
8880 "make ... subdir_do" command.
8881
348af9f7
MS
88822011-03-10 Michael Snyder <msnyder@vmware.com>
8883
8884 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8885
8886 * server.c (handle_v_run): Free alloced buffer on early return.
8887
e637a4f5
YQ
88882011-03-09 Yao Qi <yao@codesourcery.com>
8889
8890 Revert:
8891 2011-03-04 Yao Qi <yao@codesourcery.com>
8892
8893 * Makefile.in: Remove GNU make feature --directory.
8894
8895 2011-03-05 Yao Qi <yao@codesourcery.com>
8896
8897 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8898 (subdir_do): New make target. Copied from gdb/Makefile.
8899 (maintainer-clean, realclean, distclean, clean): Call corresponding
8900 make targets in common/Makefile.
8901
8902 2011-02-11 Yao Qi <yao@codesourcery.com>
8903
8904 * configure.ac: Call AC_PROG_RANLIB.
8905 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8906 * configure: Regenerate.
8907
e6edda56
JK
89082011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8909
8910 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8911
e5141119
JB
89122011-03-06 Yao Qi <yao@codesourcery.com>
8913
8914 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8915
64794aa4
JB
89162011-03-05 Yao Qi <yao@codesourcery.com>
8917
8918 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8919 (subdir_do): New make target. Copied from gdb/Makefile.
8920 (maintainer-clean, realclean, distclean, clean): Call corresponding
8921 make targets in common/Makefile.
8922
7a762829
YQ
89232011-03-04 Yao Qi <yao@codesourcery.com>
8924
8925 * Makefile.in: Remove GNU make feature --directory.
8926
348af9f7
MS
89272011-03-04 Michael Snyder <msnyder@vmware.com>
8928
8929 * server.c (queue_stop_reply): Call xmalloc not malloc.
8930
89312011-03-02 Michael Snyder <msnyder@vmware.com>
8932
8933 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8934
9f72fee2
MS
89352011-02-28 Michael Snyder <msnyder@vmware.com>
8936
588eebee
MS
8937 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8938 (cmd_qtframe): Ditto.
8939 (cmd_qtbuffer): Ditto.
8940 (cmd_bigqtbuffer): Ditto.
8941
9f72fee2
MS
8942 * utils.c (decimal2str): Initialize 'width' to nine, then
8943 don't mess with it.
8944
8040bd49
UW
89452011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8946
8947 * hostio.c (require_data): Free *data, not data.
8948
7e52cbd0
JK
89492011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8950
8951 * hostio.c (require_data): Use free, not xfree.
8952
9130f83e
MS
89532011-02-27 Michael Snyder <msnyder@vmware.com>
8954
4b812f4e
MS
8955 * server.c (handle_query): Discard unused value.
8956
9130f83e
MS
8957 * hostio.c (require_data): Free malloc memory before returning
8958 error.
8959
69d37113
MS
89602011-02-26 Michael Snyder <msnyder@vmware.com>
8961
8962 * linux-low.c (list_threads): Call closedir for dirent.
8963
35f5825a
MS
89642011-02-27 Michael Snyder <msnyder@vmware.com>
8965
2a589cef
MS
8966 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8967 a case statement falls through.
8968
0adea5f7
MS
8969 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8970
35f5825a
MS
8971 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8972 in comparison.
8973
238f1c74
MS
89742011-02-26 Michael Snyder <msnyder@vmware.com>
8975
8976 * utils.c (decimal2str): Eliminate dead code and dead param.
8977 (pulongest): Drop dead param from call to decimal2str.
8978 (plongest): Ditto.
8979
633ff500
JB
89802011-02-24 Joel Brobecker <brobecker@adacore.com>
8981
8982 Revert the following patch (not approved yet):
8983 2011-02-21 Hui Zhu <teawater@gmail.com>
8984 * tracepoint.c (tp_printf): New function.
8985 (eval_agent_expr): Handle gdb_agent_op_printf.
8986
f9c6ff72
HZ
89872011-02-21 Hui Zhu <teawater@gmail.com>
8988
8989 * tracepoint.c (tp_printf): New function.
8990 (eval_agent_expr): Handle gdb_agent_op_printf.
8991
94d5e490
TT
89922011-02-18 Tom Tromey <tromey@redhat.com>
8993
8994 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8995 (tracepoint.o): Likewise.
8996 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8997 (gdb_agent_op_names): Likewise.
8998
c7f96d2b
TT
89992011-02-18 Tom Tromey <tromey@redhat.com>
9000
9001 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9002 gdb_agent_op_rot>: New constants.
9003 (gdb_agent_op_names): Add pick and roll.
9004 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9005 cases.
9006
0feedb2c
JK
90072011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
9008
9009 * aclocal.m4: Regenerated with aclocal-1.11.1.
9010
b3b9301e
PA
90112011-02-14 Pedro Alves <pedro@codesourcery.com>
9012
9013 * server.c (handle_qxfer_traceframe_info): New.
9014 (qxfer_packets): Register "traceframe-info".
9015 (handle_query): Report support for qXfer:traceframe-info:read+.
9016 * tracepoint.c (match_blocktype): New.
9017 (traceframe_find_block_type): Rename to ...
9018 (traceframe_walk_blocks): ... this. Add callback filter argument,
9019 and use it.
9020 (traceframe_find_block_type): New, reimplemented on top of
9021 traceframe_walk_blocks.
9022 (build_traceframe_info_xml): New.
9023 (traceframe_read_info): New.
9024 * server.h (traceframe_read_info): Declare.
9025
4f3e6fb7
YQ
90262011-02-11 Yao Qi <yao@codesourcery.com>
9027
9028 * configure.ac: Call AC_PROG_RANLIB.
9029 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
9030 * configure: Regenerate.
9031
764880b7
PA
90322011-02-07 Pedro Alves <pedro@codesourcery.com>
9033
9034 * server.c (gdb_read_memory): Change return semantics to allow
9035 partial transfers.
9036 (handle_search_memory_1): Adjust.
9037 (process_serial_event) <'m' packet>: Handle partial transfers.
9038 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9039
1c79eb8a
PA
90402011-01-28 Pedro Alves <pedro@codesourcery.com>
9041
9042 * regcache.c (init_register_cache): Initialize
9043 regcache->register_status.
9044 (free_register_cache): Release regcache->register_status.
9045 (regcache_cpy): Copy register_status.
9046 (registers_to_string): Print 'x's for unavailable registers.
9047 (supply_register): Mark the register's status valid or
9048 unavailable, depending on whether a buffer was passed in or not.
9049 (supply_register_zeroed): New.
9050 (supply_regblock): Mark the registers' status valid or
9051 unavailable, depending on whether a buffer was passed in or not.
9052 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9053 (struct regcache): New `register_status' field.
9054 (supply_register_zeroed): Declare.
9055 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9056 supply_register_zeroed, rather than passing a NULL buffer to
9057 supply_register.
9058 * tracepoint.c (fetch_traceframe_registers): Update comment.
9059
85724a0e
PA
90602011-01-28 Pedro Alves <pedro@codesourcery.com>
9061
9062 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9063 buffer explicit.
9064
d08aafef
PA
90652011-01-25 Pedro Alves <pedro@codesourcery.com>
9066
9067 * server.h (decode_xfer_write): Change prototype.
9068 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9069 and don't extract the annex here.
9070 * server.c (decode_xfer_read): Remove `annex' parameter,
9071 and don't extract the annex here.
9072 (decode_xfer): New.
9073 (struct qxfer): New.
9074 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9075 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9076 (handle_qxfer_statictrace): New functions, abstracted out from
9077 handle_query, and made to use the struct qxfer interface.
9078 (handle_threads_qxfer_proper): Rename to ...
9079 (handle_qxfer_threads_proper): ... this.
9080 (handle_threads_qxfer): Rename to ...
9081 (handle_qxfer_threads): ... this. Adjust.
9082 (qxfer_packets): New array.
9083 (handle_qxfer): New function.
9084 (handle_query): Use handle_qxfer.
9085
493e2a69
MS
90862011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
9087
9088 * gdbreplay.c: Shorten lines of >= 80 columns.
9089 * linux-low.c: Ditto.
9090 * linux-ppc-low.c: Ditto.
9091 * linux-s390-low.c: Ditto.
9092 * linux-sparc-low.c: Ditto.
9093 * linux-x86-low.c: Ditto.
9094 * linux-xtensa-low.c: Ditto.
9095 * mem-break.c: Ditto.
9096 * nto-low.c: Ditto.
9097 * regcache.h: Ditto.
9098 * remote-utils.c: Ditto.
9099 * server.c: Ditto.
9100 * server.h: Ditto.
9101 * thread-db.c: Ditto.
9102 * tracepoint.c: Ditto.
9103 * utils.c: Ditto.
9104 * win32-low.h: Ditto.
9105
44944448
JB
91062011-01-05 Joel Brobecker <brobecker@adacore.com>
9107
9108 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9109 update.
9110
71ce852c
JB
91112011-01-01 Joel Brobecker <brobecker@adacore.com>
9112
9113 * server.c (gdbserver_version): Update copyright year in version
9114 output.
9115 * gdbreplay.c (gdbreplay_version): Ditto.
9116
eb826dc6
MF
91172010-12-29 Jie Zhang <jie.zhang@analog.com>
9118
9119 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9120 * linux-bfin-low.c: New file.
9121 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9122 PT_DATA_ADDR for BFIN targets.
9123 * Makefile.in (SFILES): Add linux-bfin-low.c.
9124 (clean): Remove reg-bfin.c.
9125 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9126 * README: Mention supported Blackfin targets.
9127
39ab222a
MF
91282010-12-23 Mike Frysinger <vapier@gentoo.org>
9129
9130 * .gitignore: New file.
9131
a1f2ce7d
MF
91322010-11-16 Mike Frysinger <vapier@gentoo.org>
9133
9134 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9135
f474844c
JZ
91362010-10-22 Jie Zhang <jie@codesourcery.com>
9137
9138 * Makefile.in: Add FLAGS_TO_PASS variable.
9139 (install): Remove dependency of install-only and recursively
9140 invoke make for install-only.
9141
f1048712
DE
91422010-10-04 Doug Evans <dje@google.com>
9143
9144 * Makefile.in (uninstall): Use $(DESTDIR).
9145
b53a1623
PA
91462010-09-24 Pedro Alves <pedro@codesourcery.com>
9147
e6ee044d
PA
9148 PR gdb/11842
9149
b53a1623
PA
9150 * linux-x86-low.c (compat_siginfo_from_siginfo)
9151 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9152 si_code is < 0. Check for si_code == SI_TIMER before checking for
9153 si_code < 0.
9154
fa1bd1e4
JB
91552010-09-13 Joel Brobecker <brobecker@adacore.com>
9156
9157 * lynx-i386-low.c: New file.
9158 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9159
47fac8f8
JB
91602010-09-13 Joel Brobecker <brobecker@adacore.com>
9161
9162 * lynx-low.c (ptrace_request_to_str): Remove handling for
9163 request values that have been removed in LynxOS 5.x.
9164
1adfc54d
JB
91652010-09-13 Joel Brobecker <brobecker@adacore.com>
9166
9167 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9168 <ptrace.h>
9169
c2a66c29
NS
91702010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9171
9172 * configure.ac: Add --enable-inprocess-agent option.
9173 * configure: Rebuilt.
9174
32fcada3
YQ
91752010-09-06 Yao Qi <yao@codesourcery.com>
9176
9177 * linux-low.c (linux_kill): Remove unused variable.
9178 (linux_stabilize_threads): Likewise.
9179 * server.c (start_inferior): Likewise.
9180 (queue_stop_reply_callback): Likewise.
9181 * tracepoint.c (do_action_at_tracepoint): Likewise.
9182
0cccb683
YQ
91832010-09-06 Yao Qi <yao@codesourcery.com>
9184
9185 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9186 on return.
9187
423ec54c
JK
91882010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9189
9190 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9191
12ac6819
PA
91922010-09-06 Pedro Alves <pedro@codesourcery.com>
9193
9194 * Makefile.in (install-only): Replace $IPA_DEPFILES with
9195 "$(IPA_DEPFILES)".
9196
8ed54b31
JB
91972010-09-01 Joel Brobecker <brobecker@adacore.com>
9198
9199 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9200 gdbserver/lynx-ppc-low.c: New files.
9201 * Makefile.in (lynx_low_h): New variable.
9202 (lynx-low.o, lynx-ppc-low.o): New rules.
9203 * configure.ac: On LynxOS, link with -lnetinet.
9204 * configure.srv: Add handling of powerpc-*-lynxos* targets.
9205 * configure: regenerate.
9206
bb0116a4
JB
92072010-09-01 Joel Brobecker <brobecker@adacore.com>
9208
9209 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9210 * configure.ac: Add check for vasprintf and vsnprintf.
9211 * configure, config.in: Regenerate.
9212 * server.h (vasprintf, vsnprintf): Add conditional declarations.
9213
a778ab81 92142010-09-01 Joel Brobecker <brobecker@adacore.com>
9215
9216 * gdbreplay.c: Move include of alloca.h up, next to include of
9217 malloc.h.
9218 * server.h: Add include of malloc.h.
9219 * mem-break.c: Remove include of malloc.h.
9220 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9221
8b034a19 92222010-09-01 Joel Brobecker <brobecker@adacore.com>
9223
9224 * Makefile.in (memmem.o): Build with -Wno-error.
9225
92262010-09-01 Joel Brobecker <brobecker@adacore.com>
9227
9228 * utils.c (xsnprintf): Make non-static.
9229 * server.h: Add xsnprintf declaration.
9230 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9231 replace calls to snprintf by calls to xsnprintf throughout.
9232
92332010-09-01 Joel Brobecker <brobecker@adacore.com>
9234
9235 * configure.ac: Add configure check for alloca.
9236 * configure, config.in: Regenerate.
9237 * server.h: Include alloca.h if it exists.
9238 * gdbreplay.c: Include alloca.h if it exists.
9239
1a981360
PA
92402010-08-28 Pedro Alves <pedro@codesourcery.com>
9241
9242 * linux-low.c (__SIGRTMIN): Define if not already defined.
9243 (linux_create_inferior): Check for __ANDROID__ rather than
9244 __SIGRTMIN.
9245 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9246 are already deferred.
9247 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9248 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9249 stopped and already has a pending signal to report.
9250 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9251 a pending signal to report or is moving out of a jump pad.
9252 (linux_init_signals): Check for __ANDROID__ rather than
9253 __SIGRTMIN.
9254
b4d51a55
PA
92552010-08-28 Pedro Alves <pedro@codesourcery.com>
9256
9257 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9258 debug_threads check. Avoid a linear search when not doing debug
9259 output.
9260
ec48365d
PA
92612010-08-27 Pedro Alves <pedro@codesourcery.com>
9262
9263 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9264 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9265 (struct file_handler) <fd>: Change type to gdb_fildes_t.
9266 (process_event): Change local fd's type to gdb_fildes_t.
9267 (create_file_handler): Adjust prototype.
9268 (delete_file_handler): Adjust prototype.
9269 (handle_file_event): Adjust prototype. Use pfildes.
9270 (create_file_event): Adjsut prototype.
9271 * remote-utils.c (remote_desc, listen_desc): Change type to
9272 gdb_fildes_t.
9273 * server.h: New gdb_fildes_t typedef.
9274 [USE_WIN32API]: Include winsock2.h.
9275 (delete_file_handler, add_file_handler): Adjust prototypes.
9276 (pfildes): Declare.
9277 * utils.c (pfildes): New.
9278
854d88f0
PA
92792010-08-27 Pedro Alves <pedro@codesourcery.com>
9280
9281 * configure.ac (build_warnings): Add -Wno-char-subscripts.
9282 * configure: Regenerate.
9283
0146f85b
PA
92842010-08-27 Pedro Alves <pedro@codesourcery.com>
9285
9286 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9287 (linux_done_accessing_memory): ... this.
9288 (linux_target_ops): Adjust.
9289 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9290 * nto-low.c (nto_target_ops): Adjust comment.
9291 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9292 * spu-low.c (spu_target_ops): Adjust comment.
9293 * target.h (target_ops): Rename unprepare_to_access_memory field
9294 to done_accessing_memory.
9295 (unprepare_to_access_memory): Rename to ...
9296 (done_accessing_memory): ... this.
9297
90d74c30
PA
92982010-08-26 Pedro Alves <pedro@codesourcery.com>
9299
9300 * linux-low.c (linux_prepare_to_access_memory): New.
9301 (linux_unprepare_to_access_memory): New.
9302 (linux_target_ops): Install them.
9303 * server.c (read_memory): Rename to ...
9304 (gdb_read_memory): ... this. Use
9305 prepare_to_access_memory/prepare_to_access_memory.
9306 (write_memory): Rename to ...
9307 (gdb_write_memory): ... this. Use
9308 prepare_to_access_memory/prepare_to_access_memory.
9309 (handle_search_memory_1): Adjust.
9310 (process_serial_event): Adjust.
9311 * target.h (struct target_ops): New fields
9312 prepare_to_access_memory and unprepare_to_access_memory.
9313 (prepare_to_access_memory, unprepare_to_access_memory): New.
9314 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9315 prepare_to_access_memory/prepare_to_access_memory.
9316 * nto-low.c (nto_target_ops): Adjust.
9317 * spu-low.c (spu_target_ops): Adjust.
9318 * win32-low.c (win32_target_ops): Adjust.
9319
fd467969
PA
93202010-08-26 Pedro Alves <pedro@codesourcery.com>
9321
9322 * Makefile.in (WARN_CFLAGS): Get it from configure.
9323 (WERROR_CFLAGS): New.
9324 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9325 * configure.ac: Introduce --enable-werror, which adds -Werror to
9326 the compiler command line. Enabled by default. Disable with
9327 --disable-werror. Add -Wdeclaration-after-statement
9328 Wpointer-arith and -Wformat-nonliteral to warning flags.
9329 * configure: Regenerate.
9330
331e2f5f
PA
93312010-08-26 Pedro Alves <pedro@codesourcery.com>
9332
9333 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9334
e581f2b4
PA
93352010-08-26 Pedro Alves <pedro@codesourcery.com>
9336
9337 * gdbreplay.c (remote_error): New.
9338 (gdbchar): New.
9339 (expect): Use gdbchar. Check for error reading from GDB.
9340 Clarify sync error output.
9341 (play): Check for errors writing to GDB.
9342 * linux-low.c (sigchld_handler): Really ignore `write' errors.
9343 * remote-utils.c (getpkt): Check for errors writing to the remote
9344 descriptor.
9345
3c11dd79
PA
93462010-08-25 Pedro Alves <pedro@codesourcery.com>
9347
9348 * linux-low.c (linux_wait_1): Move non-debugging code out of
9349 `debug_threads' control.
9350
d20a8ad9
PA
93512010-08-25 Pedro Alves <pedro@codesourcery.com>
9352
9353 * linux-low.c (linux_wait_1): Don't set last_status here.
9354 * server.c (push_event, queue_stop_reply_callback): Assert we're
9355 not pushing a TARGET_WAITKIND_IGNORE event.
9356 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9357 (myresume, handle_target_event): Set the thread's last_resume_kind
9358 and last_status from the target returned status.
9359
964e4306
PA
93602010-08-25 Pedro Alves <pedro@codesourcery.com>
9361
9362 PR threads/10729
9363
9364 * linux-x86-low.c (update_debug_registers_callback): New.
9365 (i386_dr_low_set_addr): Use it.
9366 (i386_dr_low_get_addr): New.
9367 (i386_dr_low_set_control): Use update_debug_registers_callback.
9368 (i386_dr_low_get_control): New.
9369 (i386_dr_low_get_status): Adjust.
9370 * linux-low.c (linux_stop_lwp): New.
9371 * linux-low.h (linux_stop_lwp): Declare.
9372
9373 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9374 argument instead of a i386_debug_reg_state.
9375 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9376 a i386_debug_reg_state.
9377 (i386_insert_aligned_watchpoint): Adjust.
9378 (i386_remove_aligned_watchpoint): Adjust.
9379 (i386_low_stopped_data_address): Read the debug registers from the
9380 inferior instead of from the mirrors.
9381 * i386-low.h (struct i386_debug_reg_state): Extend comment.
9382 (i386_dr_low_get_addr): Declare.
9383 (i386_dr_low_get_control): Declare.
9384 (i386_dr_low_get_status): Change prototype.
9385
9386 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9387 (i386_dr_low_get_addr): New.
9388 (i386_dr_low_get_control): New.
9389 (i386_dr_low_get_status): Adjust prototype. Return
9390 dr_status_mirror.
9391 (i386_initial_stuff): Clear dr_status_mirror and
9392 dr_control_mirror.
9393 (i386_get_thread_context): Adjust.
9394 (i386_set_thread_context): Adjust.
9395 (i386_thread_added): Adjust.
9396
5f21a75b
PA
93972010-08-24 Pedro Alves <pedro@codesourcery.com>
9398
9399 * linux-low.h (linux_thread_area): Delete declaration.
9400
3e4c1235
TS
94012010-08-11 Thomas Schwinge <thomas@codesourcery.com>
9402
9403 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9404 after its termination.
9405
1971b033
PA
94062010-08-09 Pedro Alves <pedro@codesourcery.com>
9407
9408 * linux-low.c (gdb_wants_lwp_stopped): Delete.
9409 (gdb_wants_all_stopped): Delete.
9410 (linux_wait_1): Don't call them.
9411 * server.c (handle_v_cont): Tag all threads as want-stopped.
9412 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
9413 stopped as "client-wants-stopped".
9414
310444ac
PA
94152010-07-31 Pedro Alves <pedro@codesourcery.com>
9416
9417 * Makefile.in (signals_h): New.
9418 (server_h): Depend on it.
9419 (server.o): Don't depend on $(signals_def).
9420 (signals.o): Depend on $(signals_def).
9421
a19cae16
JK
94222010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
9423
9424 * Makefile.in (signals_def): New.
9425 (server_h): Append include/gdb/signals.h and signals_def.
9426 (server.o): Append signals_def.
9427
30d50328
JK
94282010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9429
9430 * server.c (handle_target_event): Use target_signal_to_host for
9431 resume_info.sig initialization.
9432 * target.h (struct thread_resume) <sig>: New comment.
9433
5c3216e2
OS
94342010-07-20 Ozkan Sezer <sezeroz@gmail.com>
9435
c6f46ca0
OS
9436 * server.c (handle_query): strcpy() the returned string from paddress()
9437 instead of sprintf().
5c3216e2
OS
9438 * utils.c (paddress): Return phex_nz().
9439
6bd31874
JB
94402010-07-07 Joel Brobecker <brobecker@adacore.com>
9441
9442 * server.c (handle_v_cont): Call mourn_inferior if process
9443 just exited.
9444 (myresume): Likewise.
9445
0fb4aa4b
PA
94462010-07-01 Pedro Alves <pedro@codesourcery.com>
9447
9448 Static tracepoints, and integration with UST.
9449
9450 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
9451 * mem-break.c (uninsert_all_breakpoints)
9452 (reinsert_all_breakpoints): New.
9453 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9454 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9455 (gdb_agent_ust_loaded, helper_thread_id)
9456 (gdb_agent_helper_thread_id): New macros.
9457 (struct ipa_sym_addresses): Add addr_ust_loaded,
9458 addr_helper_thread_id, addr_cmd_buf.
9459 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9460 (in_process_agent_loaded_ust): New.
9461 (write_e_ust_not_loaded): New.
9462 (maybe_write_ipa_ust_not_loaded): New.
9463 (struct collect_static_trace_data_action): New.
9464 (enum tracepoint_type) <static_tracepoint>: New.
9465 (struct tracepoint) <handle>: Mention static tracepoints.
9466 (struct static_tracepoint_ctx): New.
9467 (CMD_BUF_SIZE): New.
9468 (add_tracepoint_action): Handle static tracepoint actions.
9469 (unprobe_marker_at): New.
9470 (clear_installed_tracepoints): Handle static tracepoints.
9471 (cmd_qtdp): Handle static tracepoints.
9472 (probe_marker_at): New.
9473 (cmd_qtstart): Handle static tracepoints.
9474 (response_tracepoint): Handle static tracepoints.
9475 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9476 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9477 (get_context_regcache): Handle static tracepoints.
9478 (do_action_at_tracepoint): Handle static tracepoint actions.
9479 (traceframe_find_block_type): Handle static trace data blocks.
9480 (traceframe_read_sdata): New.
9481 (download_tracepoints): Download static tracepoint actions.
9482 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9483 (GDB_PROBE_NAME): New.
9484 (ust_ops): New.
9485 (GET_UST_SYM): New.
9486 (USTF): New.
9487 (dlsym_ust): New.
9488 (ust_marker_to_static_tracepoint): New.
9489 (gdb_probe): New.
9490 (collect_ust_data_at_tracepoint): New.
9491 (gdb_ust_probe): New.
9492 (UNIX_PATH_MAX, SOCK_DIR): New.
9493 (gdb_ust_connect_sync_socket): New.
9494 (resume_thread, stop_thread): New.
9495 (run_inferior_command): New.
9496 (init_named_socket): New.
9497 (gdb_ust_socket_init): New.
9498 (cstr_to_hexstr): New.
9499 (next_st): New.
9500 (first_marker, next_marker): New.
9501 (response_ust_marker): New.
9502 (cmd_qtfstm, cmd_qtsstm): New.
9503 (unprobe_marker_at, probe_marker_at): New.
9504 (cmd_qtstmat, gdb_ust_thread): New.
9505 (gdb_ust_init): New.
9506 (initialize_tracepoint_ftlib): Call gdb_ust_init.
9507 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9508 (ST_REGENTRY): New.
9509 (x86_64_st_collect_regmap): New.
9510 (X86_64_NUM_ST_COLLECT_GREGS): New.
9511 (AMD64_RIP_REGNUM): New.
9512 (supply_static_tracepoint_registers): New.
9513 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9514 (ST_REGENTRY): New.
9515 (i386_st_collect_regmap): New.
9516 (i386_NUM_ST_COLLECT_GREGS): New.
9517 (supply_static_tracepoint_registers): New.
9518 * server.c (handle_query): Handle qXfer:statictrace:read.
9519 <qSupported>: Report support for StaticTracepoints, and
9520 qXfer:statictrace:read features.
9521 * server.h (traceframe_read_sdata)
9522 (supply_static_tracepoint_registers): Declare.
9523 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9524 (unpack_varlen_hex): Include in IPA build.
9525 * Makefile.in (ustlibs, ustinc): New.
9526 (IPA_OBJS): Add remote-utils-ipa.o.
9527 ($(IPA_LIB)): Link -ldl and -lpthread.
9528 (UST_CFLAGS): New.
9529 (IPAGENT_CFLAGS): Add UST_CFLAGS.
9530 * config.in, configure: Regenerate.
9531
9e4344e5
PA
95322010-06-20 Ian Lance Taylor <iant@google.com>
9533 Pedro Alves <pedro@codesourcery.com>
9534
9535 * linux-x86-low.c (always_true): Delete.
9536 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9537 trying to fool the compiler with always_true.
9538
c6beb2cb
PA
95392010-06-20 Pedro Alves <pedro@codesourcery.com>
9540
9541 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9542 conditions in gdbserver.
9543
d2ed6730
UW
95442010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
9545
9546 * spu-low.c (spu_read_memory): Wrap around local store limit.
9547 (spu_write_memory): Likewise.
9548
4e29fb54
PA
95492010-06-15 Pedro Alves <pedro@codesourcery.com>
9550
9551 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9552 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9553 LONGEST uses.
9554 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9555 uses.
9556 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9557 uses with LONGEST uses.
9558
6a271cae
PA
95592010-06-14 Stan Shebs <stan@codesourcery.com>
9560 Pedro Alves <pedro@codesourcery.com>
9561
9562 Bytecode compiler.
9563
9564 * linux-x86-low.c: Include limits.h.
9565 (add_insns): New.
9566 (always_true): New.
9567 (EMIT_ASM): New.
9568 (EMIT_ASM32): New.
9569 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9570 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9571 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9572 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9573 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9574 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9575 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9576 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9577 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9578 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9579 (amd64_emit_void_call_2): New.
9580 (amd64_emit_ops): New.
9581 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9582 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9583 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9584 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9585 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9586 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9587 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9588 (i386_emit_call, i386_emit_reg, i386_emit_pop)
9589 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9590 (i386_emit_stack_adjust, i386_emit_int_call_1)
9591 (i386_emit_void_call_2): New.
9592 (i386_emit_ops): New.
9593 (x86_emit_ops): New.
9594 (the_low_target): Install x86_emit_ops.
9595 * server.h (struct emit_ops): New.
9596 (get_raw_reg_func_addr): Declare.
9597 (current_insn_ptr, emit_error): Declare.
9598 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9599 (set_trace_state_variable_value): New defines.
9600 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9601 addr_get_trace_state_variable_value and
9602 addr_set_trace_state_variable_value.
9603 (symbol_list): New fields for get_raw_reg,
9604 get_trace_state_variable_value and set_trace_state_variable_value.
9605 (condfn): New typedef.
9606 (struct tracepoint): New field `compiled_cond'.
9607 (do_action_at_tracepoint): Clear compiled_cond.
9608 (get_trace_state_variable_value, set_trace_state_variable_value):
9609 Export in the IPA.
9610 (condition_true_at_tracepoint): If there's a compiled condition,
9611 run that.
9612 (current_insn_ptr, emit_error): New globals.
9613 (struct bytecode_address): New.
9614 (get_raw_reg_func_addr): New.
9615 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9616 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9617 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9618 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9619 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9620 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9621 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9622 (compile_tracepoint_condition, compile_bytecodes): New.
9623 * target.h (emit_ops): Forward declare.
9624 (struct target_ops): New field emit_ops.
9625 (target_emit_ops): New.
9626 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9627 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9628 * linux-low.c (linux_emit_ops): New.
9629 (linux_target_ops): Install it.
9630 * linux-low.h (struct linux_target_ops): New field emit_ops.
9631
92b72907
UW
96322010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
9633
9634 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9635 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9636
fa593d66
PA
96372010-06-01 Pedro Alves <pedro@codesourcery.com>
9638 Stan Shebs <stan@codesourcery.com>
9639
9640 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9641 (all): Depend on $(extra_libraries).
9642 (install-only): Install the IPA.
9643 (IPA_OBJS, IPA_LIB): New.
9644 (clean): Remove the IPA lib.
9645 (IPAGENT_CFLAGS): New.
9646 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9647 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9648 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9649 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9650 * configure.ac: Check for atomic builtins support in the compiler.
9651 (IPA_DEPFILES, extra_libraries): Define.
9652 * configure.srv (ipa_obj): Add description.
9653 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9654 (i[34567]86-*-linux*): Set ipa_obj.
9655 (x86_64-*-linux*): Set ipa_obj.
9656 * linux-low.c (stabilizing_threads): New.
9657 (supports_fast_tracepoints): New.
9658 (linux_detach): Stabilize threads before detaching.
9659 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9660 the lwp is either not stabilizing, or is moving out of a jump pad.
9661 (linux_fast_tracepoint_collecting): New.
9662 (maybe_move_out_of_jump_pad): New.
9663 (enqueue_one_deferred_signal): New.
9664 (dequeue_one_deferred_signal): New.
9665 (linux_wait_for_event_1): If moving out of a jump pad, defer
9666 pending signals to later.
9667 (linux_stabilize_threads): New.
9668 (linux_wait_1): Check if threads need moving out of jump pads, and
9669 do it if so.
9670 (stuck_in_jump_pad_callback): New.
9671 (move_out_of_jump_pad_callback): New.
9672 (lwp_running): New.
9673 (linux_resume_one_lwp): Handle moving out of jump pads.
9674 (linux_set_resume_request): Dequeue deferred signals.
9675 (need_step_over_p): Also step over fast tracepoint jumps.
9676 (start_step_over): Also uninsert fast tracepoint jumps.
9677 (finish_step_over): Also reinsert fast tracepoint jumps.
9678 (linux_install_fast_tracepoint_jump): New.
9679 (linux_target_ops): Install linux_stabilize_threads and
9680 linux_install_fast_tracepoint_jump_pad.
9681 * linux-low.h (linux_target_ops) <get_thread_area,
9682 install_fast_tracepoint_jump_pad>: New fields.
9683 (struct lwp_info) <collecting_fast_tracepoint,
9684 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9685 (linux_get_thread_area): Declare.
9686 * linux-x86-low.c (jump_insn): New.
9687 (x86_get_thread_area): New.
9688 (append_insns): New.
9689 (push_opcode): New.
9690 (amd64_install_fast_tracepoint_jump_pad): New.
9691 (i386_install_fast_tracepoint_jump_pad): New.
9692 (x86_install_fast_tracepoint_jump_pad): New.
9693 (the_low_target): Install x86_get_thread_area and
9694 x86_install_fast_tracepoint_jump_pad.
9695 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9696 (struct fast_tracepoint_jump): New.
9697 (fast_tracepoint_jump_insn): New.
9698 (fast_tracepoint_jump_shadow): New.
9699 (find_fast_tracepoint_jump_at): New.
9700 (fast_tracepoint_jump_here): New.
9701 (delete_fast_tracepoint_jump): New.
9702 (set_fast_tracepoint_jump): New.
9703 (uninsert_fast_tracepoint_jumps_at): New.
9704 (reinsert_fast_tracepoint_jumps_at): New.
9705 (set_breakpoint_at): Use write_inferior_memory.
9706 (uninsert_raw_breakpoint): Use write_inferior_memory.
9707 (check_mem_read): Mask out fast tracepoint jumps.
9708 (check_mem_write): Mask out fast tracepoint jumps.
9709 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9710 (set_fast_tracepoint_jump): Declare.
9711 (delete_fast_tracepoint_jump)
9712 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9713 (reinsert_fast_tracepoint_jumps_at): Declare.
9714 * regcache.c: Don't compile many functions when building the
9715 in-process agent library.
9716 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9717 the register buffer in the heap.
9718 (free_register_cache): If the register buffer isn't owned by the
9719 regcache, don't free it.
9720 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9721 pre-existing register caches.
9722 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9723 type.
9724 (convert_ascii_to_int): : Constify `from' parameter type.
9725 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9726 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9727 the needed buffer in-place.
9728 (relocate_instruction): New.
9729 * server.c (handle_query) <qSymbols>: If the target supports
9730 tracepoints, give it a chance of looking up symbols. Report
9731 support for fast tracepoints.
9732 (handle_status): Stabilize threads.
9733 (process_serial_event): Adjust.
9734 * server.h (struct fast_tracepoint_jump): Forward declare.
9735 (struct process_info) <fast_tracepoint_jumps>: New field.
9736 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9737 (decode_X_packet, decode_M_packet): Adjust.
9738 (relocate_instruction): Declare.
9739 (in_process_agent_loaded): Declare.
9740 (tracepoint_look_up_symbols): Declare.
9741 (struct fast_tpoint_collect_status): Declare.
9742 (fast_tracepoint_collecting): Declare.
9743 (force_unlock_trace_buffer): Declare.
9744 (handle_tracepoint_bkpts): Declare.
9745 (initialize_low_tracepoint)
9746 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9747 * target.h (struct target_ops) <stabilize_threads,
9748 install_fast_tracepoint_jump_pad>: New fields.
9749 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9750 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9751 [HAVE_STDINT_H]: Include stdint.h.
9752 (trace_debug_1): Rename to ...
9753 (trace_vdebug): ... this.
9754 (trace_debug): Rename to ...
9755 (trace_debug_1): ... this. Add `level' parameter.
9756 (trace_debug): New.
9757 (ATTR_USED, ATTR_NOINLINE): New.
9758 (IP_AGENT_EXPORT): New.
9759 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9760 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9761 (about_to_request_buffer_space, trace_buffer_is_full)
9762 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9763 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9764 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9765 (traceframe_write_count, traceframes_created)
9766 (trace_state_variables)
9767 New renaming defines.
9768 (struct ipa_sym_addresses): New.
9769 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9770 (symbol_list): New.
9771 (ipa_sym_addrs): New.
9772 (all_tracepoint_symbols_looked_up): New.
9773 (in_process_agent_loaded): New.
9774 (write_e_ipa_not_loaded): New.
9775 (maybe_write_ipa_not_loaded): New.
9776 (tracepoint_look_up_symbols): New.
9777 (debug_threads) [IN_PROCESS_AGENT]: New.
9778 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9779 (UNKNOWN_SIDE_EFFECTS): New.
9780 (stop_tracing): New.
9781 (flush_trace_buffer): New.
9782 (stop_tracing_bkpt): New.
9783 (flush_trace_buffer_bkpt): New.
9784 (read_inferior_integer): New.
9785 (read_inferior_uinteger): New.
9786 (read_inferior_data_pointer): New.
9787 (write_inferior_data_pointer): New.
9788 (write_inferior_integer): New.
9789 (write_inferior_uinteger): New.
9790 (struct collect_static_trace_data_action): Delete.
9791 (enum tracepoint_type): New.
9792 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
9793 <actions_str, step_actions, step_actions_str>: Only include in
9794 GDBserver.
fa593d66
PA
9795 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9796 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9797 (tracepoints): Use IP_AGENT_EXPORT.
9798 (last_tracepoint): Don't include in the IPA.
9799 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9800 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9801 (alloced_trace_state_variables): New.
9802 (trace_state_variables): Use IP_AGENT_EXPORT.
9803 (traceframe_t): Delete unused variable.
9804 (circular_trace_buffer): Don't include in the IPA.
9805 (trace_buffer_start): Delete.
9806 (struct trace_buffer_control): New.
9807 (trace_buffer_free): Delete.
9808 (struct ipa_trace_buffer_control): New.
9809 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9810 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9811 New.
9812 (trace_buffer_ctrl): New.
9813 (TRACE_BUFFER_CTRL_CURR): New.
9814 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9815 Reimplement as macros.
9816 (trace_buffer_wrap): Delete.
9817 (traceframe_write_count, traceframe_read_count)
9818 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9819 (struct tracepoint_hit_ctx) <type>: New field.
9820 (struct fast_tracepoint_ctx): New.
9821 (memory_barrier): New.
9822 (cmpxchg): New.
9823 (record_tracepoint_error): Update atomically in the IPA.
9824 (clear_inferior_trace_buffer): New.
9825 (about_to_request_buffer_space): New.
9826 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9827 updating the same buffer.
9828 (add_tracepoint): Default the tracepoint's type to trap
9829 tracepoint, and orig_size to -1.
9830 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9831 internal variables.
9832 (create_trace_state_variable): New parameter `gdb'. Handle it.
9833 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9834 (cmd_qtdp): Handle fast tracepoints.
9835 (cmd_qtdv): Adjust.
9836 (max_jump_pad_size): New.
9837 (gdb_jump_pad_head): New.
9838 (get_jump_space_head): New.
9839 (claim_jump_space): New.
9840 (sort_tracepoints): New.
9841 (MAX_JUMP_SIZE): New.
9842 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9843 IPA.
9844 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9845 support. Upload fast traceframes, and delete internal IPA
9846 breakpoints.
9847 (stop_tracing_handler): New.
9848 (flush_trace_buffer_handler): New.
9849 (cmd_qtstop): Upload fast tracepoints.
9850 (response_tracepoint): Handle fast tracepoints.
9851 (tracepoint_finished_step): Upload fast traceframes. Set the
9852 tracepoint hit context's tracepoint type.
9853 (handle_tracepoint_bkpts): New.
9854 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9855 type. Add comment about fast tracepoints.
9856 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9857 non-existing action_str field.
9858 (get_context_regcache): Handle fast tracepoints.
9859 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9860 to the regcache.
9861 (fast_tracepoint_from_jump_pad_address): New.
9862 (fast_tracepoint_from_ipa_tpoint_address): New.
9863 (collecting_t): New.
9864 (force_unlock_trace_buffer): New.
9865 (fast_tracepoint_collecting): New.
9866 (collecting): New.
9867 (gdb_collect): New.
9868 (write_inferior_data_ptr): New.
9869 (target_tp_heap): New.
9870 (target_malloc): New.
9871 (download_agent_expr): New.
9872 (UALIGN): New.
9873 (download_tracepoints): New.
9874 (download_trace_state_variables): New.
9875 (upload_fast_traceframes): New.
9876 (IPA_FIRST_TRACEFRAME): New.
9877 (IPA_NEXT_TRACEFRAME_1): New.
9878 (IPA_NEXT_TRACEFRAME): New.
9879 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9880 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9881 (gdb_jump_pad_buffer_end): New.
9882 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9883 (initialize_tracepoint): Adjust.
9884 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9885 buffer. Initialize the low module.
9886 * utils.c (PREFIX, TOOLNAME): New.
9887 (malloc_failure): Use PREFIX.
9888 (error): In the IPA, an error causes an exit.
9889 (fatal, warning): Use PREFIX.
9890 (internal_error): Use TOOLNAME.
9891 (NUMCELLS): Increase to 10.
9892 * configure, config.in: Regenerate.
9893
d149dd1d
PA
98942010-06-01 Pedro Alves <pedro@codesourcery.com>
9895
9896 * server.c (handle_query) <qSupported>: Do two passes over the
9897 qSupported string to avoid nesting strtok.
9898
f6528abd
JK
98992010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9900
9901 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9902 (CDEPS): New.
9903 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9904 -Wl,--dynamic-list.
9905 * configure: Regenerate.
9906 * proc-service.list: New.
9907
ca2a87a0
JK
99082010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9909
9910 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9911 New comment.
9912
363a6e9f
OS
99132010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9914
9915 * gdbreplay.c (remote_open): Check error return from socket() call by
9916 its equality to -1 not by it being negative.
9917 * remote-utils.c (remote_open): Likewise.
9918
d23b6cb1
PA
99192010-05-23 Pedro Alves <pedro@codesourcery.com>
9920
9921 * config.h: Regenerate.
9922
28d3cf85
MK
99232010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9924
9925 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9926 doesn't provide PTRACE_GET_THREAD_AREA.
9927
fea36a59
MK
99282010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9929
9930 * linux-m68k-low.c: Include <asm/ptrace.h>
9931 (ps_get_thread_area): Implement.
9932
24b066ba
DE
99332010-05-03 Doug Evans <dje@google.com>
9934
9935 * event-loop.c (struct callback_event): New struct.
9936 (callback_list): New global.
9937 (append_callback_event, delete_callback_event): New functions.
9938 (process_callback): New function.
9939 (start_event_loop): Call it.
9940 * remote-utils.c (NOT_SCHEDULED): Define.
9941 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9942 moved out of readchar.
9943 (readchar): Rewrite. Call reschedule before returning.
9944 (reset_readchar): New function.
9945 (remote_close): Call it.
9946 (process_remaining, reschedule): New functions.
9947 * server.h (callback_handler_func): New typedef.
9948 (append_callback_event, delete_callback_event): Declare.
9949
9836d6ea
PA
99502010-05-03 Pedro Alves <pedro@codesourcery.com>
9951
9952 * proc-service.c (ps_pglobal_lookup): Use
9953 thread_db_look_up_one_symbol.
9954 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9955 parameter. Use it instead of all_symbols_looked_up.
9956 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9957 field.
9958 (all_symbols_looked_up): Don't declare.
9959 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9960 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9961 field.
9962 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9963 Set all_symbols_looked_up here.
9964 (thread_db_look_up_one_symbol): New.
9965 (thread_db_get_tls_address): Adjust.
9966 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9967 thread_db object on the heap, and tentatively set it in the
9968 process structure.
9969 (thread_db_init): Don't set all_symbols_looked_up here.
9970 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9971
7984d532
PA
99722010-05-03 Pedro Alves <pedro@codesourcery.com>
9973
9974 * linux-low.c (linux_kill, linux_detach): Adjust.
9975 (status_pending_p_callback): Remove redundant statement. Check
9976 for !TARGET_WAITIKIND_IGNORE, instead of
9977 TARGET_WAITKIND_STOPPED.
9978 (handle_tracepoints): Make sure LWP is locked. Adjust.
9979 (linux_wait_for_event_1): Adjust.
9980 (linux_cancel_breakpoints): New.
9981 (unsuspend_one_lwp): New.
9982 (unsuspend_all_lwps): New.
9983 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9984 (send_sigstop_callback): Change return type to int, add new
9985 `except' parameter and handle it.
9986 (suspend_and_send_sigstop_callback): New.
9987 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9988 pass them down. If SUSPEND, also increment the lwp's suspend
9989 count.
9990 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9991 (need_step_over_p): Don't consider suspended LWPs.
9992 (start_step_over): Adjust.
9993 (proceed_one_lwp): Change return type to int, add new `except'
9994 parameter and handle it.
9995 (unsuspend_and_proceed_one_lwp): New.
9996 (proceed_all_lwps): Use find_inferior instead of
9997 for_each_inferior.
9998 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9999 also decrement the suspend count of LWPs. Pass `except' down,
10000 instead of hacking its suspend count.
10001 (linux_pause_all): Add `freeze' parameter. Adjust.
10002 (linux_unpause_all): New.
10003 (linux_target_ops): Install linux_unpause_all.
10004 * server.c (handle_status): Adjust.
10005 * target.h (struct target_ops): New fields `unpause_all' and
10006 `cancel_breakpoints'. Add new parameter to `pause_all'.
10007 (pause_all): Add new `freeze' parameter.
10008 (unpause_all): New.
10009 (cancel_breakpoints): New.
10010 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10011 cancel breakpoints.
10012 (cmd_qtstart): Pause threads.
10013 (stop_tracing): Pause threads, and cancel breakpoints.
10014 * win32-low.c (win32_target_ops): Adjust.
10015
e471f25b
PA
100162010-05-03 Pedro Alves <pedro@codesourcery.com>
10017
10018 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10019 the inferior right away from here...
10020 (linux_wait_1): ... to here, and adjust to check the thread's
10021 last_resume_kind instead of the lwp's step or stop_expected flags.
10022
1915ef4f
PA
100232010-05-02 Pedro Alves <pedro@codesourcery.com>
10024
10025 * README: Use consistent `GDB' and `GDBserver' spellings.
10026
f9e39928
PA
100272010-05-02 Pedro Alves <pedro@codesourcery.com>
10028
10029 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10030 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
10031 (linux_detach_one_lwp): Assume the lwp is stopped.
10032 (any_thread_of): Delete.
10033 (linux_detach): Stop all lwps here. Don't blindly delete all
10034 breakpoints.
10035 (delete_lwp_callback): New.
10036 (linux_mourn): Delete all lwps of the process that is gone.
10037 (linux_wait_1): Don't delete the last lwp of the process here.
10038 * mem-break.h (mark_breakpoints_out): Declare.
10039 * mem-break.c (mark_breakpoints_out): New.
10040 (free_all_breakpoints): Use it.
10041 * server.c (handle_target_event): If the process is gone, mark
10042 breakpoints out.
10043 * thread-db.c (struct thread_db) <create_bp>: New field.
10044 (thread_db_enable_reporting): Fix prototype. Store a thread event
10045 breakpoint reference in the thread_db struct.
10046 (thread_db_load_search): Clear the thread_db object.
10047 (try_thread_db_load_1): Ditto.
10048 (switch_to_process): New.
10049 (disable_thread_event_reporting): Use it.
10050 (remove_thread_event_breakpoints): New.
10051 (thread_db_detach, thread_db_mourn): Use it.
10052
1e7fc18c
PA
100532010-05-01 Pedro Alves <pedro@codesourcery.com>
10054
10055 * linux-low.c (linux_enable_event_reporting): New.
10056 (linux_wait_for_event_1, handle_extended_wait): Use it.
10057
02fc4de7
PA
100582010-04-30 Pedro Alves <pedro@codesourcery.com>
10059
10060 * linux-low.c (linux_kill_one_lwp, linux_kill)
10061 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10062 (send_sigstop): Take an lwp_info as parameter instead. Queue a
10063 SIGSTOP even if the LWP is stopped.
10064 (send_sigstop_callback): New.
10065 (stop_all_lwps): Use send_sigstop_callback instead.
10066 (linux_resume_one_thread): Adjust.
10067 (proceed_one_lwp): Still proceed an LWP that the client has
10068 requested to stop, if we haven't reported it as stopped yet. Make
10069 sure that LWPs the client want stopped, have a pending SIGSTOP.
10070
bc3b5632
DE
100712010-04-26 Doug Evans <dje@google.com>
10072
ae1ada35
DE
10073 * server.c (handle_general_set): Make static.
10074
bc3b5632
DE
10075 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10076 Print received char after testing for error/eof instead of before.
10077 (input_interrupt): Tweak comment.
10078
65730243
DE
100792010-04-23 Doug Evans <dje@google.com>
10080
10081 * server.c (start_inferior): Print inferior argv if --debug.
10082
a8ae7dc0
AR
100832010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
10084
10085 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10086 * nto-x86-low.c: Include server.h
10087
1c07cc19
PM
100882010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
10089
10090 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10091 be consistent with other sources of this directory.
10092 (init_registers_amd64): Correct name of source file of this function
10093 in the comment.
10094
e0a61e09
PM
100952010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10096
10097 * configure.srv (x86_64-*-mingw*): New configuration for Windows
10098 64-bit executables.
10099
54709339
PM
101002010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10101
10102 * win32-i386-low.c: Add 64-bit support.
10103 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10104 (init_registers_amd64): Declare.
10105 (mappings): Add 64-bit version of array.
10106 (init_windows_x86): New function.
10107 (the_low_target): Change init_arch field to init_windows_x86.
10108
e8f0053d
PM
101092010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10110
10111 * win32-low.c: Adapt to support also 64-bit architecture.
10112 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10113 (get_image_name): Use SIZE_T type for local variable `done'.
10114 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10115 (toolhelp_get_dll_name): Idem.
10116 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10117 Use uintptr_t typecast to avoid warning.
10118 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10119 (handle_exception): Use phex_nz to avoid warning.
10120 (win32_wait): Remove unused local variable `process'.
10121
c481e77e
PM
101222010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
10123
10124 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10125 `amd64-avx.o'.
10126
12ea4b69
PM
101272010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
10128
10129 * configure.ac: Use `ws2_32' library for srv_mingw.
10130 * configure: Regenerate.
10131 * gdbreplay.c: Include winsock2.h instead of winsock.h.
10132 * remote-utils.c: Likewise.
10133
f6d1620c
L
101342010-04-17 H.J. Lu <hongjiu.lu@intel.com>
10135
10136 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10137 if __x86_64__ is defined.
10138
8e642873
PM
101392010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10140
10141 * configure: Regenerate.
10142
711e434b
PM
101432010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
10144
10145 * server.c (handle_query): Handle 'qGetTIBAddr' query.
10146 * target.h (target_ops): New get_tib_address field.
10147 * win32-low.h (win32_thread_info): Add thread_local_base field.
10148 * win32-low.c (child_add_thread): Add tlb argument.
10149 Set thread_local_base field to TLB.
10150 (get_child_debug_event): Adapt to child_add_thread change.
10151 (win32_get_tib_address): New function.
10152 (win32_target_ops): Set get_tib_address field to
10153 win32_get_tib_address.
10154 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10155
505106cd
PA
101562010-04-12 Pedro Alves <pedro@codesourcery.com>
10157
505106cd
PA
10158 * linux-low.c (linux_mourn): Also remove the process.
10159 * server.c (handle_target_event): Don't remove the process here.
10160 * nto-low.c (nto_mourn): New.
10161 (nto_target_ops): Install it.
10162 * spu-low.c (spu_mourn): New.
10163 (spu_target_ops): Install it.
10164 * win32-low.c (win32_mourn): New.
10165 (win32_target_ops): Install it.
10166
e8470a06
PA
101672010-04-12 Pedro Alves <pedro@codesourcery.com>
10168
10169 * server.h (buffer_xml_printf): Remove redundant `;'.
10170
45ba0d02
PA
101712010-04-12 Pedro Alves <pedro@codesourcery.com>
10172
10173 * regcache.c (set_register_cache): Invalidate regcaches before
10174 changing the register cache layout.
10175 (regcache_invalidate_one): Allow a NULL regcache.
10176 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10177 regcaches before changing the register cache layout or the target
10178 regsets.
10179
59e04013
L
101802010-04-12 H.J. Lu <hongjiu.lu@intel.com>
10181
10182 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10183 variable warning on Linux/x86-64.
10184
8336d594
PA
101852010-04-11 Pedro Alves <pedro@codesourcery.com>
10186
10187 GDBserver disconnected tracing support.
10188
10189 * linux-low.c (linux_remove_process): Delete.
10190 (add_lwp): Don't set last_resume_kind here.
10191 (linux_kill): Use `mourn'.
10192 (linux_detach): Use `thread_db_detach', and `mourn'.
10193 (linux_mourn): New.
10194 (linux_attach_lwp_1): Adjust comment.
10195 (linux_attach): last_resume_kind moved the thread_info; adjust.
10196 (status_pending_p_callback): Adjust.
10197 (linux_wait_for_event_1): Adjust.
10198 (count_events_callback, select_singlestep_lwp_callback)
10199 (select_event_lwp_callback, cancel_breakpoints_callback)
10200 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10201 (proceed_one_lwp): Adjust.
10202 (linux_async): Add debug output.
10203 (linux_thread_stopped): New.
10204 (linux_pause_all): New.
10205 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10206 linux_pause_all.
10207 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10208 (thread_db_free): Delete declaration.
10209 (thread_db_detach, thread_db_mourn): Declare.
10210 * thread-db.c (thread_db_init): Use thread_db_mourn.
10211 (thread_db_free): Delete, split in two.
10212 (disable_thread_event_reporting): New.
10213 (thread_db_detach): New.
10214 (thread_db_mourn): New.
10215
10216 * server.h (struct thread_info) <last_resume_kind>: New field.
10217 <attached>: Add comment.
10218 <gdb_detached>: New field.
10219 (handler_func): Change return type to int.
10220 (handle_serial_event, handle_target_event): Ditto.
10221 (gdb_connected): Declare.
10222 (tracing): Delete.
10223 (disconnected_tracing): Declare.
10224 (stop_tracing): Declare.
10225
10226 * server.c (handle_query) <qSupported>: Report support for
10227 disconnected tracing.
10228 (queue_stop_reply_callback): Account for running threads.
10229 (gdb_wants_thread_stopped): New.
10230 (gdb_wants_all_threads_stopped): New.
10231 (gdb_reattached_process): New.
10232 (handle_status): Clear the `gdb_detached' flag of all processes.
10233 In all-stop, stop all threads.
10234 (main): Be sure to leave tfind mode. Handle disconnected tracing.
10235 (process_serial_event): If the remote connection breaks, or if an
10236 exit was forced with "monitor exit", force an event loop exit.
10237 Handle disconnected tracing on detach.
10238 (handle_serial_event): Adjust.
10239 (handle_target_event): If GDB isn't connected, forward events back
10240 to the inferior, unless the last process exited, in which case,
10241 exit gdbserver. Adjust interface.
10242
10243 * remote-utils.c (remote_open): Don't block in accept. Instead
10244 register an event loop source on the listen socket file
10245 descriptor. Refactor bits into ...
10246 (listen_desc): ... this new global.
10247 (gdb_connected): ... this new function.
10248 (enable_async_notification): ... this new function.
10249 (handle_accept_event): ... this new function.
10250 (remote_close): Clear remote_desc.
10251
10252 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10253
10254 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10255 New fields.
10256 (mourn_inferior): Define.
10257 (target_process_qsupported): Avoid the dangling else problem.
10258 (thread_stopped): Define.
10259 (pause_all): Define.
10260 (target_waitstatus_to_string): Declare.
10261 * target.c (target_waitstatus_to_string): New.
10262
10263 * tracepoint.c (tracing): Make extern.
10264 (disconnected_tracing): New.
10265 (stop_tracing): Make extern. Handle tracing stops due to GDB
10266 disconnecting.
10267 (cmd_qtdisconnected): New.
10268 (cmd_qtstatus): Report disconnected tracing status in trace reply.
10269 (handle_tracepoint_general_set): Handle QTDisconnected.
10270
10271 * event-loop.c (event_handler_func): Change return type to int.
10272 (process_event): Bail out if the event handler wants the event
10273 loop to stop.
10274 (handle_file_event): Ditto.
10275 (start_event_loop): Bail out if the event handler wants the event
10276 loop to stop.
10277
10278 * nto-low.c (nto_target_ops): Adjust.
10279 * spu-low.c (spu_wait): Don't remove the process here.
10280 (spu_target_ops): Adjust.
10281 * win32-low.c (win32_wait): Don't remove the process here.
10282 (win32_target_ops): Adjust.
10283
5d267c4c
PA
102842010-04-11 Pedro Alves <pedro@codesourcery.com>
10285
10286 * regcache.c (realloc_register_cache): Invalidate inferior's
10287 regcache before recreating it.
10288
623ccd72
PA
102892010-04-09 Pedro Alves <pedro@codesourcery.com>
10290
10291 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10292
219f2f23
PA
102932010-04-09 Stan Shebs <stan@codesourcery.com>
10294 Pedro Alves <pedro@codesourcery.com>
10295
10296 * server.h (LONGEST): New.
10297 (struct thread_info) <while_stepping>: New field.
10298 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10299 Declare.
10300 (initialize_tracepoint, handle_tracepoint_general_set)
10301 (handle_tracepoint_query, tracepoint_finished_step)
10302 (tracepoint_was_hit, release_while_stepping_state_list):
10303 (current_traceframe): Declare.
10304 * server.c (handle_general_set): Handle tracepoint packets.
10305 (read_memory): New.
10306 (write_memory): New.
10307 (handle_search_memory_1): Use read_memory.
10308 (handle_query): Report support for conditional tracepoints, trace
10309 state variables, and tracepoint sources. Handle tracepoint
10310 queries.
10311 (main): Initialize the tracepoints module.
10312 (process_serial_event): Handle traceframe reads/writes.
10313
10314 * linux-low.c (handle_tracepoints): New.
10315 (linux_wait_1): Call it.
10316 (linux_resume_one_lwp): Handle while-stepping.
10317 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10318 (linux_target_ops): Install them.
10319 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10320 New field.
10321 * linux-x86-low.c (x86_supports_tracepoints): New.
10322 (the_low_target). Install it.
10323
10324 * mem-break.h (delete_breakpoint): Declare.
10325 * mem-break.c (delete_breakpoint): Make external.
10326
10327 * target.h (struct target_ops): Add `supports_tracepoints',
10328 `read_pc', and `write_pc' fields.
10329 (target_supports_tracepoints): Define.
10330 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10331 (phex_nz): New.
10332
10333 * regcache.h (struct regcache) <registers_owned>: New field.
10334 (init_register_cache, regcache_cpy): Declare.
10335 (regcache_read_pc, regcache_write_pc): Declare.
10336 (register_cache_size): Declare.
10337 (supply_regblock): Declare.
10338 * regcache.c (init_register_cache): New.
10339 (new_register_cache): Use it.
10340 (regcache_cpy): New.
10341 (register_cache_size): New.
10342 (supply_regblock): New.
10343 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 10344
219f2f23
PA
10345 * tracepoint.c: New.
10346
10347 * Makefile.in (OBS): Add tracepoint.o.
10348 (tracepoint.o): New rule.
10349
3a13a53b
L
103502010-04-08 H.J. Lu <hongjiu.lu@intel.com>
10351
10352 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10353 (i386-mmx.o): New.
10354 (i386-mmx.c): Likewise.
10355 (i386-mmx-linux.o): Likewise.
10356 (i386-mmx-linux.c): Likewise.
10357
10358 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10359 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10360 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10361 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10362
10363 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10364 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10365 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10366
1570b33e
L
103672010-04-07 H.J. Lu <hongjiu.lu@intel.com>
10368
10369 * Makefile.in (clean): Updated.
10370 (i386-avx.o): New.
10371 (i386-avx.c): Likewise.
10372 (i386-avx-linux.o): Likewise.
10373 (i386-avx-linux.c): Likewise.
10374 (amd64-avx.o): Likewise.
10375 (amd64-avx.c): Likewise.
10376 (amd64-avx-linux.o): Likewise.
10377 (amd64-avx-linux.c): Likewise.
10378
10379 * configure.srv (srv_i386_regobj): Add i386-avx.o.
10380 (srv_i386_linux_regobj): Add i386-avx-linux.o.
10381 (srv_amd64_regobj): Add amd64-avx.o.
10382 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10383 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10384 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10385 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10386 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10387 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10388 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10389
10390 * i387-fp.c: Include "i386-xstate.h".
10391 (i387_xsave): New.
10392 (i387_cache_to_xsave): Likewise.
10393 (i387_xsave_to_cache): Likewise.
10394 (x86_xcr0): Likewise.
10395
10396 * i387-fp.h (i387_cache_to_xsave): Likewise.
10397 (i387_xsave_to_cache): Likewise.
10398 (x86_xcr0): Likewise.
10399
10400 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10401 * linux-crisv32-low.c (target_regsets): Likewise.
10402 * linux-m68k-low.c (target_regsets): Likewise.
10403 * linux-mips-low.c (target_regsets): Likewise.
10404 * linux-ppc-low.c (target_regsets): Likewise.
10405 * linux-s390-low.c (target_regsets): Likewise.
10406 * linux-sh-low.c (target_regsets): Likewise.
10407 * linux-sparc-low.c (target_regsets): Likewise.
10408 * linux-xtensa-low.c (target_regsets): Likewise.
10409
10410 * linux-low.c: Include <sys/uio.h>.
10411 (regsets_fetch_inferior_registers): Support nt_type.
10412 (regsets_store_inferior_registers): Likewise.
10413 (linux_process_qsupported): New.
10414 (linux_target_ops): Add linux_process_qsupported.
10415
10416 * linux-low.h (regset_info): Add nt_type.
10417 (linux_target_ops): Add process_qsupported.
10418
10419 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10420 and <sys/uio.h>.
10421 (init_registers_i386_avx_linux): New.
10422 (init_registers_amd64_avx_linux): Likewise.
10423 (xmltarget_i386_linux_no_xml): Likewise.
10424 (xmltarget_amd64_linux_no_xml): Likewise.
10425 (PTRACE_GETREGSET): Likewise.
10426 (PTRACE_SETREGSET): Likewise.
10427 (x86_fill_xstateregset): Likewise.
10428 (x86_store_xstateregset): Likewise.
10429 (use_xml): Likewise.
10430 (x86_linux_update_xmltarget): Likewise.
10431 (x86_linux_process_qsupported): Likewise.
10432 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10433 (x86_arch_setup): Don't call init_registers_amd64_linux nor
10434 init_registers_i386_linux here. Call
10435 x86_linux_update_xmltarget.
10436 (the_low_target): Add x86_linux_process_qsupported.
10437
10438 * server.c (handle_query): Call target_process_qsupported.
10439
10440 * target.h (target_ops): Add process_qsupported.
10441 (target_process_qsupported): New.
10442
fc7238bb
PA
104432010-04-03 Pedro Alves <pedro@codesourcery.com>
10444
10445 * inferiors.c (add_thread): Set last_status kind to
10446 TARGET_WAITKIND_IGNORE.
10447 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10448 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
10449 (linux_wait_1): Move `thread' local definition to block that uses
10450 it. Don't NULL initialize `event_child'.
10451 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10452 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10453 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10454
bdabb078
PA
104552010-04-01 Pedro Alves <pedro@codesourcery.com>
10456
10457 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10458 an extended waitstatus, or by a watchpoint.
10459 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10460 thread was stepping or has been stopped by a watchpoint.
10461
d3bbe7a0
PA
104622010-04-01 Pedro Alves <pedro@codesourcery.com>
10463
10464 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10465 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10466 of another, then delete the previous, and validate all
10467 breakpoints.
10468 (validate_inserted_breakpoint): New.
10469 (delete_disabled_breakpoints): New.
10470 (validate_breakpoints): New.
10471 (check_mem_read): Validate breakpoints before trusting their
10472 shadow. Delete disabled breakpoints.
10473 (check_mem_write): Validate breakpoints before trusting they
10474 should be inserted. Delete disabled breakpoints.
10475 * mem-break.h (validate_breakpoints):
10476 * server.c (handle_query): Validate breakpoints when we see a
10477 qSymbol query.
10478
8b07ae33
PA
104792010-04-01 Pedro Alves <pedro@codesourcery.com>
10480
10481 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10482 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
10483 if we could tell there's a GDB breakpoint at stop_pc.
10484 (need_step_over_p): Don't do a step over if we find a GDB
10485 breakpoint at the resume PC.
10486
10487 * mem-break.c (struct raw_breakpoint): New.
10488 (enum bkpt_type): New type `gdb_breakpoint'.
10489 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10490 fields. New field `raw'.
10491 (find_raw_breakpoint_at): New.
10492 (set_raw_breakpoint_at): Handle refcounting. Create a raw
10493 breakpoint instead.
10494 (set_breakpoint_at): Adjust.
10495 (delete_raw_breakpoint): New.
10496 (release_breakpoint): New.
10497 (delete_breakpoint): Rename to...
10498 (delete_breakpoint_1): ... this. Add proc parameter. Use
10499 release_breakpoint. Return ENOENT.
10500 (delete_breakpoint): Reimplement.
10501 (find_breakpoint_at): Delete.
10502 (find_gdb_breakpoint_at): New.
10503 (delete_breakpoint_at): Delete.
10504 (set_gdb_breakpoint_at): New.
10505 (delete_gdb_breakpoint_at): New.
10506 (gdb_breakpoint_here): New.
10507 (set_reinsert_breakpoint): Use release_breakpoint.
10508 (uninsert_breakpoint): Rename to ...
10509 (uninsert_raw_breakpoint): ... this.
10510 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10511 (reinsert_raw_breakpoint): Change parameter type to
10512 raw_breakpoint.
10513 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10514 instead.
10515 (check_breakpoints): Adjust. Use release_breakpoint.
10516 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10517 (breakpoint_inserted_here): Ditto.
10518 (check_mem_read): Adjust to iterate over raw breakpoints instead.
10519 Don't trust the breakpoint's shadow if it is not inserted.
10520 (check_mem_write): Adjust to iterate over raw breakpoints instead.
10521 (delete_all_breakpoints): Adjust.
10522 (free_all_breakpoints): Mark all breakpoints as uninserted, and
10523 use delete_breakpoint_1.
10524
10525 * mem-break.h (breakpoints_supported): Delete declaration.
10526 (set_gdb_breakpoint_at): Declare.
10527 (gdb_breakpoint_here): Declare.
10528 (delete_breakpoint_at): Delete.
10529 (delete_gdb_breakpoint_at): Declare.
10530
10531 * server.h (struct raw_breakpoint): Forward declare.
10532 (struct process_info): New field `raw_breakpoints'.
10533
10534 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10535 breakpoints.
10536
6bf5e0ba
PA
105372010-03-24 Pedro Alves <pedro@codesourcery.com>
10538
10539 * linux-low.c (status_pending_p_callback): Fix comment.
10540 (linux_wait_for_event_1): Move most of the internal breakpoint
10541 handling from here...
10542 (linux_wait_1): ... to here.
10543 (count_events_callback): New.
10544 (select_singlestep_lwp_callback): New.
10545 (select_event_lwp_callback): New.
10546 (cancel_breakpoints_callback): New.
10547 (select_event_lwp): New.
10548 (linux_wait_1): Simplify internal breakpoint handling. Give equal
10549 priority to all LWPs that have had events that should be reported
10550 to the client. Cancel breakpoints when about to reporting the
10551 event to the client, not while stopping lwps. No longer cancel
10552 finished single-steps here.
10553 (cancel_finished_single_step): Delete.
10554 (cancel_finished_single_steps): Delete.
10555
414a389f
PA
105562010-03-24 Pedro Alves <pedro@codesourcery.com>
10557
10558 * mem-break.c (enum bkpt_type): New.
10559 (struct breakpoint): New field `type'.
10560 (set_breakpoint_at): Change return type to struct breakpoint
10561 pointer. Set type to `other_breakpoint' by default.
10562 (delete_breakpoint): Rewrite, supporting more than one breakpoint
10563 in the breakpoint list.
10564 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10565 (reinsert_breakpoint): Rename to ...
10566 (reinsert_raw_breakpoint): ... this.
10567 (reinsert_breakpoints_at): Adjust.
10568 * mem-break.h (struct breakpoint): Declare.
10569 (set_breakpoint_at): Change return type to struct breakpoint
10570 pointer.
10571
2280c721
PA
105722010-03-24 Pedro Alves <pedro@codesourcery.com>
10573
10574 * server.c (handle_query): Assign, not compare.
10575
d50171e4
PA
105762010-03-24 Pedro Alves <pedro@codesourcery.com>
10577
10578 Teach linux gdbserver to step-over-breakpoints.
10579
10580 * linux-low.c (can_hardware_single_step): New.
10581 (supports_breakpoints): New.
10582 (handle_extended_wait): If stopping threads, read the stop pc of
10583 the new cloned LWP.
10584 (get_pc): New.
10585 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
10586 low target doesn't support retrieving the PC.
10587 (add_lwp): Set last_resume_kind to resume_continue.
10588 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
10589 (linux_attach): Don't clear stop_expected. Set the lwp's
10590 last_resume_kind to resume_stop.
10591 (linux_detach_one_lwp): Don't check for removed breakpoints.
10592 (check_removed_breakpoint): Delete.
10593 (status_pending_p): Rename to ...
10594 (status_pending_p_callback): ... this. Don't check for removed
10595 breakpoints. Don't consider threads that are stopped from GDB's
10596 perspective.
10597 (linux_wait_for_lwp): Always read the stop_pc here.
10598 (cancel_breakpoint): New.
10599 (step_over_bkpt): New global.
10600 (linux_wait_for_event_1): Implement stepping over breakpoints.
10601 (gdb_wants_lwp_stopped): New.
10602 (gdb_wants_all_stopped): New.
10603 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
10604 single-step traps here. Store the thread's last reported target
10605 wait status.
10606 (send_sigstop): Don't clear stop_expected. Always set it,
10607 instead.
10608 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10609 (cancel_finished_single_step): New.
10610 (cancel_finished_single_steps): New.
10611 (wait_for_sigstop): Don't cancel finished single-step traps here.
10612 (linux_resume_one_lwp): Don't check for removed breakpoints.
10613 Don't set `step' on non-hardware step archs.
10614 (linux_set_resume_request): Ignore resume_stop requests if already
10615 stopping or stopped. Set the lwp's last_resume_kind.
10616 (resume_status_pending_p): Don't check for removed breakpoints.
10617 (need_step_over_p): New.
10618 (start_step_over): New.
10619 (finish_step_over): New.
10620 (linux_resume_one_thread): Always queue a sigstop for resume_stop
10621 requests. Clear the thread's last reported target waitstatus.
10622 Don't use the `suspended' flag. Don't consider pending breakpoints.
10623 (linux_resume): Start a step-over if necessary.
10624 (proceed_one_lwp): New.
10625 (proceed_all_lwps): New.
10626 (unstop_all_lwps): New.
10627 * linux-low.h (struct lwp_info): Rewrite comment for the
10628 `suspended' flag. Add the `stop_pc' field. Delete the
10629 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
10630 Add `'last_resume_kind' and `need_step_over' fields.
10631 * inferiors.c (struct thread_info): Delete, moved elsewhere.
10632 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10633 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
10634 (set_raw_breakpoint_at): New.
10635 (set_breakpoint_at): Rewrite to use it.
10636 (reinsert_breakpoint_handler): Delete.
10637 (set_reinsert_breakpoint): New.
10638 (reinsert_breakpoint_by_bp): Delete.
10639 (delete_reinsert_breakpoints): New.
10640 (uninsert_breakpoint): Rewrite.
10641 (uninsert_breakpoints_at): New.
10642 (reinsert_breakpoint): Rewrite.
10643 (reinsert_breakpoints_at): New.
10644 (check_breakpoints): Rewrite.
10645 (breakpoint_here): New.
10646 (breakpoint_inserted_here): New.
10647 (check_mem_read): Adjust.
10648 * mem-break.h (breakpoints_supported, breakpoint_here)
10649 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10650 (reinsert_breakpoint_by_bp): Delete declaration.
10651 (delete_reinsert_breakpoints): Declare.
10652 (reinsert_breakpoint): Delete declaration.
10653 (reinsert_breakpoints_at): Declare.
10654 (uninsert_breakpoint): Delete declaration.
10655 (uninsert_breakpoints_at): Declare.
10656 (check_breakpoints): Adjust prototype.
10657 * server.h: Adjust include order.
10658 (struct thread_info): Declare here. Add a `last_status' field.
10659
30ba68cb
MS
106602010-03-23 Michael Snyder <msnyder@vmware.com>
10661
10662 * server.c (crc32): New function.
10663 (handle_query): Add handling for 'qCRC:' request.
10664
b9a881c2
PA
106652010-03-23 Pedro Alves <pedro@codesourcery.com>
10666
10667 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10668 lwp had been stopped by a watchpoint.
10669
e92d13d5
PA
106702010-03-16 Pedro Alves <pedro@codesourcery.com>
10671
10672 * server.h (internal_error): Declare.
10673 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10674 * utils.c (internal_error): New function.
10675
64daa791
AS
106762010-03-15 Andreas Schwab <schwab@redhat.com>
10677
10678 * configure.srv: Fix typo setting srv_regobj.
10679
f52cd8cd
PA
106802010-03-15 Pedro Alves <pedro@codesourcery.com>
10681
10682 * linux-low.c (fetch_register): Avoid passing a non string literal
10683 format to `error'.
10684 (usr_store_inferior_registers): Ditto.
10685
93ae6fdc
PA
106862010-03-14 Pedro Alves <pedro@codesourcery.com>
10687
10688 * linux-low.c (linux_write_memory): Bail out early if peeking
10689 memory failed.
10690
c3adc08c
PA
106912010-03-14 Pedro Alves <pedro@codesourcery.com>
10692
10693 * linux-low.h (struct lwp_info): New fields
10694 `stopped_by_watchpoint' and `stopped_data_address'.
10695 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10696 here, and cache them in the lwp object.
10697 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10698 directly.
10699 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10700 field.
10701 (linux_stopped_by_watchpoint): Rewrite.
10702 (linux_stopped_data_address): Rewrite.
10703
bce522a2
PA
107042010-03-06 Simo Melenius <simo.melenius@iki.fi>
10705
10706 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10707 switching the current inferior, not before.
10708
90884b2b
L
107092010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10710
10711 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10712 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10713 i386-linux.c and amd64-linux.c.
10714 (reg-i386.o): Removed.
10715 (reg-i386.c): Likewise.
10716 (reg-i386-linux.o): Likewise.
10717 (reg-i386-linux.c): Likewise.
10718 (reg-x86-64.o): Likewise.
10719 (reg-x86-64.c): Likewise.
10720 (reg-x86-64-linux.o): Likewise.
10721 (reg-x86-64-linux.c): Likewise.
10722 (i386.o): New.
10723 (i386.c): Likewise.
10724 (i386-linux.o): Likewise.
10725 (i386-linux.c): Likewise.
10726 (amd64.o): Likewise.
10727 (amd64.c): Likewise.
10728 (amd64-linux.o): Likewise.
10729 (amd64-linux.c): Likewise.
10730
10731 * configure.srv (srv_i386_regobj): New.
10732 (srv_i386_linux_regobj): Likewise.
10733 (srv_amd64_regobj): Likewise.
10734 (srv_amd64_linux_regobj): Likewise.
10735 (srv_i386_32bit_xmlfiles): Likewise.
10736 (srv_i386_64bit_xmlfiles): Likewise.
10737 (srv_i386_xmlfiles): Likewise.
10738 (srv_amd64_xmlfiles): Likewise.
10739 (srv_i386_linux_xmlfiles): Likewise.
10740 (srv_amd64_linux_xmlfiles): Likewise.
10741 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10742 srv_xmlfiles to $srv_i386_xmlfiles.
10743 (i[34567]86-*-mingw32ce*): Likewise.
10744 (i[34567]86-*-mingw*): Likewise.
10745 (i[34567]86-*-nto*): Likewise.
10746 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10747 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10748 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10749 (x86_64-*-linux*): Likewise.
10750
10751 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10752 (init_registers_amd64_linux): New.
10753 (x86_arch_setup): Replace init_registers_x86_64_linux with
10754 init_registers_amd64_linux.
10755
193f13e6
MK
107562010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10757
10758 * configure.ac: Check for libdl. If it is not available link against
10759 static libthread_db.
10760 * configure: Regenerate.
10761
85d721b8
PA
107622010-02-22 Pedro Alves <pedro@codesourcery.com>
10763
10764 PR9605
10765
10766 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10767 handing a read watchpoint.
10768 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10769
6076632b
DE
107702010-02-12 Doug Evans <dje@google.com>
10771
10772 * linux-low.c (linux_supports_tracefork_flag): Document.
10773 (linux_look_up_symbols): Add comment.
10774
3327ccf7
L
107752010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10776
10777 * regcache.c (supply_register): Clear regcache if buf is NULL.
10778
0718675c 107792010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 10780 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
10781
10782 * inferiors.c (find_inferior): Add function documentation.
10783 (unloaded_dll): Handle the case where the unloaded dll has not
10784 been previously registered in the dll list.
10785
177321bd
DJ
107862010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10787
10788 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10789 (thumb2_breakpoint): New.
10790 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10791
2b009048
DJ
107922010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10793
10794 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10795 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10796 breakpoints.
10797
3be029c7
PA
107982010-01-21 Pedro Alves <pedro@codesourcery.com>
10799
10800 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10801
18f5de3b
JK
108022010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10803
10804 * linux-s390-low.c (s390_collect_ptrace_register)
10805 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10806
3743bb4f
DE
108072010-01-21 Doug Evans <dje@google.com>
10808
14ce3065
DE
10809 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10810 (PTRACE_ARG4_TYPE): New macro.
10811 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10812 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10813 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10814 (usr_store_inferior_registers): Ditto.
10815 (linux_read_memory, linux_write_memory): Ditto.
10816 (linux_test_for_tracefork): Ditto.
10817
3743bb4f
DE
10818 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10819 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10820
8b315be5
PA
108212010-01-21 Pedro Alves <pedro@codesourcery.com>
10822
10823 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10824 target.
10825
85492558
PA
108262010-01-21 Pedro Alves <pedro@codesourcery.com>
10827
10828 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10829 prototype to take a regcache. Adjust.
10830
442ea881
PA
108312010-01-20 Pedro Alves <pedro@codesourcery.com>
10832
10833 * regcache.h (struct thread_info): Forward declare.
10834 (struct regcache): New.
10835 (new_register_cache): Adjust prototype.
10836 (get_thread_regcache): Declare.
10837 (free_register_cache): Adjust prototype.
10838 (registers_to_string, registers_from_string): Ditto.
10839 (supply_register, supply_register_by_name, collect_register)
10840 (collect_register_as_string, collect_register_by_name): Ditto.
10841 * regcache.c (struct inferior_regcache_data): Delete.
10842 (get_regcache): Rename to ...
10843 (get_thread_regcache): ... this. Adjust. Switch inferior before
10844 fetching registers.
10845 (regcache_invalidate_one): Adjust.
10846 (regcache_invalidate): Fix prototype.
10847 (new_register_cache): Return the new register cache.
10848 (free_register_cache): Change prototype.
10849 (realloc_register_cache): Adjust.
10850 (registers_to_string): Change prototype to take a regcache. Adjust.
10851 (registers_from_string): Ditto.
10852 (register_data): Ditto.
10853 (supply_register): Ditto.
10854 (supply_register_by_name): Ditto.
10855 (collect_register): Ditto.
10856 (collect_register_as_string): Ditto.
10857 (collect_register_by_name): Ditto.
10858 * server.c (process_serial_event): Adjust.
10859 * linux-low.h (regset_fill_func, regset_store_func): Change
10860 prototype.
10861 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10862 Change prototype.
10863 * linux-low.c (get_stop_pc): Adjust.
10864 (check_removed_breakpoint): Adjust.
10865 (linux_wait_for_event): Adjust.
10866 (linux_resume_one_lwp): Adjust.
10867 (fetch_register): Add regcache parameter. Adjust.
10868 (usr_store_inferior_registers): Ditto.
10869 (regsets_fetch_inferior_registers): Ditto.
10870 (regsets_store_inferior_registers): Ditto.
10871 (linux_fetch_registers, linux_store_registers): Ditto.
10872 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10873 regcache. Adjust.
43aaf8b6
PA
10874 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10875 Ditto.
442ea881
PA
10876 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10877 prototype to take a regcache.
10878 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10879 * remote-utils.c (convert_ascii_to_int, outreg)
10880 (prepare_resume_reply): Change prototype to take a regcache.
10881 Adjust.
10882 * target.h (struct target_ops) <fetch_registers, store_registers>:
10883 Change prototype to take a regcache.
10884 (fetch_inferior_registers, store_inferior_registers): Change
10885 prototype to take a regcache. Adjust.
10886 * proc-service.c (ps_lgetregs): Adjust.
10887 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10888 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10889 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10890 take a regcache. Adjust.
10891 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10892 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10893 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10894 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10895 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10896 (cris_cannot_fetch_register):
10897 (cris_breakpoint_at): Change prototype to take a regcache.
10898 Adjust.
10899 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10900 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10901 to take a regcache. Adjust.
10902 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10903 Adjust.
10904 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10905 take a regcache. Adjust.
10906 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10907 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10908 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10909 * linux-mips-low.c (mips_get_pc):
10910 (mips_set_pc): Change prototype to take a regcache. Adjust.
10911 (mips_reinsert_addr): Adjust.
10912 (mips_collect_register): Change prototype to take a regcache.
10913 Adjust.
10914 (mips_supply_register):
10915 (mips_collect_register_32bit, mips_supply_register_32bit)
10916 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10917 (mips_store_fpregset): Ditto.
43aaf8b6
PA
10918 * linux-ppc-low.c (ppc_supply_ptrace_register)
10919 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
10920 (parse_spufs_run): Adjust.
10921 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10922 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10923 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10924 take a regcache. Adjust.
10925 * linux-s390-low.c (s390_collect_ptrace_register)
10926 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10927 (s390_set_pc): Change prototype to take a regcache. Adjust.
10928 (s390_arch_setup): Adjust.
10929 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10930 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10931 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10932 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10933 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10934 regcache. Adjust.
10935 (sparc_breakpoint_at): Adjust.
10936 * linux-xtensa-low.c (xtensa_fill_gregset):
10937 (xtensa_store_gregset):
10938 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10939 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10940 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10941 prototype to take a regcache. Adjust.
10942 * win32-arm-low.c (arm_fetch_inferior_register)
10943 (arm_store_inferior_register): Change prototype to take a
10944 regcache. Adjust.
10945 * win32-i386-low.c (i386_fetch_inferior_register)
10946 (i386_store_inferior_register): Change prototype to take a
10947 regcache. Adjust.
10948 * win32-low.c (child_fetch_inferior_registers)
10949 (child_store_inferior_registers): Change prototype to take a
10950 regcache. Adjust.
10951 (win32_wait): Adjust.
10952 (win32_fetch_inferior_registers): Change prototype to take a
10953 regcache. Adjust.
10954 (win32_store_inferior_registers): Adjust.
10955 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10956 store_inferior_register>: Change prototype to take a regcache.
10957
60c3d7b0
DE
109582010-01-20 Doug Evans <dje@google.com>
10959
10960 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10961 #ifdef.
10962 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 10963 (W_STOPCODE): Provide definition if missing.
60c3d7b0 10964
dc146f7c
VP
109652010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10966
10967 * linux-low.c (linux_core_of_thread): New.
10968 (compare_ints, show_process, list_threads): New.
10969 (linux_qxfer_osdata): Report threads and cores.
10970 (linux_target_op): Register linux_core_of_thread.
10971 * remote-utils.c (prepare_resume_reply): Report the core.
10972 (buffer_xml_printf): Support %d specifier.
10973 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10974 New.
10975 (handle_query): Handle qXfer:threads. Announce availability
10976 thereof.
10977 * target.h (struct target_ops): New field core_of_thread.
10978
7803799a
UW
109792010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10980
10981 * Makefile.in (clean): Remove new generated files.
10982 (reg-s390.o, reg-s390.c): Remove rules.
10983 (reg-s390x.o, reg-s390x.c): Likewise.
10984 (s390-linux32.o, s390-linux32.c): Add rules.
10985 (s390-linux64.o, s390-linux64.c): Likewise.
10986 (s390x-linux64.o, s390x-linux64.c): Likewise.
10987 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10988 * linux-s390-low.c: Include <elf.h>.
10989 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10990 (init_registers_s390): Remove prototype.
10991 (init_registers_s390x): Likewise.
10992 (init_registers_s390_linux32): Add prototype.
10993 (init_registers_s390_linux64): Likewise.
10994 (init_registers_s390x_linux64): Likewise.
10995 (s390_num_regs_3264): New define.
10996 (s390_regmap_3264): New global variable.
10997 (s390_cannot_fetch_register): Remove obsolete check.
10998 (s390_cannot_store_register): Likewise.
10999 (s390_collect_ptrace_register): Handle upper/lower register halves.
11000 (s390_supply_ptrace_register): Likewise.
11001 (s390_fill_gregset): Update to register number changes.
11002 (s390_get_hwcap): New routine.
11003 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11004 Install appropriate regmap and register set.
11005
6e7ffa39
JB
110062010-01-01 Joel Brobecker <brobecker@adacore.com>
11007
11008 * server.c (gdbserver_version): Update copyright year to 2010.
11009 * gdbreplay.c (gdbreplay_version): Likewise.
11010
957f3f49
DE
110112009-12-28 Doug Evans <dje@google.com>
11012
11013 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11014 elf/external.h. Include <elf.h> instead but only if necessary.
11015
ca5c370d
PA
110162009-12-28 Pedro Alves <pedro@codesourcery.com>
11017
11018 * linux-low.c (linux_remove_process): Remove `detaching'
11019 parameter. Don't release/detach from thread_db here.
11020 (linux_kill): Release/detach from thread_db here, ...
11021 (linux_detach): ... and here, before actually detaching.
11022 (linux_wait_1): ... and here, when a process exits.
11023 * thread-db.c (any_thread_of): New.
11024 (thread_db_free): Switch the current inferior to a thread of the
11025 passed in process.
11026
4ee62156
DE
110272009-12-21 Doug Evans <dje@google.com>
11028
d90e6a88
DE
11029 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11030
c5f62d5f
DE
11031 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11032 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11033 warning ifndef __NR_tkill. Move setting of errno there too.
11034 Delete unnecessary resetting of errno after syscall.
11035 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11036
10e86dd7
DE
11037 * configure.ac: Check for dladdr.
11038 * config.in: Regenerate.
11039 * configure: Regenerate.
11040 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11041 (try_thread_db_load): Update.
11042
4ee62156
DE
11043 * linux-low.c (my_waitpid): Delete unnecessary prototype.
11044
00f515da
DE
110452009-12-18 Doug Evans <dje@google.com>
11046
e9464885
DE
11047 * event-loop.c: Include unistd.h if it exists.
11048
07d4f67e
DE
11049 * linux-low.c (my_waitpid): Move definition away from being in
11050 between linux_tracefork_child/linux_test_for_tracefork.
11051
00f515da
DE
11052 * gdb_proc_service.h (psaddr_t): Fix type.
11053 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11054 signature to match glibc.
11055
1de1badb
DE
110562009-12-16 Doug Evans <dje@google.com>
11057
11058 * linux-low.c (linux_read_memory): Fix argument to read.
11059
aeeb81d1
PA
110602009-11-26 Pedro Alves <pedro@codesourcery.com>
11061
11062 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11063 events, don't leave current_inferior pointing at null.
11064
10357975
PA
110652009-11-26 Pedro Alves <pedro@codesourcery.com>
11066
11067 * win32-low.c (LOG): Delete.
11068 (OUTMSG): Output to stderr.
11069 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11070 on compile time LOG macro.
11071 (win32_wait): Fix debug output.
11072
cf6e3471
PA
110732009-11-26 Pedro Alves <pedro@codesourcery.com>
11074
11075 * win32-low.c (win32_add_one_solib): If the dll name is
11076 "ntdll.dll", prepend the system directory to the dll path.
11077
0c85e18e
MK
110782009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
11079
11080 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11081
9ac544ce 110822009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 11083 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
11084
11085 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11086 * configure.ac: Check for __mcoldfire__ and set
11087 gdb_cv_m68k_is_coldfire.
11088 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11089 reg-cf.o and reg-m68k.o.
11090 * configure: Regenerated.
11091
fd7dd3e6
PA
110922009-11-16 Pedro Alves <pedro@codesourcery.com>
11093
11094 * linux-low.c (linux_remove_process): Add `detaching' parameter.
11095 Pass it to thread_db_free.
11096 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11097 proper `detaching' argument to linux_remove_process.
11098 * linux-low.h (thread_db_free): Add `detaching' parameter.
11099 * thread-db.c (thread_db_init): Pass false as `detaching' argument
11100 to thread_db_free.
11101 (thread_db_free): Add `detaching' parameter. Only
11102 call td_ta_clear_event if detaching from process.
11103
75aa492e
MK
111042009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
11105
11106 * thread-db.c (thread_db_free): Fix typo.
11107
21e1bee4
PP
111082009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
11109
11110 PR gdb/10838
11111 * thread-db.c (thread_db_free): Call td_ta_clear_event.
11112
8838b45e
NS
111132009-11-03 Nathan Sidwell <nathan@codesourcery.com>
11114
11115 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11116 with an i686 compiler.
11117 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11118 needed.
11119 * configure: Rebuilt.
11120
8a35fb51
SL
111212009-10-29 Sandra Loosemore <sandra@codesourcery.com>
11122
11123 PR gdb/10783
11124
11125 * server.c (handle_search_memory_1): Correct read_addr initialization
11126 in loop for searching subsequent chunks.
11127
96f15937
PP
111282009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
11129
11130 * configure.ac: New --with-libthread-db option.
11131 * thread-db.c: Allow direct dependence on libthread_db.
11132 (thread_db_free): Adjust.
11133 * config.in: Regenerate.
11134 * configure: Likewise.
889bf7c5 11135
5f7d1694
PP
111362009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
11137
11138 PR gdb/10757
11139 * thread-db.c (attach_thread): New function.
11140 (maybe_attach_thread): Return success/failure.
11141 (find_new_threads_callback): Adjust.
889bf7c5
PA
11142 (thread_db_find_new_threads): Loop until no new threads.
11143
88e3b899
PA
111442009-10-13 Pedro Alves <pedro@codesourcery.com>
11145
11146 * proc-service.c (ps_lgetregs): Formatting.
11147
cdbfd419
PP
111482009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
11149
11150 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11151 * configure.ac: Adjust.
11152 * linux-low.h (struct process_info_private): Move members to struct
11153 thread_db.
11154 (thread_db_free, thread_db_handle_monitor_command): New prototype.
11155 * linux-low.c (linux_remove_process): Adjust.
11156 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11157 * server.c (handle_query): Move code ...
11158 (handle_monitor_command): ... here. New function.
11159 * target.h (struct target_ops): New member.
11160 * thread-db.c (struct thread_db): New.
11161 (libthread_db_search_path): New variable.
11162 (thread_db_create_event, thread_db_enable_reporting)
11163 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11164 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11165 (try_thread_db_load_1, dladdr_to_soname): New functions.
11166 (try_thread_db_load, thread_db_load_search): New functions.
11167 (thread_db_init): Search for libthread_db.
11168 (thread_db_free): New function.
11169 (thread_db_handle_monitor_command): Likewise.
11170 * config.in: Regenerate.
11171 * configure: Regenerate.
889bf7c5 11172
4168d2d6
UW
111732009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
11174
11175 * spu-low.c (spu_kill): Wait for inferior to terminate.
11176 Call clear_inferiors.
11177 (spu_detach): Call clear_inferiors.
11178
81ecdfbb
RW
111792009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11180
11181 * aclocal.m4: Regenerate.
11182 * config.in: Likewise.
11183 * configure: Likewise.
11184
0b9ff2c0
UW
111852009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11186
11187 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11188 (parse_spufs_run): New function.
11189 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11190 (ppc_breakpoint_at): Handle SPU breakpoints.
11191
efcbbd14
UW
111922009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11193
11194 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11195 (SPUFS_MAGIC): Define.
11196 (spu_enumerate_spu_ids): New function.
11197 (linux_qxfer_spu): New function.
11198 (linux_target_ops): Install linux_qxfer_spu.
11199
f4d9bade
UW
112002009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
11201
11202 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11203 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
11204 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11205 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11206 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11207 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11208 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11209 (init_registers_powerpc_cell32l): Add prototype.
11210 (init_registers_powerpc_cell64l): Likewise.
11211 (ppc_arch_setup): Detect Cell/B.E. architecture.
11212
96e946ca
RW
112132009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11214
11215 * Makefile.in (datarootdir): New variable.
11216
58d6951d
DJ
112172009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11218
11219 * linux-low.c (linux_write_memory): Update debugging output.
11220 * Makefile.in (clean): Add new descriptions.
11221 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11222 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11223 * configure.srv: Add new files for arm*-*-linux*.
11224 * linux-arm-low.c: Add new declarations.
11225 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11226 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11227 (HWCAP_VFPv3D16): New.
11228 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11229 instead of __IWMMXT__.
11230 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11231 (arm_arch_setup): New.
11232 (target_regsets): Remove #ifdef. Add VFP regset.
11233 (the_low_target): Use arm_arch_setup.
11234
12b42a12
DJ
112352009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
11236
11237 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11238 the main thread again.
11239
ac8c974e
AR
112402009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
11241
11242 Adding Neutrino gdbserver.
11243 * configure: Regenerated.
11244 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11245 * configure.srv (i[34567]86-*-nto*): New target.
11246 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11247 * remote-utils.c [__QNX__]: Include sys/iomgr.h
11248 (nto_comctrl) [__QNX__]: New function.
11249 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11250
4424e0c3 112512009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
11252
11253 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11254 srv_tgtobj.
11255
912cf4ba
PA
112562009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
11257 Pedro Alves <pedro@codesourcery.com>
11258
11259 * win32-i386-low.c (i386_get_thread_context): Handle systems that
11260 don't support CONTEXT_EXTENDED_REGISTERS.
11261 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11262 (the_low_target): Install them.
11263 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11264 failing with ERROR_PIPE_NOT_CONNECTED.
11265
aa5ca48f
DE
112662009-06-30 Doug Evans <dje@google.com>
11267 Pierre Muller <muller@ics.u-strasbg.fr>
11268
11269 Add h/w watchpoint support to x86-linux, win32-i386.
11270 * Makefile.in (SFILES): Add i386-low.c
11271 (i386_low_h): Define.
11272 (i386-low.o): Add dependencies.
11273 (linux-x86-low.o): Add i386-low.h dependency.
11274 (win32-i386-low.o): Ditto.
11275 * i386-low.c: New file.
11276 * i386-low.h: New file.
11277 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11278 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11279 * linux-low.c (linux_add_process): Initialize arch_private.
11280 (linux_remove_process): Free arch_private.
11281 (add_lwp): Initialize arch_private.
11282 (delete_lwp): Free arch_private.
11283 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11284 provided.
11285 * linux-low.h (process_info_private): New member arch_private.
11286 (lwp_info): New member arch_private.
11287 (linux_target_ops): New members new_process, new_thread,
11288 prepare_to_resume.
11289 (ptid_of): New macro.
11290 * linux-x86-low.c: Include stddef.h, i386-low.h.
11291 (arch_process_info): New struct.
11292 (arch_lwp_info): New struct.
11293 (x86_linux_dr_get, x86_linux_dr_set): New functions.
11294 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11295 (i386_dr_low_get_status): New function.
11296 (x86_insert_point, x86_remove_point): New functions.
11297 (x86_stopped_by_watchpoint): New function.
11298 (x86_stopped_data_address): New function.
11299 (x86_linux_new_process, x86_linux_new_thread): New functions.
11300 (x86_linux_prepare_to_resume): New function.
11301 (the_low_target): Add entries for insert_point, remove_point,
11302 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11303 prepare_to_resume.
11304 * server.c (debug_hw_points): New global.
11305 (monitor_show_help): Document set debug-hw-points.
11306 (handle_query): Process "set debug-hw-points".
11307 * server.h (debug_hw_points): Declare.
11308 (paddress): Declare.
11309 * utils.c (NUMCELLS, CELLSIZE): New macros.
11310 (get_sell, xsnprintf, paddress): New functions.
11311 * win32-arm-low.c (the_low_target): Add entries for insert_point,
11312 remove_point, stopped_by_watchpoint, stopped_data_address.
11313 * win32-i386-low.c: Include i386-low.h.
11314 (debug_reg_state): Replaces dr.
11315 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11316 (i386_dr_low_get_status): New function.
11317 (i386_insert_point, i386_remove_point): New functions.
11318 (i386_stopped_by_watchpoint): New function.
11319 (i386_stopped_data_address): New function.
11320 (i386_initial_stuff): Update.
11321 (get_thread_context,set_thread_context,i386_thread_added): Update.
11322 (the_low_target): Add entries for insert_point,
11323 remove_point, stopped_by_watchpoint, stopped_data_address.
11324 * win32-low.c (win32_insert_watchpoint): New function.
11325 (win32_remove_watchpoint): New function.
11326 (win32_stopped_by_watchpoint): New function.
11327 (win32_stopped_data_address): New function.
11328 (win32_target_ops): Add entries for insert_watchpoint,
11329 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11330 * win32-low.h (win32_target_ops): New members insert_point,
11331 remove_point, stopped_by_watchpoint, stopped_data_address.
11332
d993e290
PA
113332009-06-25 Pedro Alves <pedro@codesourcery.com>
11334
11335 * server.c (process_serial_event): Re-return unsupported, not
11336 error, if the type isn't recognized. Re-allow supporting only
11337 insert or remove packets. Also call require_running for
11338 breakpoints. Add missing break statement to default case. Tidy.
11339 * target.h (struct target_ops): Rename insert_watchpoint to
11340 insert_point, and remove_watchpoint to remove_point.
11341
11342 * linux-low.h (struct linux_target_ops): Likewise.
11343 * linux-low.c (linux_insert_watchpoint): Rename to ...
11344 (linux_insert_point): ... this. Adjust.
11345 (linux_remove_watchpoint): Rename to ...
11346 (linux_remove_point): ... this. Adjust.
11347 (linux_target_ops): Adjust.
11348 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11349 (cris_insert_point): ... this.
11350 (cris_remove_watchpoint): Rename to ...
11351 (cris_remove_point): ... this.
11352 (the_low_target): Adjust.
11353
0f54c268
PM
113542009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
11355
11356 * server.c (handle_v_kill): Pass signal_pid to
11357 kill_inferior if multi_process is zero.
11358
c6314022
AR
113592009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
11360
11361 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11362 * target.h (target_ops): Comment for *_watchpoint to make it clear
11363 the functions can get types '0' and '1'.
11364
4463ce24
AR
113652009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
11366
11367 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11368 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11369 * regcache.c (get_regcache): Likewise.
11370 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11371 * win32-low.c (child_fetch_inferior_registers): Remove check for
11372 regno 0.
11373
cf8fd78b
PA
113742009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
11375 Pedro Alves <pedro@codesourcery.com>
11376
11377 * target.h (struct target_ops) <supports_multi_process>: New
11378 callback.
11379 (target_supports_multi_process): New.
11380 * server.c (handle_query): Even if GDB reports support, only
11381 enable multi-process if the target also supports it. Report
11382 multi-process support only if the target backend supports it.
11383 * linux-low.c (linux_supports_multi_process): New function.
11384 (linux_target_ops): Install it as target_supports_multi_process
11385 callback.
11386
47c0c975
DE
113872009-05-24 Doug Evans <dje@google.com>
11388
e09875d4
DE
11389 Global renaming of find_thread_pid to find_thread_ptid.
11390 * server.h (find_thread_ptid): Renamed from find_thread_pid.
11391 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11392 All callers updated.
11393
e27d73f6
DE
11394 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11395 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11396 directly.
11397
47c0c975
DE
11398 * linux-low.c (get_stop_pc): Print pc if debug_threads.
11399 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11400 (linux_resume_one_lwp): Ditto.
11401
2acc282a
DE
114022009-05-23 Doug Evans <dje@google.com>
11403
11404 * linux-low.c (linux_resume_one_lwp): Change type of first arg
11405 from struct inferior_list_entry * to struct lwp_info *.
11406 All callers updated.
11407
9f1036c1
DE
114082009-05-13 Doug Evans <dje@google.com>
11409
11410 * linux-x86-low.c: Don't include assert.h.
11411 (x86_siginfo_fixup): Use fatal, not assert.
11412 (x86_arch_setup): Fix comment.
11413
d0722149
DE
114142009-05-12 Doug Evans <dje@google.com>
11415
11416 Biarch support for i386/amd64 gdbserver.
11417 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11418 Add linux-x86-low.c.
11419 (linux-i386-low.o, linux-x86-64-low.o): Delete.
11420 (linux-x86-low.o): Add.
11421 * linux-x86-64-low.c: Delete.
11422 * linux-i386-low.c: Delete.
11423 * linux-x86-low.c: New file.
11424 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11425 linux-x86-low.o.
11426 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11427 linux-x86-low.o.
11428 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11429 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11430 (linux_child_pid_to_exec_file): New function.
11431 (elf_64_header_p, elf_64_file_p): New functions.
11432 (siginfo_fixup): New function.
11433 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
11434 give target a chance to convert layout.
11435 * linux-low.h (linux_target_ops): New member siginfo_fixup.
11436 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11437
fdeb2a12
DE
114382009-05-07 Doug Evans <dje@google.com>
11439
11440 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11441 (regsets_store_inferior_registers): Ditto.
11442
a6dbe5df
PA
114432009-05-06 Pedro Alves <pedro@codesourcery.com>
11444
11445 PR server/10048
11446
11447 * linux-low.c (must_set_ptrace_flags): Delete.
11448 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11449 of the global.
11450 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
11451 `lwp->must_set_ptrace_flags' instead.
ba42693b 11452 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
11453 (linux_wait_1): ... not here.
11454
5091eb23
DE
114552009-04-30 Doug Evans <dje@google.com>
11456
9f767825
DE
11457 * inferiors.c (started_inferior_callback): New function.
11458 (attached_inferior_callback): New function.
11459 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11460 * server.c (print_started_pid, print_attached_pid): New functions.
11461 (detach_or_kill_for_exit): New function.
11462 (main): Call it instead of for_each_inferior (kill_inferior_callback).
11463 * server.h (have_started_inferiors_p): Declare.
11464 (have_attached_inferiors_p): Declare.
11465
5091eb23
DE
11466 * inferiors.c (remove_process): Fix memory leak, free process.
11467 * linux-low.c (linux_remove_process): New function.
11468 (linux_kill): Call it instead of remove_process.
11469 (linux_detach, linux_wait_1): Ditto.
11470
155c8968
PA
114712009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
11472
11473 * configure.srv: Add x86 Windows CE target.
11474
7fe519cb
UW
114752009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11476
11477 * inferiors.c (get_thread_process): Make global.
11478 * server.h (get_thread_process): Add prototype.
11479 * thread-db.c (find_one_thread): Use get_thread_process
11480 instead of current_process.
11481 (thread_db_get_tls_address): Do not crash if called when
11482 thread layer is not yet initialized.
11483
5472f405
UW
114842009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
11485
11486 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11487 * spu-low.c (current_tid): Rename to ...
11488 (current_ptid): ... this.
11489 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11490 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11491 ptid_get_lwp (current_ptid) instead of current_tid.
11492 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11493 instead of current_tid. Use find_process_pid to verify pid
11494 argument is valid. Pass proper argument to remove_process.
11495 (spu_thread_alive): Compare current_ptid instead of current_tid.
11496 (spu_resume): Likewise.
11497
55ac2b99
PA
114982009-04-02 Pedro Alves <pedro@codesourcery.com>
11499
11500 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11501 variable.
11502
95954743
PA
115032009-04-01 Pedro Alves <pedro@codesourcery.com>
11504
11505 Implement the multiprocess extensions, and add linux multiprocess
11506 support.
11507
11508 * server.h (ULONGEST): Declare.
11509 (struct ptid, ptid_t): New.
11510 (minus_one_ptid, null_ptid): Declare.
11511 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11512 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11513 (struct inferior_list_entry): Change `id' type from unsigned from
11514 to ptid_t.
11515 (struct sym_cache, struct breakpoint, struct
11516 process_info_private): Forward declare.
11517 (struct process_info): Declare.
11518 (current_process): Declare.
11519 (all_processes): Declare.
11520 (initialize_inferiors): Declare.
11521 (add_thread): Adjust to use ptid_t.
11522 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11523 (add_process, remove_process, find_thread_pid): Declare.
11524 (find_inferior_id): Adjust to use ptid_t.
11525 (cont_thread, general_thread, step_thread): Change type to ptid_t.
11526 (multi_process): Declare.
11527 (push_event): Adjust to use ptid_t.
11528 (read_ptid, write_ptid): Declare.
11529 (prepare_resume_reply): Adjust to use ptid_t.
11530 (clear_symbol_cache): Declare.
11531 * inferiors.c (all_processes): New.
11532 (null_ptid, minus_one_ptid): New.
11533 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11534 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11535 (add_thread): Change unsigned long to ptid. Remove gdb_id
11536 parameter. Adjust.
11537 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11538 (gdb_id_to_thread): Rename to ...
11539 (find_thread_pid): ... this. Change unsigned long to ptid.
11540 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11541 (loaded_dll, pull_pid_from_list): Adjust.
11542 (add_process, remove_process, find_process_pid)
11543 (get_thread_process, current_process, initialize_inferiors): New.
11544 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11545 (struct target_waitstatus) <related_pid>: Ditto.
11546 (struct target_ops) <kill, detach>: Add `pid' argument. Change
11547 return type to int.
11548 (struct target_ops) <join>: Add `pid' argument.
11549 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11550 (struct target_ops) <wait>: Add `ptid' field. Change return type
11551 to ptid.
11552 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11553 (mywait): Add `ptid' argument. Change return type to ptid_t.
11554 (target_pid_to_str): Declare.
11555 * target.c (set_desired_inferior): Adjust to use ptids.
11556 (mywait): Add new `ptid' argument. Adjust.
11557 (target_pid_to_str): New.
11558 * mem-break.h (free_all_breakpoints): Declare.
11559 * mem-break.c (breakpoints): Delelete.
11560 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11561 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11562 to use per-process breakpoint list.
11563 (free_all_breakpoints): New.
11564 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11565 (symbol_cache, all_symbols_looked_up): Delete.
11566 (hexchars): New.
11567 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11568 read_ptid): New.
11569 (prepare_resume_reply): Change ptid argument's type from unsigned
11570 long to ptid_t. Adjust. Implement W;process and X;process.
11571 (free_sym_cache, clear_symbol_cache): New.
11572 (look_up_one_symbol): Adjust to per-process symbol cache. *
11573 * server.c (cont_thread, general_thread, step_thread): Change type
11574 to ptid_t.
11575 (attached): Delete.
11576 (multi_process): New.
11577 (last_ptid): Change type to ptid_t.
11578 (struct vstop_notif) <ptid>: Change type to ptid_t.
11579 (queue_stop_reply, push_event): Change `ptid' argument's type to
11580 ptid_t.
11581 (discard_queued_stop_replies): Add `pid' argument.
11582 (start_inferior): Adjust to use ptids. Adjust to mywait interface
11583 changes. Don't reference the `attached' global.
11584 (attach_inferior): Adjust to mywait interface changes.
11585 (handle_query): Adjust to use ptids. Parse GDB's qSupported
11586 features. Handle and report "multiprocess+". Handle
11587 "qAttached:PID".
11588 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
11589 changes.
11590 (handle_v_kill): New.
11591 (handle_v_stopped): Adjust to use target_pid_to_str.
11592 (handle_v_requests): Allow multiple attaches and runs when
11593 multiprocess extensions are in effect. Handle "vKill".
11594 (myresume): Adjust to use ptids.
11595 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
11596 (handle_status): Adjust to discard_queued_stop_replies interface
11597 change.
11598 (first_thread_of, kill_inferior_callback)
11599 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11600 (main): Call initialize_inferiors. Adjust to use ptids, killing
11601 and detaching from all inferiors. Handle multiprocess packet
11602 variants.
11603 * linux-low.h: Include gdb_proc_service.h.
11604 (struct process_info_private): New.
11605 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11606 <lwpid_of>: Use ptid_get_lwp.
11607 (get_lwp_thread): Adjust.
11608 (struct lwp_info): Add `dead' member.
11609 (find_lwp_pid): Declare.
11610 * linux-low.c (thread_db_active): Delete.
11611 (new_inferior): Adjust comment.
11612 (inferior_pid): Delete.
11613 (linux_add_process): New.
11614 (handle_extended_wait): Adjust.
11615 (add_lwp): Change unsigned long to ptid.
11616 (linux_create_inferior): Add process to processes table. Adjust
11617 to use ptids. Don't set new_inferior here.
11618 (linux_attach_lwp): Rename to ...
11619 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
11620 it. Adjust to use ptids.
11621 (linux_attach_lwp): New.
11622 (linux_attach): Add process to processes table. Don't set
11623 new_inferior here.
11624 (struct counter): New.
11625 (second_thread_of_pid_p, last_thread_of_process_p): New.
11626 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
11627 multiple processes.
11628 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
11629 processes. Remove process from process table.
11630 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
11631 to multiple processes.
11632 (any_thread_of): New.
11633 (linux_detach): Add `pid' argument, and handle it. Remove process
11634 from processes table.
11635 (linux_join): Add `pid' argument. Handle it.
11636 (linux_thread_alive): Change unsighed long argument to ptid_t.
11637 Consider dead lwps as not being alive.
11638 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
11639 threads we're not interested in.
11640 (same_lwp, find_lwp_pid): New.
11641 (linux_wait_for_lwp): Change `pid' argument's type from int to
11642 ptid_t. Adjust.
11643 (linux_wait_for_event): Rename to ...
11644 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11645 from int to ptid_t. Adjust.
11646 (linux_wait_for_event): New.
11647 (linux_wait_1): Add `ptid' argument. Change return type to
11648 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11649 that exit from the process table.
11650 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11651 Adjust.
11652 (mark_lwp_dead): New.
11653 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11654 stopping all threads, mark its main lwp as dead.
11655 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11656 ptids.
11657 (fetch_register, usr_store_inferior_registers)
11658 (regsets_fetch_inferior_registers)
11659 (regsets_store_inferior_registers, linux_read_memory)
11660 (linux_write_memory): Inline `inferior_pid'.
11661 (linux_look_up_symbols): Adjust to use per-process
11662 `thread_db_active'.
11663 (linux_request_interrupt): Adjust to use ptids.
11664 (linux_read_auxv): Inline `inferior_pid'.
11665 (initialize_low): Don't reference thread_db_active.
11666 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11667 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11668 (ps_getpid): Return the pid of the current inferior.
11669 * thread-db.c (proc_handle, thread_agent): Delete.
11670 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11671 per-process data.
11672 (find_one_thread): Change argument type to ptid_t. Adjust to
11673 per-process data.
11674 (maybe_attach_thread): Adjust to per-process data and ptids.
11675 (thread_db_find_new_threads): Ditto.
11676 (thread_db_init): Ditto.
11677 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11678 processes table. Adjust to use ptids.
11679 (spu_kill, spu_detach): Adjust interface. Remove process from
11680 processes table.
11681 (spu_join, spu_thread_alive): Adjust interface.
11682 (spu_wait): Adjust interface. Remove process from processes
11683 table. Adjust to use ptids.
11684 * win32-low.c (current_inferior_tid): Delete.
11685 (current_inferior_ptid): New.
11686 (debug_event_ptid): New.
11687 (thread_rec): Take a ptid. Adjust.
11688 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11689 (child_delete_thread): Ditto.
11690 (do_initial_child_stuff): Add `attached' argument. Add process to
11691 processes table.
11692 (child_fetch_inferior_registers, child_store_inferior_registers):
11693 Adjust.
11694 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11695 (win32_attach): Pass 1 to do_initial_child_stuff.
11696 (win32_kill): Adjust interface. Remove process from processes
11697 table.
11698 (win32_detach): Ditto.
11699 (win32_join): Adjust interface.
11700 (win32_thread_alive): Take a ptid.
11701 (win32_resume): Adjust to use ptids.
11702 (get_child_debug_event): Ditto.
11703 (win32_wait): Adjust interface. Remove exiting process from
11704 processes table.
11705
bd99dc85
PA
117062009-04-01 Pedro Alves <pedro@codesourcery.com>
11707
11708 Non-stop mode support.
11709
11710 * server.h (non_stop): Declare.
11711 (gdb_client_data, handler_func): Declare.
11712 (delete_file_handler, add_file_handler, start_event_loop):
11713 Declare.
11714 (handle_serial_event, handle_target_event, push_event)
11715 (putpkt_notif): Declare.
11716 * target.h (enum resume_kind): New.
11717 (struct thread_resume): Replace `step' field by `kind' field.
11718 (TARGET_WNOHANG): Define.
11719 (struct target_ops) <wait>: Add `options' argument.
11720 <supports_non_stop, async, start_non_stop>: New fields.
11721 (target_supports_non_stop, target_async): New.
11722 (start_non_stop): Declare.
11723 (mywait): Add `options' argument.
11724 * target.c (mywait): Add `options' argument. Print child exit
11725 notifications here.
11726 (start_non_stop): New.
11727 * server.c (non_stop, own_buf, mem_buf): New globals.
11728 (struct vstop_notif): New.
11729 (notif_queue): New global.
11730 (queue_stop_reply, push_event, discard_queued_stop_replies)
11731 (send_next_stop_reply): New.
11732 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11733 interface changes.
11734 (attach_inferior): In non-stop mode, don't wait for the target
11735 here.
11736 (handle_general_set): Handle QNonStop.
11737 (handle_query): When handling qC, return the current general
11738 thread, instead of the first thread of the list.
11739 (handle_query): If the backend supports non-stop mode, include
11740 QNonStop+ in the qSupported query response.
11741 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11742 and non-stop mode.
11743 (handle_v_attach, handle_v_run): Handle non-stop mode.
11744 (handle_v_stopped): New.
11745 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11746 (myresume): Adjust to use resume_kind. Handle non-stop.
11747 (queue_stop_reply_callback): New.
11748 (handle_status): Handle non-stop mode.
11749 (main): Clear non_stop flag on reconnection. Use the event-loop.
11750 Refactor serial protocol handling from here ...
11751 (process_serial_event): ... to this new function. When GDB
11752 selects any thread, select one here. In non-stop mode, wait until
11753 GDB acks all pending events before exiting.
11754 (handle_serial_event, handle_target_event): New.
11755 * remote-utils.c (remote_open): Install remote_desc in the event
11756 loop.
11757 (remote_close): Remove remote_desc from the event loop.
11758 (putpkt_binary): Rename to...
11759 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11760 (putpkt_binary): New as wrapper around putpkt_binary_1.
11761 (putpkt_notif): New.
11762 (prepare_resume_reply): In non-stop mode, don't change the
11763 general_thread.
11764 * event-loop.c: New.
11765 * Makefile.in (OBJ): Add event-loop.o.
11766 (event-loop.o): New rule.
11767
11768 * linux-low.h (pid_of): Moved here.
11769 (lwpid_of): New.
11770 (get_lwp_thread): Use lwpid_of.
11771 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11772 * linux-low.c (pid_of): Delete.
11773 (inferior_pid): Use lwpid_of.
11774 (linux_event_pipe): New.
11775 (target_is_async_p): New.
11776 (delete_lwp): New.
11777 (handle_extended_wait): Use lwpid_of.
11778 (add_lwp): Don't set lwpid field.
11779 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11780 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11781 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11782 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11783 first. Adjust to linux_wait_for_event interface changes. Use
11784 lwpid_of.
11785 (linux_detach): Don't delete the main lwp here.
11786 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11787 (status_pending_p): Don't consider explicitly suspended lwps.
11788 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11789 pointer. Add OPTIONS argument. Change return type to int. Use
11790 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11791 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11792 pointer. Add status pointer argument. Return a pid instead of a
11793 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11794 changes. In non-stop mode, don't switch to a random thread.
11795 (linux_wait): Rename to...
11796 (linux_wait_1): ... this. Add target_options argument, and handle
11797 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11798 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11799 clean exit and signal exit code. Don't stop all threads in
11800 non-stop mode. In all-stop mode, only stop all threads when
11801 reporting a stop to GDB. Handle explicit thread stop requests.
11802 (async_file_flush, async_file_mark): New.
11803 (linux_wait): New.
11804 (send_sigstop): Use lwpid_of.
11805 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11806 interface changes. In non-stop mode, don't switch to a random
11807 thread.
11808 (linux_resume_one_lwp): Use lwpid_of.
11809 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11810 (linux_resume_one_thread): ... this. Handle resume_stop. In
11811 non-stop mode, don't look for pending flag in all threads.
11812 (resume_status_pending_p): Don't consider explicitly suspended
11813 threads.
11814 (my_waitpid): Reimplement. Emulate __WALL.
11815 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11816 Use lwpid_of.
11817 (sigchld_handler, linux_supports_non_stop, linux_async)
11818 (linux_start_non_stop): New.
11819 (linux_target_ops): Register linux_supports_non_stop, linux_async
11820 and linux_start_non_stop.
11821 (initialize_low): Install SIGCHLD handler.
11822 * thread-db.c (thread_db_create_event, find_one_thread)
11823 (thread_db_get_tls_address): Use lwpid_of.
11824 * win32-low.c (win32_detach): Adjust to use resume_kind.
11825 (win32_wait): Add `options' argument.
11826 * spu-low.c (spu_resume): Adjust to use resume_kind.
11827 (spu_wait): Add `options' argument.
11828
5b1c542e
PA
118292009-04-01 Pedro Alves <pedro@codesourcery.com>
11830
11831 Decouple target code from remote protocol.
11832
11833 * target.h (enum target_waitkind): New.
11834 (struct target_waitstatus): New.
11835 (struct target_ops) <wait>: Return an unsigned long. Take a
11836 target_waitstatus pointer instead of a char pointer.
11837 (mywait): Likewise.
11838 * target.c (mywait): Change prototype to return an unsigned long.
11839 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11840 * server.h (thread_from_wait, old_thread_from_wait): Delete
11841 declarations.
11842 (prepare_resume_reply): Change prototype to take a
11843 target_waitstatus.
11844 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11845 (last_status, last_ptid): New.
11846 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11847 pid instead of a signal.
11848 (attach_inferior): Remove "status" and "signal" parameters.
11849 Adjust.
11850 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11851 not as an address.
11852 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11853 (handle_v_requests, myresume): Remove "status" and "signal"
11854 parameters. Adjust.
11855 (handle_status): New.
11856 (main): Delete local `status'. Adjust.
11857 * remote-utils.c: Include target.h.
11858 (prepare_resume_reply): Change prototype to take a
11859 target_waitstatus. Adjust.
11860
11861 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11862 interface.
11863 * spu-low.c (spu_wait): Adjust.
11864 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11865 Delete.
11866 (win32_wait): Adjust.
11867
2bd7c093
PA
118682009-04-01 Pedro Alves <pedro@codesourcery.com>
11869
11870 * target.h (struct thread_resume): Delete leave_stopped member.
11871 (struct target_ops): Add a `n' argument to the `resume' callback.
11872 * server.c (start_inferior): Adjust.
11873 (handle_v_cont, myresume): Adjust.
11874 * linux-low.c (check_removed_breakpoint): Adjust to resume
11875 interface change, and to removed leave_stopped field.
11876 (resume_ptr): Delete.
11877 (struct thread_resume_array): New.
11878 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11879 resume interface change.
11880 (linux_continue_one_thread, linux_queue_one_thread)
11881 (resume_status_pending_p): Check if the resume field is NULL
11882 instead of checking the leave_stopped member.
11883 (linux_resume): Adjust to the target resume interface change.
11884 * spu-low.c (spu_resume): Adjust to the target resume interface
11885 change.
11886 * win32-low.c (win32_detach, win32_resume): Ditto.
11887
c35fafde
PA
118882009-04-01 Pedro Alves <pedro@codesourcery.com>
11889
11890 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11891 flag.
11892 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11893 pending.
11894 (linux_continue_one_thread): Only preserve the stepping flag if
11895 there's a pending breakpoint.
11896
0a59d50b
PA
118972009-03-31 Pedro Alves <pedro@codesourcery.com>
11898
11899 * server.c (main): After the inferior having exited, call
11900 remote_close before exiting gdbserver.
11901
f04c6d38
TJB
119022009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11903
11904 Fix size of FPSCR in Power 7 processors.
11905 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11906 (PPC_FEATURE_HAS_DFP): New #define.
11907 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11908 size of the FPSCR.
11909
78e5cee6
PA
119102009-03-23 Pedro Alves <pedro@codesourcery.com>
11911
11912 * server.c (handle_query) Whitespace and formatting.
11913
1b3f6016
PA
119142009-03-22 Pedro Alves <pedro@codesourcery.com>
11915
11916 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11917 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11918 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11919 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11920 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11921 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11922 Makefile.in, configure.ac: Fix whitespace throughout.
11923 * configure: Regenerate.
11924
a07b2135
PA
119252009-03-22 Pedro Alves <pedro@codesourcery.com>
11926
11927 * inferiors.c (find_inferior): Make it safe for the callback
11928 function to delete the currently iterated inferior.
11929
67cc2626
PA
119302009-03-22 Pedro Alves <pedro@codesourcery.com>
11931
11932 * Makefile.in (linuw_low_h): Move higher.
11933 (thread-db.o): Depend on $(linux_low_h).
11934
54a0b537
PA
119352009-03-17 Pedro Alves <pedro@codesourcery.com>
11936
11937 Rename "process" to "lwp" throughout.
11938
11939 * linux-low.c (all_processes): Rename to...
11940 (all_lwps): ... this.
11941 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11942 (add_process): Rename to ...
11943 (add_lwp): ... this. Adjust.
11944 (linux_create_inferior): Adjust.
11945 (linux_attach_lwp): Adjust.
11946 (linux_attach): Adjust.
11947 (linux_kill_one_process): Rename to ...
11948 (linux_kill_one_lwp): ... this. Adjust.
11949 (linux_kill): Adjust.
11950 (linux_detach_one_process): Rename to ...
11951 (linux_detach_one_lwp): ... this. Adjust.
11952 (linux_detach): Adjust.
11953 (check_removed_breakpoint): Adjust.
11954 (status_pending_p): Adjust.
11955 (linux_wait_for_process): Rename to ...
11956 (linux_wait_for_lwp): ... this. Adjust.
11957 (linux_wait_for_event): Adjust.
11958 (send_sigstop): Adjust.
11959 (wait_for_sigstop): Adjust.
11960 (stop_all_processes): Rename to ...
11961 (stop_all_lwps): ... this.
11962 (linux_resume_one_process): Rename to ...
11963 (linux_resume_one_lwp): ... this. Adjust.
11964 (linux_set_resume_request, linux_continue_one_thread)
11965 (linux_queue_one_thread, resume_status_pending_p)
11966 (usr_store_inferior_registers, regsets_store_inferior_registers)
11967 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11968 Adjust.
11969 * linux-low.h (get_process): Rename to ...
11970 (get_lwp): ... this. Adjust.
11971 (get_thread_process): Rename to ...
11972 (get_thread_lwp): ... this. Adjust.
11973 (get_process_thread): Rename to ...
11974 (get_lwp_thread): ... this. Adjust.
11975 (struct process_info): Rename to ...
11976 (struct lwp_info): ... this.
11977 (all_processes): Rename to ...
11978 (all_lwps): ... this.
11979 * proc-service.c (ps_lgetregs): Adjust.
11980 * thread-db.c (thread_db_create_event, find_one_thread)
11981 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11982
0b16c5cf
PA
119832009-03-14 Pedro Alves <pedro@codesourcery.com>
11984
11985 * server.c (handle_query): Handle "qAttached".
11986
32de4b9d
NS
119872009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11988
11989 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11990 GPLv3, update license URL.
11991
2aecd87f
DE
119922009-03-01 Doug Evans <dje@google.com>
11993
93efd302 11994 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
11995 (server_h): Add gdb_signals.h.
11996 (signals.o): Update.
11997 * server.h (target_signal_from_host,target_signal_to_host_p)
11998 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11999
86b1f9c5
PM
120002009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
12001
12002 * remote-utils.c (getpkt): Also generate remote-debug
12003 information if noack_mode is set.
12004
4aa995e1
PA
120052009-02-06 Pedro Alves <pedro@codesourcery.com>
12006
12007 * server.c (handle_query): Report qXfer:siginfo:read and
12008 qXfer:siginfo:write as supported and handle them.
12009 * target.h (struct target_ops) <qxfer_siginfo>: New field.
12010 * linux-low.c (linux_xfer_siginfo): New.
12011 (linux_target_ops): Set it.
12012
62709adf
PA
120132009-01-26 Pedro Alves <pedro@codesourcery.com>
12014
12015 * server.c (gdbserver_usage): Mention --remote-debug.
12016 (main): Accept '--remote-debug' switch.
12017
aef93bd7
DE
120182009-01-18 Doug Evans <dje@google.com>
12019
12020 * regcache.c (new_register_cache): No need to check result of xcalloc.
12021 * server.c (handle_search_memory): Back out calls to xmalloc,
12022 result is checked and error is returned to user upon failure.
12023 (handle_query): Ditto. Add more checks for result of malloc.
12024 (handle_v_cont): Check result of malloc, report error back to
12025 user upon failure.
12026 (handle_v_run): Ditto. Call freeargv.
12027 * server.h (freeargv): Declare.
12028 * utils.c (freeargv): New fn.
12029
54363045
DE
120302009-01-15 Doug Evans <dje@google.com>
12031
f626972c
DE
12032 * gdbreplay.c (perror_with_name): Make arg const char *.
12033 * server.h (target_signal_to_name): Make return type const char *.
0842e787 12034 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 12035 * utils.c (perror_with_name): Make arg const char *.
54363045 12036
18aae699
PA
120372009-01-14 Pedro Alves <pedro@codesourcery.com>
12038
12039 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12040 when handling a EXIT_PROCESS_DEBUG_EVENT.
12041
ff703abe
JB
120422009-01-06 Joel Brobecker <brobecker@adacore.com>
12043
12044 * gdbreplay.c (gdbreplay_version): Update copyright year.
12045 * server.c (gdbserver_version): Likewise.
12046
f21cc1a2 120472009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
12048
12049 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 12050 (handle_extended_wait): Improve comment.
0e21c1ec 12051
bca929d3
DE
120522008-12-13 Doug Evans <dje@google.com>
12053
12054 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12055 * server.h (ATTR_MALLOC): New macro.
12056 (xmalloc,xcalloc,xstrdup): Declare.
12057 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12058 * inferiors.c: Ditto.
12059 * linux-low.c: Ditto.
12060 * mem-break.c: Ditto.
12061 * regcache.c: Ditto.
12062 * remote-utils.c: Ditto.
12063 * server.c: Ditto.
12064 * target.c: Ditto.
12065 * win32-low.c: Ditto.
12066
97438e3f
DE
120672008-12-12 Doug Evans <dje@google.com>
12068
896c7fbb
DE
12069 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12070 in debugging printf.
12071
97438e3f
DE
12072 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12073
e3b886f8
DE
120742008-12-09 Doug Evans <dje@google.com>
12075
12076 * linux-low.h (struct process_info): Delete member tid, unused.
12077 * thread-db.c (find_one_thread): Update.
12078 (maybe_attach_thread): Update.
12079
07e059b5
VP
120802008-12-02 Pedro Alves <pedro@codesourcery.com>
12081
889bf7c5
PA
12082 * target.h (struct target_ops): Add qxfer_osdata member.
12083 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12084 and dirent.h.
12085 (linux_qxfer_osdata): New functions.
12086 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12087 callback.
12088 * server.c (handle_query): Handle "qXfer:osdata:read:".
12089 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12090 (buffer_xml_printf): New functions.
12091 * server.h (struct buffer): New.
12092 (buffer_grow_str, buffer_grow_str0): New macros.
12093 (buffer_grow, buffer_free, buffer_init, buffer_finish)
12094 (buffer_xml_printf): Declare.
07e059b5 12095
4cab47ab
DE
120962008-11-24 Doug Evans <dje@google.com>
12097
12098 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12099
f142445f
DJ
121002008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
12101
12102 * server.c (handle_v_run): Always use the supplied argument list.
12103
d0107bb6 121042008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 12105
d0107bb6
BW
12106 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12107 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 12108
2c4ad781
TJB
121092008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
12110
12111 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12112 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12113 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12114 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12115 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12116 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12117 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12118 XML target descriptions.
12119 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12120 when inferior is running on an ISA 2.05 or later processor. Add
12121 special case to return offset for full 64-bit slot of FPSCR when
12122 in 32-bits.
12123
dfb64f85
DJ
121242008-11-14 Daniel Gutson <dgutson@codesourcery.com>
12125
12126 * Makefile.in (SFILES, clean): Added sparc64 files.
12127 (reg-sparc64.o, reg-sparc64.c): New.
12128 * configure.srv (sparc*-*-linux*): New configuration.
12129 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12130 syscall arguments for SPARC.
12131 (regsets_store_inferior_registers): Likewise.
12132 * linux-sparc-low.c: New file.
12133
66b6e1dd
DE
121342008-10-21 Doug Evans <dje@google.com>
12135
12136 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12137 (READLINE_DIR,READLINE_DEP): Delete.
12138 (INTERNAL_CFLAGS): Update.
12139 (LINTFLAGS): Update.
12140
9b710a42
PA
121412008-10-10 Pedro Alves <pedro@codesourcery.com>
12142
12143 * server.c (handle_v_run): If GDB didn't specify an argv, use the
12144 whole argv from the last run, not just argv[0].
12145
5822d809
PA
121462008-09-08 Pedro Alves <pedro@codesourcery.com>
12147
12148 * regcache.c (new_register_cache): Return NULL if the register
12149 cache size isn't known yet.
12150 (free_register_cache): Avoid dereferencing a NULL regcache.
12151
74aac56f
DJ
121522008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12153
12154 * configure.srv: Merge MIPS and MIPS64.
12155
400b20f5
MR
121562008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
12157
12158 * Makefile.in (uninstall): Apply $(EXEEXT) too.
12159
677c5bb1
LM
121602008-08-18 Luis Machado <luisgpm@br.ibm.com>
12161
12162 * Makefile.in: Add required vsx dependencies.
12163
12164 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12165 Declare init_registers_powerpc_vsx32l.
12166 Declare init_registers_powerpc_vsx64l.
12167 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12168 (ppc_arch_setup): Check for VSX in hwcap.
12169 (ppc_fill_vsxregset): New function.
12170 (ppc_store_vsxregset): New function.
12171 Add new VSX entry in regset_info target_regsets.
12172
12173 * configure.srv: Add new VSX dependencies.
12174
a6f3e723
SL
121752008-08-12 Pedro Alves <pedro@codesourcery.com>
12176
12177 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12178 (remote_open): Set or clear transport_is_reliable.
12179 (putpkt_binary): Don't expect acks in noack mode.
12180 (getpkt): Don't send ack/nac in noack mode.
12181 * server.c (handle_general_set): Handle QStartNoAckMode.
12182 (handle_query): If connected by tcp pass QStartNoAckMode+ in
12183 qSupported.
12184 (main): Reset noack_mode on every connection.
12185 * server.h (noack_mode): Declare.
12186
a417dc56
RW
121872008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12188
12189 * Makefile.in (GDBREPLAY_OBS): New variable.
12190 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12191
3221518c
UW
121922008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
12193 Daniel Jacobowitz <dan@codesourcery.com>
12194
12195 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12196 (usr_store_inferior_registers): Likewise.
12197 (regsets_store_inferior_registers): Likewise.
12198
ec56be1b
PA
121992008-07-31 Rolf Jansen <rj@surtec.com>
12200 Pedro Alves <pedro@codesourcery.com>
12201
12202 * configure.ac: Check for memmem declaration.
12203 * server.c [HAVE_MALLOC_H]: Include malloc.h.
12204 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12205 (disable_packet_qfThreadInfo): Unconditionally compile.
12206 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12207 * configure, config.in: Regenerate.
12208
2fe5e3ff
DE
122092008-07-28 Doug Kwan <dougkwan@google.com>
12210
12211 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12212 (linux_write_memory): Remove declaration of errno.
12213
836acd6d
UW
122142008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
12215
12216 * linux-low.c (handle_extended_wait): Do not use "status"
12217 variable uninitialized.
12218
aeba519e
PA
122192008-07-07 Pedro Alves <pedro@codesourcery.com>
12220
12221 * server.c (handle_v_attach): Inhibit reporting dll changes.
12222
db42f210
PA
122232008-06-27 Pedro Alves <pedro@codesourcery.com>
12224
12225 * remote-utils.c (prepare_resume_reply): If requested, don't
12226 output "thread:TID" in the T stop reply.
12227
12228 * server.c (disable_packet_vCont, disable_packet_Tthread)
12229 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12230 (handle_query): If requested, disable support for qC, qfThreadInfo
12231 and qsThreadInfo.
12232 (handle_v_requests): If requested, disable support for vCont.
12233 (gdbserver_show_disableable): New.
12234 (main): Handle --disable-packet and --disable-packet=LIST.
12235
12236 * server.h (disable_packet_vCont, disable_packet_Tthread)
12237 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12238
8e4c5421
CD
122392008-06-20 Carlos O'Donell <carlos@codesourcery.com>
12240
12241 * server.c (gdbserver_usage): Mention --version.
12242
6e23a804
DJ
122432008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
12244
12245 * Makefile.in (gdbreplay.o): New rule.
12246
90aa6a40
JM
122472008-06-06 Joseph Myers <joseph@codesourcery.com>
12248
12249 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12250 message, not gdbserver.
12251
c16158bc 122522008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
12253 Nathan Sidwell <nathan@codesourcery.com>
12254 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
12255
12256 * acinclude.m4: Include ../../config/acx.m4.
12257 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12258 * configure, config.in: Regenerate.
12259 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12260 * server.c (gdbserver_version): Print PKGVERSION.
12261 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
12262 (main): Adjust gdbserver_usage calls.
12263 * gdbreplay.c (version, host_name): Add declarations.
12264 (gdbreplay_version, gdbreplay_usage): New.
12265 (main): Accept --version and --help options.
12266
aeb75bf5
DJ
122672008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
12268
12269 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12270 (arm_breakpoint_at): Handle Thumb.
12271 (the_low_target): Add comment.
12272
76b233dd
UW
122732008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
12274
12275 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12276
08388c79
DE
122772008-05-09 Doug Evans <dje@google.com>
12278
a3c83fae
DE
12279 * server.h (decode_search_memory_packet): Declare.
12280 * remote-utils.c (decode_search_memory_packet): New fn.
12281 * server.c (handle_search_memory_1): New fn.
08388c79
DE
12282 (handle_search_memory): New fn.
12283 (handle_query): Process qSearch:memory packets.
12284
bb9c3d36
UW
122852008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
12286
12287 * regcache.c (registers_length): Remove.
12288 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12289 full register packet.
12290 * regcache.h (registers_length): Remove prototype.
12291 * server.h (PBUFSIZ): Define to 16384.
12292
7284e1be
UW
122932008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
12294
12295 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12296 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12297 powerpc-64l.o, and powerpc-altivec64l.o.
12298 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12299 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12300 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12301 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12302 rs6000/power-linux.xml, and rs6000/power64-linux.xml
12303 to srv_xmlfiles.
12304
12305 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12306 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12307 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12308 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12309 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12310 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12311 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12312 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12313 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12314 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12315 (clean): Update.
12316
12317 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12318 (init_registers_powerpc_32l): ... this new prototype.
12319 (init_registers_powerpc_32): Remove, replace by ...
12320 (init_registers_powerpc_altivec32l): ... this new prototype.
12321 (init_registers_powerpc_e500): Remove, replace by ...
12322 (init_registers_powerpc_e500l): ... this new prototype.
12323 (init_registers_ppc64): Remove, replace by ...
12324 (init_registers_powerpc_64l): ... this new prototype.
12325 (init_registers_powerpc_64): Remove, replace by ...
12326 (init_registers_powerpc_altivec64l): ... this new prototype.
12327 (ppc_num_regs): Set to 73.
12328 (PT_ORIG_R3, PT_TRAP): Define if necessary.
12329 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12330 (ppc_cannot_store_register): Handle orig_r3 and trap.
12331 (ppc_arch_setup): Update init_registers_... calls.
12332 (ppc_fill_gregset): Handle orig_r3 and trap.
12333
12334 * inferiors.c (clear_inferiors): Reset current_inferior.
12335
fdc59709
PB
123362008-04-23 Paolo Bonzini <bonzini@gnu.org>
12337
889bf7c5
PA
12338 * acinclude.m4: Add override.m4.
12339 * configure: Regenerate.
fdc59709 12340
c9b2f845
UW
123412008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12342
12343 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12344 initial call to init_register_ppc64.
12345
550512b8
UW
123462008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
12347
43aaf8b6
PA
12348 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12349 single powerpc*-*-linux* case.
550512b8
UW
12350 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12351
b6430ec3
UW
123522008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
12353
12354 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 12355 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
12356 from reg_xmlfiles.
12357 * linux-ppc-low.c: Include <elf.h>.
12358 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12359 (ppc_hwcap): New global variable.
12360 (ppc_regmap): Remove __SPE__ #ifdef sections.
12361 (ppc_regmap_e500): New global variable.
12362 (ppc_cannot_store_register): Update __SPE__ special case.
12363 (ppc_get_hwcap): New function.
12364 (ppc_arch_setup): Use it to determine whether inferior supports
12365 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
12366 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12367 Do not access registers if target does not support AltiVec.
12368 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12369 Do not access registers if target does not support SPE.
12370 (target_regsets): Unconditionally include AltiVec and SPE regsets.
12371
52fa2412
UW
123722008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
12373
12374 * linux-low.c (disabled_regsets, num_regsets): New.
12375 (use_regsets_p): Delete.
12376 (linux_wait_for_process): Clear disabled_regsets.
12377 (regsets_fetch_inferior_registers): Check and set it.
12378 (regsets_store_inferior_registers): Likewise.
12379 (linux_fetch_registers, linux_store_registers): Do not use
12380 use_regsets_p.
12381 (initialize_low): Allocate disabled_regsets.
12382
e28b3332
DJ
123832008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
12384
12385 * Makefile.in (LIBOBJS): New.
12386 (OBS): Use LIBOBJS.
12387 (memmem.o): New rule.
12388 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12389 * configure: Regenerated.
12390
4536995d
UW
123912008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
12392
12393 * server.c (handle_query): Never return "unsupported" for
12394 qXfer:features:read queries.
12395
221c031f
UW
123962008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
12397
12398 * server.c (get_features_xml): Fix inverted condition.
12399 (handle_query): Always support qXfer:feature:read.
12400
ccd213ac
DJ
124012008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
12402
12403 * server.c (wrapper_argv): New.
12404 (start_inferior): Handle wrapper_argv. If set, expect an extra
12405 trap.
12406 (gdbserver_usage): Document --wrapper.
12407 (main): Parse --wrapper.
12408
6fe305f7
UW
124092008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12410
12411 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12412 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12413 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12414 (ppc_set_pc): Likewise.
12415 (ppc_arch_setup): New function.
12416 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12417 of collect_register.
889bf7c5 12418 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 12419
5b0a002e
UW
124202008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12421
12422 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12423 instead of linux-ppc64-low.o.
12424 * linux-ppc64-low.c: Remove file.
12425 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12426 (linux-ppc64-low.o): Remove rule.
12427
12428 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12429 (init_registers_powerpc_64): Likewise.
12430 (ppc_regmap): Conditionally define depending on __powerpc64__.
12431 (ppc_cannot_store_register): Do not special-case "fpscr" when
12432 compiled on __powerpc64__.
12433 (ppc_collect_ptrace_register): New function.
12434 (ppc_supply_ptrace_register): New function.
12435 (ppc_breakpoint): Change type to "unsigned int".
12436 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12437 (the_low_target): Conditionally provide initializers for the
889bf7c5 12438 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
12439 collect_ptrace_register and supply_ptrace_register members.
12440
9b4b61c8
UW
124412008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12442
12443 * regcache.h (gdbserver_xmltarget): Add extern declaration.
12444 * server.c (gdbserver_xmltarget): Define.
12445 (get_features_xml): Use it to replace "target.xml" and arch_string.
12446
12447 * configure.srv: Remove srv_xmltarget. Add XML files that were
12448 mentioned there to srv_xmlfiles instead. Remove conditional tests
12449 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12450 srv_xmlfiles and srv_regobj to include all possible choices.
12451 * configure.ac (srv_xmltarget): Remove.
12452 (srv_xmlfiles): Do not add "target.xml".
12453 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12454 checks for supplementary target information.
12455 * configure: Regenerate.
12456 * Makefile.in (XML_TARGET): Remove.
12457 (target.xml): Remove rule.
12458 (clean): Do not clean up target.xml.
12459 (.PRECIOUS): Do not mention target.xml.
12460
12461 * target.h (struct target_ops): Remove arch_string member.
12462 * linux-low.c (linux_arch_string): Remove.
12463 (linux_target_ops): Remove arch_string initializer.
12464 * linux-low.h (struct linux_target_ops): Remove arch_string member.
12465 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12466 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12467 * spu-low.c (spu_arch_string): Remove.
12468 (spu_target_ops): Remove arch_string initializer.
12469 * win32-low.c (win32_arch_string): Remove.
12470 (win32_target_ops): Remove arch_string initializer.
12471 * win32-low.h (struct win32_target_ops): Remove arch_string member.
12472 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12473 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12474
ee1a7ae4
UW
124752008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12476
12477 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12478 by collect_ptrace_register and supply_ptrace_register hooks.
12479 * linux-low.c (fetch_register): Use supply_ptrace_register callback
12480 instead of checking for the_low_target.left_pad_xfer.
12481 (usr_store_inferior_registers): Use collect_ptrace_register callback
12482 instead of checking for the_low_target.left_pad_xfer.
12483
12484 * linux-s390-low.c (s390_collect_ptrace_register): New function.
12485 (s390_supply_ptrace_register): Likewise.
12486 (s390_fill_gregset): Call s390_collect_ptrace_register.
12487 (the_low_target): Update.
12488
12489 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12490 (ppc_supply_ptrace_register): Likewise.
12491 (the_low_target): Update.
12492
12493 * linux-i386-low.c (the_low_target): Update.
12494 * linux-x86-64-low.c (the_low_target): Update.
12495
d61ddec4
UW
124962008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12497
12498 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12499 reg-s390.o and reg-s390x.o.
12500
12501 * linux-low.c (new_inferior): New global variable.
12502 (linux_create_inferior, linux_attach): Set it.
12503 (linux_wait_for_process): Call the_low_target.arch_setup after the
12504 target has stopped for the first time.
12505 (initialize_low): Do not call the_low_target.arch_setup.
12506
12507 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12508 (s390_set_pc): Likewise.
12509 (s390_arch_setup): New function.
12510 (the_low_target): Use s390_arch_setup as arch_setup routine.
12511
12512 * regcache.c (realloc_register_cache): New function.
12513 (set_register_cache): Call it for each existing regcache.
12514
d05b4ac3
UW
125152008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
12516
12517 * server.h (init_registers): Remove prototype.
12518
12519 * linux-low.h (struct linux_target_ops): Add arch_setup field.
12520 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12521 instead of init_registers ().
12522 * linux-arm-low.c (init_registers_arm): Add prototype.
12523 (init_registers_arm_with_iwmmxt): Likewise.
12524 (the_low_target): Add initializer for arch_setup field.
12525 * linux-cris-low.c (init_registers_cris): Add prototype.
12526 (the_low_target): Add initializer for arch_setup field.
12527 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12528 (the_low_target): Add initializer for arch_setup field.
12529 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12530 (the_low_target): Add initializer for arch_setup field.
12531 * linux-ia64-low.c (init_registers_ia64): Add prototype.
12532 (the_low_target): Add initializer for arch_setup field.
12533 * linux-m32r-low.c (init_registers_m32r): Add prototype.
12534 (the_low_target): Add initializer for arch_setup field.
12535 * linux-m68k-low.c (init_registers_m68k): Add prototype.
12536 (the_low_target): Add initializer for arch_setup field.
12537 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12538 (init_registers_mips64_linux): Likewise.
12539 (the_low_target): Add initializer for arch_setup field.
12540 * linux-ppc-low.c (init_registers_ppc): Add prototype.
12541 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12542 (the_low_target): Add initializer for arch_setup field.
12543 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12544 (init_registers_powerpc_64): Likewise.
12545 (the_low_target): Add initializer for arch_setup field.
12546 * linux-s390-low.c (init_registers_s390): Add prototype.
12547 (init_registers_s390x): Likewise.
12548 (the_low_target): Add initializer for arch_setup field.
12549 * linux-sh-low.c (init_registers_sh): Add prototype.
12550 (the_low_target): Add initializer for arch_setup field.
12551 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12552 (the_low_target): Add initializer for arch_setup field.
12553 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12554 (the_low_target): Add initializer for arch_setup field.
12555
12556 * win32-low.h (struct win32_target_ops): Add arch_setup field.
12557 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12558 instead of init_registers ().
12559 * win32-arm-low.c (init_registers_arm): Add prototype.
12560 (the_low_target): Add initializer for arch_setup field.
12561 * win32-i386-low.c (init_registers_i386): Add prototype.
12562 (the_low_target): Add initializer for arch_setup field.
12563
12564 * spu-low.c (init_registers_spu): Add prototype.
12565 (initialize_low): Call initialie_registers_spu () instead of
12566 initialize_registers ().
12567
fd96d250
PA
125682008-02-19 Pedro Alves <pedro@codesourcery.com>
12569
12570 * server.c (handle_v_requests): When handling the vRun and vAttach
12571 packets, if already debugging a process, don't kill it. Return an
12572 error instead.
12573
d41b6bb4
DJ
125742008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
12575
12576 * server.c (handle_query): Correct length check.
12577
5ac588cf
PA
125782008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
12579
12580 * win32-low.c (do_initial_child_stuff): Add process handle
12581 parameter. Set current_process_handle and current_process_id from the
12582 parameters. Clear globals.
12583 (win32_create_inferior): Don't set current_process_handle and
12584 current_process_id here. Instead pass them on the call to
12585 do_initial_child_stuff.
12586 (win32_attach): Likewise.
12587 (win32_clear_inferiors): New.
12588 (win32_kill): Don't close the current process handle or the
12589 current thread handle here. Instead call win32_clear_inferiors.
12590 (win32_detach): Don't open a new handle to the process. Call
12591 win32_clear_inferiors.
12592 (win32_join): Don't rely on current_process_handle; open a new
12593 handle using the process id.
12594 (win32_wait): Call win32_clear_inferiors when the inferior process
12595 has exited.
12596
ecd7ecbc
DJ
125972008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
12598
12599 * server.c (monitor_show_help): Add "exit".
12600
1525d545
MG
126012008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
12602
ecd7ecbc 12603 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
12604 (clean): Add reg-xtensa.c.
12605 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
12606 * configure.srv (xtensa*-*-linux*) New target.
12607 * linux-xtensa-low.c: New.
12608 * xtensa-xtregs.c: New.
1525d545 12609
59a016f0
PA
126102008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
12611
12612 * hostio.c: Don't include errno.h.
12613 (errno_to_fileio_errno): Move to hostio-errno.
12614 * hostio.c: (hostio_error): Remove the error parameter. Defer the
12615 error number outputting to the target->hostio_last_error callback.
12616 (hostio_packet_error): Use FILEIO_EINVAL directly.
12617 (handle_open, handle_pread, hostio_error, handle_unlink): Update
12618 calls to hostio_error.
12619 * hostio-errno.c: New.
12620 * server.h (hostio_last_error_from_errno): Declare.
12621 * target.h (target_ops): Add hostio_last_error member.
12622 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12623 as hostio_last_error handler.
889bf7c5 12624 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
12625 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12626 (wince_hostio_last_error): New functions.
12627 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12628 as hostio_last_error handler.
12629 (win32_target_ops) [!_WIN32_WCE]: Register
12630 hostio_last_error_from_errno as hostio_last_error handler.
12631 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12632 (hostio-errno.o): New rule.
12633 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12634 * configure.srv (srv_hostio_err_objs): New variable. Default to
12635 hostio-errno.o.
12636 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12637 * configure: Regenerate.
12638
2d717e4f
DJ
126392008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12640
12641 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12642 (linux_kill, linux_detach): Clean up the process list.
12643 * remote-utils.c (remote_open): Improve port number parsing.
12644 (putpkt_binary, input_interrupt): Only send interrupts if the target
12645 is running.
12646 * server.c (extended_protocol): Make static.
12647 (attached): Define earlier.
12648 (exit_requested, response_needed, program_argv): New variables.
12649 (target_running): New.
12650 (start_inferior): Clear attached here.
12651 (attach_inferior): Set attached here.
12652 (require_running): Define.
12653 (handle_query): Use require_running and target_running. Implement
12654 "monitor exit".
12655 (handle_v_attach, handle_v_run): New.
12656 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12657 (gdbserver_usage): Update.
12658 (main): Redo argument parsing. Handle --debug and --multi. Handle
12659 --attach along with other options or after the port. Save
12660 program_argv. Support no initial program. Resynchronize
12661 communication with GDB after an error. Handle "monitor exit".
12662 Use require_running and target_running. Always allow the extended
12663 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12664 restart in extended mode.
12665 * README: Refer to the GDB manual. Update --attach usage.
12666
7407e2de
AS
126672007-12-20 Andreas Schwab <schwab@suse.de>
12668
12669 * linux-low.c (STACK_SIZE): Define.
12670 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12671 (linux_test_for_tracefork): Likewise.
12672
b65d95c5
DJ
126732007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12674
12675 * linux-low.c (linux_wait_for_event): Update messages. Do not
12676 reinsert auto-delete breakpoints.
12677 * mem-break.c (struct breakpoint): Change return type of handler to
12678 int.
12679 (set_breakpoint_at): Update handler type.
12680 (reinsert_breakpoint_handler): Return 1 instead of calling
12681 delete_breakpoint.
12682 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12683 setting a new one.
12684 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12685 * mem-break.h (set_breakpoint_at): Update handler type.
12686 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12687 * win32-low.c (auto_delete_breakpoint): New.
12688 (get_child_debug_event): Use it.
12689
4e799345
DJ
126902007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12691
12692 * configure.ac: Check for pread and pwrite.
12693 * hostio.c (handle_pread): Fall back to lseek and read.
12694 (handle_pwrite): Fall back to lseek and write.
12695 * config.in, configure: Regenerated.
12696
27524b67
DJ
126972007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12698
12699 * server.c (myresume): Add own_buf argument.
12700 (main): Update calls.
12701
a20d5e98
DJ
127022007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12703
12704 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12705 * remote-utils.c (remote_open): Do not call disable_async_io.
12706 (block_async_io): Delete.
12707 (unblock_async_io): Make static.
12708 (initialize_async_io): New.
12709 * server.c (handle_v_cont): Handle async I/O here.
12710 (myresume): Likewise. Move other common resume tasks here...
12711 (main): ... from here. Call initialize_async_io. Disable async
12712 I/O before the main loop.
12713 * server.h (initialize_async_io): Declare.
12714 (block_async_io, unblock_async_io): Delete prototypes.
12715 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12716
b79d787e
DJ
127172007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12718
12719 * remote-utils.c (readchar): Allow binary data in received messages.
12720
d97903b2
PA
127212007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12722
12723 * win32-low.c (attaching): New global.
12724 (win32_create_inferior): Clear the `attaching' global.
12725 (win32_attach): Set the `attaching' global.
12726 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12727 attaching. Only set a breakpoint at the entry point if not
12728 attaching.
12729
311de423
PA
127302007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12731
12732 * server.c (main): Don't report dll events on the initial
12733 connection on attaches.
12734
6c2d16d2
PA
127352007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12736
12737 * server.c (main): Relax numerical bases supported for the pid of
12738 the --attach command line argument.
12739
5ca906e6
PA
127402007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12741
12742 * win32-low.c (win32_attach): Call OpenProcess before
12743 DebugActiveProcess, not after. Add last error output to error
12744 call.
12745
9c6c8194
PA
127462007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12747
12748 * win32-low.c (win32_get_thread_context)
12749 (win32_set_thread_context): New functions.
12750 (thread_rec): Use win32_get_thread_context.
12751 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12752 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12753 field.
12754
4d5d1aaa
PA
127552007-12-03 Leo Zayas
12756 Pedro Alves <pedro_alves@portugalmail.pt>
12757
12758 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12759 global variables.
12760 (child_add_thread): Minor cleanup.
12761 (child_continue): Resume artificially suspended threads before
12762 calling ContinueDebugEvent.
12763 (suspend_one_thread): New.
12764 (fake_breakpoint_event): New.
12765 (get_child_debug_event): Change return type to int. Check here if
12766 gdb sent an interrupt request. If a soft interrupt was requested,
12767 fake a breakpoint event. Return 0 if there is no event to handle,
12768 and 1 otherwise.
12769 (win32_wait): Don't check here if gdb sent an interrupt request.
12770 Ensure there is a valid event to handle.
12771 (win32_request_interrupt): Add soft interruption method as last
12772 resort.
12773
c436e841
PA
127742007-12-03 Leo Zayas
12775 Pedro Alves <pedro_alves@portugalmail.pt>
12776
12777 * win32-low.h (win32_thread_info): Add descriptions to the
12778 structure members. Replace `suspend_count' counter by a
12779 `suspended' flag.
12780 * win32-low.c (thread_rec): Update condition of when to get the
12781 context from the inferior. Rely on ContextFlags being set if it
12782 has already been retrieved. Only suspend the inferior thread if
12783 we haven't already. Warn if that fails.
12784 (continue_one_thread): s/suspend_count/suspended/. Only call
12785 ResumeThread once. Warn if that fails.
12786
e7b5fa67
PA
127872007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12788
12789 * win32-low.c (win32_wait): Don't read from the inferior when it
12790 has already exited.
12791
a385171d
PA
127922007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12793
12794 * Makefile.in (win32_low_h): New variable.
12795 (win32-low.o): Add dependency on $(win32_low_h).
12796 (win32-arm-low.o, win32-i386-low.o): New rules.
12797
f80c84b3
DJ
127982007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12799
12800 * hostio.c: Correct copyright year.
12801
a6b151f1
DJ
128022007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12803
12804 * Makefile.in (OBS): Add hostio.o.
12805 (hostio.o): New rule.
12806 * server.h (handle_vFile): Declare.
12807 * hostio.c: New file.
12808 * server.c (handle_v_requests): Take packet_len and new_packet_len
12809 for binary packets. Call handle_vFile.
12810 (main): Update call to handle_v_requests.
12811
f9387fc3
DJ
128122007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12813
12814 * linux-low.c: Include <sched.h>.
12815
51c2684e
DJ
128162007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12817
12818 * linux-low.c (linux_tracefork_grandchild): New.
12819 (linux_tracefork_child): Use clone.
12820 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12821
75f83163
JB
128222007-10-31 Joel Brobecker <brobecker@adacore.com>
12823
12824 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12825
da5898ce
DJ
128262007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12827
12828 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12829
24a09b5f
DJ
128302007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12831
12832 * inferiors.c (change_inferior_id): Delete.
12833 (add_pid_to_list, pull_pid_from_list): New.
12834 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12835 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12836 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12837 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12838 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12839 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12840 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12841 (using_threads): Always set to 1.
12842 (handle_extended_wait): New.
12843 (add_process): Do not set TID.
12844 (linux_create_inferior): Set must_set_ptrace_flags.
12845 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12846 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12847 (linux_thread_alive): Rename TID argument to LWPID.
12848 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12849 (linux_wait_for_event): Do not use TID or check using_threads. Update
12850 call to dead_thread_notify. Call handle_extended_wait.
12851 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12852 (send_sigstop): Delete sigstop_sent.
12853 (wait_for_sigstop): Avoid TID.
12854 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12855 (linux_test_for_tracefork): New.
12856 (linux_lookup_signals): Use thread_db_active and
12857 linux_supports_tracefork_flag.
12858 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12859 * linux-low.h (get_process_thread): Avoid TID.
12860 (struct process_ifo): Move thread_known and tid to the end. Remove
12861 sigstop_sent.
12862 (linux_attach_lwp, thread_db_init): Update prototypes.
12863 * server.h (change_inferior_id): Delete prototype.
12864 (add_pid_to_list, pull_pid_from_list): New prototypes.
12865 * thread-db.c (thread_db_use_events): New.
12866 (find_first_thread): Rename to...
12867 (find_one_thread): ...this. Update callers and messages. Do not
12868 call fatal. Check thread_db_use_events. Do not call
12869 change_inferior_id or new_thread_notify.
12870 (maybe_attach_thread): Update. Do not call new_thread_notify.
12871 (thread_db_init): Set thread_db_use_events. Check use_events.
12872 * utils.c (fatal, warning): Correct message prefix.
12873
30ed0a8f
DJ
128742007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12875
12876 * Makefile.in (clean): Remove new files.
12877 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12878 (powerpc-64.o, powerpc-64.c): New rules.
12879 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12880 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12881 with SPE.
12882 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12883 SPE targets.
12884 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12885 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12886 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12887 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12888 (target_regsets): Add AltiVec and SPE register sets.
12889 * configure.ac: Check for AltiVec and SPE.
12890 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12891 (ppc_fill_vrregset, ppc_store_vrregset): New.
12892 (target_regsets): Add AltiVec register set.
12893 * configure: Regenerated.
12894
fd462a61
DJ
128952007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12896
12897 * linux-low.c (O_LARGEFILE): Define.
12898 (linux_read_memory): Use /proc/PID/mem.
12899 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12900 * configure, config.in: Regenerated.
12901
69f223ed
DJ
129022007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12903
12904 * linux-low.c (linux_wait_for_event): Do not pass signals while
12905 single-stepping.
12906
aec18585
PA
129072007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12908
12909 * win32-low.c (create_process): New.
12910 (win32_create_inferior): Use create_process instead of
12911 CreateProcess. If create_process failed retry appending an ".exe"
12912 suffix. Store the GetLastError result immediatelly after
12913 create_process calls and use it on the call to error.
12914
34d86ddd
PA
129152007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12916
12917 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12918
5a0e3bd0
JB
129192007-08-23 Joel Brobecker <brobecker@adacore.com>
12920
12921 * configure.ac: Switch license to GPLv3.
12922
f88c79e6
MS
129232007-08-01 Michael Snyder <msnyder@access-company.com>
12924
12925 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12926
6b3d9b83
PA
129272007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12928
12929 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12930 typedef.
12931 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12932 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12933 CloseToolhelp32Snapshot.
12934 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12935 CloseToolhelp32Snapshot.
12936
c588c53c
MS
129372007-07-27 Michael Snyder <michael.snyder@access-company.com>
12938
12939 * server.c (main): Check for inferior exit before main loop.
12940
aa0403d9
PA
129412007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12942
12943 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12944 instead of on tmp_desc.
12945
255e7678
DJ
129462007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12947 Daniel Jacobowitz <dan@codesourcery.com>
12948
12949 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12950 (add_thread): Minor cleanups.
12951 (clear_inferiors): Move lower in the file. Clear the DLL
12952 list.
12953 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12954 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12955 (xml_escape_text): New.
12956 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12957 for qSupported.
12958 (handle_v_cont): Report errors.
12959 (gdbserver_version): Update.
12960 (main): Correct size of own_buf. Do not report initial DLL events.
12961 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12962 (unloaded_dll, xml_escape_text): New.
12963 * win32-low.c (enum target_waitkind): Update comments.
12964 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12965 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12966 (win32_EnumProcessModules, win32_GetModuleInformation)
12967 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12968 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12969 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12970 (win32_Module32First, win32_Module32Next, load_toolhelp)
12971 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12972 (get_child_debug_event): Handle DLL events.
12973 (win32_wait): Likewise.
12974
0d37add9
DJ
129752007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12976
12977 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12978 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12979
45e2715e
PA
129802007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12981
12982 * win32-low.c (handle_output_debug_string): Ignore event if not
12983 waiting.
12984
c5674cf1
PA
129852007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12986
12987 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12988
2bbe3cc1
DJ
129892007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12990
12991 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12992
ae13219e
DJ
129932007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12994
12995 * inferiors.c (change_inferior_id): Add comment.
12996 * linux-low.c (check_removed_breakpoint): Add an early
12997 prototype. Improve debug output.
12998 (linux_attach): Doc update.
12999 (linux_detach_one_process, linux_detach): Clean up before releasing
13000 each process.
13001 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13002 * linux-low.h (struct process_info): Doc improvement.
13003 * mem-break.c (delete_all_breakpoints): New.
13004 * mem-break.h (delete_all_breakpoints): New prototype.
13005 * thread-db.c (find_first_thread): New.
13006 (thread_db_create_event): Call it instead of
13007 thread_db_find_new_threads. Clean up unused variables.
13008 (maybe_attach_thread): Remove first thread handling.
13009 (thread_db_find_new_threads): Use find_first_thread.
13010 (thread_db_get_tls_address): Likewise.
13011
4105de34
DJ
130122007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
13013
13014 * thread-db.c (thread_db_find_new_threads): Add prototype.
13015 (thread_db_create_event): Check for the main thread before adding
13016 a new thread.
13017 (maybe_attach_thread): Only enable event reporting if TID == 0.
13018 (thread_db_get_tls_address): Check for new threads.
13019
2b876972
DJ
130202007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
13021
13022 * linux-low.c (linux_create_inferior): Try execv before execvp.
13023 * spu-low.c (spu_create_inferior): Likewise.
13024
7a245884
DJ
130252007-06-13 Mike Frysinger <vapier@gentoo.org>
13026
13027 * linux-low.c (linux_create_inferior): Change execv to execvp.
13028 * spu-low.c (spu_create_inferior): Likewies.
13029
117ce543
DJ
130302007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
13031
13032 * Makefile.in (clean): Clean new files instead of deleted ones.
13033 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13034 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13035 rules.
13036 * configure.srv: Specify XML files and new regformats for MIPS and
13037 MIPS64 GNU/Linux.
13038 * linux-mips-low.c (mips_num_regs): Set to only used registers.
13039 (mips_regmap): Do not fetch $0. Remove unused registers. Add
13040 an entry for the restart register.
13041 (mips_cannot_fetch_register, mips_cannot_store_register)
13042 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13043 register names to match the XML descriptions.
13044 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
13045 restart register instead of $0.
13046
0e7f50da
UW
130472007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13048 Markus Deuling <deuling@de.ibm.com>
13049
13050 * remote-utils.c (decode_xfer_write): New function.
13051 * server.h (decode_xfer_write): Add prototype.
13052 * server.c (handle_query): Add PACKET_LEN argument. Support
13053 qXfer:spu:read and qXfer:spu:write packets.
13054 (main): Pass packet_len to handle_query.
13055 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13056 * target.h (target_ops): Add qxfer_spu.
13057
374c1d38
UW
130582007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
13059
13060 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13061 accessing non-seekable spufs files.
13062
bb63802a
UW
130632007-05-16 Markus Deuling <deuling@de.ibm.com>
13064
889bf7c5 13065 * server.c (handle_query): Add reply for qC packet.
bb63802a 13066
7390519e
PA
130672007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13068 Leo Zayas <lerele@champenstudios@com>
13069
13070 * server.h (check_remote_input_interrupt_request): New function.
13071 * remote_utils.c (INVALID_DESCRIPTOR): New define.
13072 (remote_desc): Initialize with INVALID_DESCRIPTOR.
13073 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
13074 (check_remote_input_interrupt_request): New function.
13075 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 13076 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
13077 winapi_GenerateConsoleCtrlEvent): New typedefs.
13078 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13079 to 250 ms.
13080 (win32_wait): Check for remote interrupt request
13081 with check_remote_input_interrupt_request.
13082 (win32_request_interrupt): New function.
13083 (win32_target_op): Set request_interrupt to win32_request_interrupt.
13084
34b34921
PA
130852007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13086
13087 * win32-low.c (debug_registers_changed,
13088 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13089 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13090 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13091 (thread_rec): Get context using the low target.
13092 (child_add_thread): Call thread_added on the low target,
13093 which does the same thing.
13094 (regptr): Delete.
13095 (do_initial_child_stuff): Remove debug registers references.
13096 Set context using the low target. Resume threads after
13097 setting the contexts.
13098 (child_continue): Remove dead variable. Remove debug
13099 registers references.
13100 (child_fetch_inferior_registers): Go through the low target.
13101 (do_child_store_inferior_registers): Remove.
13102 (child_store_inferior_registers): Go through the low target.
13103 (win32_resume): Remove debug registers references.
13104 Set context using the low target.
13105 (handle_exception): Change return type to void. Don't record
13106 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
13107 first chance exception.
889bf7c5 13108 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
13109 goto loop. Always return after waiting for debug event.
13110 (win32_wait): Convert to switch statement. Handle spurious
13111 events.
13112
13113 * win32-i386-low.c (debug_registers_changed,
13114 debug_registers_used): New.
13115 (initial_stuff): Rename to ...
13116 (i386_initial_stuff): ... this. Clear debug registers
13117 state variables.
13118 (store_debug_registers): Delete.
13119 (i386_get_thread_context): New.
13120 (load_debug_registers): Delete.
13121 (i386_set_thread_context): New.
13122 (i386_thread_added): New.
13123 (single_step): Rename to ...
13124 (i386_single_step): ... this.
13125 (do_fetch_inferior_registers): Rename to ...
13126 (i386_fetch_inferior_register): ... this.
13127 (i386_store_inferior_register): New.
13128 (the_low_target): Adapt to new interface.
13129
13130 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13131 (arm_get_thread_context): New.
13132 (arm_set_thread_context): New.
13133 (regptr): New.
13134 (do_fetch_inferior_registers): Rename to ...
13135 (arm_fetch_inferior_register): ... this.
13136 (arm_store_inferior_register): New.
13137 (arm_wince_breakpoint): Reimplement as unsigned long.
13138 (arm_wince_breakpoint_len): Define.
13139 (the_low_target): Adapt to new interface.
13140
13141 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13142 load_debug_registers. Add get_thread_context, set_thread_context,
13143 thread_added and store_inferior_register. Rename
13144 fetch_inferior_registers to fetch_inferior_register.
13145 (regptr): Remove declaration.
13146
dd6953e1
PA
131472007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13148
13149 * linux-low.c (linux_detach): Change return type to int. Return 0.
13150 * spu-low.c (spu_detach): Likewise.
13151
444d6139
PA
131522007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13153
13154 * target.h (target_ops): Change return type of detach to int.
13155 Add join.
13156 (join_inferior): New.
13157 * server.c (main): Don't skip detach support on mingw32.
13158 If the inferior doesn't support detaching return error.
13159 Call join_inferior instead of using waitpid.
13160 * linux-low.c (linux_join): New.
13161 (linux_target_op): Add linux_join.
13162 * spu-low.c (spu_join): New.
13163 (spu_target_ops): Add spu_join.
13164 * win32-low.c (win32_detach): Adapt to new interface.
13165 Reopen current_process_handle before detaching. Issue a child
13166 resume before detaching.
13167 (win32_join): New.
13168 (win32_target_op): Add win32_join.
13169
1d5315fe
PA
131702007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13171
13172 * win32-low.c (win32-attach): Fix return value.
13173 * target.h (target_ops): Describe ATTACH return values.
13174
bf914831
PA
131752007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13176
13177 * win32-low.c (GETPROCADDRESS): Define.
13178 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
13179 (winapi_DebugSetProcessKillOnExit): Likewise.
13180 (win32_create_inferior): Force usage of ansi CreateProcessA.
13181 (win32_attach): Use GETPROCADDRESS.
13182 (win32_detach): Likewise.
13183
f72f3e60
PA
131842007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
13185
13186 * win32-low.c (win32_wait): Don't use WSTOPSIG.
13187
ed50f18f
PA
131882007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
13189
13190 * win32-low.c: Commit leftover changes from 2007-03-29.
13191
0c2ead7e
DJ
131922007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13193
13194 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13195 fields short instead of int. Add explicit padding.
13196 (i387_cache_to_fsave): Remove unnecessary casts.
13197 (i387_fsave_to_cache): Doc fix.
13198 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13199
73725ff3
DJ
132002007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
13201
13202 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13203 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13204
d99f33d8
PA
132052007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13206
13207 * configure.srv (arm*-*-mingw32ce*): Move near the other
13208 arm targets.
13209
68070c10
PA
132102007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
13211
2482afc6 13212 * configure.ac: Add errno checking.
68070c10
PA
13213 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13214 sys/file.h and malloc.h.
13215 (AC_CHECK_DECLS): Add perror.
13216 (srv_mingwce): Handle.
2482afc6 13217 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
13218 win32-i386-low.o to srv_tgtobj.
13219 (i[34567]86-*-mingw*): Likewise.
13220 (arm*-*-mingw32ce*): Add case.
13221 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13222 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13223 [__MINGW32CE__] (strerror): New function.
13224 [__MINGW32CE__] (errno): Define to GetLastError.
13225 [__MINGW32CE__] (COUNTOF): New macro.
13226 (remote_open): Remove extra close call.
13227 * mem-break.c (delete_breakpoint_at): New function.
13228 * mem-break.h (delete_breakpoint_at): Declare.
13229 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13230 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13231 [USE_WIN32API] (read, write): Add char* casts.
13232 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13233 * server.h: Include wincecompat.h on Windows CE.
13234 [HAVE_ERRNO_H]: Check.
13235 (perror): Declare if not declared.
13236 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13237 (perror_with_name): Remove errno declaration.
13238 * wincecompat.h: New.
13239 * wincecompat.c: New.
13240 * win32-low.h: New.
13241 * win32-arm-low.c: New.
13242 * win32-i386-low.c: New.
13243 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13244 (OUTMSG2): Make it safe.
13245 (_T): New macro.
13246 (COUNTOF): New macro.
13247 (NUM_REGS): Get it from the low target.
13248 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13249 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13250 (thread_rec): Let low target handle debug registers.
13251 (child_add_thread): Likewise.
13252 (child_init_thread_list): Likewise.
13253 (continue_one_thread): Likewise.
13254 (regptr): New.
13255 (do_child_fetch_inferior_registers): Move to ...
13256 * win32-i386-low.c: ... here, and rename to ...
13257 (do_fetch_inferior_registers): ... this.
889bf7c5 13258 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
13259 Go through the low target.
13260 (do_child_store_inferior_registers): Use regptr.
13261 (strwinerror): New function.
13262 (win32_create_inferior): Handle Windows CE.
13263 Use strwinerror instead of strerror on Windows error
13264 codes. Add program to the error output.
13265 Don't close the main thread handle on Windows CE.
13266 (win32_attach): Use coredll.dll on Windows CE.
13267 (win32_kill): Close current process and current
13268 thread handles.
13269 (win32_detach): Use coredll.dll on Windows CE.
13270 (win32_resume): Let low target handle debug registers, and
13271 step request.
13272 (handle_exception): Add/Remove initial breakpoint. Avoid
13273 non-existant WSTOPSIG on Windows CE.
13274 (win32_read_inferior_memory): Cast to remove warning.
13275 (win32_arch_string): Go through the low target.
13276 (initialize_low): Call set_breakpoint_data with the low
13277 target's breakpoint.
13278 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13279 FOP_REGNUM, mappings): Move to ...
13280 * win32-i386-low.c: ... here.
13281 * win32-low.c (win32_thread_info): Move to ...
13282 * win32-low.h: ... here.
13283 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13284 win32-arm-low.c and wincecompat.c.
13285 (all:): Add $EXEEXT.
13286 (install-only:): Likewise.
13287 (gdbserver:): Likewise.
13288 (gdbreplay:): Likewise.
13289 * config.in: Regenerate.
13290 * configure: Regenerate.
13291
41093d81
PA
132922007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13293
13294 * win32-low.c: Rename typedef thread_info to
13295 win32_thread_info throughout.
13296
544afa54
PA
132972007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
13298
13299 * win32-i386-low.c: Rename to ...
13300 * win32-low.c: ... this.
13301 * configure.srv: Replace win32-i386-low.o with win32-low.o.
13302 * Makefile.in: Likewise.
13303
bce7165d
PA
133042007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
13305
13306 * remote-utils.c (monitor_output): Constify msg parameter.
13307 * server.h (monitor_output): Likewise.
13308 * win32-i386-low.c (handle_output_debug_string): New.
13309 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13310 handle_output_debug_string.
13311 (get_child_debug_event): Likewise.
13312
506c7aa0
DJ
133132007-03-27 Mat Hostetter <mat@lcs.mit.edu>
13314
13315 * server.c (main): Correct strtoul check.
13316
42c81e2a
DJ
133172007-03-27 Jon Ringle <jon@ringle.org>
13318
13319 * linux-low.c: Check __ARCH_HAS_MMU__ also.
13320
9453113a
DJ
133212007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
13322
13323 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13324
64a69107
DJ
133252007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
13326
13327 * terminal.h: Check HAVE_SGTTY_H.
13328
133292007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
13330
13331 * remote-utils.c (remote_open): Print out the assigned port number.
13332
c74d0ad8
DJ
133332007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
13334
13335 * remote-utils.c (monitor_output): New function.
13336 * server.c (debug_threads): Define here.
13337 (monitor_show_help): New function.
13338 (handle_query): Handle qRcmd.
13339 (main): Do not handle 'd' packet.
13340 * server.h (debug_threads, remote_debug, monitor_output): Declare.
13341 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13342 of debug_threads.
13343
de7c3b4a
PA
133442007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13345
13346 * Makefile.in (EXEEXT): New.
13347 (clean): Use $(EXEEXT).
13348
ef57601b
PA
133492007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13350
13351 * target.h (target_ops): Rename send_signal to request_interrupt,
13352 and remove enum target_signal parameter.
13353 * linux-low.c (linux_request_interrupt): Rename from
13354 linux_send_signal, and always send SIGINT.
13355 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13356 and always send SIGINT.
13357 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13358 of send_signal.
13359 (input_interrupt): Likewise.
13360
820f2bda
PA
133612007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
13362
13363 * server.c (get_features_xml): Check if target implemented
13364 arch_string.
13365 * win32-i386-low.c (win32_arch_string): New.
13366 (win32_target_ops): Add win32_arch_string as arch_string member.
13367
ab39bf24
UW
133682007-02-22 Markus Deuling <deuling@de.ibm.com>
13369
13370 * spu-low.c (spu_arch_string): New.
13371 (spu_target_ops): Add spu_arch_string.
13372
61ff6e04
DJ
133732007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
13374
13375 * remote-utils.c: Remove HAVE_TERMINAL_H check.
13376 * configure.ac: Do not check for terminal.h.
13377 * configure, config.in: Regenerated.
13378
fb1e4ffc
DJ
133792007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13380
13381 * Makefile.in (OBS): Add $(XML_BUILTIN).
13382 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13383 (clean): Update.
13384 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13385 (arm-with-iwmmxt.c): New.
13386 * config.in, configure: Regenerate.
13387 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
13388 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
13389 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13390 (arm*-*-linux*): Add iWMMXt and regset support.
13391 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13392 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13393 (arm_store_wmmxregset, target_regsets): New.
13394 * server.c (get_features_xml): Take annex argument. Check builtin
13395 XML documents.
13396 (handle_query): Handle multiple annexes.
13397
0f48aa01
DJ
133982007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13399
13400 * remote-utils.c [USE_WIN32API] (read, write): Define.
13401 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13402 write.
13403
23181151
DJ
134042007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
13405
13406 * linux-i386-low.c (the_low_target): Set arch_string.
13407 * linux-x86-64-low.c (the_low_target): Likewise.
13408 * linux-low.c (linux_arch_string): New.
13409 (linux_target_ops): Add it.
13410 * linux-low.h (struct linux_target_ops): Add arch_string.
13411 * server.c (write_qxfer_response): Use const void * for DATA.
13412 (get_features_xml): New.
13413 (handle_query): Handle qXfer:features:read. Report it for qSupported.
13414 * target.h (struct target_ops): Add arch_string method.
13415
9d606399
DJ
134162007-01-03 Denis Pilat <denis.pilat@st.com>
13417 Daniel Jacobowitz <dan@codesourcery.com>
13418
13419 * linux-low.c (linux_kill): Handle being called with no threads.
13420 * win32-i386-low.c (win32_kill): Likewise.
13421 (get_child_debug_event): Clear current_process_handle.
13422
134232006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
13424 Daniel Jacobowitz <dan@codesourcery.com>
13425
13426 * remote-utils.c (remote_open): Check the type of specified
13427 serial port devices before opening them.
13428 * server.c (main): Kill the inferior if an error occurs during
13429 the first remote_open.
13430
a5e13d24
DJ
134312006-12-05 Markus Deuling <deuling@de.ibm.com>
13432
13433 * README: Update supported targets.
13434
186947f7
DJ
134352006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
13436
13437 * Makefile.in (clean): Remove reg-mips64.c.
13438 (reg-mips64.c, reg-mips64.o): New rules.
13439 * configure.srv: Handle mips64. Include regset support for mips.
13440 * linux-mips-low.c (union mips_register): New.
13441 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13442 (mips_breakpoint, mips_breakpoint_at): Use int.
13443 (mips_collect_register, mips_supply_register)
13444 (mips_collect_register_32bit, mips_supply_register_32bit)
13445 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13446 (mips_store_fpregset, target_regsets): New.
13447 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13448
a13e2c95
UW
134492006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
13450
13451 * configure.srv: Add target "spu*-*-*".
13452 * Makefile.in (clean): Remove reg-spu.c.
13453 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13454 * spu-low.c: New file.
13455
cb7283db
DJ
134562006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13457
13458 * configure.ac: Correct td_thr_tls_get_addr test.
13459 * configure: Regenerated.
13460
89be2091
DJ
134612006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
13462
13463 * linux-low.c (linux_wait_for_event): Reformat. Use the
13464 pass_signals array.
13465 * remote-utils.c (decode_address_to_semicolon): New.
13466 * server.c (pass_signals, handle_general_set): New.
13467 (handle_query): Mention QPassSignals for qSupported.
13468 (main): Call handle_general_set.
13469 * server.h (pass_signals, decode_address_to_semicolon): New.
13470
000ef4f0
DJ
134712006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
13472
13473 * server.c (handle_query): Correct error handling for read_auxv.
13474
b7149293
UW
134752005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
13476
13477 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13478 and srv_linux_thread_db to yes.
13479 * linux-s390-low.c (s390_fill_gregset): New function.
13480 (target_regsets): Define data structure.
13481
dae5f5cf
DJ
134822006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
13483
13484 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13485 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
13486 * config.in, configure: Regenerated.
13487 * inferiors.c (gdb_id_to_thread): New function.
13488 (gdb_id_to_thread_id): Use it.
13489 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13490 * linux-low.h (struct process_info): Add th member.
13491 (thread_db_get_tls_address): New prototype.
13492 * remote-utils.c (decode_address): Make non-static.
13493 * server.c (handle_query): Handle qGetTLSAddr.
13494 * server.h (gdb_id_to_thread, decode_address): New prototypes.
13495 * target.h (struct target_ops): Add get_tls_address.
13496 * thread-db.c (maybe_attach_thread): Save the thread handle.
13497 (thread_db_get_tls_address): New.
13498
32ca6d61
DJ
134992006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
13500
13501 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13502 (linux_resume_one_process): Take a siginfo_t *. Update all
13503 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
13504 (struct pending_signals): Add a siginfo_t.
13505 (linux_wait_for_process): Always set last_status.
13506 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13507 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13508 * linux-low.h (struct process_info): Add last_status.
13509
5ffff7c1
DJ
135102006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
13511
13512 * remote-utils.c (try_rle): New function.
13513 (putpkt_binary): Use it.
13514
8695c747
DJ
135152006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
13516
13517 * Makefile.in (clean): Clean reg-x86-64-linux.c.
13518 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13519 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13520 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13521 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13522 point registers.
13523
290fadea
RS
135242006-08-08 Richard Sandiford <richard@codesourcery.com>
13525
13526 * server.c (terminal_fd): New variable.
13527 (old_foreground_pgrp): Likewise.
13528 (restore_old_foreground_pgrp): New function.
13529 (start_inferior): Record the terminal file descriptor in terminal_fd
13530 and its original foreground group in old_foreground_pgrp. Register
13531 restore_old_foreground_pgrp with atexit().
13532
9f2e1e63
DJ
135332006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
13534
13535 * server.c (handle_query): Correct qPart to qXfer.
13536
b80864fb
DJ
135372006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
13538
13539 * configure.ac: Check for more headers which are missing on
13540 Windows. Automatically supply -lwsock32 and USE_WIN32API.
13541 * configure.srv: Add Cygwin and mingw32.
13542 * remote-utils.c: Don't include headers unconditionally which
13543 are missing on mingw32. Include <winsock.h> for mingw32.
13544 (remote_open): Adjust for mingw32 support. Flush
13545 standard error after writing to it.
13546 (remote_close, putpkt_binary, input_interrupt, block_async_io)
13547 (unblock_async_io, enable_async_io, disable_async_io)
13548 (readchar, getpkt): Update for Winsock support.
13549 (prepare_resume_reply): Expect a protocol signal number.
13550 * server.c: Disable <sys/wait.h> on mingw32.
13551 (start_inferior): Adjust for mingw32 support. Flush
13552 standard error after writing to it.
13553 (attach_inferior): Likewise. Use protocol signal
13554 numbers.
13555 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
13556 and names.
13557 * win32-i386-low.c: New file.
13558 * Makefile.in (XM_CLIBS): Set.
13559 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13560 (win32-i386-low.o): New dependency rule.
13561 * linux-low.c (linux_wait): Use target signal numbers.
13562 * target.h (struct target_ops): Doc fix.
13563 * server.h (target_signal_to_name): New prototype.
13564 * gdbreplay.c: Don't include headers unconditionally which
13565 are missing on mingw32. Include <winsock.h> for mingw32.
13566 (remote_close, remote_open): Adjust for Winsock support.
13567 * configure, config.in: Regenerated.
13568
0876f84a
DJ
135692006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
13570
13571 * server.c (decode_xfer_read, write_qxfer_response): New.
13572 (handle_query): Take a packet length argument. Handle
13573 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
13574 the qSupported response.
13575 (main): Update call to handle_query.
13576
01f9e8fa
DJ
135772006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
13578
13579 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13580 (putpkt_binary): Renamed from putpkt and adjusted for binary
13581 data.
13582 (putpkt): New wrapper for putpkt_binary.
13583 (readchar): Don't mask off the high bit.
13584 (decode_X_packet): New function.
13585 * server.c (main): Call putpkt_binary if a handler sets the packet
13586 length. Save the length of the incoming packet. Handle 'X'.
13587 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13588
be2a5f71
DJ
135892006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
13590
13591 * server.c (handle_query): Handle qSupported.
13592
ea025f5f
DJ
135932006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13594
13595 * remote-utils.c (all_symbols_looked_up): New variable.
13596 (look_up_one_symbol): Check it.
13597 * server.h (look_up_one_symbol): New declaration.
13598 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13599
9308fc88
DJ
136002006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
13601
13602 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 13603 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
13604 (PTRACE_GET_THREAD_AREA): Define.
13605 (ps_get_thread_area): New function.
13606
52fb6437
NS
136072006-05-09 Nathan Sidwell <nathan@codesourcery.com>
13608
13609 * configure.srv (m68k*-*-uclinux*): New target.
13610 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13611 (linux_resume_one_process): Remove extraneous cast.
13612 (linux_read_offsets): New.
13613 (linux_target_op): Add linux_read_offsets on mmuless systems.
13614 * server.c (handle_query): Add qOffsets logic.
13615 * target.h (struct target_ops): Add read_offsets.
13616
21b0f40c
DJ
136172006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13618
13619 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13620 (PTRACE_GET_THREAD_AREA): Define.
13621 (ps_get_thread_area): New function.
13622 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13623 (linux-x86-64-low.o): Update.
13624
0050a760
DJ
136252006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
13626
13627 * configure.ac: Remove checks for prfpregset_t.
13628 * gdb_proc_service.h: New file.
13629 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13630 new "gdb_proc_service.h".
13631 * proc-service.c: Likewise.
13632 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13633 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13634 * Makefile.in (gdb_proc_service_h): Updated.
13635 * configure, config.in: Regenerated.
13636
b92a518e
DJ
136372006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13638
13639 * remote-utils.c (prepare_resume_reply): Move declaration
13640 of gdb_id_from_wait to the top of the block.
13641
545587ee
DJ
136422006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13643
13644 * linux-low.c (regsets_store_inferior_registers): Read the regset
13645 from the target before filling it.
13646
9db87ebd
DJ
136472006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13648
13649 * server.c (attach_inferior): Return SIGTRAP for a successful
13650 attach.
13651
dd24457d
DJ
136522006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13653
13654 * Makefile.in (OBS): Add version.o.
13655 (STAGESTUFF): Delete.
13656 (version.o): Add dependencies.
13657 (version.c): Replace rule.
13658 (clean): Remove version.c.
13659 * server.c (gdbserver_version): New.
13660 (gdbserver_usage): Use printf.
13661 (main): Handle --version and --help.
13662 * server.h (version, host_name): Add declarations.
13663
6f0f660e
EZ
136642005-12-23 Eli Zaretskii <eliz@gnu.org>
13665
889bf7c5
PA
13666 * linux-arm-low.c:
13667 * linux-arm-low.c:
13668 * inferiors.c:
13669 * i387-fp.h:
13670 * i387-fp.c:
13671 * gdbreplay.c:
13672 * regcache.c:
13673 * proc-service.c:
13674 * mem-break.h:
13675 * mem-break.c:
13676 * linux-x86-64-low.c:
13677 * linux-sh-low.c:
13678 * linux-s390-low.c:
13679 * linux-ppc64-low.c:
13680 * linux-ppc-low.c:
13681 * linux-mips-low.c:
13682 * linux-m68k-low.c:
13683 * linux-m32r-low.c:
13684 * linux-low.h:
13685 * linux-low.c:
13686 * linux-ia64-low.c:
13687 * linux-i386-low.c:
13688 * linux-crisv32-low.c:
13689 * thread-db.c:
13690 * terminal.h:
13691 * target.h:
13692 * target.c:
13693 * server.h:
13694 * server.c:
13695 * remote-utils.c:
13696 * regcache.h:
13697 * utils.c:
13698 * Makefile.in:
13699 * configure.ac:
6f0f660e
EZ
13700 * gdbserver.1: Add (C) after Copyright. Update the FSF
13701 address.
13702
9d1fb177
DJ
137032005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13704
13705 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13706 (arm_breakpoint_at): Recognize both breakpoints.
13707 (the_low_target): Use the correct breakpoint instruction.
13708
011a70c2
DJ
137092005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13710
13711 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13712 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13713 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13714 (the_low_target): Update.
13715
7fb85e41
AS
137162005-10-25 Andreas Schwab <schwab@suse.de>
13717
13718 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13719
13720 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13721 (ia64_num_regs): Reduce to 462.
13722
3db0444b
DJ
137232005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13724
13725 * acinclude.m4: Correct quoting.
13726 * aclocal.m4: Regenerated.
13727
13728 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13729 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13730 (thread_db_init): Call thread_db_err_str.
13731 * configure.ac: Check for TD_VERSION.
13732 * config.in, configure: Regenerated.
13733
bee0189a
DJ
137342005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13735
13736 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13737
e9d25b98
DJ
137382005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13739
13740 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13741 is not available. Define HAVE_PTRACE_GETREGS if it is.
13742 * config.in, configure: Regenerated.
13743 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13744 * linux-i386-low.c, linux-m68k-low.c: Update to use
13745 HAVE_PTRACE_GETREGS.
13746 * linux-low.c (regsets_fetch_inferior_registers)
13747 (regsets_store_inferior_registers): Only return 0 if we processed
13748 GENERAL_REGS.
13749 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13750 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13751
a06660f7
DJ
137522005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13753
13754 * inferiors.c (struct thread_info): Add gdb_id.
13755 (add_thread): Add gdb_id argument.
13756 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13757 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13758 calls to add_thread.
13759 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13760 * server.c (handle_query): Use thread_to_gdb_id.
13761 (handle_v_cont, main): Use gdb_id_to_thread_id.
13762 * server.h (add_thread): Update prototype.
13763 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13764 prototypes.
13765
5a1f5858
DJ
137662005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13767
13768 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13769 left-padded registers.
13770 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13771 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13772
e122f1f5
SE
137732005-07-01 Steve Ellcey <sje@cup.hp.com>
13774
13775 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13776 * configure: Regenerate.
13777 * config.in: Regenerate.
13778 * server.h (NEED_DECLARATION_STRERROR):
13779 Replace with !HAVE_DECL_STRERROR.
13780
d592fa2f
DJ
137812005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13782
13783 * linux-low.c (linux_wait, linux_send_signal): Don't test
13784 an unsigned long variable for > 0 if it could be MAX_ULONG.
13785 * server.c (myresume): Likewise.
13786 * target.c (set_desired_inferior): Likewise.
13787
ccbd4912
MK
137882005-06-13 Mark Kettenis <kettenis@gnu.org>
13789
13790 * configure.ac: Simplify and improve check for socklen_t.
13791 * configure, config.in: Regenerate.
13792
f450004a
DJ
137932005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13794
13795 * acconfig.h: Remove.
13796 * configure.ac: Add a test for socklen_t. Use three-argument
13797 AC_DEFINE throughout.
13798 * config.in: Regenerated using autoheader 2.59.
13799 * configure: Regenerated.
13800
13801 * gdbreplay.c (socklen_t): Provide a default.
13802 (remote_open): Use socklen_t.
13803 * remote-utils.c (socklen_t): Provide a default.
13804 (remote_open): Use socklen_t.
13805 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13806 unsigned char.
13807
13808 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13809 char for buffers.
13810 * linux-low.c (linux_read_memory, linux_write_memory)
13811 (linux_read_auxv): Likewise.
13812 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13813 (check_mem_write): Likewise.
13814 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13815 Likewise.
13816 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13817 (registers_from_string, register_data): Likewise.
13818 * server.c (handle_query, main): Likewise.
13819 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13820 (decode_M_packet): Likewise.
13821 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13822 * target.h (struct target_ops): Update read_memory, write_memory,
13823 and read_auxv.
13824 (read_inferior_memory, write_inferior_memory): Update.
13825 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13826 to unsigned char *.
13827 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13828 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13829 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13830 linux-s390-low.c, linux-sh-low.c: Update for changes in
13831 read_inferior_memory and the_low_target->breakpoint.
13832
eee84df1
DJ
138332005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13834
13835 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13836 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13837 * configure.srv: Add powerpc64-*-linux*.
13838 * linux-ppc64-low.c: New file.
13839
45b134e5
OF
138402005-05-23 Orjan Friberg <orjanf@axis.com>
13841
13842 * linux-cris-low.c: New file with support for CRIS.
13843 * linux-crisv32-low.c: Ditto for CRISv32.
13844 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13845 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 13846 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
13847 reg-crisv32.o, and reg-crisv32.c to make rules.
13848 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13849 recognized targets.
13850
48d93c75
UW
138512005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13852
13853 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13854 of sizeof (PTRACE_XFER_TYPE).
13855 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13856
e013ee27
OF
138572005-05-12 Orjan Friberg <orjanf@axis.com>
13858
889bf7c5 13859 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
13860 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13861 pointers for hardware watchpoint support.
13862 * linux-low.h (struct linux_target_ops): Ditto.
13863 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13864 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13865 to linux_target_ops.
13866 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13867 reply packet.
13868 * server.c (main): Recognize 'Z' and 'z' packets.
13869
b0ded00b
UW
138702005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13871
13872 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13873 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13874 (the_low_target): Add new members.
13875
8643e2ad
DJ
138762005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13877
13878 * proc-service.c (ps_lgetregs): Search all_processes instead of
13879 all_threads.
13880
fc620387
DJ
138812005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13882
13883 * server.c (start_inferior): Change return type to int.
13884 (attach_inferior): Change sigptr to int *.
13885 (handle_v_cont, handle_v_requests): Change signal to int *.
13886 (main): Change signal to int.
13887
138882005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
13889
13890 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13891 * configure.srv: Add m32r*-*-linux*.
13892 * linux-m32r-low.c: New file.
13893
e0e76420
DJ
138942005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13895
13896 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13897
a1928bad
DJ
138982005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13899
13900 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13901 Take unsigned long arguments for PIDs.
13902 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13903 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13904 (wait_for_sigstop, linux_resume_one_process)
13905 (regsets_fetch_inferior_registers, linux_send_signal)
13906 (linux_read_auxv): Likewise. Update the types of variables holding
13907 PIDs. Update format string specifiers.
13908 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13909 * remote-utils.c (prepare_resume_reply): Likewise.
13910 * server.c (cont_thread, general_thread, step_thread)
13911 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13912 unsigned long.
13913 (handle_query): Update format specifiers.
13914 (handle_v_cont, main): Use strtoul for thread IDs.
13915 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13916 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13917 (general_thread, step_thread, thread_from_wait)
13918 (old_thread_from_wait): Update.
13919 * target.h (struct thread_resume): Use unsigned long for THREAD.
13920 (struct target_ops): Use unsigned long for arguments to attach and
13921 thread_alive.
13922
dcdb98d2
DJ
139232005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13924
13925 * acinclude.m4: Include bfd/bfd.m4 directly.
13926 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13927 <agriffis@toolchain.org>.
13928 * aclocal.m4, configure: Regenerated.
13929
bec39cab
AC
139302005-01-07 Andrew Cagney <cagney@gnu.org>
13931
13932 * configure.ac: Rename configure.in, require autoconf 2.59.
13933 * configure: Re-generate.
13934
434c4c77
DJ
139352004-12-08 Daniel Jacobowitz <dan@debian.org>
13936
13937 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13938 LIBS when finished.
13939 * aclocal.m4: Regenerated.
13940 * configure: Regenerated.
13941
db1d3e1b
AS
139422004-11-21 Andreas Schwab <schwab@suse.de>
13943
13944 * linux-m68k-low.c (m68k_num_gregs): Define.
13945 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13946 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13947 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13948 (m68k_breakpoint_at): New. Add to the_low_target.
13949
13950 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13951 srv_linux_thread_db to yes.
13952
43360365
JB
139532004-10-20 Joel Brobecker <brobecker@gnat.com>
13954
13955 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13956 (ARCH_SET_FS): Likewise.
13957 (ARCH_GET_FS): Likewise.
13958 (ARCH_GET_GS): Likewise.
13959
fd500816
DJ
139602004-10-16 Daniel Jacobowitz <dan@debian.org>
13961
13962 * linux-i386-low.c (ps_get_thread_area): New.
13963 * linux-x86-64-low.c (ps_get_thread_area): New.
13964 * linux-low.c: Include <sys/syscall.h>.
13965 (linux_kill_one_process): Don't kill the first thread here.
13966 (linux_kill): Kill the first thread here.
13967 (kill_lwp): New function.
13968 (send_sigstop, linux_send_signal): Use it.
13969 * proc-service.c: Clean up #ifdefs.
13970 (fpregset_info): Delete.
13971 (ps_lgetregs): Update and enable implementation.
13972 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13973 implementations.
13974 * remote-utils.c (struct sym_cache, symbol_cache): New.
13975 (input_interrupt): Print a clearer message.
13976 (async_io_enabled): New variable.
13977 (enable_async_io, disable_async_io): Use it. Update comments.
13978 (look_up_one_symbol): Use the symbol cache.
13979 * thread-db.c (thread_db_look_up_symbols): New function.
13980 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13981
f6de3c42
DJ
139822004-10-16 Daniel Jacobowitz <dan@debian.org>
13983
13984 * configure.in: Test for -rdynamic.
13985 * configure: Regenerated.
13986 * Makefile (INTERNAL_LDFLAGS): New.
13987 (gdbserver, gdbreplay): Use it.
13988
2c0fc042
AC
139892004-09-02 Andrew Cagney <cagney@gnu.org>
13990
13991 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13992
075b3282
DJ
139932004-03-23 Daniel Jacobowitz <drow@mvista.com>
13994
13995 * linux-low.c (linux_wait): Clear all_processes list also.
13996
fa6a77dc
DJ
139972004-03-12 Daniel Jacobowitz <drow@mvista.com>
13998
13999 * linux-low.c: Include <errno.h>. Remove extern declaration of
14000 errno.
14001
6d782a97
DJ
140022004-03-12 Daniel Jacobowitz <drow@mvista.com>
14003
14004 * gdbreplay.c, server.h, utils.c: Update copyright years.
14005
3a7fb99b
DJ
140062004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14007
14008 * server.c (main): Print child status or termination signal from
14009 variable 'signal', not 'sig'.
14010
c3e735a6
DJ
140112004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
14012
14013 * linux-low.c (linux_read_memory): Change return type to
14014 int. Check for and return error from ptrace().
14015 * target.c (read_inferior_memory): Change return type to int. Pass
14016 back return status from the_target->read_memory().
14017 * target.h (struct target_ops): Adapt *read_memory() prototype.
14018 Update comment.
14019 (read_inferior_memory): Adapt prototype.
14020 * server.c (main): Return an error packet if
14021 read_inferior_memory() returns an error.
14022
a59d1c82
DJ
140232004-03-04 Daniel Jacobowitz <drow@mvista.com>
14024
14025 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14026 Unify with other clean targets.
14027
dc3f8883
DJ
140282004-02-29 Daniel Jacobowitz <drow@mvista.com>
14029
14030 * server.c (handle_v_cont): Call set_desired_inferior.
14031
89a208da
DJ
140322004-02-29 Daniel Jacobowitz <drow@mvista.com>
14033
14034 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14035
62ea82f5
DJ
140362004-02-29 Daniel Jacobowitz <drow@mvista.com>
14037
14038 * linux-low.c (linux_wait): Unblock async I/O.
14039 (linux_resume): Block and enable async I/O.
14040 * remote-utils.c (block_async_io, unblock_async_io): New functions.
14041 * server.h (block_async_io, unblock_async_io): Add prototypes.
14042
6910d122
DJ
140432004-02-29 Daniel Jacobowitz <drow@mvista.com>
14044
14045 * remote-utils.c (remote_open): Print a status notice after
14046 opening a TCP port.
14047 * server.c (attach_inferior): Print a status notice after
14048 attaching.
14049
140502004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
14051
14052 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14053
c89dc5d4
DJ
140542004-02-26 Daniel Jacobowitz <drow@mvista.com>
14055
14056 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14057 error packet.
14058 * server.c, target.h: Update copyright years.
14059
4b8dad4a
RM
140602004-02-25 Roland McGrath <roland@redhat.com>
14061
14062 * target.h (struct target_ops): New member `read_auxv'.
14063 * server.c (handle_query): Handle qPart:auxv:read: query using that.
14064 * linux-low.c (linux_read_auxv): New function.
14065 (linux_target_ops): Initialize `read_auxv' member to that.
14066
d7446758
JB
140672004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14068
14069 Committed by Jim Blandy <jimb@redhat.com>.
14070
14071 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 14072 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
14073 instead of GPR_SIZE to distiguish s390 and s390x targets.
14074
5544ad89
DJ
140752004-01-31 Daniel Jacobowitz <drow@mvista.com>
14076
14077 * linux-low.c: Update copyright year.
14078 (check_removed_breakpoint): Clear pending_is_breakpoint.
14079 (linux_set_resume_request, linux_queue_one_thread)
14080 (resume_status_pending_p): New functions.
14081 (linux_continue_one_thread): Use process->resume.
14082 (linux_resume): Only resume threads if there are no pending events.
14083 * linux-low.h (struct process_info): Add resume request
14084 pointer.
14085
2a68b70e
DJ
140862004-01-30 Daniel Jacobowitz <drow@mvista.com>
14087
14088 * regcache.c (new_register_cache): Clear the allocated register
14089 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14090
64386c31
DJ
140912003-10-13 Daniel Jacobowitz <drow@mvista.com>
14092
14093 * linux-low.c (linux_resume): Take a struct thread_resume *
14094 argument.
14095 (linux_wait): Update call.
14096 (resume_ptr): New static variable.
14097 (linux_continue_one_thread): Renamed from
14098 linux_continue_one_process. Use resume_ptr.
14099 (linux_resume): Use linux_continue_one_thread.
14100 * server.c (handle_v_cont, handle_v_requests): New functions.
14101 (myresume): New function.
14102 (main): Handle 'v' case.
14103 * target.h (struct thread_resume): New type.
14104 (struct target_ops): Change argument of "resume" to struct
14105 thread_resume *.
14106 (myresume): Delete macro.
14107
c938e9b0
L
141082003-08-08 H.J. Lu <hongjiu.lu@intel.com>
14109
14110 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14111 (uninstall): Support DESTDIR.
14112
7f313d07
BC
14113Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
14114
14115 * configure.srv: Add xscale*linux copy of arm*linux entry.
14116
3b2fc2ea
DJ
141172003-07-24 Daniel Jacobowitz <drow@mvista.com>
14118
14119 * linux-arm-low.c (arm_reinsert_addr): New function.
14120 (the_low_target): Add arm_reinsert_addr.
14121
1c0a559e
MK
141222003-07-08 Mark Kettenis <kettenis@gnu.org>
14123
14124 * mem-break.c: Remove whitespace at end of file.
14125
43d5792c
DJ
141262003-06-28 Daniel Jacobowitz <drow@mvista.com>
14127
14128 * configure.in: Check whether we need to prototype strerror.
14129 * server.h: Optionally prototype strerror.
14130 * gdbreplay.c (perror_with_name): Use strerror.
14131 * linux-low.c (linux_attach_lwp): Use strerror.
14132 * utils.c (perror_with_name): Use strerror.
14133 * config.in, configure: Regenerated.
14134
c8a86edf
DJ
141352003-06-28 Daniel Jacobowitz <drow@mvista.com>
14136
14137 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14138 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14139
73d37363
DJ
141402003-06-20 Daniel Jacobowitz <drow@mvista.com>
14141
14142 * Makefile.in (SFILES): Update.
14143 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14144 low-sun3.c: Remove files.
14145
6ad8ae5c
DJ
141462003-06-17 Daniel Jacobowitz <drow@mvista.com>
14147
14148 * linux-low.c: Move comment to linux_thread_alive where it belonged.
14149 (linux_detach_one_process, linux_detach): New functions.
14150 (linux_target_ops): Add linux_detach.
14151 * server.c (main): Handle 'D' packet.
14152 * target.h (struct target_ops): Add "detach" member.
14153 (detach_inferior): Define.
14154
1581182a
MK
141552003-06-13 Mark Kettenis <kettenis@gnu.org>
14156
14157 From Kelley Cook <kelleycook@wideopenwest.com>:
14158 * configure.srv: Accept i[34567]86 variants.
14159
e5379b03
DJ
141602003-06-05 Daniel Jacobowitz <drow@mvista.com>
14161
14162 * linux-low.c (linux_wait_for_event): Correct comment typos.
14163 (linux_resume_one_process): Call check_removed_breakpoint.
14164 (linux_send_signal): New function.
14165 (linux_target_ops): Add linux_send_signal.
14166 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14167 of kill.
14168 * target.h (struct target_ops): Add send_signal.
14169
2ff29de4
JB
141702003-05-29 Jim Blandy <jimb@redhat.com>
14171
14172 * linux-low.c (usr_store_inferior_registers): Transfer buf in
14173 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
14174 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14175 away part of the register's value.
14176
254787d4
DJ
141772003-03-26 Daniel Jacobowitz <drow@mvista.com>
14178
14179 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14180 (linux_wait_for_event, linux_init_signals): Likewise.
14181
94e10508
DJ
141822003-03-17 Daniel Jacobowitz <drow@mvista.com>
14183
14184 * configure.in: Check for stdlib.h.
14185 * configure: Regenerated.
14186 * config.in: Regenerated.
14187
4c0711e0
DJ
141882003-01-04 Andreas Schwab <schwab@suse.de>
14189
14190 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14191
ef66e766
AC
141922003-01-02 Andrew Cagney <ac131313@redhat.com>
14193
14194 * Makefile.in: Remove obsolete code.
14195
a1358604
DJ
141962002-11-20 Daniel Jacobowitz <drow@mvista.com>
14197
14198 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14199 defined(PT_FPR0_HI).
14200
23ce3b1c
DJ
142012002-11-17 Stuart Hughes <seh@zee2.com>
14202
14203 * linux-arm-low.c (arm_num_regs): Increase.
14204 (arm_regmap): Include status register.
14205
142062002-11-17 Daniel Jacobowitz <drow@mvista.com>
14207
14208 * linux-low.c (register_addr): Remove incorrect -1 check.
14209
a9fa9f7d
DJ
142102002-08-29 Daniel Jacobowitz <drow@mvista.com>
14211
14212 * linux-low.c (linux_create_inferior): Call setpgid. Return
14213 the new PID.
14214 (unstopped_p, linux_signal_pid): Remove.
14215 (linux_target_ops): Remove linux_signal_pid.
14216 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14217 global instead of target method.
14218 * target.h (struct target_ops): Remove signal_pid. Update comment
14219 for create_inferior.
14220 * server.c (signal_pid): New variable.
14221 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 14222 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
14223 (attach_inferior): Set signal_pid.
14224
17574093
DJ
142252002-08-23 Daniel Jacobowitz <drow@mvista.com>
14226
14227 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14228
142292002-08-20 Jim Blandy <jimb@redhat.com>
14230
14231 * Makefile.in (LDFLAGS): Allow the configure script to establish a
14232 default for this.
14233
142342002-08-01 Andrew Cagney <cagney@redhat.com>
14235
14236 * Makefile.in: Make chill references obsolete.
14237
142382002-07-24 Kevin Buettner <kevinb@redhat.com>
14239
14240 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14241 * configure: Regenerate.
14242 * config.in: Regenerate.
14243
142442002-07-09 David O'Brien <obrien@FreeBSD.org>
14245
14246 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14247 (perror_with_name, remote_close, remote_open, expect, play): Static.
14248
142492002-07-04 Michal Ludvig <mludvig@suse.cz>
14250
4b8dad4a 14251 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
14252 byte offsets instead of an array of indexes.
14253 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14254
142552002-06-13 Daniel Jacobowitz <drow@mvista.com>
14256
14257 * regcache.c: Add comment.
14258
142592002-06-11 Daniel Jacobowitz <drow@mvista.com>
14260
14261 * thread-db.c: New file.
14262 * proc-service.c: New file.
14263 * acinclude.m4: New file.
14264 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14265 proc-service.o, and thread-db.o.
14266 (linux-low.o): Add USE_THREAD_DB.
14267 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14268 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14269 * aclocal.m4: Regenerated.
14270 * config.in: Regenerated.
14271 * configure: Regenerated.
14272 * configure.in: Check for proc_service.h, sys/procfs.h,
14273 thread_db.h, and linux/elf.h headrs.
14274 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14275 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
14276 Check for -lthread_db and thread support.
14277 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14278 PowerPC, and SuperH.
14279 * i387-fp.c: Constify arguments.
14280 * i387-fp.h: Likewise.
14281 * inferiors.c: (struct thread_info): Renamed from
14282 `struct inferior_info'. Remove PID member. Use generic inferior
14283 list header. All uses updated.
14284 (inferiors, signal_pid): Removed.
14285 (all_threads): New variable.
14286 (get_thread): Define.
14287 (add_inferior_to_list): New function.
14288 (for_each_inferior): New function.
14289 (change_inferior_id): New function.
14290 (add_inferior): Removed.
14291 (remove_inferior): New function.
14292 (add_thread): New function.
14293 (free_one_thread): New function.
14294 (remove_thread): New function.
14295 (clear_inferiors): Use for_each_inferior and free_one_thread.
14296 (find_inferior): New function.
14297 (find_inferior_id): New function.
14298 (inferior_target_data): Update argument type.
14299 (set_inferior_target_data): Likewise.
14300 (inferior_regcache_data): Likewise.
14301 (set_inferior_regcache_data): Likewise.
14302 * linux-low.c (linux_bp_reinsert): Remove.
14303 (all_processes, stopping_threads, using_thrads)
14304 (struct pending_signals, debug_threads, pid_of): New.
14305 (inferior_pid): Replace with macro.
14306 (struct inferior_linux_data): Remove.
14307 (get_stop_pc, add_process): New functions.
14308 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14309 Use add_process and add_thread.
14310 (linux_attach_lwp): New function, based on old linux_attach. Use
14311 add_process and add_thread. Set stop_expected for new threads.
14312 (linux_attach): New function.
14313 (linux_kill_one_process): New function.
14314 (linux_kill): Kill all LWPs.
14315 (linux_thread_alive): Use find_inferior_id.
14316 (check_removed_breakpoints, status_pending_p): New functions.
14317 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14318 Update. Use WNOHANG. Wait for cloned processes also. Update process
14319 struct for the found process.
14320 (linux_wait_for_event): New function.
14321 (linux_wait): Use it. Support LWPs.
14322 (send_sigstop, wait_for_sigstop, stop_all_processes)
14323 (linux_resume_one_process, linux_continue_one_process): New functions.
14324 (linux_resume): Support LWPs.
14325 (REGISTER_RAW_SIZE): Remove.
14326 (fetch_register): Use register_size instead. Call supply_register.
14327 (usr_store_inferior_registers): Likewise. Call collect_register.
14328 Fix recursive case.
14329 (regsets_fetch_inferior_registers): Improve error message.
14330 (regsets_store_inferior_registers): Add debugging.
14331 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14332 (unstopped_p, linux_signal_pid): New functions.
14333 (linux_target_ops): Add linux_signal_pid.
14334 (linux_init_signals): New function.
14335 (initialize_low): Call it. Initialize using_threads.
14336 * regcache.c (inferior_regcache_data): Add valid
14337 flag.
14338 (get_regcache): Fetch registers lazily. Add fetch argument
14339 and update all callers.
14340 (regcache_invalidate_one, regcache_invalidate): New
14341 functions.
14342 (new_register_cache): Renamed from create_register_cache.
14343 Return the new regcache.
14344 (free_register_cache): Change argument to a void *.
14345 (registers_to_string, registers_from_string): Call get_regcache
14346 with fetch flag set.
14347 (register_data): Make static. Pass fetch flag to get_regcache.
14348 (supply_register): Call get_regcache with fetch flag clear.
14349 (collect_register): Call get_regcache with fetch flag set.
14350 (collect_register_as_string): New function.
14351 * regcache.h: Update.
14352 * remote-utils.c (putpkt): Flush after debug output and use
14353 stderr.
14354 Handle input interrupts while waiting for an ACK.
14355 (input_interrupt): Use signal_pid method.
14356 (getpkt): Flush after debug output and use stderr.
14357 (outreg): Use collect_register_as_string.
14358 (new_thread_notify, dead_thread_notify): New functions.
14359 (prepare_resume_reply): Check using_threads. Set thread_from_wait
14360 and general_thread.
14361 (look_up_one_symbol): Flush after debug output.
14362 * server.c (step_thread, server_waiting): New variables.
14363 (start_inferior): Don't use signal_pid. Update call to mywait.
14364 (attach_inferior): Update call to mywait.
14365 (handle_query): Handle qfThreadInfo and qsThreadInfo.
14366 (main): Don't fetch/store registers explicitly. Use
14367 set_desired_inferior. Support proposed ``Hs'' packet. Update
14368 calls to mywait.
14369 * server.h: Update.
14370 (struct inferior_list, struct_inferior_list_entry): New.
14371 * target.c (set_desired_inferior): New.
14372 (write_inferior_memory): Constify.
14373 (mywait): New function.
14374 * target.h: Update.
14375 (struct target_ops): New signal_pid method.
14376 (mywait): Removed macro, added prototype.
14377
14378 * linux-low.h (regset_func): Removed.
14379 (regset_fill_func, regset_store_func): New.
14380 (enum regset_type): New.
14381 (struct regset_info): Add type field. Use new operation types.
14382 (struct linux_target_ops): stop_pc renamed to get_pc.
14383 Add decr_pc_after_break and breakpoint_at.
14384 (get_process, get_thread_proess, get_process_thread)
14385 (strut process_info, all_processes, linux_attach_lwp)
14386 (thread_db_init): New.
14387
14388 * linux-arm-low.c (arm_get_pc, arm_set_pc,
14389 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14390 (the_low_target): Add new members.
14391 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14392 (i386_store_fpxregset): Constify.
14393 (target_regsets): Add new kind identifier.
14394 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
14395 (i386_set_pc): Add debugging.
14396 (i386_breakpoint_at): New function.
14397 (the_low_target): Add new members.
14398 * linux-mips-low.c (mips_get_pc, mips_set_pc)
14399 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14400 (mips_breakpoint_at): New.
14401 (the_low_target): Add new members.
14402 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14403 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14404 (the_low_target): Add new members.
14405 * linux-sh-low.c (sh_get_pc, sh_set_pc)
14406 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14407 (the_low_target): Add new members.
14408 * linux-x86-64-low.c (target_regsets): Add new kind
14409 identifier.
14410
144112002-05-15 Daniel Jacobowitz <drow@mvista.com>
14412
14413 From Martin Pool <mbp@samba.org>:
14414 * server.c (gdbserver_usage): New function.
14415 (main): Call it.
14416
144172002-05-14 Daniel Jacobowitz <drow@mvista.com>
14418
14419 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14420 stop_at -> stop_pc.
14421
144222002-05-04 Andrew Cagney <ac131313@redhat.com>
14423
14424 * Makefile.in: Remove obsolete code.
14425
144262002-04-24 Michal Ludvig <mludvig@suse.cz>
14427
14428 * linux-low.c (regsets_fetch_inferior_registers),
14429 (regsets_store_inferior_registers): Removed cast to int from
14430 ptrace() calls.
14431 * regcache.h: Added declaration of struct inferior_info.
14432
144332002-04-20 Daniel Jacobowitz <drow@mvista.com>
14434
14435 * inferiors.c (struct inferior_info): Add regcache_data.
14436 (add_inferior): Call create_register_cache.
14437 (clear_inferiors): Call free_register_cache.
14438 (inferior_regcache_data, set_inferior_regcache_data): New functions.
14439 * regcache.c (struct inferior_regcache_data): New.
14440 (registers): Remove.
14441 (get_regcache): New function.
14442 (create_register_cache, free_register_cache): New functions.
14443 (set_register_cache): Don't initialize the register cache here.
14444 (registers_to_string, registers_from_string, register_data): Call
14445 get_regcache.
14446 * regcache.h: Add prototypes.
14447 * server.h: Likewise.
14448
144492002-04-20 Daniel Jacobowitz <drow@mvista.com>
14450
14451 * mem-break.c: New file.
14452 * mem-break.h: New file.
14453 * Makefile.in: Add mem-break.o rule; update server.h
14454 dependencies.
14455 * inferiors.c (struct inferior_info): Add target_data
14456 member.
14457 (clear_inferiors): Free target_data member if set.
14458 (inferior_target_data, set_inferior_target_data): New functions.
14459 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14460 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
14461 * linux-low.c (linux_bp_reinsert): New variable.
14462 (struct inferior_linux_data): New.
14463 (linux_create_inferior): Use set_inferior_target_data.
14464 (linux_attach): Likewise. Call add_inferior.
14465 (linux_wait_for_one_inferior): New function.
14466 (linux_wait): Call it.
14467 (linux_write_memory): Add const.
14468 (initialize_low): Call set_breakpoint_data.
14469 * linux-low.h (struct linux_target_ops): Add breakpoint
14470 handling members.
14471 * server.c (attach_inferior): Remove extra add_inferior
14472 call.
14473 * server.h: Include mem-break.h. Update inferior.c
14474 prototypes.
14475 * target.c (read_inferior_memory)
14476 (write_inferior_memory): New functions.
14477 * target.h (read_inferior_memory)
14478 (write_inferior_memory): Change macros to prototypes.
14479 (struct target_ops): Update comments. Add const to write_memory
14480 definition.
14481
144822002-04-11 Daniel Jacobowitz <drow@mvista.com>
14483
14484 * linux-low.c (usr_store_inferior_registers): Support
14485 registers which are allowed to fail to store.
14486 * linux-low.h (linux_target_ops): Likewise.
14487 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14488 (ppc_cannot_store_register): FPSCR may not be storable.
14489
144902002-04-09 Daniel Jacobowitz <drow@mvista.com>
14491
14492 * server.h: Include <string.h> if HAVE_STRING_H.
14493 * ChangeLog: Correct paths in last ChangeLog entry.
14494
144952002-04-09 Daniel Jacobowitz <drow@mvista.com>
14496
14497 * linux-low.h: Remove obsolete prototypes.
14498 (struct linux_target_ops): New.
14499 (extern the_low_target): New.
14500 * linux-low.c (num_regs, regmap): Remove declarations.
14501 (register_addr): Use the_low_target explicitly.
14502 (fetch_register): Likewise.
14503 (usr_fetch_inferior_registers): Likewise.
14504 (usr_store_inferior_registers): Likewise.
14505 * linux-arm-low.c (num_regs): Remove.
14506 (arm_num_regs): Define.
14507 (arm_regmap): Renamed from regmap, made static.
14508 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14509 made static.
14510 (arm_cannot_store_register): Renamed from cannot_store_register,
14511 made static.
14512 (the_low_target): New.
14513 * linux-i386-low.c (num_regs): Remove.
14514 (i386_num_regs): Define.
14515 (i386_regmap): Renamed from regmap, made static.
14516 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14517 made static.
14518 (i386_cannot_store_register): Renamed from cannot_store_register,
14519 made static.
14520 (the_low_target): New.
14521 * linux-ia64-low.c (num_regs): Remove.
14522 (ia64_num_regs): Define.
14523 (ia64_regmap): Renamed from regmap, made static.
14524 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14525 made static.
14526 (ia64_cannot_store_register): Renamed from cannot_store_register,
14527 made static.
14528 (the_low_target): New.
14529 * linux-m68k-low.c (num_regs): Remove.
14530 (m68k_num_regs): Define.
14531 (m68k_regmap): Renamed from regmap, made static.
14532 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14533 made static.
14534 (m68k_cannot_store_register): Renamed from cannot_store_register,
14535 made static.
14536 (the_low_target): New.
14537 * linux-mips-low.c (num_regs): Remove.
14538 (mips_num_regs): Define.
14539 (mips_regmap): Renamed from regmap, made static.
14540 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14541 made static.
14542 (mips_cannot_store_register): Renamed from cannot_store_register,
14543 made static.
14544 (the_low_target): New.
14545 * linux-ppc-low.c (num_regs): Remove.
14546 (ppc_num_regs): Define.
14547 (ppc_regmap): Renamed from regmap, made static.
14548 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14549 made static.
14550 (ppc_cannot_store_register): Renamed from cannot_store_register,
14551 made static.
14552 (the_low_target): New.
14553 * linux-s390-low.c (num_regs): Remove.
14554 (s390_num_regs): Define.
14555 (s390_regmap): Renamed from regmap, made static.
14556 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14557 made static.
14558 (s390_cannot_store_register): Renamed from cannot_store_register,
14559 made static.
14560 (the_low_target): New.
14561 * linux-sh-low.c (num_regs): Remove.
14562 (sh_num_regs): Define.
14563 (sh_regmap): Renamed from regmap, made static.
14564 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14565 made static.
14566 (sh_cannot_store_register): Renamed from cannot_store_register,
14567 made static.
14568 (the_low_target): New.
14569 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14570 (the_low_target): New.
14571
145722002-04-09 Daniel Jacobowitz <drow@mvista.com>
14573
14574 * Makefile.in: Add stamp-h target.
14575 * configure.in: Create stamp-h.
14576 * configure: Regenerated.
14577
145782002-04-09 Daniel Jacobowitz <drow@mvista.com>
14579
14580 * inferiors.c: New file.
14581 * target.c: New file.
14582 * target.h: New file.
14583 * Makefile.in: Add target.o and inferiors.o. Update
14584 dependencies.
14585 * linux-low.c (inferior_pid): New static variable,
14586 moved from server.c.
14587 (linux_create_inferior): Renamed from create_inferior.
14588 Call add_inferior. Return 0 on success instead of a PID.
14589 (linux_attach): Renamed from myattach.
14590 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
14591 (linux_thread_alive): Renamed from mythread_alive.
14592 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
14593 child dies.
14594 (linux_resume): Renamed from myresume. Add missing ``return 0''.
14595 (regsets_store_inferior_registers): Correct error message.
14596 Add missing ``return 0''.
14597 (linux_fetch_registers): Renamed from fetch_inferior_registers.
14598 (linux_store_registers): Renamed from store_inferior_registers.
14599 (linux_read_memory): Renamed from read_inferior_memory.
14600 (linux_write_memory): Renamed from write_inferior_memory.
14601 (linux_target_ops): New structure.
14602 (initialize_low): Call set_target_ops ().
14603 * remote-utils.c (unhexify): New function.
14604 (hexify): New function.
14605 (input_interrupt): Send signals to ``signal_pid''.
14606 * server.c (inferior_pid): Remove.
14607 (start_inferior): Update create_inferior call.
14608 (attach_inferior): Call add_inferior.
14609 (handle_query): New function.
14610 (main): Call handle_query for `q' packets.
14611 * server.h: Include "target.h". Remove obsolete prototypes.
14612 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14613
146142002-04-09 Daniel Jacobowitz <drow@mvista.com>
14615
14616 * Makefile.in: Add WARN_CFLAGS. Update configury
14617 dependencies.
14618 * configure.in: Check for <string.h>
14619 * configure: Regenerate.
14620 * config.in: Regenerate.
14621 * gdbreplay.c: Include needed system headers.
14622 (remote_open): Remove strchr prototype.
14623 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14624 * regcache.c (supply_register): Change buf argument to const void *.
14625 (supply_register_by_name): Likewise.
14626 (collect_register): Change buf argument to void *.
14627 (collect_register_by_name): Likewise.
14628 * regcache.h: Add missing prototypes.
14629 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14630 * server.c (handle_query): New function.
14631 (attached): New static variable, moved out of main.
14632 (main): Quiet longjmp clobber warnings.
14633 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
14634 * utils.c (error): Remove NORETURN.
14635 (fatal): Likewise.