gdbserver crash in gdb/gdbserver/thread.c::thread_search_callback
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
0e50fe5c
JB
12015-12-22 Joel Brobecker <brobecker@adacore.com>
2
3 * target.c (thread_search_callback): Add check that
4 the thread_stopped target callback is not NULL before
5 calling it.
6
35adc03f
YQ
72015-12-21 Yao Qi <yao.qi@linaro.org>
8
9 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
10 arm breakpoint.
11
bd2b2909
AT
122015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
13
14 * server.c (handle_query): Call target_supports_software_single_step.
15
7fe5e27e
AT
162015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
17
18 * linux-low.c (single_step): New function.
19 (linux_resume_one_lwp_throw): Call single_step.
20 (start_step_over): Likewise.
21
d9311bfa
AT
222015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
23
24 * Makefile.in (SFILES): Append arch/arm-linux.c,
25 arch/arm-get-next-pcs.c.
26 (arm-linux.o): New rule.
27 (arm-get-next-pcs.o): New rule.
28 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
29 arm-linux.o.
30 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
31 to linux-aarch32-low.c.
32 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
33 (arm_breakpoint_len, thumb_breakpoint): Likewise.
34 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
35 (thumb2_breakpoint_len): Likewise.
36 (arm_is_thumb_mode): Make non-static.
37 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
38 from linux-aarch32-low.c.
39 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
40 (arm_breakpoint_len, thumb_breakpoint): Likewise.
41 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
42 (thumb2_breakpoint_len): Likewise.
43 (arm_is_thumb_mode): New declaration.
44 * linux-arm-low.c: Include arch/arm-linux.h
45 aarch/arm-get-next-pcs.h, sys/syscall.h.
46 (get_next_pcs_ops): New struct.
47 (get_next_pcs_addr_bits_remove): New function.
48 (get_next_pcs_is_thumb): New function.
49 (get_next_pcs_read_memory_unsigned_integer): Likewise.
50 (arm_sigreturn_next_pc): Likewise.
51 (get_next_pcs_syscall_next_pc): Likewise.
52 (arm_gdbserver_get_next_pcs): Likewise.
53 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
54 Initialize.
55 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
56 * server.h: Include gdb_vecs.h.
57
68ce2059
AT
582015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
59
60 * Makefile.in (SFILES): Append common/common-regcache.c.
61 (OBS): Append common-regcache.o.
62 (common-regcache.o): New rule.
63 * regcache.c (init_register_cache): Initialize cache to
64 REG_UNAVAILABLE.
65 (regcache_raw_read_unsigned): New function.
66 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
67 register_status enum.
68
fa5308bd
AT
692015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
70
71 * linux-aarch64-low.c (the_low_targets): Rename
72 breakpoint_reinsert_addr to get_next_pcs.
73 * linux-arm-low.c (the_low_targets): Likewise.
74 * linux-bfin-low.c (the_low_targets): Likewise.
75 * linux-cris-low.c (the_low_targets): Likewise.
76 * linux-crisv32-low.c (the_low_targets): Likewise.
77 * linux-low.c (can_software_single_step): Likewise.
78 (install_software_single_step_breakpoints): New function.
79 (start_step_over): Use install_software_single_step_breakpoints.
80 * linux-low.h: New CORE_ADDR vector.
81 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
82 get_next_pcs.
83 * linux-mips-low.c (the_low_targets): Likewise.
84 * linux-nios2-low.c (the_low_targets): Likewise.
85 * linux-sparc-low.c (the_low_targets): Likewise.
86
4a6ed09b
PA
872015-12-17 Pedro Alves <palves@redhat.com>
88
89 * linux-low.c (linux_kill_one_lwp): Remove references to
90 LinuxThreads.
91 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
92 to 'kill'.
93 (linux_init_signals): Delete.
94 (initialize_low): Adjust.
95 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
96
7544db95
PA
972015-12-16 Pedro Alves <palves@redhat.com>
98
99 * configure.ac (compiler warning flags): When testing a
100 -Wno-foo option, check whether -Wfoo works instead.
101 * configure: Regenerate.
102
8020350c
DB
1032015-12-11 Don Breazeal <donb@codesourcery.com>
104
105 * server.c (process_serial_event): Don't exit from gdbserver
106 in remote mode if there are still active inferiors.
107
db91f502
YQ
1082015-12-11 Yao Qi <yao.qi@linaro.org>
109
110 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
111 arm_breakpoint_at if the process is 32-bit.
112
b37a6290
YQ
1132015-12-11 Yao Qi <yao.qi@linaro.org>
114
115 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
116 arm breakpoint.
117
17b1509a
YQ
1182015-12-07 Yao Qi <yao.qi@linaro.org>
119
120 * configure.srv: Append arm.o to srv_tgtobj for
121 aarch64*-*-linux* target.
122 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
123 from linux-arm-low.c.
124 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
125 (arm_breakpoint_len, thumb_breakpoint): Likewise.
126 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
127 (thumb2_breakpoint_len): Likewise.
128 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
129 (arm_breakpoint_kinds): Likewise.
130 (arm_breakpoint_kind_from_pc): Likewise.
131 (arm_sw_breakpoint_from_kind): Likewise.
132 (arm_breakpoint_kind_from_current_state): Likewise.
133 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
134 (arm_sw_breakpoint_from_kind): Declare.
135 (arm_breakpoint_kind_from_current_state): Declare.
136 (arm_breakpoint_at): Declare.
137 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
138 arm_sw_breakpoint_from_kind if process is 32-bit.
139 (aarch64_breakpoint_kind_from_pc): New function.
140 (aarch64_breakpoint_kind_from_current_state): New function.
141 (the_low_target): Initialize fields breakpoint_kind_from_pc
142 and breakpoint_kind_from_current_state.
143 * linux-arm-low.c (arm_breakpoint_kinds): Move to
144 linux-aarch32-low.c.
145 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
146 (arm_breakpoint, arm_breakpoint_len): Likewise.
147 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
148 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
149 (arm_is_thumb_mode): Likewise.
150 (arm_breakpoint_at): Likewise.
151 (arm_breakpoint_kind_from_pc): Likewise.
152 (arm_sw_breakpoint_from_kind): Likewise.
153 (arm_breakpoint_kind_from_current_state): Likewise.
154
155 Revert:
156 2015-08-04 Yao Qi <yao.qi@linaro.org>
157
158 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
159 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
160 * server.c (extended_protocol): Remove "static".
161 * server.h (extended_protocol): Declare it.
162
ece66d65
JS
1632015-12-04 Josh Stone <jistone@redhat.com>
164
165 * target.h (struct target_ops) <arch_setup>: Rename to ...
166 (struct target_ops) <post_create_inferior>: ... this.
167 (target_arch_setup): Rename to ...
168 (target_post_create_inferior): ... this, calling post_create_inferior.
169 * server.c (start_inferior): Update target_arch_setup calls to
170 target_post_create_inferior.
171 * linux-low.c (linux_low_ptrace_options): Forward declare.
172 (linux_arch_setup): Update its comment for general use.
173 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
174 (struct linux_target_ops): Use linux_post_create_inferior.
175 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
176 to post_create_inferior.
177 * nto-low.c (struct nto_target_ops): Likewise.
178 * spu-low.c (struct spu_target_ops): Likewise.
179 * win32-low.c (struct win32_target_ops): Likewise.
180
e58c48b4
AT
1812015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
182
183 * linux-arm-low.c: Remove duplicate arch/arm.h include.
184
fbec8956
AT
1852015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
186
187 * linux-arm-low.c (arm_reinsert_addr): Remove function.
188 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
189 * linux-cris-low.c (cris_reinsert_addr> Remove function.
190 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
191 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
192 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
193 * linux-mips-low.c (mips_reinsert_addr): Remove function.
194 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
195 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
196 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
197 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
198 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
199
9b4c5f87
AT
2002015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
201
202 * linux-low.c (linux_look_up_symbols): Don't call
203 linux_supports_traceclone.
204 * linux-low.h (thread_db_init): Remove use_events argument.
205 * thread-db.c (thread_db_use_event): Remove global variable.
206 (struct thread_db) <td_thr_event_enable_p>: Remove field.
207 (struct thread_db) <td_create_bp>: Remove field.
208 (thread_db_create_event): Remove function.
209 (thread_db_enable_reporting): Likewise.
210 (find_one_thread): Don't check for thread_db_use_events.
211 (attach_thread): Likewise.
212 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
213 (try_thread_db_load_1): Don't check for thread_db_use_events.
214 (thread_db_init): Remove use_events argument and thread events
215 handling.
216 (remove_thread_event_breakpoints): Remove function.
217 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
218
7d00775e
AT
2192015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
220
221 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
222 New function.
223 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
224 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
225 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
226 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
227 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
228 Initialize.
229 * linux-crisv32-low.c (cris_supports_hardware_single_step):
230 New function.
231 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
232 * linux-low.c (can_hardware_single_step): Use
233 supports_hardware_single_step.
234 (can_software_single_step): New function.
235 (start_step_over): Call can_software_single_step.
236 (linux_supports_hardware_single_step): New function.
237 (struct target_ops) <supports_software_single_step>: Initialize.
238 * linux-low.h (struct linux_target_ops)
239 <supports_hardware_single_step>: Initialize.
240 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
241 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
242 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
243 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
244 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
245 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
246 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
247 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
248 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
249 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
250 Initialize.
251 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
252 (struct linux_target_ops) <tile_supports_hardware_single_step>:
253 Initialize.
254 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
255 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
256 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
257 New function.
258 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
259 * target.h (struct target_ops): <supports_software_single_step>:
260 New field.
261 (target_supports_software_single_step): New macro.
262
2d97cd35
AT
2632015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
264
265 * linux-low.c (linux_wait_1): Fix pc advance condition.
266 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
267 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
268
769ef81f
AT
2692015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
270
271 * linux-arm-low.c (arm_is_thumb_mode): New function.
272 (arm_breakpoint_at): Use arm_is_thumb_mode.
273 (arm_breakpoint_kind_from_current_state): New function.
274 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
275 Initialize.
276 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
277 (linux_breakpoint_kind_from_current_state): New function.
278 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
279 * linux-low.h (struct linux_target_ops)
280 <breakpoint_kind_from_current_state>: New field.
281 * target.h (struct target_ops): Likewise.
282 (target_breakpoint_kind_from_current_state): New macro.
283
1bebeeca
PA
2842015-11-30 Pedro Alves <palves@redhat.com>
285
286 * linux-low.c (linux_resume): Wake up the event loop before
287 returning.
288
a67a9fae
PA
2892015-11-30 Pedro Alves <palves@redhat.com>
290
291 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
292 check.
293 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
294 to -1.
295 * target.c (struct thread_search): New structure.
296 (thread_search_callback): New function.
297 (prev_general_thread): New global.
298 (prepare_to_access_memory, done_accessing_memory): New functions.
299 * target.h (prepare_to_access_memory, done_accessing_memory):
300 Replace macros with function declarations.
301
f2faf941
PA
3022015-11-30 Pedro Alves <palves@redhat.com>
303
304 PR 14618
305 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
306 report TARGET_WAITKIND_NO_RESUMED.
307 * remote-utils.c (prepare_resume_reply): Handle
308 TARGET_WAITKIND_NO_RESUMED.
309 * server.c (report_no_resumed): New global.
310 (handle_query) <qSupported>: Handle "no-resumed+". Report
311 "no-resumed+" support.
312 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
313 return error if the client doesn't support no-resumed events.
314 (push_stop_notification): New function.
315 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
316 events if the client supports them.
317
a681f9c9
PA
3182015-11-30 Pedro Alves <palves@redhat.com>
319
320 * linux-low.c (thread_still_has_status_pending_p): Don't check
321 vCont;t here.
322 (lwp_resumed): New function.
323 (status_pending_p_callback): Return early if the LWP is not
324 supposed to be resumed.
325
65706a29
PA
3262015-11-30 Pedro Alves <palves@redhat.com>
327
328 * linux-low.c (handle_extended_wait): Assert that the LWP's
329 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
330 thread create events, leave the new child's status pending.
331 (linux_low_filter_event): If GDB wants to hear about thread exit
332 events, leave the LWP marked dead and don't delete it.
333 (linux_wait_for_event_filtered): Don't check for thread exit.
334 (filter_exit_event): New function.
335 (linux_wait_1): Use it, when returning an exit event.
336 (linux_resume_one_lwp_throw): Assert that the LWP's
337 waitstatus is TARGET_WAITKIND_IGNORE.
338 * remote-utils.c (prepare_resume_reply): Handle
339 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
340 * server.c (report_thread_events): New global.
341 (handle_general_set): Handle QThreadEvents.
342 (handle_query) <qSupported>: Handle and report QThreadEvents+;
343 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
344 TARGET_WAITKIND_THREAD_EXITED.
345 * server.h (report_thread_events): Declare.
346
56cf4bed
PA
3472015-11-30 Pedro Alves <palves@redhat.com>
348
349 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
350 the thread's last_resume_kind was resume_stop.
351
500c1d85
PA
3522015-11-30 Pedro Alves <palves@redhat.com>
353
354 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
355 before returning.
356
de979965
PA
3572015-11-30 Pedro Alves <palves@redhat.com>
358
359 * server.c (handle_v_requests): Handle vCtrlC.
360
34c65914
PA
3612015-11-30 Pedro Alves <palves@redhat.com>
362
363 * gdbthread.h (find_any_thread_of_pid): Declare.
364 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
365 functions.
366 * server.c (handle_query): If current_thread is NULL, look for
367 another thread of the selected process.
368
79efa585 3692015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 370 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
371
372 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
373 * server.c (handle_qxfer_threads_worker): Refactor to include thread
374 name in reply.
375 * target.h (struct target_ops) <thread_name>: New field.
376 (target_thread_name): New macro.
377
80d82c19
JB
3782015-11-23 Joel Brobecker <brobecker@adacore.com>
379
380 * regcache.h (regcache_invalidate_pid): Add declaration.
381 * regcache.c (regcache_invalidate_pid): New function, extracted
382 from regcache_invalidate.
383 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
384 Add trivial documentation comment.
385 * lynx-low.c: Use regcache_invalidate_pid instead of
386 regcache_invalidate.
387
64da5dd5
JB
3882015-11-23 Joel Brobecker <brobecker@adacore.com>
389
390 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
391 and Elf64_auxv_t if the target is Android.
392
37ce4055
DE
3932015-11-22 Doug Evans <xdje42@gmail.com>
394
395 * target.h: #include <sys/types.h>.
396
06e03fff
PA
3972015-11-19 Pedro Alves <palves@redhat.com>
398
399 * linux-low.c (linux_process_qsupported): Change prototype.
400 Adjust.
401 * linux-low.h (struct linux_target_ops) <process_qsupported>:
402 Change prototype.
403 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
404 and adjust to loop over all features.
405 * server.c (handle_query) <qSupported>: Adjust to call
406 target_process_qsupported once, passing it a vector of unprocessed
407 features.
408 * target.h (struct target_ops) <process_qsupported>: Change
409 prototype.
410 (target_process_qsupported): Adjust.
411
9a084706
PA
4122015-11-19 Pedro Alves <palves@redhat.com>
413
414 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
415 mode.
416 * configure: Regenerate.
417
dad44a1f
PA
4182015-11-19 Pedro Alves <palves@redhat.com>
419
420 * configure: Regenerate.
421
231c0592
YQ
4222015-11-19 Yao Qi <yao.qi@linaro.org>
423
424 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
425 type to uint32_t.
426
6c1c9a8b
YQ
4272015-11-19 Yao Qi <yao.qi@linaro.org>
428
429 * linux-aarch64-low.c (enum aarch64_operand_type): New.
430 (struct aarch64_operand): Move enum out.
431
9caa3311
YQ
4322015-11-19 Yao Qi <yao.qi@linaro.org>
433
434 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
435 struct user_fpsimd_state *.
436 (aarch64_store_fpregset): Likewise.
437
6a69a054
YQ
4382015-11-19 Yao Qi <yao.qi@linaro.org>
439
440 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
441 struct user_pt_regs *.
442 (aarch64_store_gregset): Likewise.
443
1798301e
PA
4442015-11-18 Pedro Alves <palves@redhat.com>
445
446 * Makefile.in (all_object_files): Add $IPA_OBJS.
447
ce7715e2
PA
4482015-11-17 Pedro Alves <palves@redhat.com>
449
450 * win32-low.c (win32_resume): Use gdb_signal_from_host,
451 GDB_SIGNAL_0 and gdb_signal_to_string.
452
c0879059
PA
4532015-11-17 Pedro Alves <palves@redhat.com>
454
455 * win32-low.c (handle_output_debug_string): Remove parameter.
456 (win32_kill): Remove our_status local and adjust call to
457 handle_output_debug_string.
458 (get_child_debug_event): Adjust call to
459 handle_output_debug_string.
460
1996e237
SM
4612015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
462
463 * linux-mips-low.c (mips_fill_gregset): Add cast.
464 (mips_store_gregset): Likewise.
465 (mips_fill_fpregset): Likewise.
466 (mips_store_fpregset): Likewise.
467
cbec665b
SM
4682015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
469
470 * linux-mips-low.c (mips_add_watchpoint): Rename private to
471 priv.
472
eb3e3c67
SM
4732015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
474
475 * linux-mips-low.c (mips_linux_new_thread): Change type of
476 watch_type to enum target_hw_bp_type.
477
171de4b8
SM
4782015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
479
480 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
481 Change return type to arm_hwbp_type.
482
04248ead
SM
4832015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
484
485 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
486 (arm_store_gregset): Likewise.
487 * linux-arm-low.c (arm_get_hwcap): Likewise.
488 (arm_read_description): Likewise.
489
04b3479c
SM
4902015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
491
492 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
493
2bc84e8a
SM
4942015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
495
496 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
497 (ppc_fill_vsxregset): Likewise.
498 (ppc_store_vsxregset): Likewise.
499 (ppc_fill_vrregset): Likewise.
500 (ppc_store_vrregset): Likewise.
501 (ppc_fill_evrregset): Likewise.
502 (ppc_store_evrregset): Likewise.
503
e6c5bb05
SM
5042015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
505
506 * linux-ppc-low.c (ppc_usrregs_info): Remove
507 forward-declaration.
508 (ppc_arch_setup): Move lower in file.
509
7ea45d72
SM
5102015-10-30 Simon Marchi <simon.marchi@ericsson.com>
511
512 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
513 (ps_pdwrite): Likewise.
514
69291610
HW
5152015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
516
517 * linux-arm-low.c (arm_new_thread): Move pointer dereference
518 to after assert checks.
519
b42945fd
SM
5202015-10-29 Simon Marchi <simon.marchi@ericsson.com>
521
522 * proc-service.c (ps_pdread): Add/adjust casts.
523 (ps_pdwrite): Add/adjust casts.
524
d6f85c84
SM
5252015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
526
527 * server.c (handle_search_memory_1): Cast return value of
528 memmem.
529
f98cd059
SM
5302015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
531
532 * server.c (write_qxfer_response): Change type of data to
533 gdb_byte *.
534
d2412fa5
PA
5352015-10-29 Pedro Alves <palves@redhat.com>
536
537 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
538
c17414a2
PA
5392015-10-29 Pedro Alves <palves@redhat.com>
540
541 * tracepoint.c (clear_installed_tracepoints): Add casts.
542
e053fbc4
PA
5432015-10-29 Pedro Alves <palves@redhat.com>
544
545 * server.c (handle_v_cont, process_serial_event): Add enum
546 gdb_signal casts to signal parsing code.
547
add67df8
PA
5482015-10-29 Pedro Alves <palves@redhat.com>
549
550 * linux-low.h (NULL_REGSET): Define.
551 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
552 * linux-arm-low.c (arm_regsets): Likewise.
553 * linux-crisv32-low.c (cris_regsets): Likewise.
554 * linux-m68k-low.c (m68k_regsets): Likewise.
555 * linux-mips-low.c (mips_regsets): Likewise.
556 * linux-nios2-low.c (nios2_regsets): Likewise.
557 * linux-ppc-low.c (ppc_regsets): Likewise.
558 * linux-s390-low.c (s390_regsets): Likewise.
559 * linux-sh-low.c (sh_regsets): Likewise.
560 * linux-sparc-low.c (sparc_regsets): Likewise.
561 * linux-tic6x-low.c (tic6x_regsets): Likewise.
562 * linux-tile-low.c (tile_regsets): Likewise.
563 * linux-x86-low.c (x86_regsets): Likewise.
564 * linux-xtensa-low.c (xtensa_regsets): Likewise.
565
50bc912a
PA
5662015-10-29 Pedro Alves <palves@redhat.com>
567
568 * linux-low.h (NULL_REGSET): Define.
569 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
570 * linux-arm-low.c (arm_regsets): Likewise.
571 * linux-crisv32-low.c (cris_regsets): Likewise.
572 * linux-m68k-low.c (m68k_regsets): Likewise.
573 * linux-mips-low.c (mips_regsets): Likewise.
574 * linux-nios2-low.c (nios2_regsets): Likewise.
575 * linux-ppc-low.c (ppc_regsets): Likewise.
576 * linux-s390-low.c (s390_regsets): Likewise.
577 * linux-sh-low.c (sh_regsets): Likewise.
578 * linux-sparc-low.c (sparc_regsets): Likewise.
579 * linux-tic6x-low.c (tic6x_regsets): Likewise.
580 * linux-tile-low.c (tile_regsets): Likewise.
581 * linux-x86-low.c (x86_regsets): Likewise.
582 * linux-xtensa-low.c (xtensa_regsets): Likewise.
583
682b2546
DE
5842015-10-26 Doug Evans <dje@google.com>
585
586 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
587
963843d4
DE
5882015-10-26 Doug Evans <dje@google.com>
589
590 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
591
d41401ac
DE
5922015-10-26 Doug Evans <dje@google.com>
593
594 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
595 for debug_printf.
596 (attach_thread, find_new_threads_callback): Ditto.
597
3db28855
AT
5982015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
599
600 * mem-break.h (set_breakpoint_data): Remove.
601
fb78e89c
AT
6022015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
603
604 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
605 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
606 (initialize_low): Remove set_breakpoint_data call.
607 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
608 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
609 (initialize_low): Remove set_breakpoint_data call.
610 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
611 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
612 (initialize_low): Remove set_breakpoint_data call.
613
2e6ee069
AT
6142015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
615
616 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
617 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
618 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
619 * target.h (target_breakpoint_kind_from_pc): New macro.
620
1652a986
AT
6212015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
622
623 * linux-low.c (default_breakpoint_kind_from_pc): New function.
624 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
625 the default breakpoint kind.
626
abeead09
AT
6272015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
628
629 * linux-arm-low.c (arm_supports_z_point_type): Add software
630 breakpoint support.
631
b0b4b501
AT
6322015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
633
634 * linux-arm-low.c: Refactor breakpoint definitions.
635 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
636 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
637
8689682c
AT
6382015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
639
640 * Makefile.in: Add arm.c/o.
641 * configure.srv: Likewise.
642 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
643 (arm_breakpoint_kind_from_pc): New function.
644 (arm_sw_breakpoint_from_kind): Return proper kind.
645 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
646
27165294
AT
6472015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
648
649 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
650 removal.
651 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
652 (struct raw_breakpoint) <size>: Remove.
653 (struct raw_breakpoint) <kind>: Add.
654 (bp_size): New function.
655 (bp_opcode): Likewise.
656 (find_raw_breakpoint_at): Adjust for kind.
657 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
658 (remove_memory_breakpoint): Adjust for kind call bp_size.
659 (set_raw_breakpoint_at): Adjust for kind.
660 (set_breakpoint): Likewise.
661 (set_breakpoint_at): Call breakpoint_kind_from_pc.
662 (delete_raw_breakpoint): Adjust for kind.
663 (delete_breakpoint): Likewise.
664 (find_gdb_breakpoint): Likewise.
665 (set_gdb_breakpoint_1): Likewise.
666 (set_gdb_breakpoint): Likewise.
667 (delete_gdb_breakpoint_1): Likewise.
668 (delete_gdb_breakpoint): Likewise.
669 (uninsert_raw_breakpoint): Likewise.
670 (reinsert_raw_breakpoint): Likewise.
671 (set_breakpoint_data): Remove.
672 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
673 (check_mem_read): Adjust for kind call bp_size.
674 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
675 (clone_one_breakpoint): Adjust for kind.
676 * mem-break.h (set_gdb_breakpoint): Likewise.
677 (delete_gdb_breakpoint): Likewise.
678 * server.c (process_serial_event): Likewise.
679
dd373349
AT
6802015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
681
682 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
683 (struct linux_target_ops) <breakpoint>: Remove.
684 (struct linux_target_ops) <breakpoint_len>: Remove.
685 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
686 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
687 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
688 (arm_sw_breakpoint_from_kind): New function.
689 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
690 (struct linux_target_ops) <breakpoint>: Remove.
691 (struct linux_target_ops) <breakpoint_len>: Remove.
692 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
693 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
694 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
695 (struct linux_target_ops) <breakpoint>: Remove.
696 (struct linux_target_ops) <breakpoint_len>: Remove.
697 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
698 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
699 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
700 (struct linux_target_ops) <breakpoint>: Remove.
701 (struct linux_target_ops) <breakpoint_len>: Remove.
702 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
703 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
704 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
705 and sw_breakpoint_from_kind to increment the pc.
706 (linux_breakpoint_kind_from_pc): New function.
707 (linux_sw_breakpoint_from_kind): New function.
708 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
709 (initialize_low): Call breakpoint_kind_from_pc and
710 sw_breakpoint_from_kind to replace breakpoint_data/len.
711 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
712 New field.
713 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
714 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
715 (struct linux_target_ops) <breakpoint>: Remove.
716 (struct linux_target_ops) <breakpoint_len>: Remove.
717 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
718 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
719 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
720 (struct linux_target_ops) <breakpoint>: Remove.
721 (struct linux_target_ops) <breakpoint_len>: Remove.
722 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
723 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
724 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
725 (struct linux_target_ops) <breakpoint>: Remove.
726 (struct linux_target_ops) <breakpoint_len>: Remove.
727 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
728 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
729 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
730 (struct linux_target_ops) <breakpoint>: Remove.
731 (struct linux_target_ops) <breakpoint_len>: Remove.
732 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
733 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
734 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
735 (struct linux_target_ops) <breakpoint>: Remove.
736 (struct linux_target_ops) <breakpoint_len>: Remove.
737 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
738 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
739 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
740 (struct linux_target_ops) <breakpoint>: Remove.
741 (struct linux_target_ops) <breakpoint_len>: Remove.
742 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
743 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
744 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
745 (struct linux_target_ops) <breakpoint>: Remove.
746 (struct linux_target_ops) <breakpoint_len>: Remove.
747 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
748 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
749 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
750 (struct linux_target_ops) <breakpoint>: Remove.
751 (struct linux_target_ops) <breakpoint_len>: Remove.
752 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
753 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
754 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
755 (struct linux_target_ops) <breakpoint>: Remove.
756 (struct linux_target_ops) <breakpoint_len>: Remove.
757 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
758 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
759 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
760 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
761 (struct linux_target_ops) <breakpoint>: Remove.
762 (struct linux_target_ops) <breakpoint_len>: Remove.
763 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
764 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
765 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
766 (struct linux_target_ops) <breakpoint>: Remove.
767 (struct linux_target_ops) <breakpoint_len>: Remove.
768 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
769 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
770
4cd98a19
AT
7712015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
772
773 * linux-cris-low.c (cris_get_pc): Remove void arg.
774
774ee6d2
AR
7752015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
776
777 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
778 variable name.
779
833dcd29
AR
7802015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
781
782 * inferiors.c (thread_pid_matches_callback): New function.
783 (find_thread_process): New function.
784 (remove_thread): Reset current_thread.
785 (remove_process): Assert threads have been removed first.
786
8d689ee5
YQ
7872015-10-15 Yao Qi <yao.qi@linaro.org>
788
789 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
790 if it is 3.
791 (aarch64_remove_point): Likewise.
792 * regcache.c (regcache_register_size): New function.
793
1c2e1515
YQ
7942015-10-12 Yao Qi <yao.qi@linaro.org>
795
796 * linux-aarch64-low.c: Update all callers as emit_load_store
797 is renamed to aarch64_emit_load_store.
798
e1c587c3
YQ
7992015-10-12 Yao Qi <yao.qi@linaro.org>
800
801 * linux-aarch64-low.c: Update all callers of function renaming
802 from emit_insn to aarch64_emit_insn.
803
b6542f81
YQ
8042015-10-12 Yao Qi <yao.qi@linaro.org>
805
806 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
807 arch/aarch64-insn.h.
808 (struct aarch64_memory_operand): Likewise.
809 (ENCODE): Likewise.
810 (emit_insn): Move to arch/aarch64-insn.c.
811 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
812 (emit_load_store): Move to arch/aarch64-insn.c.
813 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
814 (can_encode_int32): Remove.
815
246994ce
YQ
8162015-10-12 Yao Qi <yao.qi@linaro.org>
817
818 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
819 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
820 (aarch64_relocate_instruction): Likewise.
821 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
822 (struct aarch64_insn_visitor): Likewise.
823
0badd99f
YQ
8242015-10-12 Yao Qi <yao.qi@linaro.org>
825
826 * linux-aarch64-low.c (struct aarch64_insn_data): New.
827 (struct aarch64_insn_visitor): New.
828 (struct aarch64_insn_relocation_data): New.
829 (aarch64_ftrace_insn_reloc_b): New function.
830 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
831 (aarch64_ftrace_insn_reloc_cb): Likewise.
832 (aarch64_ftrace_insn_reloc_tb): Likewise.
833 (aarch64_ftrace_insn_reloc_adr): Likewise.
834 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
835 (aarch64_ftrace_insn_reloc_others): Likewise.
836 (visitor): New.
837 (aarch64_relocate_instruction): Use visitor.
838
dfaffe9d
YQ
8392015-10-12 Yao Qi <yao.qi@linaro.org>
840
841 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
842 int. Add argument buf.
843 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
844 aarch64_relocate_instruction.
845
70b439f0
YQ
8462015-10-12 Yao Qi <yao.qi@linaro.org>
847
848 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
849 argument insn. Remove local variable insn. Don't call
850 target_read_uint32.
851 (aarch64_install_fast_tracepoint_jump_pad): Call
852 target_read_uint32.
853
7781c06f
YQ
8542015-09-30 Yao Qi <yao.qi@linaro.org>
855
856 * linux-aarch64-low.c (emit_movk): Shorten a long line.
857 (emit_load_store_pair): Likewise.
858
9a3c8263
SM
8592015-09-25 Simon Marchi <simon.marchi@ericsson.com>
860
861 * dll.c (match_dll): Add cast(s).
862 (unloaded_dll): Likewise.
863 * linux-low.c (second_thread_of_pid_p): Likewise.
864 (delete_lwp_callback): Likewise.
865 (count_events_callback): Likewise.
866 (select_event_lwp_callback): Likewise.
867 (linux_set_resume_request): Likewise.
868 * server.c (accumulate_file_name_length): Likewise.
869 (emit_dll_description): Likewise.
870 (handle_qxfer_threads_worker): Likewise.
871 (visit_actioned_threads): Likewise.
872 * thread-db.c (any_thread_of): Likewise.
873 * tracepoint.c (same_process_p): Likewise.
874 (match_blocktype): Likewise.
875 (build_traceframe_info_xml): Likewise.
876
224c3ddb
SM
8772015-09-25 Simon Marchi <simon.marchi@ericsson.com>
878
879 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
880 assignment.
881 (gdb_unparse_agent_expr): Likewise.
882 * hostio.c (require_data): Likewise.
883 (handle_pread): Likewise.
884 * linux-low.c (disable_regset): Likewise.
885 (fetch_register): Likewise.
886 (store_register): Likewise.
887 (get_dynamic): Likewise.
888 (linux_qxfer_libraries_svr4): Likewise.
889 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
890 (set_fast_tracepoint_jump): Likewise.
891 (uninsert_fast_tracepoint_jumps_at): Likewise.
892 (reinsert_fast_tracepoint_jumps_at): Likewise.
893 (validate_inserted_breakpoint): Likewise.
894 (clone_agent_expr): Likewise.
895 * regcache.c (init_register_cache): Likewise.
896 * remote-utils.c (putpkt_binary_1): Likewise.
897 (decode_M_packet): Likewise.
898 (decode_X_packet): Likewise.
899 (look_up_one_symbol): Likewise.
900 (relocate_instruction): Likewise.
901 (monitor_output): Likewise.
902 * server.c (handle_search_memory): Likewise.
903 (handle_qxfer_exec_file): Likewise.
904 (handle_qxfer_libraries): Likewise.
905 (handle_qxfer): Likewise.
906 (handle_query): Likewise.
907 (handle_v_cont): Likewise.
908 (handle_v_run): Likewise.
909 (captured_main): Likewise.
910 * target.c (write_inferior_memory): Likewise.
911 * thread-db.c (try_thread_db_load_from_dir): Likewise.
912 * tracepoint.c (init_trace_buffer): Likewise.
913 (add_tracepoint_action): Likewise.
914 (add_traceframe): Likewise.
915 (add_traceframe_block): Likewise.
916 (cmd_qtdpsrc): Likewise.
917 (cmd_qtdv): Likewise.
918 (cmd_qtstatus): Likewise.
919 (response_source): Likewise.
920 (response_tsv): Likewise.
921 (cmd_qtnotes): Likewise.
922 (gdb_collect): Likewise.
923 (initialize_tracepoint): Likewise.
924
afbe19f8
PL
9252015-09-21 Pierre Langlois <pierre.langlois@arm.com>
926
927 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
928 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
929 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
930 <NOP>: New.
931 (enum aarch64_condition_codes): New enum.
932 (w0): New static global.
933 (fp): Likewise.
934 (lr): Likewise.
935 (struct aarch64_memory_operand) <type>: New
936 MEMORY_OPERAND_POSTINDEX type.
937 (postindex_memory_operand): New helper function.
938 (emit_ret): New function.
939 (emit_load_store_pair): New function, factored out of emit_stp
940 with support for MEMORY_OPERAND_POSTINDEX.
941 (emit_stp): Rewrite using emit_load_store_pair.
942 (emit_ldp): New function.
943 (emit_load_store): Likewise.
944 (emit_ldr): Mention post-index instruction in comment.
945 (emit_ldrh): New function.
946 (emit_ldrb): New function.
947 (emit_ldrsw): Mention post-index instruction in comment.
948 (emit_str): Likewise.
949 (emit_subs): New function.
950 (emit_cmp): Likewise.
951 (emit_and): Likewise.
952 (emit_orr): Likewise.
953 (emit_orn): Likewise.
954 (emit_eor): Likewise.
955 (emit_mvn): Likewise.
956 (emit_lslv): Likewise.
957 (emit_lsrv): Likewise.
958 (emit_asrv): Likewise.
959 (emit_mul): Likewise.
960 (emit_sbfm): Likewise.
961 (emit_sbfx): Likewise.
962 (emit_ubfm): Likewise.
963 (emit_ubfx): Likewise.
964 (emit_csinc): Likewise.
965 (emit_cset): Likewise.
966 (emit_nop): Likewise.
967 (emit_ops_insns): New helper function.
968 (emit_pop): Likewise.
969 (emit_push): Likewise.
970 (aarch64_emit_prologue): New function.
971 (aarch64_emit_epilogue): Likewise.
972 (aarch64_emit_add): Likewise.
973 (aarch64_emit_sub): Likewise.
974 (aarch64_emit_mul): Likewise.
975 (aarch64_emit_lsh): Likewise.
976 (aarch64_emit_rsh_signed): Likewise.
977 (aarch64_emit_rsh_unsigned): Likewise.
978 (aarch64_emit_ext): Likewise.
979 (aarch64_emit_log_not): Likewise.
980 (aarch64_emit_bit_and): Likewise.
981 (aarch64_emit_bit_or): Likewise.
982 (aarch64_emit_bit_xor): Likewise.
983 (aarch64_emit_bit_not): Likewise.
984 (aarch64_emit_equal): Likewise.
985 (aarch64_emit_less_signed): Likewise.
986 (aarch64_emit_less_unsigned): Likewise.
987 (aarch64_emit_ref): Likewise.
988 (aarch64_emit_if_goto): Likewise.
989 (aarch64_emit_goto): Likewise.
990 (aarch64_write_goto_address): Likewise.
991 (aarch64_emit_const): Likewise.
992 (aarch64_emit_call): Likewise.
993 (aarch64_emit_reg): Likewise.
994 (aarch64_emit_pop): Likewise.
995 (aarch64_emit_stack_flush): Likewise.
996 (aarch64_emit_zero_ext): Likewise.
997 (aarch64_emit_swap): Likewise.
998 (aarch64_emit_stack_adjust): Likewise.
999 (aarch64_emit_int_call_1): Likewise.
1000 (aarch64_emit_void_call_2): Likewise.
1001 (aarch64_emit_eq_goto): Likewise.
1002 (aarch64_emit_ne_goto): Likewise.
1003 (aarch64_emit_lt_goto): Likewise.
1004 (aarch64_emit_le_goto): Likewise.
1005 (aarch64_emit_gt_goto): Likewise.
1006 (aarch64_emit_ge_got): Likewise.
1007 (aarch64_emit_ops_impl): New static global variable.
1008 (aarch64_emit_ops): New target function, return
1009 &aarch64_emit_ops_impl.
1010 (struct linux_target_ops): Install it.
1011
bb903df0
PL
10122015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1013
1014 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1015 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1016 aarch64-ipa.o.
1017 * linux-aarch64-ipa.c: New file.
1018 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1019 and endian.h.
1020 (aarch64_get_thread_area): New target method.
1021 (extract_signed_bitfield): New helper function.
1022 (aarch64_decode_ldr_literal): New function.
1023 (enum aarch64_opcodes): New enum.
1024 (struct aarch64_register): New struct.
1025 (struct aarch64_operand): New struct.
1026 (x0): New static global.
1027 (x1): Likewise.
1028 (x2): Likewise.
1029 (x3): Likewise.
1030 (x4): Likewise.
1031 (w2): Likewise.
1032 (ip0): Likewise.
1033 (sp): Likewise.
1034 (xzr): Likewise.
1035 (aarch64_register): New helper function.
1036 (register_operand): Likewise.
1037 (immediate_operand): Likewise.
1038 (struct aarch64_memory_operand): New struct.
1039 (offset_memory_operand): New helper function.
1040 (preindex_memory_operand): Likewise.
1041 (enum aarch64_system_control_registers): New enum.
1042 (ENCODE): New macro.
1043 (emit_insn): New helper function.
1044 (emit_b): New function.
1045 (emit_bcond): Likewise.
1046 (emit_cb): Likewise.
1047 (emit_tb): Likewise.
1048 (emit_blr): Likewise.
1049 (emit_stp): Likewise.
1050 (emit_ldp_q_offset): Likewise.
1051 (emit_stp_q_offset): Likewise.
1052 (emit_load_store): Likewise.
1053 (emit_ldr): Likewise.
1054 (emit_ldrsw): Likewise.
1055 (emit_str): Likewise.
1056 (emit_ldaxr): Likewise.
1057 (emit_stxr): Likewise.
1058 (emit_stlr): Likewise.
1059 (emit_data_processing_reg): Likewise.
1060 (emit_data_processing): Likewise.
1061 (emit_add): Likewise.
1062 (emit_sub): Likewise.
1063 (emit_mov): Likewise.
1064 (emit_movk): Likewise.
1065 (emit_mov_addr): Likewise.
1066 (emit_mrs): Likewise.
1067 (emit_msr): Likewise.
1068 (emit_sevl): Likewise.
1069 (emit_wfe): Likewise.
1070 (append_insns): Likewise.
1071 (can_encode_int32_in): New helper function.
1072 (aarch64_relocate_instruction): New function.
1073 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1074 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1075 (struct linux_target_ops): Install aarch64_get_thread_area,
1076 aarch64_install_fast_tracepoint_jump_pad and
1077 aarch64_get_min_fast_tracepoint_insn_len.
1078
787749ea
PL
10792015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1080
1081 * Makefile.in (aarch64-insn.o): New rule.
1082 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1083
9812b2e6
YQ
10842015-09-21 Yao Qi <yao.qi@linaro.org>
1085
1086 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1087
18fe412b
YQ
10882015-09-21 Yao Qi <yao.qi@linaro.org>
1089
1090 * tracepoint.c (max_jump_pad_size): Remove.
1091
a0cc84cd
YQ
10922015-09-18 Yao Qi <yao.qi@linaro.org>
1093
1094 * linux-aarch64-low.c: Don't include sys/uio.h.
1095 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1096
d78908cf
WW
10972015-09-16 Wei-cheng Wang <cole945@gmail.com>
1098
1099 * tracepoint.c (eval_result_type): Change prototype.
1100 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1101
d57e0d50
PA
11022015-09-15 Pedro Alves <palves@redhat.com>
1103
1104 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1105 Check whether to report exec events instead of checking whether
1106 multiprocess is enabled.
1107
5a676acc
PA
11082015-09-15 Pedro Alves <palves@redhat.com>
1109
1110 PR remote/18965
1111 * remote-utils.c (prepare_resume_reply): Merge
1112 TARGET_WAITKIND_VFORK_DONE switch case with the
1113 TARGET_WAITKIND_FORKED case.
1114
7c5d0fad
YQ
11152015-09-15 Yao Qi <yao.qi@linaro.org>
1116
1117 * server.c (handle_query): Check string comparison using
1118 "else if" instead of "if".
1119
750ce8d1
YQ
11202015-09-15 Yao Qi <yao.qi@linaro.org>
1121
1122 * server.c (vCont_supported): New global variable.
1123 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1124 matches. Append ";vContSupported+" to own_buf.
1125 (handle_v_requests): Append ";s;S" to own_buf if target supports
1126 hardware single step or vCont_supported is false.
1127 (capture_main): Set vCont_supported to zero.
1128
70b90b91
YQ
11292015-09-15 Yao Qi <yao.qi@linaro.org>
1130
1131 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1132 it to ...
1133 (linux_supports_hardware_single_step): ... New function.
1134 (linux_target_ops): Update.
1135 * lynx-low.c (lynx_target_ops): Set field
1136 supports_hardware_single_step to target_can_do_hardware_single_step.
1137 * nto-low.c (nto_target_ops): Likewise.
1138 * spu-low.c (spu_target_ops): Likewise.
1139 * win32-low.c (win32_target_ops): Likewise.
1140 * target.c (target_can_do_hardware_single_step): New function.
1141 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1142 Remove. <supports_hardware_single_step>: New field.
1143 (target_supports_conditional_breakpoints): Remove.
1144 (target_supports_hardware_single_step): New macro.
1145 (target_can_do_hardware_single_step): Declare.
1146 * server.c (handle_query): Use target_supports_hardware_single_step
1147 instead of target_supports_conditional_breakpoints.
1148
ade90bde
YQ
11492015-09-15 Yao Qi <yao.qi@linaro.org>
1150
1151 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1152 function.
1153 (struct linux_target_ops the_low_target): Install
1154 aarch64_linux_siginfo_fixup.
1155
94585166
DB
11562015-09-11 Don Breazeal <donb@codesourcery.com>
1157 Luis Machado <lgustavo@codesourcery.com>
1158
1159 * linux-low.c (linux_mourn): Static declaration.
1160 (linux_arch_setup): Move in front of
1161 handle_extended_wait.
1162 (linux_arch_setup_thread): New function.
1163 (handle_extended_wait): Handle exec events. Call
1164 linux_arch_setup_thread. Make event_lwp argument a
1165 pointer-to-a-pointer.
1166 (check_zombie_leaders): Do not check stopped threads.
1167 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1168 (linux_low_filter_event): Add lwp and thread for exec'ing
1169 non-leader thread if leader thread has been deleted.
1170 Refactor code into linux_arch_setup_thread and call it.
1171 Pass child lwp pointer by reference to handle_extended_wait.
1172 (linux_wait_for_event_filtered): Update comment.
1173 (linux_wait_1): Prevent clobbering exec event status.
1174 (linux_supports_exec_events): New function.
1175 (linux_target_ops) <supports_exec_events>: Initialize new member.
1176 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1177 new member.
1178 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1179 * server.c (report_exec_events): New global variable.
1180 (handle_query): Handle qSupported query for exec-events feature.
1181 (captured_main): Initialize report_exec_events.
1182 * server.h (report_exec_events): Declare new global variable.
1183 * target.h (struct target_ops) <supports_exec_events>: New
1184 member.
1185 (target_supports_exec_events): New macro.
1186 * win32-low.c (win32_target_ops) <supports_exec_events>:
1187 Initialize new member.
1188
0568462b
MM
11892015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1190
1191 * linux-low.c (linux_low_enable_btrace): Remove.
1192 (linux_target_ops): Replace linux_low_enable_btrace with
1193 linux_enable_btrace.
1194
39edd165
YQ
11952015-09-03 Yao Qi <yao.qi@linaro.org>
1196
1197 * linux-aarch64-low.c (aarch64_insert_point): Call
1198 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1199 returns true.
1200
1db33b5a
UW
12012015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1202
1203 * linux-low.c (check_stopped_by_breakpoint): Use
1204 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1205
ab290430
PA
12062015-08-27 Pedro Alves <palves@redhat.com>
1207
1208 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1209
8d749320
SM
12102015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1211
6711b7f8
SM
1212 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1213 the XNEW-family equivalent.
8d749320
SM
1214 (compile_bytecodes): Likewise.
1215 * dll.c (loaded_dll): Likewise.
1216 * event-loop.c (append_callback_event): Likewise.
1217 (create_file_handler): Likewise.
1218 (create_file_event): Likewise.
1219 * hostio.c (handle_open): Likewise.
1220 * inferiors.c (add_thread): Likewise.
1221 (add_process): Likewise.
1222 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1223 * linux-arm-low.c (arm_new_process): Likewise.
1224 (arm_new_thread): Likewise.
1225 * linux-low.c (add_to_pid_list): Likewise.
1226 (linux_add_process): Likewise.
1227 (handle_extended_wait): Likewise.
1228 (add_lwp): Likewise.
1229 (enqueue_one_deferred_signal): Likewise.
1230 (enqueue_pending_signal): Likewise.
1231 (linux_resume_one_lwp_throw): Likewise.
1232 (linux_resume_one_thread): Likewise.
1233 (linux_read_memory): Likewise.
1234 (linux_write_memory): Likewise.
1235 * linux-mips-low.c (mips_linux_new_process): Likewise.
1236 (mips_linux_new_thread): Likewise.
1237 (mips_add_watchpoint): Likewise.
1238 * linux-x86-low.c (initialize_low_arch): Likewise.
1239 * lynx-low.c (lynx_add_process): Likewise.
1240 * mem-break.c (set_raw_breakpoint_at): Likewise.
1241 (set_breakpoint): Likewise.
1242 (add_condition_to_breakpoint): Likewise.
1243 (add_commands_to_breakpoint): Likewise.
1244 (clone_agent_expr): Likewise.
1245 (clone_one_breakpoint): Likewise.
1246 * regcache.c (new_register_cache): Likewise.
1247 * remote-utils.c (look_up_one_symbol): Likewise.
1248 * server.c (queue_stop_reply): Likewise.
1249 (start_inferior): Likewise.
1250 (queue_stop_reply_callback): Likewise.
1251 (handle_target_event): Likewise.
1252 * spu-low.c (fetch_ppc_memory): Likewise.
1253 (store_ppc_memory): Likewise.
1254 * target.c (set_target_ops): Likewise.
1255 * thread-db.c (thread_db_load_search): Likewise.
1256 (try_thread_db_load_1): Likewise.
1257 * tracepoint.c (add_tracepoint): Likewise.
1258 (add_tracepoint_action): Likewise.
1259 (create_trace_state_variable): Likewise.
1260 (cmd_qtdpsrc): Likewise.
1261 (cmd_qtro): Likewise.
1262 (add_while_stepping_state): Likewise.
1263 * win32-low.c (child_add_thread): Likewise.
1264 (get_image_name): Likewise.
1265
ed8b7b42
YQ
12662015-08-25 Yao Qi <yao.qi@linaro.org>
1267
1268 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1269
db3cb7cb
YQ
12702015-08-25 Yao Qi <yao.qi@linaro.org>
1271
1272 * Makefile.in (aarch64-linux.o): New rule.
1273 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1274 srv_tgtobj.
1275 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1276 (aarch64_init_debug_reg_state): Make it extern.
1277 (aarch64_linux_prepare_to_resume): Remove.
1278
f6011a1c
YQ
12792015-08-25 Yao Qi <yao.qi@linaro.org>
1280
1281 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1282 lwp_arch_private_info and ptid_of_lwp.
1283
88e2cf7e
YQ
12842015-08-25 Yao Qi <yao.qi@linaro.org>
1285
1286 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1287 Find proc_info by find_process_pid. All callers updated.
1288
5e35436e
YQ
12892015-08-25 Yao Qi <yao.qi@linaro.org>
1290
1291 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1292 Remove.
1293 (debug_reg_change_callback): Remove.
1294 (aarch64_notify_debug_reg_change): Remove.
1295
4a8a7965
YQ
12962015-08-25 Yao Qi <yao.qi@linaro.org>
1297
1298 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1299 Call current_lwp_ptid.
1300
32a271ee
YQ
13012015-08-25 Yao Qi <yao.qi@linaro.org>
1302
1303 * linux-aarch64-low.c (debug_reg_change_callback): Use
1304 debug_printf.
1305
0d51c8d7
YQ
13062015-08-25 Yao Qi <yao.qi@linaro.org>
1307
1308 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1309
31a43dd5
YQ
13102015-08-25 Yao Qi <yao.qi@linaro.org>
1311
1312 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1313
8ee52567
YQ
13142015-08-25 Yao Qi <yao.qi@linaro.org>
1315
1316 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1317 the code.
1318
ff3f0f45
YQ
13192015-08-25 Yao Qi <yao.qi@linaro.org>
1320
1321 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1322 Remove.
1323 (debug_reg_change_callback): Remove argument entry and add argument
1324 lwp. Remove local variable thread. Don't print thread id in the
1325 debugging output. Don't check whether pid of thread equals to pid.
1326 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1327 iterate_over_lwps instead find_inferior.
1328
3d40fbb5
PA
13292015-08-24 Pedro Alves <palves@redhat.com>
1330
1331 * inferiors.c (get_first_process): New function.
1332 * inferiors.h (get_first_process): New declaration.
1333 * remote-utils.c (read_ptid): Default to the first process in the
1334 list, instead of to the current thread's process.
1335
438e1e42
PA
13362015-08-24 Pedro Alves <palves@redhat.com>
1337
1338 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1339 * event-loop.c: Likewise.
1340 * remote-utils.c: Likewise.
1341 * tracepoint.c: Likewise.
1342
a8c6d4fc
PA
13432015-08-24 Pedro Alves <palves@redhat.com>
1344
1345 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1346 ptid_get_lwp.
1347
99b0bb12
PA
13482015-08-21 Pedro Alves <palves@redhat.com>
1349
1350 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1351 instead of literal 1.
1352
f8904751
PA
13532015-08-21 Pedro Alves <palves@redhat.com>
1354
1355 * tdesc.c (default_description): Explicitly zero-initialize.
1356
465a859e
PA
13572015-08-21 Pedro Alves <palves@redhat.com>
1358
1359 PR gdb/18749
1360 * inferiors.c (remove_thread): Discard any pending stop reply for
1361 this thread.
1362 * server.c (remove_all_on_match_pid): Rename to ...
1363 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1364 instead of a pid.
1365 (discard_queued_stop_replies): Change parameter to a ptid. Now
1366 extern.
1367 (handle_v_kill, kill_inferior_callback, captured_main)
1368 (process_serial_event): Adjust.
1369 * server.h (discard_queued_stop_replies): Declare.
1370
f0db101d
PA
13712015-08-21 Pedro Alves <palves@redhat.com>
1372
1373 * linux-low.c (wait_for_sigstop): Always switch to no thread
1374 selected if the previously current thread dies.
1375 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1376 process instead of the current thread's.
1377 * remote-utils.c (input_interrupt): Don't check if there's no
1378 current thread.
1379 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1380 current thread to the general thread fails, error out.
1381 (handle_qxfer_auxv, handle_qxfer_libraries)
1382 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1383 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1384 (handle_query): Check if there's a thread selected instead of
1385 checking whether there's any thread in the thread list.
1386 (handle_qxfer_threads, handle_qxfer_btrace)
1387 (handle_qxfer_btrace_conf): Don't error out early if there's no
1388 thread in the thread list.
1389 (handle_v_cont, myresume): Don't set the current thread to the
1390 continue thread.
1391 (process_serial_event) <Hg handling>: Also set thread_id if the
1392 previous general thread is still alive.
1393 (process_serial_event) <g/G handling>: If setting the current
1394 thread to the general thread fails, error out.
1395 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1396 thread's lwp instead of the current thread's.
1397 * target.c (set_desired_thread): If the desired thread was not
1398 found, leave the current thread pointing to NULL. Return an int
1399 (boolean) indicating success.
1400 * target.h (set_desired_thread): Change return type to int.
1401
40045d91
MF
14022015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1403
1404 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1405 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1406 #includes.
1407 (ps_get_thread_area): New function.
1408
45face3b
GB
14092015-08-19 Gary Benson <gbenson@redhat.com>
1410
1411 * hostio.c (handle_pread): Do not attempt to read more data
1412 than hostio_reply_with_data can fit in a packet.
1413
16d5f642
JB
14142015-08-18 Joel Brobecker <brobecker@adacore.com>
1415
1416 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1417
a738da3a
MF
14182015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1419
1420 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1421
33ebda9d
PA
14222015-08-06 Pedro Alves <palves@redhat.com>
1423
1424 * tracepoint.c (expr_eval_result): Now an int.
1425
a44892be
PA
14262015-08-06 Pedro Alves <palves@redhat.com>
1427
1428 * gdbthread.h (struct regcache): Forward declare.
1429 (struct thread_info) <regcache_data>: Now a struct regcache
1430 pointer.
1431 * inferiors.c (inferior_regcache_data)
1432 (set_inferior_regcache_data): Now work with struct regcache
1433 pointers.
1434 * inferiors.h (struct regcache): Forward declare.
1435 (inferior_regcache_data, set_inferior_regcache_data): Now work
1436 with struct regcache pointers.
1437 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1438 (free_register_cache_thread): Remove struct regcache pointer
1439 casts.
1440
608a1e46
PA
14412015-08-06 Pedro Alves <palves@redhat.com>
1442
1443 * server.c (captured_main): On error, print the exception message
1444 to stderr, and if run_once is set, throw a quit.
1445
f0ce0d3a
PA
14462015-08-06 Pedro Alves <palves@redhat.com>
1447
1448 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1449 the current thread.
1450
bf47e248
PA
14512015-08-06 Pedro Alves <palves@redhat.com>
1452
1453 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1454 reading beyond the passed in buffer length.
1455
b6b9ffcc
PL
14562015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1457
1458 * tracepoint.c (symbol_list) <required>: Remove.
1459
863d01bd
PA
14602015-08-06 Pedro Alves <palves@redhat.com>
1461
1462 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1463 count if stopping and suspending threads.
1464 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1465 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1466 (linux_detach): Complete an ongoing step-over.
1467 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1468 throughout.
1469 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1470 (linux_wait_1): If passing a signal to the inferior after
1471 finishing a step-over, unsuspend and re-resume all lwps. If we
1472 see a single-step event but the thread should be continuing, don't
1473 pass the trap to gdb.
1474 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1475 internal_error instead of gdb_assert.
1476 (enqueue_pending_signal): New function.
1477 (check_ptrace_stopped_lwp_gone): Add debug output.
1478 (start_step_over): Use internal_error instead of gdb_assert.
1479 (complete_ongoing_step_over): New function.
1480 (linux_resume_one_thread): Don't resume a suspended thread.
1481 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1482 it stepping.
1483
00db26fa
PA
14842015-08-06 Pedro Alves <palves@redhat.com>
1485
1486 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1487 (linux_thread_alive): Use lwp_is_marked_dead.
1488 (extended_event_reported): Delete.
1489 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1490 instead of extended_event_reported.
1491 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1492 as well.
1493 (lwp_is_marked_dead): New function.
1494 (lwp_running): Use lwp_is_marked_dead.
1495 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1496 comment.
1497
ad071a30
PA
14982015-08-06 Pedro Alves <palves@redhat.com>
1499
1500 * linux-low.c (linux_wait_1): Move fork event output out of the
1501 !report_to_gdb check. Pass event_child->waitstatus to
1502 target_waitstatus_to_string instead of ourstatus.
1503
524b57e6
YQ
15042015-08-04 Yao Qi <yao.qi@linaro.org>
1505
1506 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1507 if current_thread is 32 bit.
1508
6085d6f6
YQ
15092015-08-04 Yao Qi <yao.qi@linaro.org>
1510
1511 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1512 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1513 * server.c (extended_protocol): Remove "static".
1514 * server.h (extended_protocol): Declare it.
1515
8a7e4587
YQ
15162015-08-04 Yao Qi <yao.qi@linaro.org>
1517
1518 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1519 both aarch64 and aarch32.
1520 (aarch64_set_pc): Likewise.
1521
3b53ae99
YQ
15222015-08-04 Yao Qi <yao.qi@linaro.org>
1523
1524 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1525 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1526 arm-with-neon.xml to srv_xmlfiles.
1527 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1528 (is_64bit_tdesc): New function.
1529 (aarch64_linux_read_description): New function.
1530 (aarch64_arch_setup): Call aarch64_linux_read_description.
1531 (regs_info): Rename to regs_info_aarch64.
1532 (aarch64_regs_info): Return right regs_info.
1533 (initialize_low_arch): Call initialize_low_arch_aarch32.
1534
bd9e6534
YQ
15352015-08-04 Yao Qi <yao.qi@linaro.org>
1536
1537 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1538 * linux-aarch32-low.c: New file.
1539 * linux-aarch32-low.h: New file.
1540 * linux-arm-low.c (arm_fill_gregset): Move it to
1541 linux-aarch32-low.c.
1542 (arm_store_gregset): Likewise.
1543 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1544 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1545 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1546 (regs_info): Rename to regs_info_arm.
1547 (arm_regs_info): Return regs_info_aarch32 if
1548 have_ptrace_getregset is 1 and target description is
1549 arm_with_neon or arm_with_vfpv3.
1550 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1551 Call initialize_low_arch_aarch32 instead.
1552
ded48a5e
YQ
15532015-08-04 Yao Qi <yao.qi@linaro.org>
1554
1555 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1556 * linux-low.c: ... here.
1557 * linux-low.h (have_ptrace_getregset): Declare it.
1558
96e9210f
PA
15592015-08-04 Pedro Alves <palves@redhat.com>
1560
1561 * thread-db.c (struct thread_db): Use new typedefs.
1562 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1563 CHK calls.
1564 (disable_thread_event_reporting): Cast result of dlsym to
1565 destination function pointer type.
1566 (thread_db_mourn): Use td_ta_delete_ftype.
1567
af60a1ef
SL
15682015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1569
1570 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1571 arch variant.
1572 (CDX_BREAKPOINT): Define for R2.
1573 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1574 (the_low_target): Add comments.
1575
e8b41681
YQ
15762015-07-30 Yao Qi <yao.qi@linaro.org>
1577
1578 * linux-arm-low.c (arm_hwcap): Remove it.
1579 (arm_read_description): New local variable arm_hwcap. Don't
1580 set arm_hwcap to zero.
1581
89abb039
YQ
15822015-07-30 Yao Qi <yao.qi@linaro.org>
1583
1584 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1585 Use regcache->tdesc instead.
1586 (arm_store_wmmxregset): Likewise.
1587 (arm_fill_vfpregset): Likewise.
1588 (arm_store_vfpregset): Likewise.
1589
deca266c
YQ
15902015-07-30 Yao Qi <yao.qi@linaro.org>
1591
1592 * linux-arm-low.c: Include arch/arm.h.
1593 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1594 (arm_store_gregset): Likewise.
1595
aa58a496
SM
15962015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1597
1598 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1599 ptrace's 4th parameter.
1600
50904b25
YQ
16012015-07-27 Yao Qi <yao.qi@linaro.org>
1602
1603 * configure.srv (case aarch64*-*-linux*): Don't set
1604 srv_linux_usrregs.
1605
5826e159
PA
16062015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1607
1608 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1609 sys/ptrace.h.
1610 * linux-arm-low.c: Likewise.
1611 * linux-cris-low.c: Likewise.
1612 * linux-crisv32-low.c: Likewise.
1613 * linux-low.c: Likewise.
1614 * linux-m68k-low.c: Likewise.
1615 * linux-mips-low.c: Likewise.
1616 * linux-nios2-low.c: Likewise.
1617 * linux-s390-low.c: Likewise.
1618 * linux-sparc-low.c: Likewise.
1619 * linux-tic6x-low.c: Likewise.
1620 * linux-tile-low.c: Likewise.
1621 * linux-x86-low.c: Likewise.
1622
54019719
PA
16232015-07-24 Pedro Alves <palves@redhat.com>
1624
1625 * config.in: Regenerate.
1626 * configure: Regenerate.
1627
eb7aa561
PA
16282015-07-24 Pedro Alves <palves@redhat.com>
1629
1630 * acinclude.m4: Include ../ptrace.m4.
1631 * configure.ac: Call GDB_AC_PTRACE.
1632 * config.in, configure: Regenerate.
1633
55d7b841
YQ
16342015-07-24 Yao Qi <yao.qi@linaro.org>
1635
1636 * linux-low.c (linux_create_inferior): Remove setting to
1637 proc->priv->new_inferior.
1638 (linux_attach): Likewise.
1639 (linux_low_filter_event): Likewise.
1640 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1641
c06cbd92
YQ
16422015-07-24 Yao Qi <yao.qi@linaro.org>
1643
1644 * linux-low.c (linux_arch_setup): New function.
1645 (linux_low_filter_event): If proc->tdesc is NULL and
1646 proc->attached is true, call the_low_target.arch_setup.
1647 Otherwise, keep status pending, and return.
1648 (linux_resume_one_lwp_throw): Don't call get_pc if
1649 thread->while_stepping isn't NULL. Don't call
1650 get_thread_regcache if proc->tdesc is NULL.
1651 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1652 (linux_target_ops): Install arch_setup.
1653 * server.c (start_inferior): Call the_target->arch_setup.
1654 * target.h (struct target_ops) <arch_setup>: New field.
1655 (target_arch_setup): New marco.
1656 * lynx-low.c (lynx_target_ops): Update.
1657 * nto-low.c (nto_target_ops): Update.
1658 * spu-low.c (spu_target_ops): Update.
1659 * win32-low.c (win32_target_ops): Update.
1660
5ae3ebba
YQ
16612015-07-24 Yao Qi <yao.qi@linaro.org>
1662
1663 * linux-low.c (linux_add_process): Don't set
1664 proc->priv->new_inferior.
1665 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1666 (linux_attach): Likewise.
1667
eb97750b
YQ
16682015-07-24 Yao Qi <yao.qi@linaro.org>
1669
1670 * server.c (start_inferior): Code refactor.
1671
51aee833
YQ
16722015-07-24 Yao Qi <yao.qi@linaro.org>
1673
1674 * server.c (process_serial_event): Set general_thread.
1675
af1b22f3
YQ
16762015-07-21 Yao Qi <yao.qi@linaro.org>
1677
1678 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1679 aarch64_linux_get_debug_reg_capacity.
1680
554717a3
YQ
16812015-07-17 Yao Qi <yao.qi@linaro.org>
1682
1683 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1684 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1685 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1686 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1687 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1688 (AARCH64_HWP_ALIGNMENT): Likewise.
1689 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1690 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1691 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1692 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1693 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1694 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1695 (struct aarch64_debug_reg_state): Likewise.
1696 (struct arch_lwp_info): Likewise.
1697 (aarch64_align_watchpoint): Likewise.
1698 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1699 (aarch64_watchpoint_length): Likewise.
1700 (aarch64_point_encode_ctrl_reg): Likewise
1701 (aarch64_point_is_aligned): Likewise.
1702 (aarch64_align_watchpoint): Likewise.
1703 (aarch64_linux_set_debug_regs):
1704 (aarch64_dr_state_insert_one_point): Likewise.
1705 (aarch64_dr_state_remove_one_point): Likewise.
1706 (aarch64_handle_breakpoint): Likewise.
1707 (aarch64_handle_aligned_watchpoint): Likewise.
1708 (aarch64_handle_unaligned_watchpoint): Likewise.
1709 (aarch64_handle_watchpoint): Likewise.
1710
c67ca4de
YQ
17112015-07-17 Yao Qi <yao.qi@linaro.org>
1712
1713 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1714 and don't aarch64_get_debug_reg_state. All callers update.
1715 (aarch64_handle_aligned_watchpoint): Likewise.
1716 (aarch64_handle_unaligned_watchpoint): Likewise.
1717 (aarch64_handle_watchpoint): Likewise.
1718 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1719 (aarch64_remove_point): Likewise.
1720
25abf979
YQ
17212015-07-17 Yao Qi <yao.qi@linaro.org>
1722
1723 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1724 debug_printf.
1725 (aarch64_handle_unaligned_watchpoint): Likewise.
1726
db1ff28b
JK
17272015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1728
1729 Revert the previous 3 commits:
1730 Move gdb_regex* to common/
1731 Move linux_find_memory_regions_full & co.
1732 gdbserver build-id attribute generator
1733
700ca40f
JK
17342015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1735 Jan Kratochvil <jan.kratochvil@redhat.com>
1736
1737 gdbserver build-id attribute generator.
1738 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1739 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1740 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1741 (find_phdr): New.
1742 (get_dynamic): Use find_pdhr to traverse program headers.
1743 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1744 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1745 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1746 (get_hex_build_id): New.
1747 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1748 to reply XML document.
1749
9904185c
JK
17502015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1751 Jan Kratochvil <jan.kratochvil@redhat.com>
1752
1753 * target.c: Include target/target-utils.h and fcntl.h.
1754 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1755 (target_fileio_read_stralloc): New functions.
1756
6e5b4429
JK
17572015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1758
1759 * Makefile.in (OBS): Add gdb_regex.o.
1760 (gdb_regex.o): New.
1761 * config.in: Rebuilt.
1762 * configure: Rebuilt.
1763
ddc98fbf
JK
17642015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1765 Jan Kratochvil <jan.kratochvil@redhat.com>
1766
1767 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1768 * Makefile.in (OBS): Add target-utils.o.
1769 (linux-maps.o, target-utils.o): New.
1770 * configure.srv (srv_linux_obj): Add linux-maps.o.
1771
e57bb7a0
PL
17722015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1773
1774 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1775 function, return 1.
1776 (the_low_target): Install it.
1777
586b02a9
PA
17782015-07-14 Pedro Alves <palves@redhat.com>
1779
1780 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1781 Instead, ignore ECHILD, and throw an error for other errnos.
1782
58c1b36c
PA
17832015-07-10 Pedro Alves <palves@redhat.com>
1784
1785 * event-loop.c (struct callback_event) <data>: Change type to
1786 gdb_client_data instance instead of gdb_client_data pointer.
1787 (append_callback_event): Adjust.
1788
421530db
PL
17892015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1790
1791 * linux-aarch64-low.c: Add comments for each linux_target_ops
1792 method. Remove comments already covered in target_ops and
1793 linux_target_ops definitions.
1794 (the_low_target): Add comments for each unimplemented method.
1795
c2d65f38
YQ
17962015-07-09 Yao Qi <yao.qi@linaro.org>
1797
1798 * linux-aarch64-low.c (aarch64_regmap): Remove.
1799 (aarch64_usrregs_info): Remove.
1800 (regs_info): Set field usrregs to NULL.
1801
b20a6524
MM
18022015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1803
1804 * linux-low.c: Include "rsp-low.h"
1805 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1806 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1807 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1808 (handle_btrace_enable_pt): New.
1809 (handle_btrace_general_set): Support "pt".
1810 (handle_btrace_conf_general_set): Support "pt:size".
1811
96c97461
PL
18122015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1813
1814 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1815 Z_PACKET_SW_BP.
1816
37d66942
PL
18172015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1818
1819 * linux-aarch64-low.c: Remove comment about endianness.
1820 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1821 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1822 memcmp.
1823
dc06243f
GB
18242015-06-24 Gary Benson <gbenson@redhat.com>
1825
1826 * linux-i386-ipa.c (stdint.h): Do not include.
1827 * lynx-i386-low.c (stdint.h): Likewise.
1828 * lynx-ppc-low.c (stdint.h): Likewise.
1829 * mem-break.c (stdint.h): Likewise.
1830 * thread-db.c (stdint.h): Likewise.
1831 * tracepoint.c (stdint.h): Likewise.
1832 * win32-low.c (stdint.h): Likewise.
1833
124e13d9
SM
18342015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1835
1836 * server.c (write_qxfer_response): Update call to
1837 remote_escape_output.
1838
909c2cda
JK
18392015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1840 Jan Kratochvil <jan.kratochvil@redhat.com>
1841
1842 Merge multiple hex conversions.
1843 * gdbreplay.c (tohex): Rename to 'fromhex'.
1844 (logchar): Use fromhex.
1845
24c05f46
JK
18462015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1847
1848 * server.c (handle_qxfer_libraries): Set `version' attribute for
1849 <library-list>.
1850
14d2069a
GB
18512015-06-10 Gary Benson <gbenson@redhat.com>
1852
1853 * target.h (struct target_ops) <multifs_open>: New field.
1854 <multifs_unlink>: Likewise.
1855 <multifs_readlink>: Likewise.
1856 * linux-low.c (nat/linux-namespaces.h): New include.
1857 (linux_target_ops): Initialize the_target->multifs_open,
1858 the_target->multifs_unlink and the_target->multifs_readlink.
1859 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1860 * hostio.c (hostio_fs_pid): New static variable.
1861 (hostio_handle_new_gdb_connection): New function.
1862 (handle_setfs): Likewise.
1863 (handle_open): Use the_target->multifs_open as appropriate.
1864 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1865 (handle_readlink): Use the_target->multifs_readlink as
1866 appropriate.
1867 (handle_vFile): Handle vFile:setfs packets.
1868 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1869 after target_handle_new_gdb_connection.
1870
4b8b5e72
GB
18712015-06-10 Gary Benson <gbenson@redhat.com>
1872
1873 * configure.ac (AC_CHECK_FUNCS): Add setns.
1874 * config.in: Regenerate.
1875 * configure: Likewise.
1876 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1877 (linux-namespaces.o): New rule.
1878 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1879
3ac2e371
GB
18802015-06-09 Gary Benson <gbenson@redhat.com>
1881
1882 * hostio.c (handle_open): Process mode argument with
1883 fileio_to_host_mode.
1884
ca9b78ce
YQ
18852015-06-01 Yao Qi <yao.qi@linaro.org>
1886
1887 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1888 * linux-x86-low.c: Likewise.
1889
bfacd19d
DB
18902015-05-28 Don Breazeal <donb@codesourcery.com>
1891
1892 * linux-low.c (handle_extended_wait): Initialize
1893 thread_info.last_resume_kind for new fork children.
1894
452003ef
PA
18952015-05-15 Pedro Alves <palves@redhat.com>
1896
1897 * target.h (target_handle_new_gdb_connection): Rewrite using if
1898 wrapped in do/while.
1899
1041a03c
JB
19002015-05-14 Joel Brobecker <brobecker@adacore.com>
1901
1902 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1903 * configure, config.in: Regenerate.
1904 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1905 Declare typedef.
1906
c269dbdb
DB
19072015-05-12 Don Breazeal <donb@codesourcery.com>
1908
1909 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1910 PTRACE_EVENT_VFORK_DONE.
1911 (linux_low_ptrace_options, extended_event_reported): Add vfork
1912 events.
1913 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1914 and "vforkdone" for RSP 'T' Stop Reply Packet.
1915 * server.h (report_vfork_events): Declare
1916 global variable.
1917
3a8a0396
DB
19182015-05-12 Don Breazeal <donb@codesourcery.com>
1919
1920 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1921 (the_low_target) <new_fork>: Initialize new member.
1922 * linux-arm-low.c (arm_new_fork): New function.
1923 (the_low_target) <new_fork>: Initialize new member.
1924 * linux-low.c (handle_extended_wait): Call new target function
1925 new_fork.
1926 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1927 * linux-mips-low.c (mips_add_watchpoint): New function
1928 extracted from mips_insert_point.
1929 (the_low_target) <new_fork>: Initialize new member.
1930 (mips_linux_new_fork): New function.
1931 (mips_insert_point): Call mips_add_watchpoint.
1932 * linux-x86-low.c (x86_linux_new_fork): New function.
1933 (the_low_target) <new_fork>: Initialize new member.
1934
de0d863e
DB
19352015-05-12 Don Breazeal <donb@codesourcery.com>
1936
1937 * linux-low.c (handle_extended_wait): Implement return value,
1938 rename argument 'event_child' to 'event_lwp', handle
1939 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1940 (linux_low_ptrace_options): New function.
1941 (linux_low_filter_event): Call linux_low_ptrace_options,
1942 use different argument fo linux_enable_event_reporting,
1943 use return value from handle_extended_wait.
1944 (extended_event_reported): New function.
1945 (linux_wait_1): Call extended_event_reported and set
1946 status to report fork events.
1947 (linux_write_memory): Add pid to debug message.
1948 (reset_lwp_ptrace_options_callback): New function.
1949 (linux_handle_new_gdb_connection): New function.
1950 (linux_target_ops): Initialize new structure member.
1951 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1952 * lynx-low.c: Initialize new structure member.
1953 * remote-utils.c (prepare_resume_reply): Implement stop reason
1954 "fork" for "T" stop message.
1955 * server.c (handle_query): Call handle_new_gdb_connection.
1956 * server.h (report_fork_events): Declare global flag.
1957 * target.h (struct target_ops) <handle_new_gdb_connection>:
1958 New member.
1959 (target_handle_new_gdb_connection): New macro.
1960 * win32-low.c: Initialize new structure member.
1961
ddcbc397
DB
19622015-05-12 Don Breazeal <donb@codesourcery.com>
1963
1964 * mem-break.c (APPEND_TO_LIST): Define macro.
1965 (clone_agent_expr): New function.
1966 (clone_one_breakpoint): New function.
1967 (clone_all_breakpoints): New function.
1968 * mem-break.h: Declare new functions.
1969
89245bc0
DB
19702015-05-12 Don Breazeal <donb@codesourcery.com>
1971
1972 * linux-low.c (linux_supports_fork_events): New function.
1973 (linux_supports_vfork_events): New function.
1974 (linux_target_ops): Initialize new structure members.
1975 (initialize_low): Call linux_check_ptrace_features.
1976 * lynx-low.c (lynx_target_ops): Initialize new structure
1977 members.
1978 * server.c (report_fork_events, report_vfork_events):
1979 New global flags.
1980 (handle_query): Add new features to qSupported packet and
1981 response.
1982 (captured_main): Initialize new global variables.
1983 * target.h (struct target_ops) <supports_fork_events>:
1984 New member.
1985 <supports_vfork_events>: New member.
1986 (target_supports_fork_events): New macro.
1987 (target_supports_vfork_events): New macro.
1988 * win32-low.c (win32_target_ops): Initialize new structure
1989 members.
1990
835205d0
GB
19912015-05-12 Gary Benson <gbenson@redhat.com>
1992
1993 * server.c (handle_qxfer_exec_file): Use current process
1994 if annex is empty.
1995
21e94bd9
SL
19962015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1997
1998 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1999 Remove HAVE_PTRACE_GETREGS conditionals.
2000 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2001 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2002
45614f15
YQ
20032015-05-08 Yao Qi <yao.qi@linaro.org>
2004
2005 * linux-low.c (linux_supports_conditional_breakpoints): New
2006 function.
2007 (linux_target_ops): Install new target method.
2008 * lynx-low.c (lynx_target_ops): Install NULL hook for
2009 supports_conditional_breakpoints.
2010 * nto-low.c (nto_target_ops): Likewise.
2011 * spu-low.c (spu_target_ops): Likewise.
2012 * win32-low.c (win32_target_ops): Likewise.
2013 * server.c (handle_query): Check
2014 target_supports_conditional_breakpoints.
2015 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2016 New field.
2017 (target_supports_conditional_breakpoints): New macro.
2018
80ad801e
PA
20192015-05-06 Pedro Alves <palves@redhat.com>
2020
2021 PR server/18081
2022 * server.c (start_inferior): If the process exits, mourn it.
2023
819843c7
GB
20242015-04-21 Gary Benson <gbenson@redhat.com>
2025
2026 * hostio.c (fileio_open_flags_to_host): Factored out to
2027 fileio_to_host_openflags in common/fileio.c. Single use
2028 updated.
2029
a2d5a9d7
MF
20302015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2031
2032 * linux-xtensa-low.c (xtensa_fill_gregset)
2033 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2034 XCHAL_HAVE_LOOP.
2035
deb44829
MF
20362015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2037
2038 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2039 (regs_info): Replace usrregs pointer with NULL.
2040
e57f1de3
GB
20412015-04-17 Gary Benson <gbenson@redhat.com>
2042
2043 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2044 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2045 * server.c (handle_qxfer_exec_file): New function.
2046 (qxfer_packets): Add exec-file entry.
2047 (handle_query): Report qXfer:exec-file:read as supported packet.
2048
62828379
RN
20492015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2050
2051 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2052
b88bb450
GB
20532015-04-09 Gary Benson <gbenson@redhat.com>
2054
2055 * hostio-errno.c (errno_to_fileio_error): Remove function.
2056 Update caller to use remote_fileio_to_fio_error.
2057
c8f4bfdd
YQ
20582015-04-09 Yao Qi <yao.qi@linaro.org>
2059
2060 * linux-low.c (linux_insert_point): Call
2061 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2062 (linux_remove_point): Call remove_memory_breakpoint if type is
2063 raw_bkpt_type_sw.
2064 * linux-x86-low.c (x86_insert_point): Don't call
2065 insert_memory_breakpoint.
2066 (x86_remove_point): Don't call remove_memory_breakpoint.
2067
41f98f02
PA
20682015-04-01 Pedro Alves <palves@redhat.com>
2069 Cleber Rosa <crosa@redhat.com>
2070
2071 * server.c (gdbserver_usage): Reorganize and extend the usage
2072 message.
2073
2bf6fb9d
PA
20742015-03-24 Pedro Alves <palves@redhat.com>
2075
2076 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2077 output. Also dump TRAP_TRACE.
2078 (linux_low_filter_event): In debug output, distinguish a
2079 resume_stop SIGSTOP from a delayed SIGSTOP.
2080
369f6daa
GB
20812015-03-24 Gary Benson <gbenson@redhat.com>
2082
2083 * linux-x86-low.c (x86_linux_new_thread): Moved to
2084 nat/x86-linux.c.
2085 (x86_linux_prepare_to_resume): Likewise.
2086
8e5d4070
GB
20872015-03-24 Gary Benson <gbenson@redhat.com>
2088
2089 * Makefile.in (x86-linux-dregs.o): New rule.
2090 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2091 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2092 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2093 (x86_linux_dr_get): Likewise.
2094 (x86_linux_dr_set): Likewise.
2095 (update_debug_registers_callback): Likewise.
2096 (x86_linux_dr_set_addr): Likewise.
2097 (x86_linux_dr_get_addr): Likewise.
2098 (x86_linux_dr_set_control): Likewise.
2099 (x86_linux_dr_get_control): Likewise.
2100 (x86_linux_dr_get_status): Likewise.
2101 (x86_linux_update_debug_registers): Likewise.
2102
2b95d440
GB
21032015-03-24 Gary Benson <gbenson@redhat.com>
2104
2105 * linux-x86-low.c (x86_linux_update_debug_registers):
2106 New function, factored out from...
2107 (x86_linux_prepare_to_resume): ...this.
2108
14b0bc68
GB
21092015-03-24 Gary Benson <gbenson@redhat.com>
2110
2111 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2112 (x86_linux_dr_set): Likewise.
2113 (update_debug_registers_callback): Likewise.
2114 (x86_linux_dr_set_addr): Likewise.
2115 (x86_linux_dr_get_addr): Likewise.
2116 (x86_linux_dr_set_control): Likewise.
2117 (x86_linux_dr_get_control): Likewise.
2118 (x86_linux_dr_get_status): Likewise.
2119 (x86_linux_prepare_to_resume): Likewise.
2120
5dfe6ca8
GB
21212015-03-24 Gary Benson <gbenson@redhat.com>
2122
2123 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2124 Use perror_with_name. Pass string through gettext.
2125 (x86_linux_dr_set): Likewise.
2126
d33472ad
GB
21272015-03-24 Gary Benson <gbenson@redhat.com>
2128
2129 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2130 (x86_linux_dr_set_addr): ...this.
2131 (x86_dr_low_get_addr): Rename to...
2132 (x86_linux_dr_get_addr): ...this.
2133 (x86_dr_low_set_control): Rename to...
2134 (x86_linux_dr_set_control): ...this.
2135 (x86_dr_low_get_control): Rename to...
2136 (x86_linux_dr_get_control): ...this.
2137 (x86_dr_low_get_status): Rename to...
2138 (x86_linux_dr_get_status): ...this.
2139 (x86_dr_low): Update with new function names.
2140
4b134ca1
GB
21412015-03-24 Gary Benson <gbenson@redhat.com>
2142
2143 * Makefile.in (x86-linux.o): New rule.
2144 * configure.srv: Add x86-linux.o to relevant targets.
2145 * linux-low.c (lwp_set_arch_private_info): New function.
2146 (lwp_arch_private_info): Likewise.
2147 * linux-x86-low.c: Include nat/x86-linux.h.
2148 (arch_lwp_info): Removed structure.
2149 (update_debug_registers_callback):
2150 Use lwp_set_debug_registers_changed.
2151 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2152 and lwp_set_debug_registers_changed.
2153 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2154
34c703da
GB
21552015-03-24 Gary Benson <gbenson@redhat.com>
2156
2157 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2158 * linux-arm-low.c (arm_new_thread): Likewise.
2159 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2160 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2161 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2162 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2163
cff068da
GB
21642015-03-24 Gary Benson <gbenson@redhat.com>
2165
2166 * linux-low.c (ptid_of_lwp): New function.
2167 (lwp_is_stopped): Likewise.
2168 (lwp_stop_reason): Likewise.
2169 * linux-x86-low.c (update_debug_registers_callback):
2170 Use lwp_is_stopped.
2171 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2172 lwp_stop_reason.
2173
b2f7c7e8
GB
21742015-03-24 Gary Benson <gbenson@redhat.com>
2175
2176 * linux-low.h (linux_stop_lwp): Remove declaration.
2177
6d4ee8c6
GB
21782015-03-24 Gary Benson <gbenson@redhat.com>
2179
2180 * linux-low.h: Include nat/linux-nat.h.
2181 * linux-low.c (iterate_over_lwps_args): New structure.
2182 (iterate_over_lwps_filter): New function.
2183 (iterate_over_lwps): Likewise.
2184 * linux-x86-low.c (update_debug_registers_callback):
2185 Update signature to what iterate_over_lwps expects.
2186 Remove PID check that iterate_over_lwps now performs.
2187 (x86_dr_low_set_addr): Use iterate_over_lwps.
2188 (x86_dr_low_set_control): Likewise.
2189
70a0bb6b
GB
21902015-03-24 Gary Benson <gbenson@redhat.com>
2191
2192 * linux-x86-low.c (x86_debug_reg_state): New function.
2193 (x86_linux_prepare_to_resume): Use the above.
2194
7b669087
GB
21952015-03-24 Gary Benson <gbenson@redhat.com>
2196
2197 * linux-low.c (current_lwp_ptid): New function.
2198 * linux-x86-low.c: Include nat/linux-nat.h.
2199 (x86_dr_low_get_addr): Use current_lwp_ptid.
2200 (x86_dr_low_get_control): Likewise.
2201 (x86_dr_low_get_status): Likewise.
2202
eef49a3d
PA
22032015-03-20 Pedro Alves <palves@redhat.com>
2204
2205 * tracepoint.c (cmd_qtstatus): Make "str" const.
2206
b2333d22
PA
22072015-03-20 Pedro Alves <palves@redhat.com>
2208
2209 * server.c (handle_general_set): Make "req_str" const.
2210
23f238d3
PA
22112015-03-19 Pedro Alves <palves@redhat.com>
2212
2213 * linux-low.c (linux_resume_one_lwp): Rename to ...
2214 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2215 instead call perror_with_name.
2216 (check_ptrace_stopped_lwp_gone): New function.
2217 (linux_resume_one_lwp): Reimplement as wrapper around
2218 linux_resume_one_lwp_throw that swallows errors if the LWP is
2219 gone.
2220
91baf43f
PA
22212015-03-19 Pedro Alves <palves@redhat.com>
2222
2223 * linux-low.c (count_events_callback, select_event_lwp_callback):
2224 No longer check whether the thread has resume_stop as last resume
2225 kind.
2226
8bf3b159
PA
22272015-03-19 Pedro Alves <palves@redhat.com>
2228
2229 * linux-low.c (count_events_callback, select_event_lwp_callback):
2230 Use the lwp's status_pending_p field, not the thread's.
2231
b90fc188
PA
22322015-03-19 Pedro Alves <palves@redhat.com>
2233
2234 * linux-low.c (select_event_lwp_callback): Update comments to
2235 no longer mention SIGTRAP.
2236
464b0089
GB
22372015-03-18 Gary Benson <gbenson@redhat.com>
2238
2239 * server.c (handle_query): Do not report vFile:fstat as supported.
2240
aa9e327f
GB
22412015-03-11 Gary Benson <gbenson@redhat.com>
2242
2243 * hostio.c (sys/types.h): New include.
2244 (sys/stat.h): Likewise.
2245 (common-remote-fileio.h): Likewise.
2246 (handle_fstat): New function.
2247 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 2248
791c0056
GB
22492015-03-11 Gary Benson <gbenson@redhat.com>
2250
2251 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2252 struct stat.st_blocks and struct stat.st_blksize.
2253 * configure: Regenerate.
2254 * config.in: Likewise.
2255 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2256 (OBS): Add common-remote-fileio.o.
2257 (common-remote-fileio.o): New rule.
2258
9a9df970
PA
22592015-03-09 Pedro Alves <palves@redhat.com>
2260
2261 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2262 'struct sockaddr' pointer in 'accept' call.
2263
9eb1356e
PA
22642015-03-09 Pedro Alves <palves@redhat.com>
2265
2266 Revert:
2267 2015-03-07 Pedro Alves <palves@redhat.com>
2268 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2269 or <winsock2.h> here. Instead include "gdb_socket.h".
2270 (remote_open): Use union gdb_sockaddr_u.
2271 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2272 or <winsock2.h> here. Instead include "gdb_socket.h".
2273 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2274 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2275 or <sys/un.h>.
2276 (init_named_socket, gdb_agent_helper_thread): Use union
2277 gdb_sockaddr_u.
2278
aac331e4
PA
22792015-03-07 Pedro Alves <palves@redhat.com>
2280
2281 * configure.ac (build_warnings): Move
2282 -Wdeclaration-after-statement to the C-specific set.
2283 * configure: Regenerate.
2284
366c75fc
PA
22852015-03-07 Pedro Alves <palves@redhat.com>
2286
2287 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2288 or <winsock2.h> here. Instead include "gdb_socket.h".
2289 (remote_open): Use union gdb_sockaddr_u.
2290 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2291 or <winsock2.h> here. Instead include "gdb_socket.h".
2292 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2293 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2294 or <sys/un.h>.
2295 (init_named_socket, gdb_agent_helper_thread): Use union
2296 gdb_sockaddr_u.
2297
492d29ea
PA
22982015-03-07 Pedro Alves <palves@redhat.com>
2299
2300 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2301 instead.
2302
60a191ed
YQ
23032015-03-06 Yao Qi <yao.qi@linaro.org>
2304
2305 * linux-aarch64-low.c (aarch64_insert_point): Use
2306 show_debug_regs as a boolean.
2307 (aarch64_remove_point): Likewise.
2308
f5771b1d
PA
23092015-03-05 Pedro Alves <palves@redhat.com>
2310
2311 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2312 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2313 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2314 * nto-low.c (nto_target_ops): Likewise.
2315 * spu-low.c (spu_target_ops): Likewise.
2316 * win32-low.c (win32_target_ops): Likewise.
2317
3e572f71
PA
23182015-03-04 Pedro Alves <palves@redhat.com>
2319
72f4393d 2320 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
2321 Decide whether a breakpoint triggered based on the SIGTRAP's
2322 siginfo.si_code.
72f4393d
L
2323 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2324 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
2325 (linux_low_filter_event): Check for breakpoints before checking
2326 watchpoints.
2327 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2328 siginfo.si_code.
72f4393d
L
2329 (linux_stopped_by_sw_breakpoint)
2330 (linux_supports_stopped_by_sw_breakpoint)
2331 (linux_stopped_by_hw_breakpoint)
2332 (linux_supports_stopped_by_hw_breakpoint): New functions.
2333 (linux_target_ops): Install new target methods.
3e572f71 2334
1ec68e26
PA
23352015-03-04 Pedro Alves <palves@redhat.com>
2336
2337 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2338 * server.c (swbreak_feature, hwbreak_feature): New globals.
2339 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2340 (captured_main): Clear swbreak_feature and hwbreak_feature.
2341 * server.h (swbreak_feature, hwbreak_feature): Declare.
2342 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2343 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2344 supports_stopped_by_hw_breakpoint>: New fields.
2345 (target_supports_stopped_by_sw_breakpoint)
2346 (target_stopped_by_sw_breakpoint)
2347 (target_supports_stopped_by_hw_breakpoint)
2348 (target_stopped_by_hw_breakpoint): Declare.
2349
15c66dd6
PA
23502015-03-04 Pedro Alves <palves@redhat.com>
2351
2352 enum lwp_stop_reason -> enum target_stop_reason
2353 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2354 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2355 (linux_wait_1, stuck_in_jump_pad_callback)
2356 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2357 (linux_stopped_by_watchpoint):
2358 * linux-low.h (enum lwp_stop_reason): Delete.
2359 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2360 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2361
98fc70d6
YQ
23622015-03-04 Yao Qi <yao.qi@linaro.org>
2363
2364 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2365
dd2ac174
GB
23662015-03-03 Gary Benson <gbenson@redhat.com>
2367
2368 * hostio.c (handle_vFile): Fix prefix lengths.
2369
d68e53f4
MM
23702015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2371
2372 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2373 ptr_bits.
2374
bf2d68ab
AA
23752015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2376
2377 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2378 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2379 (clean): Add "rm -f" for above C files.
2380 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2381 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2382 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2383 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2384 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2385 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2386 (init_registers_s390x_vx_linux64)
2387 (init_registers_s390x_tevx_linux64)
2388 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2389 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2390 declarations.
2391 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2392 (s390_store_vxrs_high): New functions.
2393 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2394 NT_S390_VXRS_HIGH.
2395 (s390_arch_setup): Add logic for selecting one of the new target
2396 descriptions. Activate the new vector regsets if applicable.
2397 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2398 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2399 and init_registers_s390x_tevx_linux64.
2400
c966a859
PA
24012015-03-01 Pedro Alves <palves@redhat.com>
2402
2403 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2404 parameter.
2405
4180215b
PA
24062015-02-27 Pedro Alves <palves@redhat.com>
2407
2408 * linux-x86-low.c (u_debugreg_offset): New function.
2409 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2410
749bab01
PA
24112015-02-27 Pedro Alves <palves@redhat.com>
2412
2413 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2414 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2415 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2416 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2417 (ps_lsetfpregs, ps_getpid)
2418 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2419 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2420 (ps_lsetxregs, ps_plog): Declare.
2421
3c14e5a3
PA
24222015-02-27 Pedro Alves <palves@redhat.com>
2423
2424 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2425 IP_AGENT_EXPORT_FUNC.
2426 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2427 IP_AGENT_EXPORT_FUNC.
2428 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2429 (IP_AGENT_EXPORT): Delete.
2430 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2431 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2432 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2433 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2434 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2435 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2436 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2437 (traceframe_read_count, traceframe_write_count)
2438 (traceframes_created, trace_state_variables, get_raw_reg)
2439 (get_trace_state_variable_value, set_trace_state_variable_value)
2440 (ust_loaded, helper_thread_id, cmd_buf): Use
2441 IPA_SYM_EXPORTED_NAME.
2442 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2443 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2444 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2445 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2446 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2447 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2448 EXTERN_C_PUSH/EXTERN_C_POP.
2449 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2450 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2451 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2452 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2453 (traceframe_write_count, traceframe_read_count)
2454 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2455 (about_to_request_buffer_space, get_trace_state_variable_value)
2456 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2457 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2458 EXTERN_C_PUSH/EXTERN_C_POP.
2459 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2460 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2461 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2462 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2463 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2464 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2465 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2466 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2467 Define.
2468 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2469 (IP_AGENT_EXPORT_VAR_DECL): Define.
2470 (tracing): Declare.
2471 (gdb_agent_get_raw_reg): Declare.
2472
fe978cb0
PA
24732015-02-27 Tom Tromey <tromey@redhat.com>
2474 Pedro Alves <palves@redhat.com>
2475
2476 Rename symbols whose names are reserved C++ keywords throughout.
2477
3bc3d82a
PA
24782015-02-27 Pedro Alves <palves@redhat.com>
2479
2480 * Makefile.in (COMPILER): New, get it from autoconf.
2481 (CXX): Get from autoconf instead.
2482 (COMPILE.pre): Use COMPILER.
2483 (CC-LD): Rename to ...
2484 (CC_LD): ... this. Use COMPILER.
2485 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2486 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2487 * acinclude.m4: Include build-with-cxx.m4.
2488 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2489 Disable -Werror by default if building in C++ mode.
2490 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2491 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2492 the C++ compiler. Save/restore CXXFLAGS too.
2493 * configure: Regenerate.
2494
07697489
PA
24952015-02-27 Pedro Alves <palves@redhat.com>
2496
2497 * acinclude.m4: Include libiberty.m4.
2498 * configure.ac: Call libiberty_INIT.
2499 * config.in, configure: Regenerate.
2500
9beb7c4e
PA
25012015-02-26 Pedro Alves <palves@redhat.com>
2502
2503 * linux-low.c (linux_wait_1): When incrementing the PC past a
2504 program breakpoint always use the_low_target.breakpoint_len as
2505 increment, rather than the maximum between that and
2506 the_low_target.decr_pc_after_break.
2507
8090aef2
PA
25082015-02-23 Pedro Alves <palves@redhat.com>
2509
2510 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2511 thread was doing a step-over; always adjust the PC if
2512 we stepped over a permanent breakpoint.
2513 (linux_wait_1): If we stepped over breakpoint that was on top of a
2514 permanent breakpoint, manually advance the PC past it.
2515
bc9540e8
PA
25162015-02-23 Pedro Alves <palves@redhat.com>
2517
2518 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2519 modes.
2520 (x86_fill_gregset, x86_store_gregset): Use it when handling
2521 $orig_eax.
2522
2db9a427
PA
25232015-02-20 Pedro Alves <palves@redhat.com>
2524
2525 * thread-db.c: Include "nat/linux-procfs.h".
2526 (thread_db_init): Skip listing new threads if the kernel supports
2527 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2528
afa8d396
PA
25292015-02-20 Pedro Alves <palves@redhat.com>
2530
2531 * linux-low.c (status_pending_p_callback): Use ptid_match.
2532
c9587f88
AT
25332015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2534
2535 PR breakpoints/16812
2536 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2537 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2538 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2539
b05ec7a5
AT
25402015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2541
2542 PR breakpoints/15956
2543 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2544
d33501a5
MM
25452015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2546
2547 * linux-low.c (linux_low_btrace_conf): Print size.
2548 * server.c (handle_btrace_conf_general_set): New.
2549 (hanle_general_set): Call handle_btrace_conf_general_set.
2550 (handle_query): Report Qbtrace-conf:bts:size as supported.
2551
f4abbc16
MM
25522015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2553
2554 * linux-low.c (linux_low_enable_btrace): Update parameters.
2555 (linux_low_btrace_conf): New.
2556 (linux_target_ops)<to_btrace_conf>: Initialize.
2557 * server.c (current_btrace_conf): New.
2558 (handle_btrace_enable): Rename to ...
2559 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2560 to target_enable_btrace. Update comment. Update users.
2561 (handle_qxfer_btrace_conf): New.
2562 (qxfer_packets): Add btrace-conf entry.
2563 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2564 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2565 (target_ops)<read_btrace_conf>: New.
2566 (target_enable_btrace): Update parameters.
2567 (target_read_btrace_conf): New.
2568
043c3577
MM
25692015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2570
2571 * server.c (handle_btrace_general_set): Remove call to
2572 target_supports_btrace.
2573 (supported_btrace_packets): New.
2574 (handle_query): Call supported_btrace_packets.
2575 * target.h: include btrace-common.h.
2576 (btrace_target_info): Removed.
2577 (supports_btrace, target_supports_btrace): Update parameters.
2578
734b0e4b
MM
25792015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2580
2581 * Makefile.in (SFILES): Add common/btrace-common.c.
2582 (OBS): Add common/btrace-common.o.
2583 (btrace-common.o): Add build rules.
2584 * linux-low: Include btrace-common.h.
2585 (linux_low_read_btrace): Use struct btrace_data. Call
2586 btrace_data_init and btrace_data_fini.
2587
d6c146e9
PA
25882015-02-06 Pedro Alves <palves@redhat.com>
2589
2590 * thread-db.c (find_new_threads_callback): Add debug output.
2591
20ba1ce6
PA
25922015-02-04 Pedro Alves <palves@redhat.com>
2593
2594 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2595 (resume_stopped_resumed_lwps): New function.
2596 (linux_wait_for_event_filtered): Use it.
2597
8cc73a39
SDJ
25982015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2599
2600 * Makefile.in (SFILES): Add linux-personality.c.
2601 (linux-personality.o): New rule.
2602 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2603 list of objects to be built.
2604 * linux-low.c: Include nat/linux-personality.h.
2605 (linux_create_inferior): Remove code to disable address space
2606 randomization (moved to ../nat/linux-personality.c). Create
2607 cleanup to disable address space randomization.
2608
fb23d554
SDJ
26092015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2610
2611 * Makefile.in (posix-strerror.o): New rule.
2612 (mingw-strerror.o): Likewise.
2613 * configure: Regenerated.
2614 * configure.ac: Source file ../common/common.host. Initialize new
2615 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2616
cdf43629
YQ
26172015-01-14 Yao Qi <yao@codesourcery.com>
2618
2619 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2620 (ppc-linux.o): New rule.
2621 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2622 * configure.ac: AC_CHECK_FUNCS(getauxval).
2623 * config.in: Re-generated.
2624 * configure: Re-generated.
2625 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2626 ppc64_64bit_inferior_p
2627
514c5338
YQ
26282015-01-14 Yao Qi <yao@codesourcery.com>
2629
2630 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2631 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2632 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2633 (PT_ORIG_R3, PT_TRAP): Likewise.
2634 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2635 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2636 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2637
3368c1e5
JB
26382015-01-10 Joel Brobecker <brobecker@adacore.com>
2639
2640 * i387-fp.c (i387_cache_to_xsave): In look over
2641 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2642 zmmh_low_space field by use of zmmh_high_space.
2643
582511be
PA
26442015-01-09 Pedro Alves <palves@redhat.com>
2645
2646 * linux-low.c (step_over_bkpt): Move higher up in the file.
2647 (handle_extended_wait): Don't store the stop_pc here.
2648 (get_stop_pc): Adjust comments and rename to ...
2649 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2650 stopped for a software breakpoint or hardware breakpoint.
2651 (thread_still_has_status_pending_p): New function.
2652 (status_pending_p_callback): Use
2653 thread_still_has_status_pending_p. If the event is no longer
2654 interesting, resume the LWP.
2655 (handle_tracepoints): Add assert.
2656 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2657 (wstatus_maybe_breakpoint): New function.
2658 (cancel_breakpoint): Delete function.
2659 (check_stopped_by_watchpoint): New function, factored out from
2660 linux_low_filter_event.
2661 (lp_status_maybe_breakpoint): Delete function.
2662 (linux_low_filter_event): Remove filter_ptid argument.
2663 Leave thread group exits pending here. Store the LWP's stop PC.
2664 Always leave events pending.
2665 (linux_wait_for_event_filtered): Pull all events out of the
2666 kernel, and leave them all pending.
2667 (count_events_callback, select_event_lwp_callback): Consider all
2668 events.
2669 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2670 (select_event_lwp): Only give preference to the stepping LWP in
2671 all-stop mode. Adjust comments.
2672 (ignore_event): New function.
2673 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2674 references to cancel_breakpoints. Adjust to renames. Also give
2675 equal priority to all LWPs that have had events in non-stop mode.
2676 If reporting a software breakpoint event, unadjust the LWP's PC.
2677 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2678 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2679 Adjust.
2680 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2681 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2682 (linux_stopped_by_watchpoint): Adjust.
2683 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2684 * linux-low.h (enum lwp_stop_reason): New.
2685 (struct lwp_info) <stop_pc>: Adjust comment.
2686 <stopped_by_watchpoint>: Delete field.
2687 <stop_reason>: New field.
2688 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2689 * mem-break.c (software_breakpoint_inserted_here)
2690 (hardware_breakpoint_inserted_here): New function.
2691 * mem-break.h (software_breakpoint_inserted_here)
2692 (hardware_breakpoint_inserted_here): Declare.
2693 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2694 (cancel_breakpoints): Delete.
2695 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2696 (upload_fast_traceframes): Remove references to
2697 cancel_breakpoints.
2698
a33e3959
PA
26992015-01-09 Pedro Alves <palves@redhat.com>
2700
2701 * thread-db.c (find_new_threads_callback): Ignore thread if the
2702 kernel thread ID is -1.
2703
8784d563
PA
27042015-01-09 Pedro Alves <palves@redhat.com>
2705
2706 * linux-low.c (linux_attach_fail_reason_string): Move to
2707 nat/linux-ptrace.c, and rename.
2708 (linux_attach_lwp): Update comment.
2709 (attach_proc_task_lwp_callback): New function.
2710 (linux_attach): Adjust to rename and use
2711 linux_proc_attach_tgid_threads.
2712 (linux_attach_fail_reason_string): Delete declaration.
2713
76f2b779
JB
27142015-01-01 Joel Brobecker <brobecker@adacore.com>
2715
2716 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2717 * server.c (gdbserver_version): Likewise.
2718
fafcc06a
SDJ
27192014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2720
2721 * remote-utils.c: Include ctype.h.
2722 (input_interrupt): Explicitly handle the case when the char
2723 received is the NUL byte. Improve the printing of non-ASCII
2724 characters.
2725
beed38b8
JB
27262014-12-16 Joel Brobecker <brobecker@adacore.com>
2727
2728 * linux-low.c (linux_low_filter_event): Update call to
2729 linux_enable_event_reporting following the addition of
2730 a new parameter to that function.
2731
bf330350
CU
27322014-12-16 Catalin Udma <catalin.udma@freescale.com>
2733
2734 PR server/17457
2735 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2736 (AARCH64_FPCR_REGNO): Likewise.
2737 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2738 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2739 (aarch64_store_fpregset): Likewise.
2740
5227d625
JB
27412014-12-15 Joel Brobecker <brobecker@adacore.com>
2742
2743 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2744 Remove FIXME comment about assumption about N.
2745
f93b65a0
JB
27462014-12-13 Joel Brobecker <brobecker@adacore.com>
2747
2748 * configure.ac: If large-file support is disabled in GDBserver,
2749 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2750 * configure: Regenerate.
2751
e5a9158d
AA
27522014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2753
2754 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2755 warning upon ENODATA from ptrace.
2756 * linux-s390-low.c (s390_store_tdb): New.
2757 (s390_regsets): Add regset for NT_S390_TDB.
2758
feea5f36
AA
27592014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2760
2761 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2762 without a fill_function.
2763 * linux-s390-low.c (s390_fill_last_break): Remove.
2764 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2765 (s390_arch_setup): Use regset's size instead of fill_function for
2766 loop end condition.
2767
098dbe61
AA
27682014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2769
2770 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2771 the regset's store function when ptrace returned an error.
2772 * regcache.c (get_thread_regcache): Invalidate register cache
2773 before fetching inferior's registers.
2774
28eef672
AA
27752014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2776
2777 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2778 while-loop as for-loop.
2779 (regsets_store_inferior_registers): Likewise.
2780
bdca27a2
YQ
27812014-11-28 Yao Qi <yao@codesourcery.com>
2782
2783 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2784 * config.in, configure: Re-generate.
2785 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2786 is defined.
2787
9c232dda
YQ
27882014-11-21 Yao Qi <yao@codesourcery.com>
2789
2790 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2791 (AC_CHECK_HEADERS): Remove malloc.h.
2792 * configure: Re-generated.
2793 * config.in: Re-generated.
2794 * server.h: Don't include alloca.h and malloc.h.
2795 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2796 Don't include malloc.h.
2797
43968415
JB
27982014-11-17 Joel Brobecker <brobecker@adacore.com>
2799
2800 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2801 corresponding ERRNO check in same block.
2802
40e91bc7
PA
28032014-11-12 Pedro Alves <palves@redhat.com>
2804
2805 * server.c (cont_thread): Update comment.
2806 (start_inferior, attach_inferior): No longer clear cont_thread.
2807 (handle_v_cont): No longer set cont_thread.
2808 (captured_main): Clear cont_thread each time a GDB connects.
2809
c2c118cf
PA
28102014-11-12 Pedro Alves <palves@redhat.com>
2811
2812 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2813 thread, and don't resume all threads if the Hc thread has exited.
2814
78708b7c
PA
28152014-11-12 Pedro Alves <palves@redhat.com>
2816
2817 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2818 the process group instead of to a specific LWP.
2819
a2abc7de
PA
28202014-10-15 Pedro Alves <palves@redhat.com>
2821
2822 PR server/17487
2823 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2824 parameter.
2825 (arm_set_thread_context): Delete.
2826 (the_low_target): Adjust.
2827 * win32-i386-low.c (debug_registers_changed)
2828 (debug_registers_used): Delete.
2829 (update_debug_registers_callback): New function.
2830 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2831 needing to update their debug registers.
2832 (win32_get_current_dr): New function.
2833 (x86_dr_low_get_addr, x86_dr_low_get_control)
2834 (x86_dr_low_get_status): Fetch the debug register from the thread
2835 record's context.
2836 (i386_initial_stuff): Adjust.
2837 (i386_get_thread_context): Remove current_event parameter. Don't
2838 clear debug_registers_changed nor copy DR values to
2839 debug_reg_state.
2840 (i386_set_thread_context): Delete.
2841 (i386_prepare_to_resume): New function.
2842 (i386_thread_added): Mark the thread as needing to update irs
2843 debug registers.
2844 (the_low_target): Remove i386_set_thread_context and install
2845 i386_prepare_to_resume.
2846 * win32-low.c (win32_get_thread_context): Adjust.
2847 (win32_set_thread_context): Use SetThreadContext
2848 directly.
2849 (win32_prepare_to_resume): New function.
2850 (win32_require_context): New function, factored out from ...
2851 (thread_rec): ... this.
2852 (continue_one_thread): Call win32_prepare_to_resume on each thread
2853 we're about to continue.
2854 (win32_resume): Call win32_prepare_to_resume on the event thread.
2855 * win32-low.h (struct win32_thread_info)
2856 <debug_registers_changed>: New field.
2857 (struct win32_target_ops): Change prototype of set_thread_context,
2858 delete set_thread_context and add prepare_to_resume.
2859 (win32_require_context): New declaration.
2860
a442d071
GB
28612014-10-08 Gary Benson <gbenson@redhat.com>
2862
2863 * server.h: Do not include common-exceptions.h.
2864
6f1947e8
GB
28652014-10-08 Gary Benson <gbenson@redhat.com>
2866
2867 * server.h: Do not include cleanups.h.
2868
63b434a4
JH
28692014-09-30 James Hogan <james.hogan@imgtec.com>
2870
2871 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2872 mips64-dsp-linux.c.
2873
c4d9ceb6
YQ
28742014-09-23 Yao Qi <yao@codesourcery.com>
2875
2876 * linux-low.c (lp_status_maybe_breakpoint): New function.
2877 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2878 (count_events_callback): Likewise.
2879 (select_event_lwp_callback): Likewise.
2880 (cancel_breakpoints_callback): Likewise.
2881
89a5711c
DB
28822014-09-19 Don Breazeal <donb@codesourcery.com>
2883
2884 * linux-low.c (handle_extended_wait): Call
2885 linux_ptrace_get_extended_event.
2886 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2887 linux_is_extended_waitstatus.
2888
bffc0964
JB
28892014-09-16 Joel Brobecker <brobecker@adacore.com>
2890
2891 * Makefile.in (CPPFLAGS): Define.
2892 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2893 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2894
0bfdf32f
GB
28952014-09-16 Gary Benson <gbenson@redhat.com>
2896
2897 * inferiors.h (current_inferior): Renamed as...
2898 (current_thread): New variable. All uses updated.
2899 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2900 (maybe_move_out_of_jump_pad): Likewise.
2901 (cancel_breakpoint): Likewise.
2902 (linux_low_filter_event): Likewise.
2903 (wait_for_sigstop): Likewise.
2904 (linux_resume_one_lwp): Likewise.
2905 (need_step_over_p): Likewise.
2906 (start_step_over): Likewise.
2907 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2908 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2909 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2910 and save_inferior as saved_thread.
2911 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2912 saved_thread.
2913 (regcache_invalidate_thread): Likewise.
2914 * remote-utils.c (prepare_resume_reply): Likewise.
2915 * thread-db.c (thread_db_get_tls_address): Likewise.
2916 (disable_thread_event_reporting): Likewise.
2917 (remove_thread_event_breakpoints): Likewise.
2918 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2919 as saved_thread.
2920 * target.h (set_desired_inferior): Renamed as...
2921 (set_desired_thread): New declaration. All uses updated.
2922 * server.c (myresume): Updated comment to reference thread instead
2923 of inferior.
2924 (handle_serial_event): Likewise.
2925 (handle_target_event): Likewise.
2926
361c8ade
GB
29272014-09-12 Tom Tromey <tromey@redhat.com>
2928 Gary Benson <gbenson@redhat.com>
2929
2930 * regcache.h: Include common-regcache.h.
2931 (regcache_read_pc): Don't declare.
2932 * regcache.c (get_thread_regcache_for_ptid): New function.
2933
bd9269f7
GB
29342014-09-11 Tom Tromey <tromey@redhat.com>
2935 Gary Benson <gbenson@redhat.com>
2936
2937 * symbol.c: New file.
2938 * Makefile.in (SFILES): Add symbol.c.
2939 (OBS): Add symbol.o.
2940
f8c1d06b
GB
29412014-09-11 Gary Benson <gbenson@redhat.com>
2942
2943 * target.c (target_stop_ptid, target_continue_ptid): New
2944 functions.
2945
721ec300
GB
29462014-09-11 Tom Tromey <tromey@redhat.com>
2947 Gary Benson <gbenson@redhat.com>
2948
2949 * target.h: Include target/target.h.
2950 * target.c (target_read_memory, target_read_uint32)
2951 (target_write_memory): New functions.
2952
c5e92cca
GB
29532014-09-11 Gary Benson <gbenson@redhat.com>
2954
2955 * server.h (debug_hw_points): Don't declare.
2956 * server.c (debug_hw_points): Don't define. Replace all uses
2957 with show_debug_regs.
2958 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2959 all uses with show_debug_regs.
2960
2e4bb98a
EBM
29612014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2962
2963 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2964 endianness into account.
2965 (ppc_supply_ptrace_register): Likewise.
2966
ac740bc7
JH
29672014-09-03 James Hogan <james.hogan@imgtec.com>
2968
2969 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2970 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2971
97ea6506
GB
29722014-09-03 Gary Benson <gbenson@redhat.com>
2973
2974 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2975 ALL_DEBUG_ADDRESS_REGISTERS.
2976
df7e5265
GB
29772014-09-02 Gary Benson <gbenson@redhat.com>
2978
2979 * i386-low.h: Renamed as...
2980 * x86-low.h: New file. All type, function and variable name
2981 prefixes changed from "i386_" to "x86_". All references updated.
2982 * i386-low.c: Renamed as...
2983 * x86-low.c: New file. All type, function and variable name
2984 prefixes changed from "i386_" to "x86_". All references updated.
2985
ed859da7
GB
29862014-09-02 Gary Benson <gbenson@redhat.com>
2987
2988 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2989 (x86_linux_new_thread): Likewise.
2990
860789c7
GB
29912014-08-29 Gary Benson <gbenson@redhat.com>
2992
2993 * server.h (setjmp.h): Do not include.
2994 (toplevel): Do not declare.
2995 (common-exceptions.h): Include.
2996 (cleanups.h): Likewise.
2997 * server.c (toplevel): Do not define.
2998 (exit_code): New static global.
2999 (detach_or_kill_for_exit_cleanup): New function.
3000 (main): New function. Original main renamed to...
3001 (captured_main): New function.
3002 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3003
ff55e1b5
GB
30042014-08-29 Gary Benson <gbenson@redhat.com>
3005
3006 * Makefile.in (SFILES): Add common/common-exceptions.c.
3007 (OBS): Add common-exceptions.o.
3008 (common-exceptions.o): New rule.
3009 * utils.c (prepare_to_throw_exception): New function.
3010
e9bcb658
GB
30112014-08-29 Gary Benson <gbenson@redhat.com>
3012
3013 * config.in: Regenerate.
3014 * configure: Likewise.
3015
e3180625
GB
30162014-08-29 Gary Benson <gbenson@redhat.com>
3017
3018 * Makefile.in (SFILES): Add common/cleanups.c.
3019 (OBS): cleanups.o.
3020 (cleanups.o): New rule.
3021
e3d6ba5d
GB
30222014-08-29 Gary Benson <gbenson@redhat.com>
3023
3024 * utils.c (internal_vwarning): New function.
3025
7096e886
GB
30262014-08-28 Gary Benson <gbenson@redhat.com>
3027
3028 * utils.h (fatal): Remove declaration.
3029 * utils.c (fatal): Remove function.
3030
14ce3192
GB
30312014-08-28 Gary Benson <gbenson@redhat.com>
3032
3033 * tracepoint.c (gdb_agent_init): Replace fatal with
3034 perror_with_name.
3035 (initialize_tracepoint): Likewise.
3036
50278d59
GB
30372014-08-28 Gary Benson <gbenson@redhat.com>
3038
3039 * remote-utils.c (remote_prepare): Replace fatal with error.
3040
aa96c426
GB
30412014-08-28 Gary Benson <gbenson@redhat.com>
3042
3043 * linux-low.c (linux_async): Replace fatal with warning.
3044 Tidy up and return.
3045 (linux_start_non_stop): Return -1 if linux_async failed.
3046
f7160e97
GB
30472014-08-28 Gary Benson <gbenson@redhat.com>
3048
3049 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3050 gdb_assert.
3051 (i386_dr_low_get_addr): Remove vague comment.
3052 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3053 gdb_assert.
3054
38e08fca
GB
30552014-08-28 Gary Benson <gbenson@redhat.com>
3056
3057 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3058 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3059 internal_error.
3060 (linux_resume_one_lwp): Likewise.
3061 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3062 gdb_assert.
3063 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3064 with internal_error.
3065 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3066 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3067 (find_register_by_name): Replace fatal with internal_error.
3068 (find_regno): Likewise.
3069 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3070 * thread-db.c (thread_db_create_event): Likewise.
3071 (thread_db_load_search): Likewise.
3072 (try_thread_db_load_1): Likewise.
3073 * tracepoint.c (get_jump_space_head): Replace fatal with
3074 internal_error.
3075 (claim_trampoline_space): Likewise.
3076 (have_fast_tracepoint_trampoline_buffer): Likewise.
3077 (cmd_qtstart): Likewise.
3078 (stop_tracing): Likewise.
3079 (fast_tracepoint_collecting): Likewise.
3080 (target_malloc): Likewise.
3081 (download_tracepoint): Likewise.
3082 (download_trace_state_variables): Replace check with gdb_assert.
3083 (upload_fast_traceframes): Replace fatal with internal_error.
3084
34abf635
GB
30852014-08-19 Tom Tromey <tromey@redhat.com>
3086 Gary Benson <gbenson@redhat.com>
3087
3088 * Makefile.in (SFILES): Add common/common-debug.c.
3089 (OBS): Add common-debug.o.
3090 (common-debug.o): New rule.
3091 * debug.h (debug_printf): Don't declare.
3092 * debug.c (debug_printf): Renamed and rewritten as...
3093 (debug_vprintf): New function.
3094
f6e94d78
GB
30952014-08-19 Gary Benson <gbenson@redhat.com>
3096
3097 * utils.h: Do not include print-utils.h.
3098
9239eeab
GB
30992014-08-19 Tom Tromey <tromey@redhat.com>
3100 Gary Benson <gbenson@redhat.com>
3101
3102 * server.h: Add static assertion.
3103 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3104
ef87c8bb
GB
31052014-08-19 Tom Tromey <tromey@redhat.com>
3106 Gary Benson <gbenson@redhat.com>
3107
3108 * Makefile.in (SFILES): Add common/errors.c.
3109 (OBS): Add errors.o.
3110 (IPA_OBS): Add errors-ipa.o.
3111 (errors.o): New rule.
3112 (errors-ipa.o): Likewise.
3113 * utils.h (perror_with_name, error, warning): Don't declare.
3114 * utils.c (warning): Renamed and rewritten as...
3115 (vwarning): New function.
3116 (error): Renamed and rewritten as...
3117 (verror): New function.
3118 (internal_error): Renamed and rewritten as...
3119 (internal_verror): New function.
3120
bb974a24
GB
31212014-08-07 Gary Benson <gbenson@redhat.com>
3122
3123 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3124 * configure: Regenerate.
3125 * config.in: Likewise.
3126 * server.h: Do not include errno.h.
3127 * event-loop.c: Likewise.
3128 * hostio-errno.c: Likewise.
3129 * linux-low.c: Likewise.
3130 * remote-utils.c: Likewise.
3131 * spu-low.c: Likewise.
3132 * utils.c: Likewise.
3133 * gdbreplay.c: Unconditionally include errno.h.
3134
6d3d12eb
GB
31352014-08-07 Gary Benson <gbenson@redhat.com>
3136
3137 * server.h: Do not include string.h.
3138 * event-loop.c: Likewise.
3139 * linux-low.c: Likewise.
3140 * regcache.c: Likewise.
3141 * remote-utils.c: Likewise.
3142 * spu-low.c: Likewise.
3143 * utils.c: Likewise.
3144
dccbb609
GB
31452014-08-07 Gary Benson <gbenson@redhat.com>
3146
3147 * server.h: Do not include gdb_assert.h.
3148
e76df0d0
GB
31492014-08-07 Gary Benson <gbenson@redhat.com>
3150
3151 * server.h: Do not include common-utils.h.
3152
4cb9c816
GB
31532014-08-07 Gary Benson <gbenson@redhat.com>
3154
3155 * server.h: Do not include ptid.h.
3156 * notif.h: Likewise.
3157
3995eeee
GB
31582014-08-07 Gary Benson <gbenson@redhat.com>
3159
3160 * server.h: Do not include gdb_locale.h.
3161
cb9f1a9b
GB
31622014-08-07 Gary Benson <gbenson@redhat.com>
3163
3164 * server.h: Do not include gdb/signals.h.
3165 * win32-low.c: Likewise.
3166
a5fceff8
GB
31672014-08-07 Gary Benson <gbenson@redhat.com>
3168
3169 * server.h: Do not include pathmax.h.
3170
b9391142
GB
31712014-08-07 Gary Benson <gbenson@redhat.com>
3172
3173 * server.h: Do not include libiberty.h.
3174 * linux-bfin-low.c: Likewise.
3175
0e443c87
GB
31762014-08-07 Gary Benson <gbenson@redhat.com>
3177
3178 * server.h: Do not include ansidecl.h.
3179
8ebb3f56
GB
31802014-08-07 Gary Benson <gbenson@redhat.com>
3181
3182 * linux-x86-low.c: Do not include stddef.h.
3183 * lynx-ppc-low.c: Likewise.
3184 * tracepoint.c: Likewise.
3185
8980bdf6
GB
31862014-08-07 Gary Benson <gbenson@redhat.com>
3187
3188 * server.h: Do not include stdarg.h.
3189 * nto-low.c: Likewise.
3190
d7096f71
GB
31912014-08-07 Gary Benson <gbenson@redhat.com>
3192
3193 * server.h: Do not include stdlib.h.
3194 * inferiors.c: Likewise.
3195 * linux-low.c: Likewise.
3196 * regcache.c: Likewise.
3197 * spu-low.c: Likewise.
3198 * tracepoint.c: Likewise.
3199 * utils.c: Likewise.
3200
d02f550d
GB
32012014-08-07 Gary Benson <gbenson@redhat.com>
3202
3203 * server.h: Do not include stdio.h.
3204 * linux-low.c: Likewise.
3205 * remote-utils.c: Likewise.
3206 * spu-low.c: Likewise.
3207 * utils.c: Likewise.
3208 * wincecompat.c: Likewise.
3209
87f6c4e3
GB
32102014-08-06 Gary Benson <gbenson@redhat.com>
3211
3212 * regcache.c (init_register_cache): Move conditionals inside if.
3213
7089dca4
GB
32142014-08-06 Gary Benson <gbenson@redhat.com>
3215
3216 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3217
462f517e
GB
32182014-07-31 Gary Benson <gbenson@redhat.com>
3219
3220 * ax.h: Do not include server.h.
3221 * gdbthread.h: Likewise.
3222 * lynx-low.h: Likewise.
3223 * notif.h: Likewise.
3224
976411d6
GB
32252014-07-30 Gary Benson <gbenson@redhat.com>
3226
3227 * server.h: Include common-defs.h.
3228 Do not include config.h or build-gnulib-gdbserver/config.h.
3229
d41f6d8e
GB
32302014-07-30 Gary Benson <gbenson@redhat.com>
3231
3232 * hostio-errno.c: Move server.h to top of includes list.
3233 * inferiors.c: Likewise.
3234 * linux-x86-low.c: Likewise.
3235 * notif.c: Include server.h.
3236
314c6a35
TT
32372014-07-24 Tom Tromey <tromey@redhat.com>
3238 Gary Benson <gbenson@redhat.com>
3239
3240 * server.h (CORE_ADDR): Now unsigned.
3241
69ff6be5
PA
32422014-07-16 Pedro Alves <palves@redhat.com>
3243
3244 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3245
ce9e3fe7
PA
32462014-07-15 Pedro Alves <palves@redhat.com>
3247
3248 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3249 copy.
3250
e76126e8
PA
32512014-07-11 Pedro Alves <palves@redhat.com>
3252
3253 * linux-low.c (kill_wait_lwp): New function, based on
3254 kill_one_lwp_callback, but use my_waitpid directly.
3255 (kill_one_lwp_callback, linux_kill): Use it.
3256
8e9db26e
PA
32572014-06-23 Pedro Alves <palves@redhat.com>
3258
3259 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3260 before setting DR0..DR3.
3261
698b3e08
GB
32622014-06-20 Gary Benson <gbenson@redhat.com>
3263
3264 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3265 * configure: Regenerated.
3266 * config.in: Likewise.
3267
125f8a3d
GB
32682014-06-20 Gary Benson <gbenson@redhat.com>
3269
3270 * Makefile.in (SFILES): Update locations for files moved
3271 from common to nat.
3272 (object file files): Reordered.
3273
42995dbd
GB
32742014-06-20 Gary Benson <gbenson@redhat.com>
3275
3276 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3277 (i386_dr_low_set_addr): Likewise.
3278 (i386_dr_low_get_addr): Likewise.
3279 (i386_dr_low_can_set_control): Likewise.
3280 (i386_dr_low_set_control): Likewise.
3281 (i386_dr_low_get_control): Likewise.
3282 (i386_dr_low_get_status): Likewise.
3283 (i386_get_debug_register_length): Likewise.
3284 * linux-x86-low.c (i386_dr_low_set_addr):
3285 Changed signature. Made static.
3286 (i386_dr_low_get_addr): Likewise.
3287 (i386_dr_low_set_control): Likewise.
3288 (i386_dr_low_get_control): Likewise.
3289 (i386_dr_low_get_status): Likewise.
3290 (i386_dr_low): New global variable.
3291 * win32-i386-low.c (i386_dr_low_set_addr):
3292 Changed signature. Made static.
3293 (i386_dr_low_get_addr): Likewise.
3294 (i386_dr_low_set_control): Likewise.
3295 (i386_dr_low_get_control): Likewise.
3296 (i386_dr_low_get_status): Likewise.
3297 (i386_dr_low): New global variable.
3298
e1d2394b
MS
32992014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3300
3301 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3302 * Makefile.in (AR, AR_FLAGS): Define.
3303 * configure: Regenerate.
3304
3a8ee006
GB
33052014-06-19 Gary Benson <gbenson@redhat.com>
3306
3307 * Makefile.in (i386-dregs.o): New rule.
3308 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3309 * i386-low.c (target.h): Remove include.
3310 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3311 (DR_CONTROL_SHIFT): Likewise.
3312 (DR_CONTROL_SIZE): Likewise.
3313 (DR_RW_EXECUTE): Likewise.
3314 (DR_RW_WRITE): Likewise.
3315 (DR_RW_READ): Likewise.
3316 (DR_RW_IORW): Likewise.
3317 (DR_LEN_1): Likewise.
3318 (DR_LEN_2): Likewise.
3319 (DR_LEN_4): Likewise.
3320 (DR_LEN_8): Likewise.
3321 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3322 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3323 (DR_ENABLE_SIZE): Likewise.
3324 (DR_LOCAL_SLOWDOWN): Likewise.
3325 (DR_GLOBAL_SLOWDOWN): Likewise.
3326 (DR_CONTROL_RESERVED): Likewise.
3327 (I386_DR_CONTROL_MASK): Likewise.
3328 (I386_DR_VACANT): Likewise.
3329 (I386_DR_LOCAL_ENABLE): Likewise.
3330 (I386_DR_GLOBAL_ENABLE): Likewise.
3331 (I386_DR_DISABLE): Likewise.
3332 (I386_DR_SET_RW_LEN): Likewise.
3333 (I386_DR_GET_RW_LEN): Likewise.
3334 (I386_DR_WATCH_HIT): Likewise.
3335 (i386_wp_op_t): Likewise.
3336 (i386_show_dr): Likewise.
3337 (i386_length_and_rw_bits): Likewise.
3338 (i386_insert_aligned_watchpoint): Likewise.
3339 (i386_remove_aligned_watchpoint): Likewise.
3340 (i386_handle_nonaligned_watchpoint): Likewise.
3341 i386_update_inferior_debug_regs(): Likewise.
3342 (i386_dr_insert_watchpoint): Likewise.
3343 (i386_dr_remove_watchpoint): Likewise.
3344 (i386_dr_region_ok_for_watchpoint): Likewise.
3345 (i386_dr_stopped_data_address): Likewise.
3346 (i386_dr_stopped_by_watchpoint): Likewise.
3347
8f26655c
GB
33482014-06-19 Gary Benson <gbenson@redhat.com>
3349
3350 * i386-low.c (i386_dr_show): Renamed to
3351 i386_show_dr and made static. All uses updated.
3352 (i386_dr_length_and_rw_bits): Renamed to
3353 i386_length_and_rw_bits and made static.
3354 All uses updated.
3355 (i386_dr_insert_aligned_watchpoint): Renamed to
3356 i386_insert_aligned_watchpoint and made static.
3357 All uses updated.
3358 (i386_dr_remove_aligned_watchpoint): Renamed to
3359 i386_remove_aligned_watchpoint and made static.
3360 All uses updated.
3361 (i386_dr_update_inferior_debug_regs): Renamed to
3362 i386_update_inferior_debug_regs and made static.
3363 All uses updated.
3364
b9228891
GB
33652014-06-18 Gary Benson <gbenson@redhat.com>
3366
5171def3
GB
3367 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3368 (i386_dr_low_can_set_control): Likewise.
3369 (i386_get_debug_register_length): Likewise.
3370 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3371 (i386_dr_low_can_set_control): Likewise.
3372 (i386_get_debug_register_length): Likewise.
3373
33742014-06-17 Gary Benson <gbenson@redhat.com>
3375
b9228891
GB
3376 * i386-low.h (i386-dregs.h): New include.
3377 (DR_FIRSTADDR): Now in i386-dregs.h.
3378 (DR_LASTADDR): Likewise.
3379 (DR_NADDR): Likewise.
3380 (DR_STATUS): Likewise.
3381 (DR_CONTROL): Likewise.
3382 (i386_debug_reg_state): Likewise.
3383 (i386_dr_insert_watchpoint): Likewise.
3384 (i386_dr_remove_watchpoint): Likewise.
3385 (i386_dr_region_ok_for_watchpoint): Likewise.
3386 (i386_dr_stopped_data_address): Likewise.
3387 (i386_dr_stopped_by_watchpoint): Likewise.
3388 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3389
4be83cc2
GB
33902014-06-18 Gary Benson <gbenson@redhat.com>
3391
3392 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3393 i386_dr_insert_watchpoint.
3394 (i386_low_remove_watchpoint): Renamed to
3395 i386_dr_remove_watchpoint.
3396 (i386_low_region_ok_for_watchpoint): Renamed to
3397 i386_dr_region_ok_for_watchpoint.
3398 (i386_low_stopped_data_address): Renamed to
3399 i386_dr_stopped_data_address.
3400 (i386_low_stopped_by_watchpoint): Renamed to
3401 i386_dr_stopped_by_watchpoint.
3402 * i386-low.c (i386_show_dr): Renamed to
3403 i386_dr_show and made nonstatic. All uses updated.
3404 (i386_length_and_rw_bits): Renamed to
3405 i386_dr_length_and_rw_bits and made nonstatic.
3406 All uses updated.
3407 (i386_insert_aligned_watchpoint): Renamed to
3408 i386_dr_insert_aligned_watchpoint and made nonstatic.
3409 All uses updated.
3410 (i386_remove_aligned_watchpoint): Renamed to
3411 i386_dr_remove_aligned_watchpoint and made nonstatic.
3412 All uses updated.
3413 (i386_update_inferior_debug_regs): Renamed to
3414 i386_dr_update_inferior_debug_regs and made nonstatic.
3415 All uses updated.
3416 (i386_low_insert_watchpoint): Renamed to
3417 i386_dr_insert_watchpoint. All uses updated.
3418 (i386_low_remove_watchpoint): Renamed to
3419 i386_dr_remove_watchpoint. All uses updated.
3420 (i386_low_region_ok_for_watchpoint): Renamed to
3421 i386_dr_region_ok_for_watchpoint. All uses updated.
3422 (i386_low_stopped_data_address): Renamed to
3423 i386_dr_stopped_data_address. All uses updated.
3424 (i386_low_stopped_by_watchpoint): Renamed to
3425 i386_dr_stopped_by_watchpoint. All uses updated.
3426
131aa0d4
GB
34272014-06-18 Gary Benson <gbenson@redhat.com>
3428
3429 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3430 (i386_dr_low_can_set_control): Likewise.
3431 (i386_insert_aligned_watchpoint): New check.
3432
d9305f7f
GB
34332014-06-18 Gary Benson <gbenson@redhat.com>
3434
3435 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3436 Renamed to state.
3437
e927c9fc
GB
34382014-06-18 Gary Benson <gbenson@redhat.com>
3439
3440 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3441 instead of fatal and error.
3442 (i386_handle_nonaligned_watchpoint): Likewise.
3443
1b6d4134
GB
34442014-06-18 Gary Benson <gbenson@redhat.com>
3445
3446 * i386-low.c (i386_get_debug_register_length): New macro.
3447 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3448 (i386_show_dr): Use debug_printf instead of fprintf. Use
3449 phex to format values.
3450
6e62758f
GB
34512014-06-18 Gary Benson <gbenson@redhat.com>
3452
3453 * i386-low.h: Comment changes.
3454 * i386-low.c: Likewise.
3455
fc6e2f03
GB
34562014-06-18 Gary Benson <gbenson@redhat.com>
3457
3458 * i386-low.c: Whitespace changes.
3459
f9d1eeed
TT
34602014-06-12 Tom Tromey <tromey@redhat.com>
3461
3462 * utils.c (freeargv): Remove.
3463
0b04e523
TT
34642014-06-12 Tom Tromey <tromey@redhat.com>
3465
3466 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3467 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3468 (parse_debug_format_options): Likewise.
3469 (gdbserver_usage): Likewise.
3470 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3471 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3472 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3473 against libiberty.
3474 ($(LIBGNU)): Depend on libiberty.
3475 (all-lib): Recurse into all subdirs.
3476 (install-only): Invoke "install" target in subdirs.
3477 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3478 targets.
3479 * configure: Rebuild.
3480 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3481 for vasprintf, vsnprintf, or gettimeofday.
3482 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3483 srv_tgtobj.
3484
270c9937
JB
34852014-06-05 Joel Brobecker <brobecker@adacore.com>
3486
3487 * development.sh: Delete.
3488 * Makefile.in (config.status): Adjust dependency on development.sh.
3489 * configure.ac: Adjust development.sh source call.
3490 * configure: Regenerate.
3491
0a261ed8
PA
34922014-06-02 Pedro Alves <palves@redhat.com>
3493
3494 * ax.c (gdb_free_agent_expr): New function.
3495 * ax.h (gdb_free_agent_expr): New declaration.
3496 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3497 list.
3498 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3499 static.
3500 (clear_breakpoint_conditions_and_commands): New function.
3501 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3502 (clear_breakpoint_conditions_and_commands): New declaration.
3503
e9dae05e
RR
35042014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3505
3506 * linux-aarch64-low.c (asm/ptrace.h): Include.
3507
5876f503
JK
35082014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3509
3510 Fix TLS access for -static -pthread.
3511 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3512 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3513 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3514
802e8e6d
PA
35152014-05-20 Pedro Alves <palves@redhat.com>
3516
3517 * linux-aarch64-low.c (aarch64_insert_point)
3518 (aarch64_remove_point): No longer check whether the type is
3519 supported here. Adjust to new interface.
3520 (the_low_target): Install aarch64_supports_z_point_type as
3521 supports_z_point_type method.
3522 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3523 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3524 instead of a Z packet char. Adjust.
3525 (arm_supports_z_point_type): New function.
3526 (arm_insert_point, arm_remove_point): Adjust to new interface.
3527 (the_low_target): Install arm_supports_z_point_type.
3528 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3529 (cris_insert_point, cris_remove_point): Adjust to new interface.
3530 Don't check whether the type is supported here.
3531 (the_low_target): Install cris_supports_z_point_type.
3532 * linux-low.c (linux_supports_z_point_type): New function.
3533 (linux_insert_point, linux_remove_point): Adjust to new interface.
3534 * linux-low.h (struct linux_target_ops) <insert_point,
3535 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3536 raw_breakpoint pointer parameter.
3537 <supports_z_point_type>: New method.
3538 * linux-mips-low.c (mips_supports_z_point_type): New function.
3539 (mips_insert_point, mips_remove_point): Adjust to new interface.
3540 Use mips_supports_z_point_type.
3541 (the_low_target): Install mips_supports_z_point_type.
3542 * linux-ppc-low.c (the_low_target): Install NULL as
3543 supports_z_point_type method.
3544 * linux-s390-low.c (the_low_target): Install NULL as
3545 supports_z_point_type method.
3546 * linux-sparc-low.c (the_low_target): Install NULL as
3547 supports_z_point_type method.
3548 * linux-x86-low.c (x86_supports_z_point_type): New function.
3549 (x86_insert_point): Adjust to new insert_point interface. Use
3550 insert_memory_breakpoint. Adjust to new
3551 i386_low_insert_watchpoint interface.
3552 (x86_remove_point): Adjust to remove_point interface. Use
3553 remove_memory_breakpoint. Adjust to new
3554 i386_low_remove_watchpoint interface.
3555 (the_low_target): Install x86_supports_z_point_type.
3556 * lynx-low.c (lynx_target_ops): Install NULL as
3557 supports_z_point_type callback.
3558 * nto-low.c (nto_supports_z_point_type): New.
3559 (nto_insert_point, nto_remove_point): Adjust to new interface.
3560 (nto_target_ops): Install nto_supports_z_point_type.
3561 * mem-break.c: Adjust intro comment.
3562 (struct raw_breakpoint) <raw_type, size>: New fields.
3563 <inserted>: Update comment.
3564 <shlib_disabled>: Delete field.
3565 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3566 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3567 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3568 (raw_bkpt_type_to_target_hw_bp_type): New function.
3569 (find_enabled_raw_code_breakpoint_at): New function.
3570 (find_raw_breakpoint_at): New type and size parameters. Use them.
3571 (insert_memory_breakpoint): New function, based off
3572 set_raw_breakpoint_at.
3573 (remove_memory_breakpoint): New function.
3574 (set_raw_breakpoint_at): Reimplement.
3575 (set_breakpoint): New, based on set_breakpoint_at.
3576 (set_breakpoint_at): Reimplement.
3577 (delete_raw_breakpoint): Go through the_target->remove_point
3578 instead of assuming memory breakpoints.
3579 (find_gdb_breakpoint_at): Delete.
3580 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3581 (find_gdb_breakpoint): New function.
3582 (set_gdb_breakpoint_at): Delete.
3583 (z_type_supported): New function.
3584 (set_gdb_breakpoint_1): New function, loosely based off
3585 set_gdb_breakpoint_at.
3586 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3587 (delete_gdb_breakpoint_at): Delete.
3588 (delete_gdb_breakpoint_1): New function, loosely based off
3589 delete_gdb_breakpoint_at.
3590 (delete_gdb_breakpoint): New function.
3591 (clear_gdb_breakpoint_conditions): Rename to ...
3592 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3593 breakpoint.
3594 (add_condition_to_breakpoint): Make static.
3595 (add_breakpoint_condition): Take a struct breakpoint pointer
3596 instead of an address. Adjust.
3597 (gdb_condition_true_at_breakpoint): Rename to ...
3598 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3599 z_type parameter.
3600 (gdb_condition_true_at_breakpoint): Reimplement.
3601 (add_breakpoint_commands): Take a struct breakpoint pointer
3602 instead of an address. Adjust.
3603 (gdb_no_commands_at_breakpoint): Rename to ...
3604 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3605 parameter. Return true if no breakpoint was found. Change debug
3606 output.
3607 (gdb_no_commands_at_breakpoint): Reimplement.
3608 (run_breakpoint_commands): Rename to ...
3609 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3610 and change return type to boolean.
3611 (run_breakpoint_commands): New function.
3612 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3613 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3614 breakpoint. Go through the_target->remove_point instead of
3615 assuming memory breakpoint.
3616 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3617 software and hardware breakpoints.
3618 (reinsert_raw_breakpoint): Go through the_target->insert_point
3619 instead of assuming memory breakpoint.
3620 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3621 software and hardware breakpoints.
3622 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3623 Check both software and hardware breakpoints.
3624 (validate_inserted_breakpoint): Assert the breakpoint is a
3625 software breakpoint. Set the inserted flag to -1 instead of
3626 setting shlib_disabled.
3627 (delete_disabled_breakpoints): Adjust.
3628 (validate_breakpoints): Only validate software breakpoints.
3629 Adjust to inserted flag change.
3630 (check_mem_read, check_mem_write): Skip breakpoint types other
3631 than software breakpoints. Adjust to inserted flag change.
3632 * mem-break.h (enum raw_bkpt_type): New enum.
3633 (raw_breakpoint, struct process_info): Forward declare.
3634 (Z_packet_to_target_hw_bp_type): Delete declaration.
3635 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3636 (set_gdb_breakpoint, delete_gdb_breakpoint)
3637 (clear_breakpoint_conditions): New declarations.
3638 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3639 (breakpoint_inserted_here): Update comment.
3640 (add_breakpoint_condition, add_breakpoint_commands): Replace
3641 address parameter with a breakpoint pointer parameter.
3642 (gdb_breakpoint_here): Update comment.
3643 (delete_gdb_breakpoint_at): Delete.
3644 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3645 * server.c (process_point_options): Take a struct breakpoint
3646 pointer instead of an address. Adjust.
3647 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3648 delete_gdb_breakpoint.
3649 * spu-low.c (spu_target_ops): Install NULL as
3650 supports_z_point_type method.
3651 * target.h: Include mem-break.h.
3652 (struct target_ops) <prepare_to_access_memory>: Update comment.
3653 <supports_z_point_type>: New field.
3654 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3655 instead of a char. Also take a raw breakpoint pointer.
3656 * win32-arm-low.c (the_low_target): Install NULL as
3657 supports_z_point_type.
3658 * win32-i386-low.c (i386_supports_z_point_type): New function.
3659 (i386_insert_point, i386_remove_point): Adjust to new interface.
3660 (the_low_target): Install i386_supports_z_point_type.
3661 * win32-low.c (win32_supports_z_point_type): New function.
3662 (win32_insert_point, win32_remove_point): Adjust to new interface.
3663 (win32_target_ops): Install win32_supports_z_point_type.
3664 * win32-low.h (struct win32_target_ops):
3665 <supports_z_point_type>: New method.
3666 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3667 instead of a char. Also take a raw breakpoint pointer.
3668
932539e3
PA
36692014-05-20 Pedro Alves <palves@redhat.com>
3670
3671 * mem-break.h: Include break-common.h.
3672 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3673 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3674 (Z_packet_to_target_hw_bp_type): New declaration.
3675 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3676 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3677 (Z_PACKET_ACCESS_WP): Delete macros.
3678 (Z_packet_to_hw_type): Delete function.
3679 * i386-low.h: Don't include break-common.h here.
3680 (Z_packet_to_hw_type): Delete declaration.
3681 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3682 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3683 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3684 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3685 * linux-aarch64-low.c: Don't include break-common.h here.
3686 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3687 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3688 (Z_packet_to_target_hw_bp_type): Delete function.
3689 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3690 function.
3691 (mips_insert_point, mips_remove_point): Use
3692 Z_packet_to_target_hw_bp_type.
3693
4ff0d3d8
PA
36942014-05-20 Pedro Alves <palves@redhat.com>
3695
3696 * linux-aarch64-low.c: Include break-common.h.
3697 (enum target_point_type): Delete.
3698 (Z_packet_to_point_type): Rename to ...
3699 (Z_packet_to_target_hw_bp_type): ... this, and return a
3700 target_hw_bp_type instead.
3701 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3702 instead of an enum target_point_type.
3703 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3704 breakpoint type.
3705 (aarch64_dr_state_insert_one_point)
3706 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3707 (aarch64_handle_aligned_watchpoint)
3708 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3709 Take an enum target_hw_bp_type instead of an enum
3710 target_point_type.
3711 (aarch64_supports_z_point_type): New function.
3712 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3713 use Z_packet_to_target_hw_bp_type.
3714
786dc519
JB
37152014-05-20 Joel Brobecker <brobecker@adacore.com>
3716
3717 * configure.ac: Only use -Werror by default when DEVELOPMENT
3718 is true.
3719 * configure: Regenerate.
3720
9e0aa64f
JK
37212014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3722
3723 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3724 * linux-x86-low.c (X86_64_USER_REGS): New.
3725 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3726
2b577b92
YQ
37272014-04-28 Yao Qi <yao@codesourcery.com>
3728
3729 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3730 name.
3731
94611da2
PA
37322014-04-25 Pedro Alves <palves@redhat.com>
3733
3734 PR server/16255
3735 * linux-low.c (linux_attach_fail_reason_string): New function.
3736 (linux_attach_lwp): Delete.
3737 (linux_attach_lwp_1): Rename to ...
3738 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3739 argument. Remove "initial" parameter. Return int instead of
3740 void. Don't error or warn here.
3741 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3742 failure to attach to the tgid. Call warning when failing to
3743 attach to an lwp.
3744 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3745 argument. Remove "initial" parameter. Return int instead of
3746 void. Don't error or warn here.
3747 (linux_attach_fail_reason_string): New declaration.
3748 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3749 interface change. Use linux_attach_fail_reason_string.
3750
01f9f808
MS
37512014-04-24 Michael Sturm <michael.sturm@mintel.com>
3752 Walfred Tedeschi <walfred.tedeschi@intel.com>
3753
3754 * Makefile.in: Added rules to handle new files
3755 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3756 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3757 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3758 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3759 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3760 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3761 x32-avx512-linux.o.
3762 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3763 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3764 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3765 i386/x32-avx512.xml.
3766 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3767 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3768 i386/x32-avx512-linux.xml.
3769 * i387-fp.c (num_avx512_k_registers): New constant for number
3770 of K registers.
3771 (num_avx512_zmmh_low_registers): New constant for number of
3772 lower ZMM registers (0-15).
3773 (num_avx512_zmmh_high_registers): New constant for number of
3774 higher ZMM registers (16-31).
3775 (num_avx512_ymmh_registers): New contant for number of higher
3776 YMM registers (ymm16-31 added by avx521 on x86_64).
3777 (num_avx512_xmm_registers): New constant for number of higher
3778 XMM registers (xmm16-31 added by AVX512 on x86_64).
3779 (struct i387_xsave): Add space for AVX512 registers.
3780 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3781 Add code to handle AVX512 registers.
3782 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3783 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3784 prototypei from generated file.
3785 (tdesc_amd64_avx512_linux): Likewise.
3786 (init_registers_x32_avx512_linux): Likewise.
3787 (tdesc_x32_avx512_linux): Likewise.
3788 (init_registers_i386_avx512_linux): Likewise.
3789 (tdesc_i386_avx512_linux): Likewise.
3790 (x86_64_regmap): Add AVX512 registers.
3791 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3792 mask.
3793 (initialize_low_arch): Add code to initialize AVX512 registers.
3794
51aa91f9
PA
37952014-04-23 Pedro Alves <palves@redhat.com>
3796
3797 * mem-break.c (find_gdb_breakpoint_at): Make static.
3798 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3799
a4165e94
PA
38002014-04-23 Pedro Alves <palves@redhat.com>
3801
3802 * i386-low.c: Don't include break-common.h here.
3803 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3804 prototype to take target_hw_bp_type as argument instead of a Z
3805 packet char.
3806 * i386-low.h: Include break-common.h here.
3807 (Z_packet_to_hw_type): Declare.
3808 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3809 prototypes.
3810 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3811 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3812 (x86_remove_point): Convert the packet number to a
3813 target_hw_bp_type before calling i386_low_remove_watchpoint.
3814 * win32-i386-low.c (i386_insert_point): Convert the packet number
3815 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3816 (i386_remove_point): Convert the packet number to a
3817 target_hw_bp_type before calling i386_low_remove_watchpoint.
3818
b8acf843
PA
38192014-04-23 Pedro Alves <palves@redhat.com>
3820
3821 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3822
d708bcd1
PA
38232014-04-10 Pedro Alves <palves@redhat.com>
3824
3825 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3826 Check if the condition or command is NULL before checking if the
3827 breakpoint is known. On success, return true.
3828 * mem-break.h (add_breakpoint_condition): Document return.
3829 (add_breakpoint_commands): Add describing comment.
3830 * server.c (skip_to_semicolon): New function.
3831 (process_point_options): Use it.
3832
2eec7d5b
PA
38332014-04-09 Pedro Alves <palves@redhat.com>
3834
3835 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3836 to lwpid_of.
3837
fa96cb38
PA
38382014-02-27 Pedro Alves <palves@redhat.com>
3839
3840 PR 12702
3841 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3842 macros.
3843 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3844 output.
3845 (last_thread_of_process_p): Take a PID argument instead of a
3846 thread pointer.
3847 (linux_wait_for_lwp): Delete.
3848 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3849 functions.
3850 (linux_low_filter_event): New function, party factored out from
3851 linux_wait_for_event.
3852 (linux_wait_for_event): Rename to ...
3853 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3854 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3855 sigsuspend. Check for zombie leaders.
3856 (linux_wait_for_event): Reimplement as wrapper around
3857 linux_wait_for_event_filtered.
3858 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3859 a normal or signal exit is seen, it's the whole process exiting.
3860 (wait_for_sigstop): No longer a for_each_inferior callback.
3861 Rewrite on top of linux_wait_for_event_filtered.
3862 (stop_all_lwps): Call wait_for_sigstop directly.
3863 * server.c (resume, handle_target_event): Handle
3864 TARGET_WAITKIND_NO_RESUMED.
3865
d763de10
JB
38662014-02-26 Joel Brobecker <brobecker@adacore.com>
3867
3868 * win32-low.c (psapi_get_dll_name,
3869 * win32_CreateToolhelp32Snapshot): Delete.
3870 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3871 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3872 Delete.
3873 (handle_load_dll): Add function description.
3874 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3875
850a0f76
JB
38762014-02-26 Joel Brobecker <brobecker@adacore.com>
3877
3878 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3879 Add comment.
3880 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3881 base address when calling win32_add_one_solib.
3882 (handle_load_dll): Delete local variable load_addr.
3883 Remove 0x1000 offset applied to DLL base address when calling
3884 win32_add_one_solib.
3885 (handle_unload_dll): Add comment.
3886
f25b3fc3
JB
38872014-02-26 Joel Brobecker <brobecker@adacore.com>
3888
3889 * win32-low.c (win32_add_all_dlls): Renames
3890 win32_ensure_ntdll_loaded. Rewrite function documentation.
3891 Adjust implementation to always load all DLLs.
3892 Add 0x1000 offset to DLL base address when calling
3893 win32_add_one_solib.
3894 (child_initialization_done): New static global.
3895 (do_initial_child_stuff): Set child_initialization_done to
3896 zero during child initialization, and 1 after. Replace call
3897 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3898 Add comment.
3899 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3900 (handle_unload_dll): Add function documentation.
3901 (get_child_debug_event): Ignore load and unload DLL events
3902 during child initialization.
3903
d86d4aaf
DE
39042014-02-20 Doug Evans <dje@google.com>
3905
3bc32da3 3906 Remove global all_lwps.
d86d4aaf
DE
3907 * inferiors.h (ptid_of): Move here from linux-low.h.
3908 (pid_of, lwpid_of): Ditto.
3909 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3910 parameter is a struct thread_info * now.
3911 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3912 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3913 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3914 directly.
3915 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3916 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3917 * linux-arm-low.c (update_registers_callback): Update, "entry"
3918 parameter is a struct thread_info * now.
3919 Fetch lwpid from current_inferior directly.
3920 (arm_insert_point): Pass &all_threads to find_inferior instead of
3921 &all_lwps.
3922 (arm_remove_point): Ditto.
3923 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3924 (arm_prepare_to_resume): Fetch pid from thread.
3925 (arm_read_description): Fetch lwpid from current_inferior directly.
3926 * linux-low.c (all_lwps): Delete.
3927 (delete_lwp): Delete call to remove_inferior.
3928 (handle_extended_wait): Fetch lwpid from thread.
3929 (add_lwp): Don't set lwp->entry.id. Remove call to
3930 add_inferior_to_list.
3931 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3932 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3933 (kill_one_lwp_callback): Ditto.
3934 (linux_kill): Don't dereference NULL pointer.
3935 Fetch ptid,lwpid from thread.
3936 (get_detach_signal): Fetch ptid from thread.
3937 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3938 Simplify call to regcache_invalidate_thread.
3939 (delete_lwp_callback): Update, "entry" parameter is a
3940 struct thread_info * now. Fetch pid from thread.
3941 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3942 (status_pending_p_callback): Update, "entry" parameter is a
3943 struct thread_info * now. Fetch ptid from thread.
3944 (find_lwp_pid): Update, "entry" parameter is a
3945 struct thread_info * now.
3946 (linux_wait_for_lwp): Fetch pid from thread.
3947 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3948 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3949 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3950 (dequeue_one_deferred_signal): Ditto.
3951 (cancel_breakpoint): Fetch ptid from current_inferior.
3952 (linux_wait_for_event): Pass &all_threads to find_inferior,
3953 not &all_lwps. Fetch ptid, lwpid from thread.
3954 (count_events_callback): Update, "entry" parameter is a
3955 struct thread_info * now.
3956 (select_singlestep_lwp_callback): Ditto.
3957 (select_event_lwp_callback): Ditto.
3958 (cancel_breakpoints_callback): Ditto.
3959 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3960 not &all_lwps.
3961 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3962 (unsuspend_one_lwp): Update, "entry" parameter is a
3963 struct thread_info * now.
3964 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3965 not &all_lwps.
3966 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3967 Fetch lwpid from thread, not lwp.
3968 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3969 Pass &all_threads to find_inferior, not &all_lwps.
3970 (send_sigstop): Fetch lwpid from thread, not lwp.
3971 (send_sigstop_callback): Update, "entry" parameter is a
3972 struct thread_info * now.
3973 (suspend_and_send_sigstop_callback): Ditto.
3974 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3975 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3976 struct thread_info * now.
3977 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3978 from thread, lwp.
3979 (lwp_running): Update, "entry" parameter is a
3980 struct thread_info * now.
3981 (stop_all_lwps): Fetch ptid from thread.
3982 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3983 (linux_resume_one_lwp): Fetch lwpid from thread.
3984 (linux_set_resume_request): Update, "entry" parameter is a
3985 struct thread_info * now. Fetch pid, lwpid from thread.
3986 (resume_status_pending_p): Update, "entry" parameter is a
3987 struct thread_info * now.
3988 (need_step_over_p): Ditto. Fetch lwpid from thread.
3989 (start_step_over): Fetch lwpid from thread.
3990 (linux_resume_one_thread): Update, "entry" parameter is a
3991 struct thread_info * now. Fetch lwpid from thread.
3992 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3993 (proceed_one_lwp): Update, "entry" parameter is a
3994 struct thread_info * now. Fetch lwpid from thread.
3995 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3996 struct thread_info * now.
3997 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3998 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3999 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4000 directly.
4001 (regsets_store_inferior_registers): Ditto.
4002 (fetch_register, store_register): Ditto.
4003 (linux_read_memory, linux_write_memory): Ditto.
4004 (linux_request_interrupt): Ditto.
4005 (linux_read_auxv): Ditto.
4006 (linux_xfer_siginfo): Ditto.
4007 (linux_qxfer_spu): Ditto.
4008 (linux_qxfer_libraries_svr4): Ditto.
4009 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4010 moved to inferiors.h.
4011 (get_lwp): Delete.
4012 (get_thread_lwp): Update.
4013 (struct lwp_info): Delete member "entry". Simplify comment for
4014 member "thread".
4015 (all_lwps): Delete.
4016 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4017 current_inferior directly.
4018 (update_watch_registers_callback): Update, "entry" parameter is a
4019 struct thread_info * now. Fetch pid from thread.
4020 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4021 (mips_insert_point): Fetch lwpid from current_inferior.
4022 Pass &all_threads to find_inferior, not &all_lwps.
4023 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4024 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4025 directly.
4026 (mips_stopped_data_address): Ditto.
4027 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4028 directly.
4029 * linux-tile-low.c (tile_arch_setup): Ditto.
4030 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4031 (update_debug_registers_callback): Update, "entry" parameter is a
4032 struct thread_info * now. Fetch pid from thread.
4033 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4034 Pass &all_threads to find_inferior, not &all_lwps.
4035 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4036 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4037 Pass &all_threads to find_inferior, not &all_lwps.
4038 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4039 (i386_dr_low_get_status): Ditto.
4040 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4041 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4042 (x86_linux_read_description): Ditto.
4043 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4044
3b8361aa
DE
40452014-02-20 Doug Evans <dje@google.com>
4046
4047 * inferiors.c (get_first_inferior): Fix buglet.
4048
f7667f0d
DE
40492014-02-19 Doug Evans <dje@google.com>
4050
4051 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4052 * inferiors.c (add_thread): Change result type to struct thread_info *.
4053 All callers updated.
4054 (add_lwp): Call add_thread here instead of in callers.
4055 All callers updated.
4056 * linux-low.h (get_lwp_thread): Rewrite.
4057 (struct lwp_info): New member "thread".
4058
b3312d80
DE
40592014-02-19 Doug Evans <dje@google.com>
4060
4061 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4062 All callers updated.
4063
ecc6f45c
DE
40642014-02-19 Doug Evans <dje@google.com>
4065
4066 * inferiors.c (add_thread): Fix whitespace.
4067
649ebbca
DE
40682014-02-19 Doug Evans <dje@google.com>
4069
4070 * dll.c (clear_dlls): Replace accessing list implemention details
4071 with API function.
4072 * gdbthread.h (get_first_thread): Declare.
4073 * inferiors.c (for_each_inferior_with_data): New function.
4074 (get_first_thread): New function.
4075 (find_thread_ptid): Simplify.
4076 (get_first_inferior): New function.
4077 (clear_list): Delete.
4078 (one_inferior_p): New function.
4079 (clear_inferior_list): New function.
4080 (clear_inferiors): Update.
4081 * inferiors.h (for_each_inferior_with_data): Declare.
4082 (clear_inferior_list): Declare.
4083 (one_inferior_p): Declare.
4084 (get_first_inferior): Declare.
4085 * linux-low.c (linux_wait_for_event): Replace accessing list
4086 implemention details with API function.
4087 * server.c (target_running): Ditto.
4088 (accumulate_file_name_length): New function.
4089 (emit_dll_description): New function.
4090 (handle_qxfer_libraries): Replace accessing list implemention
4091 details with API function.
4092 (handle_qxfer_threads_worker): New function.
4093 (handle_qxfer_threads_proper): Replace accessing list implemention
4094 details with API function.
4095 (handle_query): Ditto.
4096 (visit_actioned_threads_callback_ftype): New typedef.
4097 (visit_actioned_threads_data): New struct.
4098 (visit_actioned_threads): Rewrite to be find_inferior callback.
4099 (resume): Call find_inferior.
4100 (handle_status): Replace accessing list implemention
4101 details with API function.
4102 (process_serial_event): Replace accessing list implemention details
4103 with API function.
4104 * target.c (set_desired_inferior): Replace accessing list implemention
4105 details with API function.
4106 * tracepoint.c (same_process_p): New function.
4107 (gdb_agent_about_to_close): Replace accessing list implemention
4108 details with API function.
4109 * win32-low.c (child_delete_thread): Replace accessing list
4110 implemention details with API function.
4111 (match_dll_by_basename): New function.
4112 (dll_is_loaded_by_basename): New function.
4113 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4114 details call to dll_is_loaded_by_basename.
4115
80894984
DE
41162014-02-19 Doug Evans <dje@google.com>
4117
4118 * dll.h (struct dll_info): Add comment.
4119 * gdbthread.h (struct thread_info): Add comment.
4120 (current_ptid): Simplify.
4121 * inferiors.c (add_process): Update.
4122 (remove_process): Update.
4123 * inferiors.h (struct process_info): Rename member "head" to "entry".
4124 * linux-low.c (delete_lwp): Update.
4125 (add_lwp): Update.
4126 (last_thread_of_process_p): Update.
4127 (kill_one_lwp_callback, linux_kill): Update.
4128 (status_pending_p_callback): Update.
4129 (wait_for_sigstop): Update. Simplify read of ptid.
4130 (start_step_over): Update.
4131 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4132 (get_lwp_thread): Update.
4133 (struct lwp_info): Rename member "head" to "entry".
4134 * regcache.h (inferior_list_entry): Delete.
4135 * server.c (kill_inferior_callback): Update.
4136 (detach_or_kill_inferior_callback): Update.
4137 (print_started_pid): Update.
4138 (print_attached_pid): Update.
4139 (process_serial_event): Simplify read of ptid.
4140 * thread-db.c (thread_db_create_event): Update.
4141 (thread_db_get_tls_address): Update.
4142 * win32-low.c (current_inferior_ptid): Simplify.
4143
46917d26
TT
41442014-02-19 Tom Tromey <tromey@redhat.com>
4145
4146 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4147 argument.
4148 (target_supports_btrace): Update.
4149
0759a81e
YQ
41502014-02-14 Yao Qi <yao@codesourcery.com>
4151
4152 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4153 (rsp-low-ipa.o): New target.
4154
a7191e8b
TT
41552014-02-12 Tom Tromey <tromey@redhat.com>
4156
4157 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4158 convert_ascii_to_int.
4159 * regcache.c (registers_to_string): Likewise.
4160 * remote-utils.c (decode_M_packet): Likewise.
4161 * server.c (process_serial_event): Likewise.
4162
ff0e980e
TT
41632014-02-12 Tom Tromey <tromey@redhat.com>
4164
4165 * server.c (handle_query, handle_v_run): Use hex2bin, not
4166 unhexify.
4167 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4168
e9371aff
TT
41692014-02-12 Tom Tromey <tromey@redhat.com>
4170
4171 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4172 convert_int_to_ascii.
4173 * regcache.c (registers_to_string, collect_register_as_string):
4174 Likewise.
4175 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4176 Likewise.
4177 * server.c (process_serial_event): Likewise.
4178 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4179 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4180
971dc0b8
TT
41812014-02-12 Tom Tromey <tromey@redhat.com>
4182
4183 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4184 bin2hex, not hexify.
4185 * tracepoint.c (cmd_qtstatus): Likewise.
4186
0a822afb
TT
41872014-02-12 Tom Tromey <tromey@redhat.com>
4188
4189 * remote-utils.c (monitor_output): Pass explicit length to
4190 hexify.
4191
9c3d6531
TT
41922014-02-12 Tom Tromey <tromey@redhat.com>
4193
4194 * tracepoint.c: Include rsp-low.h.
4195 * server.c: Include rsp-low.h.
4196 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4197 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4198 declare.
4199 * remote-utils.c: Include rsp-low.h.
4200 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4201 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4202 (convert_int_to_ascii, convert_ascii_to_int): Move to
4203 common/rsp-low.c.
4204 * regcache.c: Include rsp-low.h.
4205 * ax.c: Include rsp-low.h.
4206 * Makefile.in (SFILES): Add common/rsp-low.c.
4207 (OBS): Add rsp-low.o.
4208 (rsp-low.o): New target.
4209
01fd3ea5
TT
42102014-02-12 Tom Tromey <tromey@redhat.com>
4211
4212 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4213 Include print-utils.h.
4214 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4215 (plongest, thirty_two, phex_nz): Remove.
4216 * Makefile.in (SFILES): Add common/print-utils.c.
4217 (OBS): Add print-utils.o.
4218 (print-utils-ipa.o): New target.
4219 (print-utils.o): New target.
4220 (IPA_OBJS): Add print-utils-ipa.o.
4221
e99dc820
TT
42222014-02-06 Tom Tromey <tromey@redhat.com>
4223
4224 * Makefile.in (SFILES): Fix indentation.
4225
ee1e2d4f
DE
42262014-02-05 Doug Evans <dje@google.com>
4227
4228 * linux-low.c (linux_wait_for_event): Improve comment.
4229 (linux_wait_1): Keep current_inferior in sync with event_child.
4230
f5a02773
DE
42312014-01-22 Doug Evans <dje@google.com>
4232
4233 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4234
87ce2a04
DE
42352014-01-22 Doug Evans <dje@google.com>
4236
4237 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4238 * configure: Regenerate.
4239 * config.in: Regenerate.
4240 * Makefile.in (SFILES): Add debug.c.
4241 (OBS): Add debug.o.
4242 * debug.c: New file.
4243 * debug.h: New file.
4244 * linux-aarch64-low.c (*): Update all debugging printfs to use
4245 debug_printf instead of fprintf.
4246 * linux-arm-low.c (*): Ditto.
4247 * linux-cris-low.c (*): Ditto.
4248 * linux-crisv32-low.c (*): Ditto.
4249 * linux-m32r-low.c (*): Ditto.
4250 * linux-sparc-low.c (*): Ditto.
4251 * linux-x86.c (*): Ditto.
4252 * linux-low.c (*): Ditto.
4253 (linux_wait_1): Add calls to debug_enter, debug_exit.
4254 (linux_wait): Remove redundant debugging printf.
4255 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4256 (linux_resume, unstop_all_lwps): Ditto.
4257 * mem-break.c (*): Update all debugging printfs to use
4258 debug_printf instead of fprintf.
4259 * remote-utils.c (*): Ditto.
4260 * thread-db.c (*): Ditto.
4261 * server.c #include <ctype.h>, "gdb_vecs.h".
4262 (debug_threads): Moved to debug.c.
4263 (*): Update all debugging printfs to use debug_printf instead of
4264 fprintf.
4265 (start_inferior): Replace call to fflush with call to debug_flush.
4266 (monitor_show_help): Mention set debug-format.
4267 (parse_debug_format_options): New function.
4268 (handle_monitor_command): Handle "monitor set debug-format".
4269 (gdbserver_usage): Mention --debug-format.
4270 (main): Parse --debug-format.
4271 * server.h (debug_threads): Declaration moved to debug.h.
4272 #include "debug.h".
4273 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4274 trace_debug_1 that uses debug_printf.
4275 (tracepoint_look_up_symbols): Update all debugging printfs to use
4276 debug_printf instead of fprintf.
4277
e671835b
BS
42782014-01-20 Baruch Siach <baruch@tkos.co.il>
4279
4280 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4281 sys/ptrace.h.
4282
b5737fa9
PA
42832014-01-17 Pedro Alves <palves@redhat.com>
4284
ea38d2a9 4285 PR build/16445
c7faa97a
PA
4286 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4287 defined after including gdb_proc_service.h.
b5737fa9 4288
40ed484e
DE
42892014-01-16 Doug Evans <dje@google.com>
4290
4291 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4292 (match_dll): Use it.
4293
969c39fb
MM
42942014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4295
4296 * target.h (target_ops) <read_btrace>: Change parameters and
4297 return type to allow error reporting.
4298 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4299 trace reading errors on.
4300 * linux-low.c (linux_low_read_btrace): Pass trace reading
4301 errors on.
4302 (linux_low_disable_btrace): New.
4303
ab7f45ba
DE
43042014-01-15 Doug Evans <dje@google.com>
4305
4306 * inferiors.c (thread_id_to_gdb_id): Delete.
4307 * inferiors.h (thread_id_to_gdb_id): Delete.
4308
66af0f44
EZ
43092014-01-13 Eli Zaretskii <eliz@gnu.org>
4310
4311 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4312 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4313 versions.
4314
9939e131
PA
43152014-01-08 Pedro Alves <palves@redhat.com>
4316
4317 * server.c (handle_status): Don't discard previous queued stop
4318 replies or thread's pending status here.
4319 (main) <disconnection>: Do it here instead.
4320
b7ea362b
PA
43212014-01-08 Pedro Alves <palves@redhat.com>
4322
4323 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4324 * server.c (visit_actioned_threads, handle_pending_status): New
4325 function.
4326 (handle_v_cont): Factor out parts to ...
4327 (resume): ... this new function. If in all-stop, and a thread
4328 being resumed has a pending status, report it without actually
4329 resuming.
4330 (myresume): Adjust to use the new 'resume' function.
4331 (clear_pending_status_callback, set_pending_status_callback)
4332 (find_status_pending_thread_callback): New functions.
4333 (handle_status): Handle the case of multiple threads having
4334 interesting statuses to report. Report threads' real last signal
4335 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4336 with an interesting thread to report the status for, instead of
4337 always reporting the status of the first thread.
4338
28498c42
JB
43392014-01-01 Joel Brobecker <brobecker@adacore.com>
4340
4341 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4342 * gdbreplay.c (gdbreplay_version): Likewise.
4343
f45c82da
YZ
43442013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4345
4346 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4347 iov.iov_len with the real length in use.
4348
379a5e2d
JB
43492013-12-13 Joel Brobecker <brobecker@adacore.com>
4350
4351 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4352 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4353 for all targets that use win32-low.c.
4354 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4355 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4356
4210d83e
PA
43572013-12-13 Pedro Alves <palves@redhat.com>
4358
4359 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4360 if equal to TARGET_WAITKIND_LOADED.
4361 * win32-low.c (cached_status): New static global.
4362 (win32_wait): Add declaration.
4363 (do_initial_child_stuff): Flush all initial pending debug events
4364 up to the initial breakpoint.
4365 (win32_wait): If CACHED_STATUS was set, return that instead
4366 of doing a real wait. Remove the code resuming the execution
4367 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4368 during the initial phase. Also remove the code changing
4369 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4370 TARGET_WAITKIND_STOPPED.
4371
e7f0d979
YQ
43722013-12-11 Yao Qi <yao@codesourcery.com>
4373
4374 * notif.c (handle_notif_ack): Return 0 if no notification
4375 matches.
4376
ebcf782c
DE
43772013-11-20 Doug Evans <dje@google.com>
4378
4379 * linux-low.c (linux_set_resume_request): Fix comment.
4380
20ad9378
DE
43812013-11-20 Doug Evans <dje@google.com>
4382
4383 * linux-low.c (resume_status_pending_p): Tweak comment.
4384
a196ebeb
WT
43852013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4386
4387 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4388 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4389 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4390 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4391 (srv_amd64_regobj): Add amd64-mpx.o.
4392 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4393 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4394 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4395 * i387-fp.c (num_pl_bnd_register) Added constant.
4396 (num_pl_bnd_cfg_registers) Added constant.
4397 (struct i387_xsave) Added reserved area and MPX fields.
4398 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4399 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4400 function.
4401 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4402 (init_registers_amd64_mpx_linux): Declare new function.
4403 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4404 (x86_64_regmap): Add MPX registers.
4405 (x86_linux_read_description): Add MPX case.
4406 (initialize_low_arch): Initialize MPX targets.
4407
0080a2f6
TT
44082013-11-18 Tom Tromey <tromey@redhat.com>
4409
4410 * configure: Rebuild.
4411 * configure.ac: Don't check for stdlib.h.
4412 * gdbreplay.c: Unconditionally include stdlib.h.
4413
2978b111
TT
44142013-11-18 Tom Tromey <tromey@redhat.com>
4415
4416 * config.in: Rebuild.
4417 * configure: Rebuild.
4418 * configure.ac: Don't use AC_HEADER_DIRENT.
4419
a3d08894
TT
44202013-11-18 Tom Tromey <tromey@redhat.com>
4421
4422 * server.h: Don't check HAVE_STRING_H.
4423 * gdbreplay.c: Don't check HAVE_STRING_H.
4424 * configure: Rebuild.
4425
0a5dd17d
TT
44262013-11-18 Tom Tromey <tromey@redhat.com>
4427
4428 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4429 LIBGNU.
4430
1bd2f0ba
TT
44312013-11-08 Tom Tromey <tromey@redhat.com>
4432
4433 * configure, config.in: Rebuild.
4434 * configure.ac: Remove unused configury.
4435
3266f10b
TT
44362013-11-08 Tom Tromey <tromey@redhat.com>
4437
4438 * acinclude.m4: Include common.m4, codeset.m4.
4439 * configure, config.in: Rebuild.
4440 * configure.ac: Use GDB_AC_COMMON.
4441
6682d959
AA
44422013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4443
4444 * linux-s390-low.c (HWCAP_S390_TE): New define.
4445 (s390_arch_setup): Consider the TE field in the HWCAP for
4446 determining 'have_regset_tdb'.
4447
fd0a4d76
SDJ
44482013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4449
4450 PR gdb/16014
4451 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4452 call to sizeof.
4453
1a3d890b
PA
44542013-10-02 Pedro Alves <palves@redhat.com>
4455
4456 * server.c (process_serial_event): Don't output "GDBserver
4457 exiting" if GDB is connected through stdio.
4458 * target.c (mywait): Likewise, be silent if GDB is connected
4459 through stdio.
4460
97ad4581
JB
44612013-10-01 Joel Brobecker <brobecker@adacore.com>
4462
4463 * lynx-low.c (lynx_add_threads_after_attach): New function.
4464 (lynx_attach): Remove call to add_thread. Add call to
4465 lynx_add_threads_after_attach instead.
4466
5b4e221c
MF
44672013-09-28 Mike Frysinger <vapier@gentoo.org>
4468
4469 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4470 * config.in, configure: Regenerated.
4471
ee47b2f8
YQ
44722013-09-18 Yao Qi <yao@codesourcery.com>
4473
4474 PR server/15959
4475 * server.c (start_inferior): Clear 'resume_info'.
4476
d6707650 44772013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4478
d6707650
JW
4479 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4480 for each register.
4481
9243dd0e 44822013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4483
9243dd0e
JW
4484 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4485 linux-tile-low.o to srv_tgtobj.
4486
c623a6ef
WN
44872013-09-16 Will Newton <will.newton@linaro.org>
4488
4489 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4490 out regs.
4491
fb71d39e
PA
44922013-09-06 Pedro Alves <palves@redhat.com>
4493
4494 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4495 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4496 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4497 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4498 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4499 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4500
8e7e9910
PA
45012013-09-06 Pedro Alves <palves@redhat.com>
4502
4503 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4504 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4505
7c3a12ca
PA
45062013-09-06 Pedro Alves <palves@redhat.com>
4507
4508 * linux-amd64-ipa.c: Include tracepoint.h.
4509 * linux-i386-ipa.c: Include tracepoint.h.
4510
8eb3d7b6
RW
45112013-09-06 Ricard Wanderlof <ricardw@axis.com>
4512
4513 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4514 (ps_get_thread_area): New function.
4515
eddddb9d
RW
45162013-09-06 Ricard Wanderlof <ricardw@axis.com>
4517
4518 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4519 (initialize_low_arch): Call init_registers_crisv32 rather than
4520 init_register_crisv32.
4521
533b0600
PA
45222013-09-05 Pedro Alves <palves@redhat.com>
4523
4524 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4525 to ...
4526 * hostio.h: ... this new file.
4527 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4528 win32-low.c: Include hostio.h.
4529
0ce3d3b5
PA
45302013-09-05 Pedro Alves <palves@redhat.com>
4531
4532 * server.h (gdb_client_data, handler_func, callback_handler_func)
4533 (delete_file_handler, add_file_handler, append_callback_event)
4534 (delete_callback_event, start_event_loop, initialize_event_loop):
4535 Move to event-loop.h and include it.
4536 * event-loop.h: New file.
4537
799cdc37
PA
45382013-09-05 Pedro Alves <palves@redhat.com>
4539
4540 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4541 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4542 (loaded_dll, unloaded_dll): Move to ...
4543 * dll.h: ... this new file.
4544 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4545
6a6bbd9d
PA
45462013-09-05 Pedro Alves <palves@redhat.com>
4547
4548 * server.h (current_process, get_thread_process, all_processes)
4549 (add_inferior_to_list, for_each_inferior, current_inferior)
4550 (remove_inferior, add_process, remove_process, find_process_pid)
4551 (have_started_inferiors_p, have_attached_inferiors_p)
4552 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4553 (clear_inferiors, find_inferior, find_inferior_id)
4554 (inferior_target_data, set_inferior_target_data)
4555 (inferior_regcache_data, set_inferior_regcache_data): Move to
4556 inferiors.h, and include it.
4557 * inferiors.h: New file.
4558
f699aaba
PA
45592013-09-05 Pedro Alves <palves@redhat.com>
4560
4561 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4562 Move ...
72f4393d 4563 * ax.h: ... here.
f699aaba 4564
c144c7a0
PA
45652013-09-05 Pedro Alves <palves@redhat.com>
4566
4567 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4568 tracepoint.h.
4569 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4570 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4571 (handle_tracepoint_general_set, handle_tracepoint_query)
4572 (tracepoint_finished_step, tracepoint_was_hit)
4573 (release_while_stepping_state_list, current_traceframe)
4574 (in_readonly_region, traceframe_read_mem)
4575 (fetch_traceframe_registers, traceframe_read_sdata)
4576 (traceframe_read_info, struct fast_tpoint_collect_status)
4577 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4578 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4579 (supply_fast_tracepoint_registers)
4580 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4581 (ipa_tdesc, claim_trampoline_space)
4582 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4583 (agent_mem_read, agent_get_trace_state_variable_value)
4584 (agent_set_trace_state_variable_value, agent_tsv_read)
4585 (agent_mem_read_string, get_raw_reg_func_addr)
4586 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4587 * tracepoint.h: ... this new file.
4588
ff42e6ab
PA
45892013-09-05 Pedro Alves <palves@redhat.com>
4590
4591 * server.h (perror_with_name, error, fatal, warning, paddress)
4592 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4593 include it.
4594 * utils.h: New file.
4595
541af0f4
PA
45962013-09-05 Pedro Alves <palves@redhat.com>
4597
4598 * server.h (remote_debug, noack_mode, transport_is_reliable)
4599 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4600 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4601 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4602 (write_enn, initialize_async_io, enable_async_io)
4603 (disable_async_io, check_remote_input_interrupt_request)
4604 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4605 (dead_thread_notify, prepare_resume_reply)
4606 (decode_address_to_semicolon, decode_address, decode_m_packet)
4607 (decode_M_packet, decode_X_packet, decode_xfer_write)
4608 (decode_search_memory_packet, unhexify, hexify)
4609 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4610 (look_up_one_symbol, relocate_instruction)
4611 (monitor_output): Move to remote-utils.h, and include it.
4612 * remote-utils.h: New file.
4613
eebdf26b
PA
46142013-09-05 Pedro Alves <palves@redhat.com>
4615
4616 * server.h (_): Delete.
4617
3aafd2ff
PA
46182013-09-02 Pedro Alves <palves@redhat.com>
4619
4620 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4621 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4622 allocated.
4623 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4624
cee83bcb
PM
46252013-09-02 Pierre Muller <muller@sourceware.org>
4626
4627 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4628 or WriteProcessMemory complete successfully and handle
4629 ERROR_PARTIAL_COPY error.
4630
9a13b2fa
PA
46312013-09-02 Pedro Alves <palves@redhat.com>
4632
4633 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4634 error instead of EIO.
4635
602e3198
JK
46362013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4637
4638 PR server/15604
4639 * linux-low.c: Include filestuff.h.
4640 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4641 * lynx-low.c: Include filestuff.h.
4642 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4643 * server.c: Include filestuff.h.
4644 (main): Call notice_open_fds.
4645 * spu-low.c: Include filestuff.h.
4646 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4647
96d7229d
LM
46482013-08-22 Luis Machado <lgustavo@codesourcery.com>
4649
4650 * Makefile.in: Explain why ../target and ../nat are not
4651 listed as include file search paths.
4652 (linux-waitpid.o): New object file rule.
4653 * configure.srv (srv_native_linux_obj): New variable.
4654 Replace all occurrences of linux native object files with
4655 $srv_native_linux_obj.
4656 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4657 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4658 (linux_enable_event_reporting): Remove declaration.
4659 (my_waitpid): Moved to common/linux-waitpid.c.
4660 (linux_wait_for_event): Pass ptid when calling
4661 linux_enable_event_reporting.
4662 (linux_supports_tracefork_flag): Remove.
4663 (linux_enable_event_reporting): Likewise.
4664 (linux_tracefork_grandchild): Remove.
4665 (STACK_SIZE): Moved to common/linux-ptrace.c.
4666 (linux_tracefork_child): Remove.
4667 (linux_test_for_tracefork): Remove.
4668 (linux_look_up_symbols): Call linux_supports_traceclone.
4669 (initialize_low): Remove call to linux_test_for_tracefork.
4670 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4671 common/linux-ptrace.h.
4672 (PTRACE_TYPE_ARG4): Likewise.
4673 Include linux-ptrace.h.
4674
32940073
PA
46752013-08-21 Pedro Alves <palves@redhat.com>
4676
4677 * config.in: Renegerate.
4678
33b60d58 46792013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4680
33b60d58
LM
4681 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4682 (SFILES): Remove $(srcdir)/common/target-common.c and
4683 add $(srcdir)/target/waitstatus.c.
4684 (OBS): Remove target-common.o and add waitstatus.o.
4685 (server_h): Remove $(srcdir)/../common/target-common.h and
4686 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4687 and $(srcdir)/../target/waitstatus.h.
4688 (target-common.o): Remove.
4689 (waitstatus.o): New target object file.
4690 * target.h: Do not include target-common.h and
4691 include target/resume.h, target/wait.h and
4692 target/waitstatus.h.
4693
b8e1b30e
LM
46942013-08-13 Luis Machado <lgustavo@codesourcery.com>
4695
4696 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4697 to PTRACE_TYPE_ARG3.
4698 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4699 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4700 PTRACE_TYPE_ARG4.
4701 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4702 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4703
7a60ad40
YQ
47042013-07-27 Jie Zhang <jie@codesourcery.com>
4705 Daniel Jacobowitz <dan@codesourcery.com>
4706 Yao Qi <yao@codesourcery.com>
4707
4708 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4709 (mips-linux-watch.o): New rule.
4710 (mips_linux_watch_h): New variable.
4711 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4712 srv_tgtobj.
4713 * linux-mips-low.c: Include mips-linux-watch.h.
4714 (struct arch_process_info, struct arch_lwp_info): New.
4715 (update_watch_registers_callback): New function.
4716 (mips_linux_new_process, mips_linux_new_thread) New functions.
4717 (mips_linux_prepare_to_resume, mips_insert_point): New
4718 functions.
4719 (mips_remove_point, mips_stopped_by_watchpoint): New
4720 functions.
4721 (rsp_bp_type_to_target_hw_bp_type): New function.
4722 (mips_stopped_data_address): New function.
4723 (the_low_target): Add watchpoint support functions.
4724
de6f69ad
YQ
47252013-07-27 Yao Qi <yao@codesourcery.com>
4726
4727 * i386-low.c: Include break-common.h.
4728 (enum target_hw_bp_type): Remove.
4729
3360c0bf
LM
47302013-07-24 Luis Machado <lgustavo@codesourcery.com>
4731
4732 * Makefile.in (SFILES): /common/target-common.c.
4733 (OBS): Add target-common.o.
4734 (server_h): Add $(srcdir)/../common/target-common.h.
4735 (target-common.o): New target.
4736 * server.c (queue_stop_reply_callback): Free
4737 status string after use.
4738 * target.c (target_waitstatus_to_string): Remove.
4739 * target.h: Include target-common.h.
4740 (resume_kind): Likewise.
4741 (target_waitkind): Likewise.
4742 (target_waitstatus): Likewise.
4743 (TARGET_WNOHANG): Likewise.
4744
bd885420
YQ
47452013-07-04 Yao Qi <yao@codesourcery.com>
4746
4747 * Makefile.in (host_alias): Use @host_noncanonical@.
4748 (target_alias): Use @target_noncanonical@.
4749 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4750 ACX_NONCANONICAL_HOST.
4751 * configure: Regenerated.
4752
4753 Revert:
4754 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4755
4756 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4757 * configure: Rebuild.
4758 * Makefile.in (version_host, version_target): Get from configure.
4759 (version.c): Use $(version_host) and $(version_target).
4760
17ef446e
PA
47612013-07-03 Pedro Alves <palves@redhat.com>
4762
4763 * Makefile.in (config.status): Depend on development.sh.
4764 * acinclude.m4: Include libmcheck.m4.
4765 * configure: Regenerate.
4766
7a9a7487
MG
47672013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4768
4769 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4770 attribute inside the parentheses.
4771 (winapi_DebugSetProcessKillOnExit): Ditto.
4772 (winapi_DebugBreakProcess): Ditto.
4773 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 4774
49b64de6
MG
47752013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4776
4777 * notif.h (notif_event): Add a dummy member to avoid compiler
4778 errors.
4779
d5749ee7
PA
47802013-07-01 Pedro Alves <palves@redhat.com>
4781
4782 * hostio.c (HOSTIO_PATH_MAX): Define.
4783 (require_filename, handle_open, handle_unlink, handle_readlink):
4784 Use it.
4785
d8d2a3ee
PA
47862013-07-01 Pedro Alves <palves@redhat.com>
4787
4788 * server.h: Include "pathmax.h".
4789 * linux-low.c: Don't include sys/param.h.
4790 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4791 MAXPATHLEN.
4792 * win32-low.c: Don't include sys/param.h.
4793 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4794
bc7dea8d
PA
47952013-07-01 Pedro Alves <palves@redhat.com>
4796
4797 * event-loop.c: Don't check HAVE_UNISTD_H before including
4798 <unistd.h>.
4799 * gdbreplay.c: Likewise.
4800 * remote-utils.c: Likewise.
4801 * server.c: Likewise.
4802 * configure.ac: Don't check for unistd.h.
4803 * configure: Regenerate.
4804
d6c2da54
TT
48052013-06-28 Tom Tromey <tromey@redhat.com>
4806
4807 * Makefile.in (version.c): Use version.in, not
4808 common/version.in.
4809
257b6bec
MG
48102013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4811
4812 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4813 * configure: Rebuild.
4814 * Makefile.in (version_host, version_target): Get from configure.
4815 (version.c): Use $(version_host) and $(version_target).
4816
86ebe149
DK
48172013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4818
4819 Fix trace-status to output user name without trailing colon.
4820 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4821
f30aa5af
DK
48222013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4823
4824 Fix trace-status to output proper start-time and stop-time.
4825 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4826 output start time and stop time in hex as gdb expects.
4827
28a93511
YQ
48282013-06-26 Pedro Alves <pedro@codesourcery.com>
4829
4830 * tracepoint.c (build_traceframe_info_xml): Output trace state
4831 variables present in the trace buffer.
4832
01208463
TT
48332013-06-24 Tom Tromey <tromey@redhat.com>
4834
4835 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4836 create-version.sh.
4837 (version.o): Remove.
4838 * gdbreplay.c: Include version.h.
4839 (version, host_name): Don't declare.
4840 * server.h: Include version.h.
4841 (version, host_name): Don't declare.
4842
760256f9
PA
48432013-06-12 Pedro Alves <palves@redhat.com>
4844
4845 * linux-x86-low.c (linux_is_elf64): Delete global.
4846 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4847 with local linux_pid_exe_is_elf_64_file use.
4848
030031ee
PA
48492013-06-11 Pedro Alves <palves@redhat.com>
4850
4851 * linux-low.c (regset_disabled, disable_regset): New functions.
4852 (regsets_fetch_inferior_registers)
4853 (regsets_store_inferior_registers): Use them.
4854 (initialize_regsets_info); Don't allocate the disabled_regsets
4855 array here.
4856 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4857 comment.
4858
5da6eb0a
PA
48592013-06-11 Pedro Alves <palves@redhat.com>
4860
4861 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4862 xmalloc.
4863
7e5aaa09
PA
48642013-06-11 Pedro Alves <palves@redhat.com>
4865
4866 * linux-x86-low.c (initialize_low_arch): Call
4867 init_registers_x32_avx_linux.
4868
d878444c
JK
48692013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4870
4871 Fix compatibility with Android Bionic.
4872 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4873 it is not empty.
4874
3aee8918
PA
48752013-06-07 Pedro Alves <palves@redhat.com>
4876
5f2b57b5 4877 PR server/14823
3aee8918
PA
4878 * Makefile.in (OBS): Add tdesc.o.
4879 (IPA_OBJS): Add tdesc-ipa.o.
4880 (tdesc-ipa.o): New rule.
4881 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4882 interface.
4883 * linux-low.c (new_inferior): Delete.
4884 (disabled_regsets, num_regsets): Delete.
4885 (linux_add_process): Adjust to set the new per-process
4886 new_inferior flag.
4887 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4888 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4889 was a stop. When calling arch_setup, switch the current inferior
4890 to the thread that got an event.
4891 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4892 (regsets_fetch_inferior_registers)
4893 (regsets_store_inferior_registers): New regsets_info parameter.
4894 Adjust to use it.
4895 (linux_register_in_regsets): New regs_info parameter. Adjust to
4896 use it.
4897 (register_addr, fetch_register, store_register): New usrregs_info
4898 parameter. Adjust to use it.
4899 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4900 parameter regs_info. Adjust to use it.
4901 (linux_fetch_registers): Get the current inferior's regs_info, and
4902 adjust to use it.
4903 (linux_store_registers): Ditto.
4904 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4905 (initialize_low): Don't initialize the target_regsets here. Call
4906 initialize_low_arch.
4907 * linux-low.h (target_regsets): Delete declaration.
4908 (struct regsets_info): New.
4909 (struct usrregs_info): New.
4910 (struct regs_info): New.
4911 (struct process_info_private) <new_inferior>: New field.
4912 (struct linux_target_ops): Delete the num_regs, regmap, and
4913 regset_bitmap fields. New field regs_info.
4914 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4915 * i387-fp.c (num_xmm_registers): Delete.
4916 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4917 calls to new interface.
4918 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4919 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4920 Infer the number of xmm registers from the regcache's target
4921 description.
4922 * i387-fp.h (num_xmm_registers): Delete.
4923 * inferiors.c (add_thread): Don't install the thread's regcache
4924 here.
4925 * proc-service.c (gregset_info): Fetch the current inferior's
4926 regs_info. Adjust to use it.
4927 * regcache.c: Include tdesc.h.
4928 (register_bytes, reg_defs, num_registers)
4929 (gdbserver_expedite_regs): Delete.
4930 (get_thread_regcache): If the thread doesn't have a regcache yet,
4931 create one, instead of aborting gdbserver.
4932 (regcache_invalidate_one): Rename to ...
4933 (regcache_invalidate_thread): ... this.
4934 (regcache_invalidate_one): New.
4935 (regcache_invalidate): Only invalidate registers of the current
4936 process.
4937 (init_register_cache): Add target_desc parameter, and use it.
4938 (new_register_cache): Ditto. Assert the target description has a
4939 non zero registers_size.
4940 (regcache_cpy): Add assertions. Adjust.
4941 (realloc_register_cache, set_register_cache): Delete.
4942 (registers_to_string, registers_from_string): Adjust.
4943 (find_register_by_name, find_regno, find_register_by_number)
4944 (register_cache_size): Add target_desc parameter, and use it.
4945 (free_register_cache_thread, free_register_cache_thread_one)
4946 (regcache_release, register_cache_size): New.
4947 (register_size): Add target_desc parameter, and use it.
4948 (register_data, supply_register, supply_register_zeroed)
4949 (supply_regblock, supply_register_by_name, collect_register)
4950 (collect_register_as_string, collect_register_by_name): Adjust.
4951 * regcache.h (struct target_desc): Forward declare.
4952 (struct regcache) <tdesc>: New field.
4953 (init_register_cache, new_register_cache): Add target_desc
4954 parameter.
4955 (regcache_invalidate_thread): Declare.
4956 (regcache_invalidate_one): Delete declaration.
4957 (regcache_release): Declare.
4958 (find_register_by_number, register_cache_size, register_size)
4959 (find_regno): Add target_desc parameter.
4960 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4961 declarations.
4962 * remote-utils.c: Include tdesc.h.
4963 (outreg, prepare_resume_reply): Adjust.
4964 * server.c: Include tdesc.h.
4965 (gdbserver_xmltarget): Delete declaration.
4966 (get_features_xml, process_serial_event): Adjust.
4967 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4968 declare.
4969 (struct process_info) <tdesc>: New field.
4970 (ipa_tdesc): Declare.
4971 * tdesc.c: New file.
4972 * tdesc.h: New file.
4973 * tracepoint.c: Include tdesc.h.
4974 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4975 (get_context_regcache): Adjust to pass ipa_tdesc down.
4976 (do_action_at_tracepoint): Adjust to get the register cache size
4977 from the context regcache's description.
4978 (traceframe_walk_blocks): Adjust to get the register cache size
4979 from the current trace frame's description.
4980 (traceframe_get_pc): Adjust to get current trace frame's
4981 description and pass it down.
4982 (gdb_collect): Adjust to get the register cache size from the
4983 IPA's description.
4984 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4985 (gdbserver_xmltarget): Delete.
4986 (initialize_low_tracepoint): Set the ipa's target description.
4987 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4988 (initialize_low_tracepoint): Set the ipa's target description.
4989 * linux-x86-low.c: Include tdesc.h.
4990 [__x86_64__] (is_64bit_tdesc): New.
4991 (ps_get_thread_area, x86_get_thread_area): Use it.
4992 (i386_cannot_store_register): Rename to ...
4993 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4994 (i386_cannot_fetch_register): Rename to ...
4995 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4996 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4997 to new interface.
4998 (target_regsets): Rename to ...
4999 (x86_regsets): ... this.
5000 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5001 interface.
5002 (x86_siginfo_fixup): Use is_64bit_tdesc.
5003 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5004 (tdesc_x32_avx_linux, tdesc_x32_linux)
5005 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5006 Declare.
5007 (x86_linux_update_xmltarget): Delete.
5008 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5009 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5010 (AMD64_LINUX_USER64_CS): New.
5011 (x86_linux_read_description): New, based on
5012 x86_linux_update_xmltarget.
5013 (same_process_callback): New.
5014 (x86_arch_setup_process_callback): New.
5015 (x86_linux_update_xmltarget): New.
5016 (x86_regsets_info): New.
5017 (amd64_linux_regs_info): New.
5018 (i386_linux_usrregs_info): New.
5019 (i386_linux_regs_info): New.
5020 (x86_linux_regs_info): New.
5021 (x86_arch_setup): Reimplement.
5022 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5023 (x86_emit_ops): Ditto.
5024 (the_low_target): Adjust. Install x86_linux_regs_info,
5025 x86_cannot_fetch_register, and x86_cannot_store_register.
5026 (initialize_low_arch): New.
5027 * linux-ia64-low.c (tdesc_ia64): Declare.
5028 (ia64_fetch_register): Adjust.
5029 (ia64_usrregs_info, regs_info): New globals.
5030 (ia64_regs_info): New function.
5031 (the_low_target): Adjust.
5032 (initialize_low_arch): New function.
5033 * linux-sparc-low.c (tdesc_sparc64): Declare.
5034 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5035 Adjust.
5036 (sparc_arch_setup): New function.
5037 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5038 (the_low_target): Adjust.
5039 (initialize_low_arch): New function.
5040 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5041 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5042 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5043 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5044 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5045 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5046 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5047 (tdesc_powerpc_isa205_vsx64l): Declare.
5048 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5049 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5050 (ppc_set_pc, ppc_get_hwcap): Adjust.
5051 (ppc_usrregs_info): Forward declare.
5052 (!__powerpc64__) ppc_regmap_adjusted: New global.
5053 (ppc_arch_setup): Adjust to the current process'es target
5054 description.
5055 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5056 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5057 (ppc_store_evrregset): Adjust.
5058 (target_regsets): Rename to ...
5059 (ppc_regsets): ... this, and make static.
5060 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5061 (ppc_regs_info): New function.
5062 (the_low_target): Adjust.
5063 (initialize_low_arch): New function.
5064 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5065 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5066 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5067 (tdesc_s390x_linux64v2): Declare.
5068 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5069 (s390_fill_gregset, s390_store_last_break): Adjust.
5070 (target_regsets): Rename to ...
5071 (s390_regsets): ... this, and make static.
5072 (s390_get_pc, s390_set_pc): Adjust.
5073 (s390_get_hwcap): New target_desc parameter, and use it.
5074 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5075 (s390_arch_setup): Adjust to set the current process'es target
5076 description. Don't adjust the regmap.
5077 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5078 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5079 (regs_info_3264): New globals.
5080 (s390_regs_info): New function.
5081 (the_low_target): Adjust.
5082 (initialize_low_arch): New function.
5083 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5084 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5085 [__mips64] (init_registers_mips_linux)
5086 (init_registers_mips_dsp_linux): Delete defines.
5087 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5088 (have_dsp): New global.
5089 (mips_read_description): New, based on mips_arch_setup.
5090 (mips_arch_setup): Reimplement.
5091 (get_usrregs_info): New function.
5092 (mips_cannot_fetch_register, mips_cannot_store_register)
5093 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5094 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5095 (target_regsets): Rename to ...
5096 (mips_regsets): ... this, and make static.
5097 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5098 (dsp_regs_info, regs_info): New globals.
5099 (mips_regs_info): New function.
5100 (the_low_target): Adjust.
5101 (initialize_low_arch): New function.
5102 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5103 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5104 Declare.
5105 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5106 (arm_read_description): New, with bits factored from
5107 arm_arch_setup.
5108 (arm_arch_setup): Reimplement.
5109 (target_regsets): Rename to ...
5110 (arm_regsets): ... this, and make static.
5111 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5112 (arm_regs_info): New function.
5113 (the_low_target): Adjust.
5114 (initialize_low_arch): New function.
5115 * linux-m68k-low.c (tdesc_m68k): Declare.
5116 (target_regsets): Rename to ...
5117 (m68k_regsets): ... this, and make static.
5118 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5119 (m68k_regs_info): New function.
5120 (m68k_arch_setup): New function.
5121 (the_low_target): Adjust.
5122 (initialize_low_arch): New function.
5123 * linux-sh-low.c (tdesc_sharch): Declare.
5124 (target_regsets): Rename to ...
5125 (sh_regsets): ... this, and make static.
5126 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5127 (sh_regs_info, sh_arch_setup): New functions.
5128 (the_low_target): Adjust.
5129 (initialize_low_arch): New function.
5130 * linux-bfin-low.c (tdesc_bfin): Declare.
5131 (bfin_arch_setup): New function.
5132 (bfin_usrregs_info, regs_info): New globals.
5133 (bfin_regs_info): New function.
5134 (the_low_target): Adjust.
5135 (initialize_low_arch): New function.
5136 * linux-cris-low.c (tdesc_cris): Declare.
5137 (cris_arch_setup): New function.
5138 (cris_usrregs_info, regs_info): New globals.
5139 (cris_regs_info): New function.
5140 (the_low_target): Adjust.
5141 (initialize_low_arch): New function.
5142 * linux-cris-low.c (tdesc_crisv32): Declare.
5143 (cris_arch_setup): New function.
5144 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5145 (cris_regs_info): New function.
5146 (the_low_target): Adjust.
5147 (initialize_low_arch): New function.
5148 * linux-m32r-low.c (tdesc_m32r): Declare.
5149 (m32r_arch_setup): New function.
5150 (m32r_usrregs_info, regs_info): New globals.
5151 (m32r_regs_info): Adjust.
5152 (initialize_low_arch): New function.
5153 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5154 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5155 (tic6x_usrregs_info): Forward declare.
5156 (tic6x_read_description): New function, based on ...
5157 (tic6x_arch_setup): ... this. Reimplement.
5158 (target_regsets): Rename to ...
5159 (tic6x_regsets): ... this, and make static.
5160 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5161 (tic6x_regs_info): New function.
5162 (the_low_target): Adjust.
5163 (initialize_low_arch): New function.
5164 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5165 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5166 (target_regsets): Rename to ...
5167 (xtensa_regsets): ... this, and make static.
5168 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5169 globals.
5170 (xtensa_arch_setup, xtensa_regs_info): New functions.
5171 (the_low_target): Adjust.
5172 (initialize_low_arch): New function.
5173 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5174 (nios2_arch_setup): Set the current process'es tdesc.
5175 (target_regsets): Rename to ...
5176 (nios2_regsets): ... this.
5177 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5178 (nios2_regs_info): New function.
5179 (the_low_target): Adjust.
5180 (initialize_low_arch): New function.
a261b8f5
PA
5181 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5182 (aarch64_arch_setup): Set the current process'es tdesc.
5183 (target_regsets): Rename to ...
5184 (aarch64_regsets): ... this.
5185 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5186 (aarch64_regs_info): New function.
5187 (the_low_target): Adjust.
5188 (initialize_low_arch): New function.
3aee8918
PA
5189 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5190 globals.
5191 (target_regsets): Rename to ...
5192 (tile_regsets): ... this.
5193 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5194 (tile_regs_info): New function.
5195 (tile_arch_setup): Set the current process'es tdesc.
5196 (the_low_target): Adjust.
5197 (initialize_low_arch): New function.
5198 * spu-low.c (tdesc_spu): Declare.
5199 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5200 * win32-arm-low.c (tdesc_arm): Declare.
5201 (arm_arch_setup): New function.
5202 (the_low_target): Install arm_arch_setup instead of
5203 init_registers_arm.
5204 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5205 (init_windows_x86): Rename to ...
5206 (i386_arch_setup): ... this. Set `win32_tdesc'.
5207 (the_low_target): Adjust.
5208 * win32-low.c (win32_tdesc): New global.
5209 (child_add_thread): Don't create the thread cache here.
5210 (do_initial_child_stuff): Set the new process'es tdesc.
5211 * win32-low.h (struct target_desc): Forward declare.
5212 (win32_tdesc): Declare.
5213 * lynx-i386-low.c (tdesc_i386): Declare global.
5214 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5215 * lynx-low.c (lynx_tdesc): New global.
5216 (lynx_add_process): Set the new process'es tdesc.
5217 * lynx-low.h (struct target_desc): Forward declare.
5218 (lynx_tdesc): Declare global.
5219 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5220 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5221 * nto-low.c (nto_tdesc): New global.
5222 (do_attach): Set the new process'es tdesc.
5223 * nto-low.h (struct target_desc): Forward declare.
5224 (nto_tdesc): Declare.
5225 * nto-x86-low.c (tdesc_i386): Declare.
5226 (nto_x86_arch_setup): Set `nto_tdesc'.
5227
b1fbec62
GB
52282013-06-04 Gary Benson <gbenson@redhat.com>
5229
5230 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5231 to qSupported response when appropriate.
5232 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5233 with nonzero-length annex.
5234 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5235 arguments supplied in annex.
5236
d1ec4ce7
DE
52372013-05-31 Doug Evans <dje@google.com>
5238
ac44adcb 5239 PR server/15594
d1ec4ce7
DE
5240 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5241 64 bits in 64-cross-32 environment.
5242
9b25f2d3
PA
52432013-05-28 Pedro Alves <palves@redhat.com>
5244
5245 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5246 (aarch64-without-fpu.c): Delete rule.
5247 * configure.srv (aarch64*-*-linux*): Remove references to
5248 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5249 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5250 declaration.
5251
6740dc9c
PA
52522013-05-24 Pedro Alves <palves@redhat.com>
5253
5254 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5255 instead of strchr/decode_address. Error if the range isn't split
5256 with a ','. Don't assume there's be a ':' in the action.
5257
c2d6af84
PA
52582013-05-23 Yao Qi <yao@codesourcery.com>
5259 Pedro Alves <palves@redhat.com>
5260
5261 * linux-low.c (lwp_in_step_range): New function.
5262 (linux_wait_1): If the thread was range stepping and stopped
5263 outside the stepping range, report the stop to GDB. Otherwise,
5264 continue stepping. Add range stepping debug output.
5265 (linux_set_resume_request): Copy the step range from the resume
5266 request to the lwp.
5267 (linux_supports_range_stepping): New.
5268 (linux_target_ops) <supports_range_stepping>: Set to
5269 linux_supports_range_stepping.
5270 * linux-low.h (struct linux_target_ops)
5271 <supports_range_stepping>: New field.
5272 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5273 * linux-x86-low.c (x86_supports_range_stepping): New.
5274 (the_low_target) <supports_range_stepping>: Set to
5275 x86_supports_range_stepping.
5276 * server.c (handle_v_cont): Handle 'r' action.
5277 (handle_v_requests): Append ";r" if the target supports range
5278 stepping.
5279 * target.h (struct thread_resume) <step_range_start,
5280 step_range_end>: New fields.
5281 (struct target_ops) <supports_range_stepping>:
5282 New field.
5283 (target_supports_range_stepping): New macro.
5284
58794e1a
JB
52852013-05-17 Joel Brobecker <brobecker@adacore.com>
5286
5287 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5288 confusion in comment.
5289
d631c5a7
JB
52902013-05-17 Joel Brobecker <brobecker@adacore.com>
5291
5292 * lynx-low.c (struct process_info_private): New type.
5293 (lynx_add_process): New function.
5294 (lynx_create_inferior, lynx_attach): Replace calls to
5295 add_process by calls to lynx_add_process.
5296 (lynx_resume): If PTID is null, then try using
5297 current_process()->private->last_wait_event_ptid.
5298 Add comments.
5299 (lynx_clear_inferiors): Delete. The contents of that function
5300 has been inlined in lynx_mourn;
5301 (lynx_wait_1): Save the ptid in the process's private data.
5302 (lynx_mourn): Free the process' private data. Replace call
5303 to lynx_clear_inferiors by call to clear_inferiors.
5304
96f7a20f
YQ
53052013-05-17 Yao Qi <yao@codesourcery.com>
5306
5307 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5308 the right place.
5309
db0dfaa0
LM
53102013-05-16 Luis Machado <lgustavo@codesourcery.com>
5311
5312 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5313 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5314 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5315 PT_TEXT_END_ADDR guards. Update comments.
5316 (linux_target_op) <read_offsets>: Conditionally define to
5317 linux_read_offsets if the target is UCLIBC and if it defines
5318 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5319
68f5f838
SL
53202013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5321 Andrew Jenner <andrew@codesourcery.com>
5322
5323 * Makefile.in (SFILES): Add linux-nios2-low.c.
5324 (clean): Add action to delete nios2-linux.c.
5325 (nios2-linux.c): New rule.
5326 * configure.srv: Add nios2*-*-linux*.
5327 * linux-nios2-low.c: New.
5328
1ebff1fd
HAQ
53292013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5330
5331 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5332
f6150862
HZ
53332013-04-25 Hui Zhu <hui@codesourcery.com>
5334
5335 PR gdb/15186
f6150862
HZ
5336 * ax.c (ax_printf): Add fflush.
5337
614c279d
TT
53382013-04-22 Tom Tromey <tromey@redhat.com>
5339
5340 * Makefile.in (SFILES): Add filestuff.c.
5341 (OBS): Add filestuff.o.
5342 (filestuff.o): New target.
5343 * config.in, configure: Rebuild.
5344 * configure.ac: Check for fdwalk, pipe2.
5345
7d4e5717
PA
53462013-04-17 Pedro Alves <palves@redhat.com>
5347
5348 * configure.ac (USE_THREAD_DB): Delete variable.
5349 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5350 Don't AC_SUBST USE_THREAD_DB.
5351 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5352 * config.in, configure: Regenerate.
5353
d5c93e41
PA
53542013-04-16 Pedro Alves <palves@redhat.com>
5355
5356 * linux-low.h (struct lwp_info) <thread_known>: Move under
5357 the USE_THREAD_DB #ifdef.
5358
04f5fe89
PA
53592013-04-16 Pedro Alves <palves@redhat.com>
5360
5361 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5362 (linux-low.o): Delete rule.
5363 * linux-low.h: Always include "gdb_thread_db.h" instead of
5364 conditionally including thread_db.h.
5365 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5366 HAVE_THREAD_DB_H.
5367
480b27bf
JK
53682013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5369
5370 * Makefile.in (install-only): Fix make install regression.
5371
43662968
JK
53722013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5373
5374 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5375 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5376 installation.
5377 * gdbserver.1: Remove.
5378
3e74e146
PA
53792013-03-22 Pedro Alves <palves@redhat.com>
5380
5381 * linux-low.c (handle_extended_wait): Don't call
5382 linux_enable_event_reporting.
5383
a8347a2a
TT
53842013-03-15 Tony Theodore <tonyt@logyst.com>
5385
5386 PR build/9098:
5387 * Makefile.in (SHELL): Use @SHELL@.
5388
eeb56fa7
SDJ
53892013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5390
5391 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5392 compiler warning.
5393
4fa7e2ff
JB
53942013-03-13 Joel Brobecker <brobecker@adacore.com>
5395
5396 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5397 Remove extraneous NULL element.
5398
8ddb1965
YQ
53992013-03-13 Yao Qi <yao@codesourcery.com>
5400
5401 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5402 'V' block in trace frame.
5403
9accd112
MM
54042013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5405
5406 * target.h (struct target_ops): Add btrace ops.
5407 (target_supports_btrace): New macro.
5408 (target_enable_btrace): New macro.
5409 (target_disable_btrace): New macro.
5410 (target_read_btrace): New macro.
5411 * gdbthread.h (struct thread_info): Add btrace field.
5412 * server.c: Include btrace-common.h.
5413 (handle_btrace_general_set): New function.
5414 (handle_btrace_enable): New function.
5415 (handle_btrace_disable): New function.
5416 (handle_general_set): Call handle_btrace_general_set.
5417 (handle_qxfer_btrace): New function.
5418 (struct qxfer qxfer_packets[]): Add btrace entry.
5419 * inferiors.c (remove_thread): Disable btrace.
5420 * linux-low: Include linux-btrace.h.
5421 (linux_low_enable_btrace): New function.
5422 (linux_low_read_btrace): New function.
5423 (linux_target_ops): Add btrace ops.
5424 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5425 Add srv_linux_btrace=yes.
5426 (x86_64-*-linux*): Add linux-btrace.o.
5427 Add srv_linux_btrace=yes.
5428 * configure.ac: Define HAVE_LINUX_BTRACE.
5429 * config.in: Regenerated.
5430 * configure: Regenerated.
5431
5cc22e4c
MM
54322013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5433
5434 * server.c (handle_qxfer): Preserve error message if -3 is
5435 returned.
5436 (qxfer): Document the -3 return value.
5437
7c97f91e
MM
54382013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5439
5440 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5441 (linux_btrace_h): New variable.
5442 (linux-btrace.o): New rule.
5443
be9a119c 54442013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
5445 Hafiz Abid Qadeer <abidh@codesourcery.com>
5446
5447 * tracepoint.c (trace_buffer_size): New global.
5448 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5449 (init_trace_buffer): Change to one-argument function. Allocate
5450 trace buffer memory.
5451 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5452 handle QTBuffer:size packet.
5453 (cmd_bigqtbuffer_size): New function.
5454 (initialize_tracepoint): Call init_trace_buffer with
5455 DEFAULT_TRACE_BUFFER_SIZE.
5456 * server.c (handle_query): Add QTBuffer:size in the
5457 supported packets.
5458
e64f7499
YQ
54592013-03-07 Yao Qi <yao@codesourcery.com>
5460
5461 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5462 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5463 of -1.
5464 (cmd_qtsp): Adjust condition. Do post increment.
5465 Set cur_action and cur_step_action back to 0.
5466
f0ae6fc3
PA
54672013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5468
5469 PR server/15236
5470 * linux-low.c (linux_write_memory): Return early success if LEN is
5471 zero.
5472
b5b0b0af
CV
54732013-03-05 Corinna Vinschen <vinschen@redhat.de>
5474
334ad4a8 5475 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 5476
589bc927
TT
54772013-02-28 Tom Tromey <tromey@redhat.com>
5478
5479 * configure.ac: Invoke AC_SYS_LARGEFILE.
5480 * configure, config.in: Rebuild.
5481
dfe07582
CV
54822013-02-28 Corinna Vinschen <vinschen@redhat.com>
5483
5484 * win32-low.c: Throughout, fix format strings and casts of
5485 printf-like functions to avoid type related warnings on all
5486 platforms.
5487 (get_child_debug_event): Print dwDebugEventCode as hex since
5488 that's how it's usually documented.
5489
736cd585
YQ
54902013-02-28 Yao Qi <yao@codesourcery.com>
5491
5492 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5493 pulongest.
5494
e1f58301
JW
54952013-02-27 Jiong Wang <jiwang@tilera.com>
5496
5497 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5498 (reg-tilegx32.c): New rule.
5499 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5500 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5501 different register info initializer according to elf class.
5502 (init_registers_tilgx32): New function. The tilegx32 register info
5503 initializer.
5504 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5505 (tile_store_gregset): Likewise.
5506
d171ca78
YQ
55072013-02-27 Yao Qi <yao@codesourcery.com>
5508
5509 * server.c (process_point_options): Print debug message when
5510 debug_threads is true.
5511
282bbdf3
YQ
55122013-02-26 Yao Qi <yao@codesourcery.com>
5513
5514 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5515
aca22551
PA
55162013-02-19 Pedro Alves <palves@redhat.com>
5517 Kai Tietz <ktietz@redhat.com>
5518
5519 PR gdb/15161
5520
5521 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5522 instead of strtoul to extract address from packet.
5523 (process_serial_event) <'z'>: Likewise.
5524
4f3cee1c
YQ
55252013-02-18 Yao Qi <yao@codesourcery.com>
5526
5527 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5528
8e1d55a3
PA
55292013-02-14 Pedro Alves <palves@redhat.com>
5530
5531 Plug memory leak.
5532
5533 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5534 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5535
458820da
PA
55362013-02-14 Pedro Alves <palves@redhat.com>
5537
5538 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5539
baea0dae
PA
55402013-02-14 Pedro Alves <palves@redhat.com>
5541
5542 * tracepoint.c (save_string): Delete.
5543 (add_tracepoint_action): Use savestring instead of save_string.
5544
0b1afbb3
PA
55452013-02-12 Pedro Alves <palves@redhat.com>
5546
5547 * linux-xtensa-low.c: Ditto.
5548 * xtensa-xtregs.c: Ditto.
5549
8a4ac37e
PA
55502013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5551
5552 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5553 thread_db.
5554
148de6bb
MS
55552013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5556
5557 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5558 aarch64_num_wp_regs and aarch64_num_bp_regs to
5559 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5560
55fac6e0
MS
55612013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5562
5563 * linux-aarch64-low.c (ps_get_thread_area): Replace
5564 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5565
176eb98c
MS
55662013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5567 Marcus Shawcroft <marcus.shawcroft@arm.com>
5568 Nigel Stephens <nigel.stephens@arm.com>
5569 Yufeng Zhang <yufeng.zhang@arm.com>
5570
5571 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5572 (aarch64.c, aarch64-without-fpu.c): New targets.
5573 * configure.srv (aarch64*-*-linux*): New.
5574 * linux-aarch64-low.c: New file.
5575
56f7af9c
MS
55762013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5577
43aaf8b6 5578 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5579 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5580 (dequeue_one_deferred_signal, linux_resume_one_thread)
5581 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5582 (linux_tracefork_grandchild, linux_test_for_tracefork)
5583 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5584 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5585 where the argument is 0.
5586
60f662b0
YQ
55872013-01-25 Yao Qi <yao@codesourcery.com>
5588
5589 * event-loop.c: Include "queue.h".
5590 (gdb_event_p): New typedef.
5591 (struct gdb_event) <next_event>: Remove.
5592 (event_queue): Change to QUEUE(gdb_event_p).
5593 (async_queue_event): Remove.
5594 (gdb_event_xfree): New.
5595 (initialize_event_loop): New.
5596 (process_event): Use API from QUEUE.
5597 (wait_for_event): Likewise.
5598 * server.c (main): Call initialize_event_loop.
5599 * server.h (initialize_event_loop): Declare.
5600
5ae4861a
YQ
56012013-01-18 Yao Qi <yao@codesourcery.com>
5602
5603 * ax.h (struct eval_agent_expr_context): New.
5604 (gdb_eval_agent_expr): Update declaration.
5605 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5606 TFRAME. Add new argument CTX.
5607 * server.h (struct eval_agent_expr_context): Declare.
5608 (agent_mem_read, agent_tsv_read): Update declaration.
5609 (agent_mem_read_string): Likewise.
5610 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5611 (add_traceframe_block): Add new argument TPOINT.
5612 Increase TPOINT->traceframe_usage.
5613 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5614 eval_tracepoint_agent_expr.
5615 (condition_true_at_tracepoint): Likewise.
5616 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5617 (agent_mem_read_string, agent_tsv_read): Likewise.
5618
85e00e85
YQ
56192013-01-16 Yao Qi <yao@codesourcery.com>
5620
5621 * linux-low.c (linux_resume_one_lwp): Don't check
5622 'lwp->bp_reinsert != 0'.
5623
4039cf45
JB
56242013-01-07 Joel Brobecker <brobecker@adacore.com>
5625 Pedro Alves <palves@redhat.com>
5626
5627 * lynx-low.c (ptrace_request_to_str): Define a temporary
5628 macro and use it to simplify this function's implementation.
5629
9044dee2
JB
56302013-01-07 Joel Brobecker <brobecker@adacore.com>
5631
5632 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5633 sets errno.
5634
e6352c8f
JB
56352013-01-07 Joel Brobecker <brobecker@adacore.com>
5636
5637 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5638
50681a27
JB
56392013-01-07 Joel Brobecker <brobecker@adacore.com>
5640
5641 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5642
3f6e77ef
JB
56432013-01-07 Joel Brobecker <brobecker@adacore.com>
5644
5645 * lynx-low.c (lynx_resume): Use the resume_info parameter
5646 to determine the ptid for the lynx_ptrace call, unless
5647 it is equal to minus_one_ptid, in which case we use the
5648 ptid of the current_inferior.
5649 (lynx_wait_1): After having received a thread create/exit
5650 event, resume the inferior's execution using the signaling
5651 thread's ptid, rather than the old ptid.
5652
7fda33ae
JB
56532013-01-07 Joel Brobecker <brobecker@adacore.com>
5654
5655 * lynx-low.c (lynx_resume): Delete variable ret.
5656
b9786c74
JB
56572013-01-01 Joel Brobecker <brobecker@adacore.com>
5658
5659 * gdbreplay.c (gdbreplay_version): Update copyright year.
5660 * server.c (gdbserver_version): Likewise.
5661
8b93d60f
JB
56622012-12-17 Joel Brobecker <brobecker@adacore.com>
5663
5664 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5665 new thread.
5666
037335a7
JB
56672012-12-17 Joel Brobecker <brobecker@adacore.com>
5668
5669 * lynx-low.c (ptrace_request_to_str): Add handling for
5670 PTRACE_GETTRACESIG.
5671
52d4cbd8
JB
56722012-12-17 Joel Brobecker <brobecker@adacore.com>
5673
5674 * lynx-low.c (lynx_attach): Delete variable new_process.
5675
ab8f6ca9
JB
56762012-12-17 Joel Brobecker <brobecker@adacore.com>
5677
5678 * lynx-low.c (lynx_create_inferior): Delete variable
5679 new_process.
5680
78cbc024
JB
56812012-12-17 Joel Brobecker <brobecker@adacore.com>
5682
5683 * lynx-low.c (ptrace_request_to_str): Do not handle
5684 PTRACE_GETTHREADLIST if this macro does not exist.
5685
14a00470
YQ
56862012-12-15 Yao Qi <yao@codesourcery.com>
5687
5688 * Makefile.in (OBS): Add notif.o.
5689 * notif.c, notif.h: New.
5690 * server.c: Include "notif.h".
5691 (struct vstop_notif) <next>: Remove.
5692 <base>: New field.
5693 (queue_stop_reply): Update.
5694 (push_event, send_next_stop_reply): Remove.
5695 (discard_queued_stop_replies): Update.
5696 (notif_stop): New variable.
5697 (handle_v_stopped): Remove.
5698 (handle_v_requests): Don't call handle_v_stopped. Call
5699 handle_ack_notif instead.
5700 (queue_stop_reply_callback): Call notif_event_enque instead
5701 of queue_stop_reply.
5702 (handle_status): Don't call send_next_stop_reply, call
5703 notif_write_event instead.
5704 (kill_inferior_callback): Likewise.
5705 (detach_or_kill_inferior_callback): Likewise.
5706 (main): Call initialize_notif.
5707 (process_serial_event): Call QUEUE_is_empty.
5708 (handle_target_event): Call notif_push instead of push event.
5709 * server.h (push_event): Remove declaration.
5710
61c125b9
TT
57112012-12-10 Tom Tromey <tromey@redhat.com>
5712
5713 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5714 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5715 macros.
5716 (.c.o): Rewrite.
5717 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5718 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5719 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5720 (amd64-linux-ipa.o, ax.o): Rewrite.
5721 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5722 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5723 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5724 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5725 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5726 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5727 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5728 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5729 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5730 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5731 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5732 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5733 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5734 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5735 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5736 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5737 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5738 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5739 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5740 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5741 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5742 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5743 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5744 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5745 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5746 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5747 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5748 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5749 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5750 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5751 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5752 (reg-tilegx.o): Remove.
5753 (all_object_files): New macro.
5754 Include .deps files.
5755 * aclocal.m4, configure: Rebuild.
5756 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5757 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5758 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5759
e90e9ad9
TT
57602012-12-05 Tom Tromey <tromey@redhat.com>
5761
5762 PR gdb/14917:
5763 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5764
02d403bf 57652012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
5766
5767 * configure.ac: Check for linux/perf_event.h.
5768 * config.in: Regenerated.
5769 * configure: Regenerated.
5770
0270a750
PA
57712012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5772
5773 * hostio.c (handle_readlink): Decrease buffer size
5774 parameter passed to readlink by one byte.
5775
8c29b58e
YQ
57762012-11-26 Yao Qi <yao@codesourcery.com>
5777
5778 * configure.ac (build_warnings): Append '-Wempty-body'.
5779 * configure: Regenerated.
5780 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5781 body.
5782
8bdce1ff
PM
57832012-11-15 Pierre Muller <muller@sourceware.org>
5784
5785 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5786 * config.in: Regenerate.
5787 * configure: Regenerate.
5788 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5789 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5790 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5791 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5792 header.
5793 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5794 instead of <sys/wait.h> header.
5795 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5796
02d403bf 57972012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
5798
5799 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5800 (various make rules): Remove -DGDBSERVER
5801
fbd5db48
YQ
58022012-11-09 Yao Qi <yao@codesourcery.com>
5803
5804 * spu-low.c (current_ptid): Move it to ..
5805 * gdbthread.h: ... here. New.
5806 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5807 * server.c (myresume, process_serial_event): Likewise.
5808 * thread-db.c (thread_db_find_new_threads): Likewise.
5809 * tracepoint.c (run_inferior_command): Likewise.
5810
b3dc46ff
AB
58112012-10-01 Andrew Burgess <aburgess@broadcom.com>
5812
5813 * server.c (handle_search_memory_1): Include access length in
5814 warning message.
5815
07c04788
HPN
58162012-09-05 Michael Brandt <michael.brandt@axis.com>
5817
5818 * linux-crisv32-low.c: Fix compile errors.
5819
918d227b
YQ
58202012-09-04 Yao Qi <yao@codesourcery.com>
5821
5822 * tracepoint.c (cmd_qtsv): Adjust debug message.
5823 Don't check CUR_TPOINT.
5824
18c1b81a
YQ
58252012-08-28 Yao Qi <yao@codesourcery.com>
5826
5827 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5828 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5829 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5830 Remove declarations of xmalloc, xreallloc, xstrdup and
5831 freeargv.
5832 * Makefile.in (libiberty_h): New.
5833 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5834 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5835
dc82f37b
YQ
58362012-08-23 Yao Qi <yao@codesourcery.com>
5837
5838 * server.h: Remove declaration of 'xsnprintf'.
5839
406b1477
KS
58402012-08-22 Keith Seitz <keiths@redhat.com>
5841
5842 * server.h: Include build-gnulib-gbserver/config.h.
5843 * gdbreplay.c: Likewise.
5844
e6712ff1
DE
58452012-08-08 Doug Evans <dje@google.com>
5846
5847 * Makefile.in (SFILES): Add gdb_vecs.c.
5848 (OBS): Add gdb_vecs.o.
5849 (gdb_vecs_h, host_defs_h): New variables.
5850 (thread-db.o): Add $(gdb_vecs_h) dependency.
5851 (gdb_vecs.o): New rule.
5852 * thread-db.c: #include "gdb_vecs.h".
5853 (thread_db_load_search): Use a vector to iterate over path elements.
5854 Handle text appearing after "$pdir".
5855
5856 * configure.ac: Add check for strstr.
5857 * config.in: Regenerate.
5858 * configure: Regenerate.
5859
7c3270ae
UW
58602012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5861
5862 * hostio.c (handle_pread): If pread fails, fall back to attempting
5863 lseek/read.
5864 (handle_pwrite): Likewise for pwrite.
5865
b62e2b27
UW
58662012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5867
5868 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5869 between unsupported TYPE and unimplementable ADDR/LEN combination.
5870 (arm_insert_point): Act on new return value.
5871
78a99e91
PA
58722012-07-31 Pedro Alves <palves@redhat.com>
5873
5874 * server.c (process_point_options): Only skip tokens if we find
5875 one that is unrecognized. Don't treat 'X' specially while
5876 skipping unrecognized tokens.
5877
fcf303ab
UW
58782012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5879
5880 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5881 to 4-byte-align HW breakpoint addresses for Thumb.
5882
7255706c
YQ
58832012-07-27 Yao Qi <yao@codesourcery.com>
5884
5885 PR remote/14161.
5886
5887 * server.h: Declare gdb_agent_about_to_close.
5888 * target.c (kill_inferior): Include "agent.h".
5889 New. Send command 'kill'.
5890 * target.h (kill_inferior): Removed macro.
5891 * tracepoint.c (gdb_agent_about_to_close): New.
5892 (gdb_agent_helper_thread): Handle command 'close'.
5893 Wait endlessly until the inferior stops.
5894 Install gdb_agent_remove_socket to atexit hook.
5895 (agent_socket_name): New static variable.
5896 (gdb_agent_socket_init): Replace local variable 'name' with
5897 'agent_socket_name'.
5898 (gdb_agent_remove_socket): New.
5899
5a3f286f
YQ
59002012-07-27 Yao Qi <yao@codesourcery.com>
5901
5902 * server.c (process_point_options): Stop at 'X' when parsing.
5903
961bd387
ME
59042012-07-19 Michael Eager <eager@eagercon.com>
5905
a261b8f5 5906 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
5907 to hw_execute.
5908 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5909 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5910 hardware breakpoint.
5911
aa7c7447
JK
59122012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5913
5914 * gdbserver/linux-low.c (initialize_low): Call
5915 linux_ptrace_init_warnings.
5916
7f216e7c
DE
59172012-07-02 Doug Evans <dje@google.com>
5918
5919 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5920 pointer to int.
5921
d3ce09f5
SS
59222012-07-02 Stan Shebs <stan@codesourcery.com>
5923
5924 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5925 (ax.o): Add it to build rule.
5926 (ax-ipa.o): Ditto.
5927 (OBS): Add format.o.
5928 (IPA_OBS): Add format.o.
5929 * server.c (handle_query): Claim support for breakpoint commands.
5930 (process_point_options): Add command case.
5931 (process_serial_event): Leave running if there are printfs in
5932 effect.
5933 * mem-break.h (any_persistent_commands): Declare.
5934 (add_breakpoint_commands): Declare.
5935 (gdb_no_commands_at_breakpoint): Declare.
5936 (run_breakpoint_commands): Declare.
5937 * mem-break.c (struct point_command_list): New struct.
5938 (struct breakpoint): New field command_list.
5939 (any_persistent_commands): New function.
5940 (add_commands_to_breakpoint): New function.
5941 (add_breakpoint_commands): New function.
5942 (gdb_no_commands_at_breakpoint): New function.
5943 (run_breakpoint_commands): New function.
5944 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5945 locally.
5946 * ax.c: Include format.h.
5947 (ax_printf): New function.
5948 (gdb_eval_agent_expr): Add printf opcode.
5949
2f8f6aed
YQ
59502012-06-13 Yao Qi <yao@codesourcery.com>
5951
5952 * server.c (start_inferior): Remove duplicated writes to fields
5953 'last_resume_kind' and 'last_status' of 'current_inferior'.
5954
0c9070b3
YQ
59552012-06-12 Yao Qi <yao@codesourcery.com>
5956 Pedro Alves <palves@redhat.com>
5957
5958 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5959 comment.
5960 * server.c (handle_v_cont): Extend comment.
5961
c52daf70
YQ
59622012-06-11 Yao Qi <yao@codesourcery.com>
5963
5964 * linux-low.c (linux_attach): Add 'static'.
5965
d38bbb0a
YQ
59662012-06-06 Yao Qi <yao@codesourcery.com>
5967
5968 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5969
89dc0afd
JK
59702012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5971
5972 Fix gcc -flto compilation warning.
5973 * server.c (main): Make variable multi_mode and attach volatile.
5974
75f62ce7
TJB
59752012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5976
5977 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5978 if the platform doesn't know about it.
5979
65f479b6
PA
59802012-05-30 Jeff Kenton <jkenton@tilera.com>
5981
5982 * Makefile.in (SFILES): Add linux-tile-low.c.
5983 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5984 * configure.srv: Handle tilegx-*-linux*.
5985 * linux-tile-low.c: New file.
5986
0c5bf5a9
JK
59872012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5988
5989 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5990
a493e3e2
PA
59912012-05-24 Pedro Alves <palves@redhat.com>
5992
5993 PR gdb/7205
5994
43aaf8b6 5995 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 5996
2ea28649
PA
59972012-05-24 Pedro Alves <palves@redhat.com>
5998
5999 PR gdb/7205
6000
6001 Replace target_signal with gdb_signal throughout.
6002
8d409d16
MR
60032012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6004
6005 * linux-low.c (linux_store_registers): Avoid the copying sequence
6006 when no data has been retrieved by ptrace.
6007
23512c01
MGD
60082012-05-22 Will Deacon <will.deacon@arm.com>
6009
6010 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6011 Include asm/ptrace.h.
6012 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6013 already defined.
6014
4934b29e
MR
60152012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6016
6017 * linux-low.c (linux_store_registers): Don't re-retrieve data
6018 with ptrace that has already been obtained from /proc. Always
6019 copy any data retrieved with ptrace to the buffer supplied.
6020
bde24c0a
PA
60212012-05-11 Yao Qi <yao@codesourcery.com>
6022 Pedro Alves <palves@redhat.com>
6023
6024 * linux-low.c (enum stopping_threads_kind): New.
6025 (stopping_threads): Change type to `enum stopping_threads_kind'.
6026 (handle_extended_wait): If stopping and suspending threads, leave
6027 the new_lwp suspended too.
6028 (linux_wait_for_event): Adjust.
6029 (stop_all_lwps): Set `stopping_threads' to
6030 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6031 whether we're suspending threads or just stopping them. Assert no
6032 recursion happens.
6033
623b6bdf
YQ
60342012-04-29 Yao Qi <yao@codesourcery.com>
6035
6036 * server.h: Move some code to ...
6037 * gdbthread.h: ... here. New.
6038 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6039 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6040 (nto-low.o, win32-low.o): Likewise.
6041 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6042 * regcache.c, remote-utils.c, server.c: Likewise.
6043 * target.c, tracepoint.c, win32-low.c: Likewise.
6044
f15f9948
TJB
60452012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6046
6047 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6048 (PTRACE_ARG4_TYPE): Likewise.
6049 (PTRACE_XFER_TYPE): Likewise.
6050 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6051 ptrace to PTRACE_ARG3_TYPE.
6052 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6053 (PTRACE_ARG4_TYPE): Likewise.
6054 (PTRACE_XFER_TYPE): Likewise.
6055 (linux_detach_one_lwp): Cast fourth argument of
6056 ptrace to long then PTRACE_ARG4_TYPE.
6057 (regsets_fetch_inferior_registers): Cast third argument of
6058 ptrace to long then PTRACE_ARG3_TYPE.
6059 (regsets_store_inferior_registers): Likewise.
6060
38ea300a
PA
60612012-04-20 Pedro Alves <palves@redhat.com>
6062
6063 * configure: Regenerate.
6064
c971b7fa
PA
60652012-04-19 Pedro Alves <palves@redhat.com>
6066
43aaf8b6 6067 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 6068 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
6069 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6070 (all, install-only, uninstall, clean-info, all-lib, clean): No
6071 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6072 (maintainer-clean realclean distclean): Use subdir_do.
6073 (subdir_do): New.
6074 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 6075 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
6076 * acinclude.m4: Include acx_configure_dir.m4.
6077 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6078 calls. Call AC_PROG_RANLIB. Configure gnulib using
6079 ACX_CONFIGURE_DIR.
6080 (GNULIB): New.
6081 (GNULIB_STDINT_H): Adjust.
6082 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6083 * gdbreplay.c: Include build-gnulib/config.h.
6084 * server.h: Likewise.
6085 * aclocal.m4: Regenerate.
6086 * config.in: Regenerate.
6087 * configure: Regenerate.
c971b7fa 6088
809277f8
PA
60892012-04-19 Pedro Alves <palves@redhat.com>
6090
6091 * Makefile.in (LIBGNU, INCGNU): Adjust.
6092 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6093 (all, install-only, uninstall, clean-info, all-lib, clean)
6094 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6095 * configure.ac: Adjust AC_OUTPUT output.
6096 * aclocal.m4: Regenerate.
6097 * configure: Regenerate.
6098
fd9bb8b8
PA
60992012-04-19 Pedro Alves <palves@redhat.com>
6100
6101 * Makefile.in (generated_files): New.
6102 (server_h): Remove the explicit dependency on config.h, and depend
6103 on $generated_files.
6104
1c298c66
PA
61052012-04-19 Pedro Alves <palves@redhat.com>
6106
6107 * Makefile.in (INCGNU): Add -Ignulib.
6108
57c4b50b
PA
61092012-04-19 Pedro Alves <palves@redhat.com>
6110
6111 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6112 (INCGNU): ... this, and spell out -I here.
6113 (GNULIB_LIB): Rename to ...
6114 (LIBGNU): ... this.
6115 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6116
1030e047
PA
61172012-04-19 Pedro Alves <palves@redhat.com>
6118
6119 * config.in: Regenerate.
6120
447d4319
PA
61212012-04-19 Pedro Alves <palves@redhat.com>
6122
6123 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6124 * server.h (memmem): Remove declaration.
6125 * config.in: Regenerate.
6126 * configure: Regenerate.
6127
aad9eab9
YQ
61282012-04-19 Yao Qi <yao@codesourcery.com>
6129
6130 * Makefile.in (SFILES): Add common/vec.c.
6131 (OBS): Add vec.o.
6132 (vec.o): New rule.
6133
3e10640f
YQ
61342012-04-19 Yao Qi <yao@codesourcery.com>
6135
6136 * remote-utils.c (prepare_resume_reply): Replace with macro
6137 target_core_of_thread.
6138 * server.c (handle_qxfer_threads_proper): Likewise.
6139 * target.h (traget_core_of_thread): New macro.
6140
71622373
PA
61412012-04-18 Pedro Alves <palves@redhat.com>
6142
6143 * aclocal.m4: Regenerate.
6144 * configure: Regenerate.
6145
80d26939
YQ
61462012-04-16 Yao Qi <yao@codesourcery.com>
6147
6148 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6149 duplicated on address.
6150
42476b70
YQ
61512012-04-16 Yao Qi <yao@codesourcery.com>
6152
6153 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6154 (struct tracepoint_action_ops) <send>: New field.
6155 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6156 (agent_expr_send, x_tracepoint_action_send): New.
6157 (l_tracepoint_action_send): New.
6158 (cmd_qtdp): Download and install tracepoint
6159 according to `use_agent'.
6160 (run_inferior_command): Add one more parameter `len'.
6161 Update callers.
6162 (tracepoint_send_agent): New.
6163 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6164
7bc83639
YQ
61652012-04-16 Yao Qi <yao@codesourcery.com>
6166
6167 * tracepoint.c (download_tracepoints): Moved to ...
6168 (cmd_qtstart): ... here.
6169
5f18041e
YQ
61702012-04-14 Yao Qi <yao@codesourcery.com>
6171
6172 * tracepoint.c: Include inttypes.h.
6173 (struct collect_memory_action): Use sized types.
6174 (struct tracepoint): Likewise.
6175 (cmd_qtdp, stop_tracing): Update print specifiers.
6176 (cmd_qtp, response_tracepoint): Likewise.
6177 (collect_data_at_tracepoint): Likewise.
6178 (collect_data_at_step): Likewise.
6179
55a8c076
YQ
61802012-04-14 Yao Qi <yao@codesourcery.com>
6181
6182 Import gnulib module inttypes.
6183 * aclocal.m4, config.in, configure: Regenerated.
6184
dc750257
YQ
61852012-04-14 Yao Qi <yao@codesourcery.com>
6186
6187 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6188 Makefile and config.status at last.
6189
0ab5faf9
YQ
61902012-04-13 Yao Qi <yao@codesourcery.com>
6191
6192 * tracepoint.c: Include stdint.h unconditionally.
6193
18f5fd81
TJB
61942012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6195
6196 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6197 on BFD_HAVE_SYS_PROCFS_TYPE.
6198 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6199 * configure: Regenerate.
6200 * config.in: Likewise.
6201
4d47af5c
L
62022012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6203
6204 * Makefile.in (clean): Also remove x32.c x32-linux.c
6205 x32-avx.c x32-avx-linux.c.
6206 (x32.o): New target.
6207 (x32.c): Likewise.
6208 (x32-linux.o): Likewise.
6209 (x32-linux.c): Likewise.
6210 (x32-avx.o): Likewise.
6211 (x32-avx.c): Likewise.
6212 (x32-avx-linux.o): Likewise.
6213 (x32-avx-linux.c): Likewise.
6214
6215 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6216 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6217 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6218 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6219 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6220 i386/x32-avx-linux.xml.
6221
6222 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6223 (init_registers_x32_avx_linux): Likwise.
6224 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6225 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6226
ecedbe58
PA
62272012-04-13 Pedro Alves <palves@redhat.com>
6228
6229 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6230 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6231 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6232 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6233 the sub-make.
6234
c92b5177
L
62352012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6236
6237 * linux-x86-low.c (compat_x32_clock_t): New.
6238 (compat_x32_siginfo_t): Likewise.
6239 (compat_x32_siginfo_from_siginfo): Likewise.
6240 (siginfo_from_compat_x32_siginfo): Likewise.
6241 (linux_is_elf64): Likewise.
6242 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6243 and siginfo_from_compat_x32_siginfo for x32.
6244 (x86_arch_setup): Set linux_is_elf64.
6245
214d508e
L
62462012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6247
6248 PR gdb/13969
6249 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6250 e_machine field.
6251 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6252 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6253 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6254 compatible with process.
6255
c9a1864a
YQ
62562012-04-12 Yao Qi <yao@codesourcery.com>
6257
6258 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6259 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6260 (install-only, install-info, clean): Handle sub dir gnulib.
6261 (all-lib, am--refresh): New targets.
6262 (memmem.o): Remove target.
6263 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6264 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6265 (AC_REPLACE_FUNCS): Remove memmem.
6266 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6267 (AC_OUTPUT): Generate Makefile in gnulib/.
6268 * aclocal.m4, config.in, configure: Regenerated.
6269
367ba2c2
MR
62702012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6271
6272 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6273
9d236627
PA
62742012-04-05 Pedro Alves <palves@redhat.com>
6275
6276 -Werror=strict-aliasing
6277
6278 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6279 pointer.
6280
111217b3
PA
62812012-04-04 Pedro Alves <palves@redhat.com>
6282
6283 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6284 (sparc_store_gregset_from_stack, sparc_store_gregset)
6285 (sparc_breakpoint_at): Fix formatting.
6286
8365dcf5
TJB
62872012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6288
6289 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6290 are available.
6291 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6292 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6293 * config.in: Regenerate.
6294 * configure: Likewise.
6295
689cc2ae
PA
62962012-03-29 Pedro Alves <palves@redhat.com>
6297
6298 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6299 Correct ptrace arguments.
6300
c14dfd32
PA
63012012-03-28 Pedro Alves <palves@redhat.com>
6302
6303 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6304 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6305 (IA64_FR1_REGNUM): New defines.
6306 (ia64_fetch_register): New.
6307 (the_low_target): Install it.
6308 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6309 field.
6310 * linux-low.c (linux_fetch_registers): Try the
6311 the_low_target.fetch_register hook first.
6312
6313 * linux-arm-low.c (the_low_target): Adjust.
6314 * linux-bfin-low.c (the_low_target): Adjust.
6315 * linux-cris-low.c (the_low_target): Adjust.
6316 * linux-crisv32-low.c (the_low_target): Adjust.
6317 * linux-m32r-low.c (the_low_target): Adjust.
6318 * linux-m68k-low.c (the_low_target): Adjust.
6319 * linux-mips-low.c (the_low_target): Adjust.
6320 * linux-ppc-low.c (the_low_target): Adjust.
6321 * linux-s390-low.c (the_low_target): Adjust.
6322 * linux-sh-low.c (the_low_target): Adjust.
6323 * linux-sparc-low.c (the_low_target): Adjust.
6324 * linux-tic6x-low.c (the_low_target): Adjust.
6325 * linux-x86-low.c (the_low_target): Adjust.
6326 * linux-xtensa-low.c (the_low_target): Adjust.
6327
63c88e13
PA
63282012-03-26 Pedro Alves <palves@redhat.com>
6329
6330 * server.c (handle_qxfer_libraries): Don't bail early if
6331 the_target->qxfer_libraries_svr4 is not NULL.
6332
fb723180
PA
63332012-03-26 Pedro Alves <palves@redhat.com>
6334
6335 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6336
0afae3cf
PA
63372012-03-23 Pedro Alves <palves@redhat.com>
6338
6339 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6340 "library-list-svr4" element's start tag when the the DSO list is
6341 empty.
6342
485f1ee4
PA
63432012-03-23 Pedro Alves <palves@redhat.com>
6344
6345 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6346 a variable whose type size is the same as the inferior's pointer
6347 size.
6348
a5362b9a
TS
63492012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6350
6351 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6352 struct siginfo.
6353 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6354 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6355 * linux-low.h: Include <signal.h>.
6356 (struct siginfo): Remove forward declaration.
6357 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6358 struct siginfo.
6359
d226c142
MF
63602012-03-21 Mike Frysinger <vapier@gentoo.org>
6361
6362 * .gitignore: Ignore more files.
6363
122f36ef
PA
63642012-03-19 Pedro Alves <palves@redhat.com>
6365 Jan Kratochvil <jan.kratochvil@redhat.com>
6366
6367 * server.c (cont_thread, general_thread): Add describing comments.
6368 (start_inferior): Clear `cont_thread'.
6369 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6370 of a process.
6371
fc3e5175
YQ
63722012-03-15 Yao Qi <yao@codesourcery.com>
6373
6374 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6375 handling to ...
6376 (cmd_qtdp): ... here.
6377
8d0d92cd
YQ
63782012-03-15 Yao Qi <yao@codesourcery.com>
6379
6380 * tracepoint.c (struct tracepoint_action_ops): New.
6381 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6382 (m_tracepoint_action_download): New.
6383 (r_tracepoint_action_download): New.
6384 (x_tracepoint_action_download): New.
6385 (l_tracepoint_action_download): New.
6386 (add_tracepoint_action): Install `action->ops' according type.
6387 (download_tracepoint_1): Move code `download' function pointer
6388 of various tracepoint_action_ops.
6389
87b0bb13
JK
63902012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6391
6392 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6393 linux_ptrace_attach_warnings.
6394
5f572dec
JK
63952012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6396
6397 * Makefile.in (linux-ptrace.o): New.
6398 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6399 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6400 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6401 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6402 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6403 of these targets.
6404 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6405
f4647387
YQ
64062012-03-08 Yao Qi <yao@codesourcery.com>
6407 Pedro Alves <palves@redhat.com>
6408
6409 Fix PR server/13392.
6410 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6411 offset of JMP insn.
6412 * tracepoint.c (remove_tracepoint): New.
6413 (cmd_qtdp): Call remove_tracepoint when failed to install.
6414
9b224c5e
PA
64152012-03-07 Pedro Alves <palves@redhat.com>
6416
6417 * linux-low.c (get_detach_signal): New.
6418 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6419 Pass on pending signals to PTRACE_DETACH. Check the result of the
6420 ptrace call.
6421 * server.c (program_signals, program_signals_p): New.
6422 (handle_general_set): Handle QProgramSignals.
6423 * server.h (program_signals, program_signals_p): Declare.
6424
e237a7e2
JK
64252012-03-05 Pedro Alves <palves@redhat.com>
6426 Jan Kratochvil <jan.kratochvil@redhat.com>
6427
6428 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6429 New comment why.
6430
5808517f
YQ
64312012-03-03 Yao Qi <yao@codesourcery.com>
6432
6433 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6434 agent_look_up_symbols.
6435
58b4daa5
YQ
64362012-03-03 Yao Qi <yao@codesourcery.com>
6437
6438 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6439 (linux-x86-low.o): Likewise.
6440 * server.h: Remove in_process_agent_loaded.
6441 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6442 common/agent.c.
6443 Update callers.
6444
8ffcbaaf
YQ
64452012-03-03 Yao Qi <yao@codesourcery.com>
6446
6447 * tracepoint.c (gdb_agent_capability): New global.
6448 (in_process_agent_loaded_ust): Renamed to
6449 `in_process_agent_supports_ust'.
6450 Update callers.
6451 (in_process_agent_supports_ust): Call agent_capability_check.
6452 (clear_installed_tracepoints): Assert that agent supports
6453 agent.
6454
d1feda86
YQ
64552012-03-03 Yao Qi <yao@codesourcery.com>
6456
6457 * linux-low.c (linux_supports_agent): New.
6458 (linux_target_ops): Initialize field `supports_agent' with
6459 linux_supports_agent.
6460 * target.h (struct target_ops) <supports_agent>: New.
6461 (target_supports_agent): New macro.
6462 * server.c (handle_general_set): Handle packet 'QAgent'.
6463 (handle_query): Send `QAgent+'.
6464 * Makefile.in (server.o): Depends on agent.h.
6465
2fa291ac
YQ
64662012-03-03 Yao Qi <yao@codesourcery.com>
6467
6468 * Makefile.in (OBS): Add agent.o.
6469 Add new rule for agent.o.
6470 Track dependence of tracepoint.c on agent.h.
6471 * tracepoint.c (run_inferior_command_1):
6472 (run_inferior_command): Call agent_run_command.
6473 (gdb_ust_connect_sync_socket): Deleted. Move it to
6474 common/agent.c.
6475 (resume_thread, stop_thread): Likewise.
6476 (gdb_ust_socket_init): Renamed to ...
6477 (gdb_agent_socket_init): ... New.
6478 (gdb_ust_thread): Renamed to ...
6479 (gdb_agent_helper_thread): ... New.
6480 (gdb_ust_init): Move some code to ...
6481 (gdb_agent_init): ... here. New.
6482 [HAVE_UST]: Call gdb_ust_init.
6483 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6484 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6485 * config.in, configure: Regenerated.
6486
05044653
PA
64872012-03-02 Pedro Alves <palves@redhat.com>
6488
6489 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6490 * linux-low.c (struct simple_pid_list): New.
6491 (stopped_pids): New a struct simple_pid_list pointer.
6492 (add_to_pid_list, pull_pid_from_list): New.
6493 (handle_extended_wait): Don't assume the first signal new children
6494 report is SIGSTOP. Adjust call to pull_pid_from_list.
6495 (linux_wait_for_lwp): Adjust.
6496
8d00225b
YQ
64972012-03-02 Yao Qi <yao@codesourcery.com>
6498
6499 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6500 debug log.
6501
19560ba5
YQ
65022012-03-02 Yao Qi <yao@codesourcery.com>
6503
6504 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6505 `stop_pc' and `tpoint'. Update caller.
6506
1faeff08
MR
65072012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6508
6509 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6510 * linux-low.c (use_linux_regsets): New macro.
6511 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6512 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6513 (linux_register_in_regsets): New function.
6514 (usr_fetch_inferior_registers): Skip registers covered by
6515 regsets.
6516 (usr_store_inferior_registers): Likewise.
6517 (usr_fetch_inferior_registers): New macro.
6518 (usr_store_inferior_registers): Likewise.
6519 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6520 (linux_store_registers): Likewise.
6521 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6522 prototype.
6523 (init_registers_mips64_dsp_linux): Likewise.
6524 (init_registers_mips_linux): New macro.
6525 (init_registers_mips_dsp_linux): Likewise.
6526 (mips_dsp_num_regs): Likewise.
6527 (DSP_BASE, DSP_CONTROL): New fallback macros.
6528 (mips_base_regs): New macro.
6529 (mips_regmap): Use it. Fix the size.
6530 (mips_dsp_regmap): New variable.
6531 (mips_dsp_regset_bitmap): Likewise.
6532 (mips_arch_setup): New function.
6533 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6534 than mips_regmap.
6535 (mips_cannot_store_register): Likewise.
6536 (the_low_target): Update .arch_setup, .num_regs and .regmap
6537 initializers. Add .regset_bitmap initializer.
6538 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6539 initializer.
6540 * linux-bfin-low.c (the_low_target): Likewise.
6541 * linux-cris-low.c (the_low_target): Likewise.
6542 * linux-crisv32-low.c (the_low_target): Likewise.
6543 * linux-ia64-low.c (the_low_target): Likewise.
6544 * linux-m32r-low.c (the_low_target): Likewise.
6545 * linux-m68k-low.c (the_low_target): Likewise.
6546 * linux-ppc-low.c (the_low_target): Likewise.
6547 * linux-s390-low.c (the_low_target): Likewise.
6548 * linux-sh-low.c (the_low_target): Likewise.
6549 * linux-sparc-low.c (the_low_target): Likewise.
6550 * linux-tic6x-low.c (the_low_target): Likewise.
6551 * linux-x86-low.c (the_low_target): Likewise.
6552 * linux-xtensa-low.c (the_low_target): Likewise.
6553 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6554 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6555 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6556 srv_xmlfiles.
6557 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6558 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6559
c03e6ccc
YQ
65602012-02-29 Yao Qi <yao@codesourcery.com>
6561 Pedro Alves <palves@redhat.com>
6562
6563 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6564 `step_over_finished' is true.
6565
644cebc9
PA
65662012-02-27 Pedro Alves <palves@redhat.com>
6567
6568 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6569 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6570
c14d7ab2
PA
65712012-02-27 Pedro Alves <palves@redhat.com>
6572
6573 PR server/9684
6574 * linux-low.c (pid_is_stopped): New.
6575 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6576
412c89dd
LM
65772012-02-25 Luis Machado <lgustavo@codesourcery.com>
6578
6579 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6580 of conditions.
6581
b745defe
MR
65822012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6583
6584 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6585
9f3a5c85
LM
65862012-02-24 Luis Machado <lgustavo@codesourcery>
6587
6588 * server.c (handle_query): Advertise support for target-side
6589 breakpoint condition evaluation.
6590 (process_point_options): New function.
6591 (process_serial_event): When inserting a breakpoint, check for
6592 a target-side condition that should be evaluated.
6593
6594 * mem-break.c: Include regcache.h and ax.h.
6595 (point_cond_list_t): New data structure.
6596 (breakpoint) <cond_list>: New field.
6597 (find_gdb_breakpoint_at): Make non-static.
6598 (delete_gdb_breakpoint_at): Clear any target-side
6599 conditions.
6600 (clear_gdb_breakpoint_conditions): New function.
6601 (add_condition_to_breakpoint): Likewise.
6602 (add_breakpoint_condition): Likewise.
6603 (gdb_condition_true_at_breakpoint): Likewise.
6604 (gdb_breakpoint_here): Return result directly instead
6605 of going through a local variable.
6606
6607 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6608 (clear_gdb_breakpoint_conditions): Likewise.
6609 (add_breakpoint_condition): Likewise.
6610 (gdb_condition_true_at_breakpoint): Likewise.
6611
6612 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6613 (need_step_over_p): Take target-side breakpoint condition into
6614 consideration.
6615
5e1dc496
LM
66162012-02-24 Luis Machado <lgustavo@codesourcery>
6617
6618 * server.h: Include tracepoint.h.
6619 (agent_mem_read, agent_get_trace_state_variable_value,
6620 agent_set_trace_state_variable_value,
6621 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6622 get_set_tsv_func_addr): New prototypes.
6623
6624 * ax.h: New include file.
6625 * ax.c: New source file.
6626
6627 * tracepoint.c: Include ax.h.
6628 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6629 agent_expr, eval_result_type): Move to ax.h.
6630 (parse_agent_expr): Rename to ...
6631 (gdb_parse_agent_expr): ... this, make it non-static and move
6632 to ax.h.
6633 (unparse_agent_expr) Rename to ...
6634 (gdb_unparse_agent_expr): ... this, make it non-static and move
6635 to ax.h.
6636 (eval_agent_expr): Rename to ...
6637 (eval_tracepoint_agent_expr): ... this.
6638 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6639 forward declarations.
6640 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6641 (agent_get_trace_state_variable_value): New function.
6642 (agent_set_trace_state_variable_value): New function.
6643 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6644 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6645 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6646 (condition_true_at_tracepoint): Likewise.
6647 (parse_agent_expr): Rename to ...
6648 (gdb_parse_agent_expr): ... this and move to ax.c.
6649 (unparse_agent_expr): Rename to ...
6650 (gdb_unparse_agent_expr): ... this and move to ax.c.
6651 (gdb_agent_op_name): Move to ax.c.
6652 (eval_agent_expr): Rename to ...
6653 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6654 and move to ax.c.
6655 (eval_tracepoint_agent_expr): New function.
6656 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 6657 non-static.
5e1dc496
LM
6658 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6659 ax.c.
6660 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6661 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6662 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6663 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6664 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6665 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6666 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6667 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6668 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6669 (compile_bytecodes): Remove forward declaration.
6670 (is_goto_target): Move to ax.c.
6671 (compile_bytecodes): Move to ax.c and call
6672 agent_get_trace_state_variable_value (...) and
6673 agent_set_trace_state_variable_value (...).
6674
6675 * Makefile.in: Update ax.c and IPA dependencies.
6676
277e4e52
PA
66772012-02-24 Pedro Alves <palves@redhat.com>
6678
6679 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6680 (cmd_bigqtbuffer_circular): ... this. Only handle
6681 'QTBuffer:circular:'.
6682 (handle_tracepoint_general_set): Adjust.
6683
bf4c19f7
YQ
66842012-02-16 Yao Qi <yao@codesourcery.com>
6685
6686 * inferiors.c: Move code to ...
6687 * dll.c: .... here. New.
6688 * server.h: Declare clear_dlls.
6689 * Makefile.in (SFILES): Add dll.c.
6690 (OBS): Add dll.o
6691 (dll.o): New rule.
6692
d73f2619
YQ
66932012-02-11 Yao Qi <yao@codesourcery.com>
6694
6695 * server.c: (handle_monitor_command): Add a new parameter
6696 `own_buf'.
6697 (handle_query): Update caller.
6698
f8255c2a
JB
66992012-02-09 Joel Brobecker <brobecker@adacore.com>
6700
6701 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6702 * configure, config.in: Regenerate.
6703 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6704 is not defined.
6705
da84f473
PA
67062012-02-02 Pedro Alves <palves@redhat.com>
6707
6708 Try SIGKILL first, then PTRACE_KILL.
6709 * linux-low.c (linux_kill_one_lwp): New.
6710 (linux_kill_one_lwp): Rename to ...
6711 (kill_one_lwp_callback): ... this. Use the new
6712 linux_kill_one_lwp.
6713
e886a173
PA
67142012-02-02 Pedro Alves <palves@redhat.com>
6715
6716 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6717 inferior.
6718
be07f1a2
PA
67192012-01-27 Pedro Alves <palves@redhat.com>
6720
6721 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6722 (elf_64_file_p): Make static.
6723 (linux_pid_exe_is_elf_64_file): New.
6724 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6725 Delete declarations.
6726 (linux_pid_exe_is_elf_64_file): Declare.
6727 * linux-x86-low.c (x86_arch_setup): Use
6728 linux_pid_exe_is_elf_64_file.
6729
d8301ad1
JK
67302012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6731
6732 * linux-low.c (linux_wait_for_event_1): Rename to ...
6733 (linux_wait_for_event): ... here and merge it with former
6734 linux_wait_for_event - new variable wait_ptid, use it.
6735 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6736
01b17894
PA
67372012-01-23 Pedro Alves <palves@redhat.com>
6738
6739 * server.c (main): Avoid yet another case of infinite loop while
6740 detaching/killing after a longjmp.
6741
e825046f
JK
67422012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6743
6744 Code cleanup.
6745 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6746
b9e7b9c3
UW
67472012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6748
6749 * hostio.c (handle_readlink): New function.
6750 (handle_vFile): Call it to handle "vFile:readlink" packets.
6751
901f9912
UW
67522012-01-20 Pedro Alves <palves@redhat.com>
6753 Ulrich Weigand <ulrich.weigand@linaro.org>
6754
6755 * server.c (handle_v_requests): Only support vAttach and vRun to
6756 start multiple processes when in extended protocol mode.
6757
fc1ab1a0
PA
67582012-01-17 Pedro Alves <palves@redhat.com>
6759
6760 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6761 memalign plus mprotect to allocate the scratch buffer.
6762
7d5d4e98
PA
67632012-01-13 Pedro Alves <palves@redhat.com>
6764
6765 * server.c (attach_inferior): Clear `cont_thread'.
6766
f128d5e9
PA
67672012-01-13 Pedro Alves <palves@redhat.com>
6768
6769 * server.c (main): Avoid infinite loop while detaching/killing
6770 after a longjmp.
6771
06db92f0
DE
67722012-01-09 Doug Evans <dje@google.com>
6773
6774 * server.c (start_inferior): Set last_ptid in --wrapper case.
6775
32d92999
YQ
67762012-01-06 Yao Qi <yao@codesourcery.com>
6777
6778 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6779 defined.
6780 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6781
5e0a92a9
YQ
67822012-01-04 Yao Qi <yao@codesourcery.com>
6783
6784 * tracepoint.c (cmd_qtdp): Print debug message
6785 for static tracepoint.
6786
ae639e8c
YQ
67872012-01-04 Yao Qi <yao@codesourcery.com>
6788
6789 * tracepoint.c (trace_vdebug): Differentiate debug message
6790 between gdbserver and IPA.
6791
f72429c5
YQ
67922012-01-03 Yao Qi <yao@codesourcery.com>
6793
6794 * tracepoint.c (tracepoint_was_hit): Don't collect for
6795 static tracepoint.
6796
12c3e59c
JB
67972012-01-02 Joel Brobecker <brobecker@adacore.com>
6798
6799 * terminal.h: Reformat copyright header.
6800
67827812
JB
68012012-01-02 Joel Brobecker <brobecker@adacore.com>
6802
6803 * server.c (gdbserver_version): Update copyright year.
6804 * gdbreplay.c (gdbreplay_version): Likewise.
6805
3e52c33d
JK
68062011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6807
6808 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6809
6810 Revert:
6811 2011-12-18 Hui Zhu <teawater@gmail.com>
6812 * linux-low.c (linux_create_inferior): Save return value to ret.
6813
66f1260e
HZ
68142011-12-18 Hui Zhu <teawater@gmail.com>
6815
6816 * linux-low.c (linux_create_inferior): Save return value to ret.
6817
e77616d7
DE
68182011-12-16 Doug Evans <dje@google.com>
6819
e7b06c57
DE
6820 * linux-low.c (linux_create_inferior): If stdio connection,
6821 redirect stdin from /dev/null, stdout to stderr.
6822 * remote-utils.c (remote_is_stdio): New static global.
6823 (remote_connection_is_stdio): New function.
6824 (remote_prepare): Handle stdio connection.
6825 (remote_open): Ditto.
6826 (remote_close): Don't close stdin for stdio connections.
6827 (read_prim,write_prim): New functions. Replace all calls to
6828 read/write to these.
6829 * server.c (main): Watch for "-" argument. Move call to
6830 remote_prepare before start_inferior.
6831 * server.h (STDIO_CONNECTION_NAME): New macro.
6832 (remote_connection_is_stdio): Declare.
6833
e77616d7
DE
6834 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6835 in debugging output.
6836
82067193
YQ
68372011-12-15 Yao Qi <yao@codesourcery.com>
6838
6839 * tracepoint.c: Include sys/syscall.h.
6840 (gdb_ust_thread): Remove preprocessor conditional.
6841
82bfbe7e
PA
68422011-12-14 Pedro Alves <pedro@codesourcery.com>
6843
6844 * linux-low.c (linux_detach_one_lwp): Call
6845 the_low_target.prepare_to_resume before detaching.
6846
712c6575
YQ
68472011-12-14 Yao Qi <yao@codesourcery.com>
6848
6849 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6850 of write.
6851
d54d1edf
YQ
68522011-12-14 Yao Qi <yao@codesourcery.com>
6853
6854 * i386-low.c (i386_low_stopped_data_address): Initialize local
6855 variable `control'.
6856
6210a125
PA
68572011-12-13 Pedro Alves <pedro@codesourcery.com>
6858
6859 PR remote/13492
6860
6861 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6862 DR_CONTROL unless necessary. Extend comments.
6863 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6864 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6865
2ece8244
YQ
68662011-12-13 Yao Qi <yao@codesourcery.com>
6867
6868 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6869 macros.
6870 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6871
784867a5
JK
68722011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6873
6874 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6875 Print new debug message for such case.
6876
6bf36717
JK
68772011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6878
6879 Fix overlapping memcpy.
6880 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6881 the read_inferior_memory transfer.
6882 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6883 write_inferior_memory transfer.
6884 (set_fast_tracepoint_jump): New variable buf. Use it for the
6885 read_inferior_memory and write_inferior_memory transfers.
6886 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6887 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6888 Use it for the write_inferior_memory transfer.
6889 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6890 buffers.
6891
50275556
MR
68922011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6893
6894 * linux-low.c (fetch_register, store_register): Make code
6895 consistent, fix formatting.
6896
7325beb4
MR
68972011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6898
6899 * linux-low.c (usr_store_inferior_registers): Factor out code
6900 to handle individual registers into...
6901 (store_register): ... this new function.
6902
c642a434
UW
69032011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6904
6905 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6906 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6907 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6908 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6909 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6910 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6911 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6912 (srv_xmlfiles): Add new XML files.
6913
6914 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6915 and <sys/uio.h>.
6916 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6917 (init_registers_s390_linux32v1): Add prototype.
6918 (init_registers_s390_linux32v2): Likewise.
6919 (init_registers_s390_linux64v1): Likewise.
6920 (init_registers_s390_linux64v2): Likewise.
6921 (init_registers_s390x_linux64v1): Likewise.
6922 (init_registers_s390x_linux64v2): Likewise.
6923 (s390_num_regs): Increment to 52.
6924 (s390_regmap): Add orig_r2 register.
6925 (s390_num_regs_3264): Increment to 68.
6926 (s390_regmap_3264): Add orig_r2 register.
6927 (s390_collect_ptrace_register): Handle orig_r2 register.
6928 (s390_supply_ptrace_register): Likewise.
6929 (s390_fill_last_break): New function.
6930 (s390_store_last_break): Likewise.
6931 (s390_fill_system_call): New function.
6932 (s390_store_system_call): Likewise.
6933 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6934 register sets.
6935 (s390_check_regset): New function.
6936 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6937 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6938 Update target_regsets for available register sets.
6939
2268b414
JK
69402011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6941 Jan Kratochvil <jan.kratochvil@redhat.com>
6942
6943 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6944 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6945 New.
6946 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6947 * linux-low.h (struct process_info_private): New member r_debug.
6948 * server.c (handle_qxfer_libraries): Call
6949 the_target->qxfer_libraries_svr4.
6950 (handle_qxfer_libraries_svr4): New function.
6951 (qxfer_packets): New entry "libraries-svr4".
6952 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6953 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6954 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6955 PACKET_qXfer_libraries_svr4.
6956
d6db1fab
UW
69572011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6958
6959 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6960 PSW address/mask between 8-byte and 16-byte formats.
6961 (s390_supply_ptrace_register): Likewise.
6962 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6963 basic addressing mode bit.
6964
242f5f1c
SS
69652011-11-24 Stan Shebs <stan@codesourcery.com>
6966
6967 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6968
f196051f
SS
69692011-11-17 Stan Shebs <stan@codesourcery.com>
6970
6971 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6972 (tracing_start_time): New global.
6973 (tracing_stop_time): New global.
6974 (tracing_user_name): New global.
6975 (tracing_notes): New global.
6976 (tracing_stop_note): New global.
6977 (cmd_qtstart): Set traceframe_usage, start_time.
6978 (stop_tracing): Set stop_time.
6979 (cmd_qtstatus): Report additional status.
6980 (cmd_qtp): New function.
6981 (handle_tracepoint_query): Call it.
6982 (cmd_qtnotes): New function.
6983 (handle_tracepoint_general_set): Call it.
6984 (get_timestamp): Rename from tsv_get_timestamp.
6985
405f8e94
SS
69862011-11-14 Stan Shebs <stan@codesourcery.com>
6987 Kwok Cheung Yeung <kcy@codesourcery.com>
6988
6989 * linux-x86-low.c (small_jump_insn): New.
6990 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6991 trampoline and error message, build a trampoline and issue a small
6992 jump instruction to it.
6993 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6994 trampoline and error message.
6995 (x86_get_min_fast_tracepoint_insn_len): New.
6996 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6997 * linux-low.h (struct linux_target_ops): Add arguments to
6998 install_fast_tracepoint_jump_pad operation, add new operation.
6999 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7000 arguments.
7001 (linux_get_min_fast_tracepoint_insn_len): New function.
7002 (linux_target_op): Add new operation.
7003 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7004 (gdb_trampoline_buffer_end): Ditto.
7005 (gdb_trampoline_buffer_error): Ditto.
7006 (struct ipa_sym_addresses): Add fields for new IPA variables.
7007 (symbol_list): Add entries for new IPA variables.
7008 (struct tracepoint): Add fields to hold the address range of the
7009 trampoline used by the tracepoint.
7010 (trampoline_buffer_head): New static variable.
7011 (trampoline_buffer_tail): Ditto.
7012 (claim_trampoline_space): New function.
7013 (have_fast_tracepoint_trampoline_buffer): New function.
7014 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7015 structure.
7016 (install_fast_tracepoint): Ditto, also add error buffer argument.
7017 (cmd_qtminftpilen): New function.
7018 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7019 (fast_tracepoint_from_trampoline_address): New function.
7020 (fast_tracepoint_collecting): Handle trampoline as part of jump
7021 pad space.
7022 (set_trampoline_buffer_space): New function.
7023 (initialize_tracepoint): Initialize new IPA variables.
7024 * target.h (struct target_ops): Add arguments to
7025 install_fast_tracepoint_jump_pad operation, add new
7026 get_min_fast_tracepoint_insn_len operation.
7027 (target_get_min_fast_tracepoint_insn_len): New.
7028 (install_fast_tracepoint_jump_pad): Add arguments.
7029 * server.h (IPA_BUFSIZ): Define.
7030 * linux-i386-ipa.c: Include extra header files.
7031 (initialize_fast_tracepoint_trampoline_buffer): New function.
7032 (initialize_low_tracepoint): Call it.
7033 * server.h (set_trampoline_buffer_space): Declare.
7034 (claim_trampoline_space): Ditto.
7035 (have_fast_tracepoint_trampoline_buffer): Ditto.
7036
1e4d1764
YQ
70372011-11-14 Yao Qi <yao@codesourcery.com>
7038
7039 * server.c (handle_query): Handle InstallInTrace for qSupported.
7040 * tracepoint.c (add_tracepoint): Sort list.
7041 (install_tracepoint, download_tracepoint): New.
7042 (cmd_qtdp): Call them to install and download tracepoints.
7043 (sort_tracepoints): Removed.
7044 (cmd_qtstart): Update.
7045
5c73ff4e
YQ
70462011-11-14 Yao Qi <yao@codesourcery.com>
7047
7048 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7049 * mem-break.h: Declare.
7050 * tracepoint.c (cmd_qtstart): Move some code to ...
7051 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7052 New.
7053 (download_tracepoints): Move some code to ...
7054 (download_tracepoint_1): ... here. New.
7055
86a30030
YQ
70562011-11-08 Yao Qi <yao@codesourcery.com>
7057
7058 * remote-utils.c (relocate_instruction): A comment fix.
7059
8d26e50c
JB
70602011-11-07 Joel Brobecker <brobecker@adacore.com>
7061
7062 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7063 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7064 dr_status_mirror and dr_control_mirror from debug_reg_state.
7065 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7066 (i386_initial_stuff): Remove use of deleted globals.
7067 (i386_get_thread_context, i386_set_thread_context,
7068 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7069 from debug_reg_state.
7070
a59306a3
YQ
70712011-11-05 Yao Qi <yao@codesourcery.com>
7072
7073 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7074 address as TPOINT's.
7075
3065dfb6
SS
70762011-11-02 Stan Shebs <stan@codesourcery.com>
7077
7078 * tracepoint.c (agent_mem_read_string): New function.
7079 (eval_agent_expr): Call it for tracenz.
7080 * server.c (handle_query): Report support for tracenz.
7081
fd0d8c7c
YQ
70822011-11-02 Yao Qi <yao@codesourcery.com>
7083
7084 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7085
609086b1
YQ
70862011-11-02 Yao Qi <yao@codesourcery.com>
7087
7088 * target.h: Fix a typo in comment.
7089
b9fd1791
PA
70902011-10-31 Pedro Alves <pedro@codesourcery.com>
7091
7092 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7093 clobber the breakpoints' shadows with fast tracepoint jumps.
7094 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7095 * target.c (write_inferior_memory): Also pass MYADDR down to
7096 check_mem_write.
7097
03583c20
UW
70982011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7099
7100 * configure.ac: Check support for personality routine.
7101 * configure: Regenerate.
7102 * config.in: Likewise.
7103 * linux-low.c: Include <sys/personality.h>.
7104 Define ADDR_NO_RANDOMIZE if necessary.
7105 (linux_create_inferior): Disable address space randomization when
7106 forking inferior, if requested.
7107 (linux_supports_disable_randomization): New function.
7108 (linux_target_ops): Install it.
7109 * server.h (disable_randomization): Declare.
7110 * server.c (disable_randomization): New global variable.
7111 (handle_general_set): Handle QDisableRandomization.
7112 (handle_query): Likewise for qSupported.
7113 (main): Support --disable-randomization and --no-disable-randomization
7114 command line arguments.
7115 * target.h (struct target_ops): Add supports_disable_randomization.
7116 (target_supports_disable_randomization): New macro.
7117
723b724b
MF
71182011-09-29 Mike Frysinger <vapier@gentoo.org>
7119
7120 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7121 ifdef check.
7122 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7123 [!PT_GETDSBT] (target_loadmap): New definition.
7124 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7125 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7126 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7127 and PT_GETDSBT to LINUX_LOADMAP.
7128 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7129 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7130
55329a5c 71312011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
7132
7133 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7134 (arm_linux_hwbp_cap): New static variable.
7135 (arm_linux_get_hwbp_cap): Replace by ...
7136 (arm_linux_init_hwbp_cap): ... this new function.
7137 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7138 (arm_linux_get_hw_watchpoint_count): Likewise.
7139 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7140 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7141 (arm_prepare_to_resume): Use perror_with_name instead of error.
7142
55329a5c 71432011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
7144
7145 * linux-arm-low.c: Include <signal.h>.
7146 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7147 (struct arm_linux_hwbp_cap): New data type.
7148 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7149 (struct arm_linux_hw_breakpoint): New data type.
7150 (MAX_BPTS, MAX_WPTS): Define.
7151 (struct arch_process_info, struct arch_lwp_info): New data types.
7152 (arm_linux_get_hwbp_cap): New function.
7153 (arm_linux_get_hw_breakpoint_count): Likewise.
7154 (arm_linux_get_hw_watchpoint_count): Likewise.
7155 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7156 (arm_hwbp_control_initialize): Likewise.
7157 (arm_hwbp_control_is_enabled): Likewise.
7158 (arm_hwbp_control_is_initialized): Likewise.
7159 (arm_hwbp_control_disable): Likewise.
7160 (arm_linux_hw_breakpoint_equal): Likewise.
7161 (arm_linux_hw_point_initialize): Likewise.
7162 (struct update_registers_data): New data structure.
7163 (update_registers_callback: New function.
7164 (arm_insert_point): Likewise.
7165 (arm_remove_point): Likewise.
7166 (arm_stopped_by_watchpoint): Likewise.
7167 (arm_stopped_data_address): Likewise.
7168 (arm_new_process): Likewise.
7169 (arm_new_thread): Likewise.
7170 (arm_prepare_to_resume): Likewise.
7171 (the_low_target): Register arm_insert_point, arm_remove_point,
7172 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7173 arm_new_thread, and arm_prepare_to_resume.
7174
6b9801d4
SS
71752011-09-15 Stan Shebs <stan@codesourcery.com>
7176
7177 * server.h (struct emit_ops): Add compare-goto fields.
7178 * tracepoint.c (gdb_agent_op_sizes): New table.
7179 (emit_eq_goto): New function.
7180 (emit_ne_goto): New function.
7181 (emit_lt_goto): New function.
7182 (emit_le_goto): New function.
7183 (emit_gt_goto): New function.
7184 (emit_ge_goto): New function.
7185 (is_goto_target): New function.
7186 (compile_bytecodes): Recognize special cases of compare-goto
7187 combinations and call specialized emitters for them.
7188 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7189 (amd64_emit_ne_goto): New function.
7190 (amd64_emit_lt_goto): New function.
7191 (amd64_emit_le_goto): New function.
7192 (amd64_emit_gt_goto): New function.
7193 (amd64_emit_ge_goto): New function.
7194 (amd64_emit_ops): Add the new functions.
7195 (i386_emit_eq_goto): New function.
7196 (i386_emit_ne_goto): New function.
7197 (i386_emit_lt_goto): New function.
7198 (i386_emit_le_goto): New function.
7199 (i386_emit_gt_goto): New function.
7200 (i386_emit_ge_goto): New function.
7201 (i386_emit_ops): Add the new functions.
7202
bf15cbda
SS
72032011-09-08 Stan Shebs <stan@codesourcery.com>
7204
7205 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7206 (i386_emit_epilogue): Restore %ebx.
7207
943ca1dd
JZ
72082011-08-31 Jie Zhang <jzhang918@gmail.com>
7209
7210 * server.c (step_thread): Remove definition.
7211 (process_serial_event): Don't handle Hs.
7212 * server.h (step_thread): Remove declaration.
7213 * target.c (set_desired_inferior): Remove use of step_thread.
7214
e3deef73
LM
72152011-08-24 Luis Machado <lgustavo@codesourcery.com>
7216
7217 * linux-low.c: Include linux-procfs.h.
7218 (linux_attach_lwp_1): Update comments.
7219 (linux_attach): Scan for existing threads when attaching to a
7220 process that is the tgid.
7221 * Makefile.in: Update dependencies.
7222
13da1c97
LM
72232011-08-24 Luis Machado <lgustavo@codesourcery.com>
7224
7225 * configure.srv: Add linux-procfs.o dependencies.
7226
881127c9
YQ
72272011-08-14 Yao Qi <yao@codesourcery.com>
7228
7229 * target.h (struct target_ops): Fix indent.
7230 * win32-low.c (win32_target_ops): Fix comment.
7231
58dbd541
YQ
72322011-08-14 Andrew Jenner <andrew@codesourcery.com>
7233 Yao Qi <yao@codesourcery.com>
7234
7235 * Makefile.in (clean): Remove tic6x-*.c files.
7236 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7237 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7238 (tic6x-c64xp-linux.c): Likewise.
7239 * configure.srv: Add support for tic6x-*-uclinux.
7240 * linux-tic6x-low.c: New.
7241 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7242
78d85199
YQ
72432011-08-14 Andrew Stubbs <ams@codesourcery.com>
7244 Yao Qi <yao@codesourcery.com>
7245
7246 * target.h (struct target_ops): Add read_loadmap.
7247 * linux-low.c (struct target_loadseg): New type.
7248 (struct target_loadmap): New type.
7249 (linux_read_loadmap): New function.
7250 (linux_target_ops): Add linux_read_loadmap.
7251 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
7252 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7253 to NULL.
78d85199 7254
a959a88d
EZ
72552011-08-05 Eli Zaretskii <eliz@gnu.org>
7256
7257 * win32-low.c: Include <stdint.h>.
7258
1ced966e
PA
72592011-07-22 Pedro Alves <pedro@codesourcery.com>
7260
7261 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7262 to the inferior here.
7263 (i386_remove_aligned_watchpoint): Ditto.
7264 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7265 fit part of the watchpoint in the debug registers.
7266 (i386_update_inferior_debug_regs): New.
7267 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7268 registers, and only update the inferior on success.
7269 (i386_low_remove_watchpoint): Ditto.
7270
d26e3629
KY
72712011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7272
7273 * linux-low.c (compare_ints, unique, list_threads, show_process,
7274 linux_core_of_thread): Delete.
7275 (linux_target_ops): Change linux_core_of_thread to
7276 linux_common_core_of_thread.
7277 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7278 * utils.c (malloc_failure): Change type of argument.
7279 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7280 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7281 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7282 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7283 (IPA_OBJS): Add common-utils-ipa.o.
7284 (ptid_h, linux_osdata_h): New macros.
7285 (server_h): Add common/common-utils.h, common/xml-utils.h,
7286 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7287 common/ptid.h.
7288 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7289 ptid.o, buffer.o): New rules.
7290 (linux-low.o): Add common/linux-osdata.h as a dependency.
7291 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7292 * configure.ac: Add AC_HEADER_DIRENT check.
7293 * config.in: Regenerate.
7294 * configure: Regenerate.
7295 * remote-utils.c (xml_escape_text): Delete.
7296 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7297 buffer_xml_printf): Move to common/buffer.c.
7298 * server.c (main): Remove call to initialize_inferiors.
7299 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7300 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7301 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7302 internal_error, gdb_assert, gdb_assert_fail): Delete.
7303 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7304 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7305 common/buffer.h.
7306 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7307 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7308 initialize_inferiors): Delete.
7309
2275a1a7
PA
73102011-07-20 Pedro Alves <pedro@codesourcery.com>
7311
7312 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7313 symbol error.
7314
0a5b1e09
PA
73152011-05-31 Pedro Alves <pedro@codesourcery.com>
7316
7317 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7318 assertion.
7319 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7320
6938fd34
YQ
73212011-05-26 Yao Qi <yao@codesourcery.com>
7322
7323 * Makefile.in (thread-db.o): Track dependence to
7324 common/gdb_thread_db.h.
7325 * thread-db.c: include gdb_thread_db.h from right place.
7326
b481f9e0
TT
73272011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7328
7329 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7330 __FILE__ and __LINE__ to internal_error.
7331
98a5dd13
DE
73322011-05-13 Doug Evans <dje@google.com>
7333
7334 * thread-db.c (try_thread_db_load_from_sdir): New function.
7335 (try_thread_db_load_from_dir): New function.
7336 (thread_db_load_search): Handle $sdir, ignore $pdir.
7337 Remove trying of system directories if search of
7338 libthread-db-search-path fails, that is now done via $sdir.
7339
d248b706
KY
73402011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7341
7342 * server.c (handle_query): Add EnableDisableTracepoints to the list
7343 of supported features.
43aaf8b6 7344 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 7345 tracepoints.
43aaf8b6
PA
7346 (cmd_qtenable_disable): New.
7347 (cmd_qtstart): Install tracepoints even if disabled.
7348 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7349 receiving a QTEnable or QTDisable packet.
7350 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7351 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7352 tracepoints.
7353 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 7354
84e578fb
DE
73552011-05-10 Doug Evans <dje@google.com>
7356
7357 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7358
71f55dd8
DE
73592011-05-04 Doug Evans <dje@google.com>
7360
7361 * linux-low.c (linux_join): Skip process lookup.
7362 * spu-low.c (spu_join): Ditto.
7363 * server.c (join_inferiors_callback): Delete.
7364 (process_serial_event): For 'D' packet (detach) call join_inferior
7365 directly.
7366
4d393d60
JM
73672011-05-04 Joseph Myers <joseph@codesourcery.com>
7368
7369 * README: Don't mention xscale*-*-linux*.
7370 * configure.srv (xscale*-*-linux*): Don't handle target.
7371
b00ad6ff
NF
73722011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7373
7374 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7375 casting pointers.
7376 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7377 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7378 (i386_emit_void_call_2): Likewise.
7379
af96c192
YQ
73802011-04-26 Yao Qi <yao@codesourcery.com>
7381
43aaf8b6
PA
7382 * linux-low.c: Move common macros to linux-ptrace.h.
7383 Include linux-ptrace.h.
af96c192
YQ
7384 * Makefile.in (linux_ptrace_h): New.
7385 (linux-low.o): Depends on linux-ptrace.h.
7386
03f2bd59
JK
73872011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7388
7389 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7390 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7391 (remote_prepare): New function with most of the TCP code from ...
7392 (remote_open): ... here. Detect PORT here unconditionally. Move also
7393 setting transport_is_reliable.
7394 * server.c (run_once): New variable.
7395 (gdbserver_usage): Document it.
7396 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7397 the first run if RUN_ONCE.
7398 * server.h (run_once, remote_prepare): New declarations.
7399
7a9dd1b2
TT
74002011-04-19 Tom Tromey <tromey@redhat.com>
7401
7402 * win32-low.c (handle_load_dll): Remove duplicate "the".
7403
81239425
PM
74042011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7405
7406 Remove support for old Cygwin 1.5 versions.
7407 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7408 function to avoid warning.
7409 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7410 warning.
7411
9e0627f1
PM
74122011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7413
7414 * gdbserver/server.h (Macro _): Define it if not available.
7415
588eebee
MS
74162011-03-14 Michael Snyder <msnyder@vmware.com>
7417
348af9f7 7418 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 7419
43f70d4c
JB
74202011-03-10 Joel Brobecker <brobecker@adacore.com>
7421
7422 * Makefile.in (maintainer-clean realclean distclean): Remove
7423 "make ... subdir_do" command.
7424
348af9f7
MS
74252011-03-10 Michael Snyder <msnyder@vmware.com>
7426
7427 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7428
7429 * server.c (handle_v_run): Free alloced buffer on early return.
7430
e637a4f5
YQ
74312011-03-09 Yao Qi <yao@codesourcery.com>
7432
7433 Revert:
7434 2011-03-04 Yao Qi <yao@codesourcery.com>
7435
7436 * Makefile.in: Remove GNU make feature --directory.
7437
7438 2011-03-05 Yao Qi <yao@codesourcery.com>
7439
7440 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7441 (subdir_do): New make target. Copied from gdb/Makefile.
7442 (maintainer-clean, realclean, distclean, clean): Call corresponding
7443 make targets in common/Makefile.
7444
7445 2011-02-11 Yao Qi <yao@codesourcery.com>
7446
7447 * configure.ac: Call AC_PROG_RANLIB.
7448 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7449 * configure: Regenerate.
7450
e6edda56
JK
74512011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7452
7453 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7454
e5141119
JB
74552011-03-06 Yao Qi <yao@codesourcery.com>
7456
7457 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7458
64794aa4
JB
74592011-03-05 Yao Qi <yao@codesourcery.com>
7460
7461 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7462 (subdir_do): New make target. Copied from gdb/Makefile.
7463 (maintainer-clean, realclean, distclean, clean): Call corresponding
7464 make targets in common/Makefile.
7465
7a762829
YQ
74662011-03-04 Yao Qi <yao@codesourcery.com>
7467
7468 * Makefile.in: Remove GNU make feature --directory.
7469
348af9f7
MS
74702011-03-04 Michael Snyder <msnyder@vmware.com>
7471
7472 * server.c (queue_stop_reply): Call xmalloc not malloc.
7473
74742011-03-02 Michael Snyder <msnyder@vmware.com>
7475
7476 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7477
9f72fee2
MS
74782011-02-28 Michael Snyder <msnyder@vmware.com>
7479
588eebee
MS
7480 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7481 (cmd_qtframe): Ditto.
7482 (cmd_qtbuffer): Ditto.
7483 (cmd_bigqtbuffer): Ditto.
7484
9f72fee2
MS
7485 * utils.c (decimal2str): Initialize 'width' to nine, then
7486 don't mess with it.
7487
8040bd49
UW
74882011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7489
7490 * hostio.c (require_data): Free *data, not data.
7491
7e52cbd0
JK
74922011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7493
7494 * hostio.c (require_data): Use free, not xfree.
7495
9130f83e
MS
74962011-02-27 Michael Snyder <msnyder@vmware.com>
7497
4b812f4e
MS
7498 * server.c (handle_query): Discard unused value.
7499
9130f83e
MS
7500 * hostio.c (require_data): Free malloc memory before returning
7501 error.
7502
69d37113
MS
75032011-02-26 Michael Snyder <msnyder@vmware.com>
7504
7505 * linux-low.c (list_threads): Call closedir for dirent.
7506
35f5825a
MS
75072011-02-27 Michael Snyder <msnyder@vmware.com>
7508
2a589cef
MS
7509 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7510 a case statement falls through.
7511
0adea5f7
MS
7512 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7513
35f5825a
MS
7514 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7515 in comparison.
7516
238f1c74
MS
75172011-02-26 Michael Snyder <msnyder@vmware.com>
7518
7519 * utils.c (decimal2str): Eliminate dead code and dead param.
7520 (pulongest): Drop dead param from call to decimal2str.
7521 (plongest): Ditto.
7522
633ff500
JB
75232011-02-24 Joel Brobecker <brobecker@adacore.com>
7524
7525 Revert the following patch (not approved yet):
7526 2011-02-21 Hui Zhu <teawater@gmail.com>
7527 * tracepoint.c (tp_printf): New function.
7528 (eval_agent_expr): Handle gdb_agent_op_printf.
7529
f9c6ff72
HZ
75302011-02-21 Hui Zhu <teawater@gmail.com>
7531
7532 * tracepoint.c (tp_printf): New function.
7533 (eval_agent_expr): Handle gdb_agent_op_printf.
7534
94d5e490
TT
75352011-02-18 Tom Tromey <tromey@redhat.com>
7536
7537 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7538 (tracepoint.o): Likewise.
7539 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7540 (gdb_agent_op_names): Likewise.
7541
c7f96d2b
TT
75422011-02-18 Tom Tromey <tromey@redhat.com>
7543
7544 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7545 gdb_agent_op_rot>: New constants.
7546 (gdb_agent_op_names): Add pick and roll.
7547 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7548 cases.
7549
0feedb2c
JK
75502011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7551
7552 * aclocal.m4: Regenerated with aclocal-1.11.1.
7553
b3b9301e
PA
75542011-02-14 Pedro Alves <pedro@codesourcery.com>
7555
7556 * server.c (handle_qxfer_traceframe_info): New.
7557 (qxfer_packets): Register "traceframe-info".
7558 (handle_query): Report support for qXfer:traceframe-info:read+.
7559 * tracepoint.c (match_blocktype): New.
7560 (traceframe_find_block_type): Rename to ...
7561 (traceframe_walk_blocks): ... this. Add callback filter argument,
7562 and use it.
7563 (traceframe_find_block_type): New, reimplemented on top of
7564 traceframe_walk_blocks.
7565 (build_traceframe_info_xml): New.
7566 (traceframe_read_info): New.
7567 * server.h (traceframe_read_info): Declare.
7568
4f3e6fb7
YQ
75692011-02-11 Yao Qi <yao@codesourcery.com>
7570
7571 * configure.ac: Call AC_PROG_RANLIB.
7572 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7573 * configure: Regenerate.
7574
764880b7
PA
75752011-02-07 Pedro Alves <pedro@codesourcery.com>
7576
7577 * server.c (gdb_read_memory): Change return semantics to allow
7578 partial transfers.
7579 (handle_search_memory_1): Adjust.
7580 (process_serial_event) <'m' packet>: Handle partial transfers.
7581 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7582
1c79eb8a
PA
75832011-01-28 Pedro Alves <pedro@codesourcery.com>
7584
7585 * regcache.c (init_register_cache): Initialize
7586 regcache->register_status.
7587 (free_register_cache): Release regcache->register_status.
7588 (regcache_cpy): Copy register_status.
7589 (registers_to_string): Print 'x's for unavailable registers.
7590 (supply_register): Mark the register's status valid or
7591 unavailable, depending on whether a buffer was passed in or not.
7592 (supply_register_zeroed): New.
7593 (supply_regblock): Mark the registers' status valid or
7594 unavailable, depending on whether a buffer was passed in or not.
7595 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7596 (struct regcache): New `register_status' field.
7597 (supply_register_zeroed): Declare.
7598 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7599 supply_register_zeroed, rather than passing a NULL buffer to
7600 supply_register.
7601 * tracepoint.c (fetch_traceframe_registers): Update comment.
7602
85724a0e
PA
76032011-01-28 Pedro Alves <pedro@codesourcery.com>
7604
7605 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7606 buffer explicit.
7607
d08aafef
PA
76082011-01-25 Pedro Alves <pedro@codesourcery.com>
7609
7610 * server.h (decode_xfer_write): Change prototype.
7611 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7612 and don't extract the annex here.
7613 * server.c (decode_xfer_read): Remove `annex' parameter,
7614 and don't extract the annex here.
7615 (decode_xfer): New.
7616 (struct qxfer): New.
7617 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7618 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7619 (handle_qxfer_statictrace): New functions, abstracted out from
7620 handle_query, and made to use the struct qxfer interface.
7621 (handle_threads_qxfer_proper): Rename to ...
7622 (handle_qxfer_threads_proper): ... this.
7623 (handle_threads_qxfer): Rename to ...
7624 (handle_qxfer_threads): ... this. Adjust.
7625 (qxfer_packets): New array.
7626 (handle_qxfer): New function.
7627 (handle_query): Use handle_qxfer.
7628
493e2a69
MS
76292011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7630
7631 * gdbreplay.c: Shorten lines of >= 80 columns.
7632 * linux-low.c: Ditto.
7633 * linux-ppc-low.c: Ditto.
7634 * linux-s390-low.c: Ditto.
7635 * linux-sparc-low.c: Ditto.
7636 * linux-x86-low.c: Ditto.
7637 * linux-xtensa-low.c: Ditto.
7638 * mem-break.c: Ditto.
7639 * nto-low.c: Ditto.
7640 * regcache.h: Ditto.
7641 * remote-utils.c: Ditto.
7642 * server.c: Ditto.
7643 * server.h: Ditto.
7644 * thread-db.c: Ditto.
7645 * tracepoint.c: Ditto.
7646 * utils.c: Ditto.
7647 * win32-low.h: Ditto.
7648
44944448
JB
76492011-01-05 Joel Brobecker <brobecker@adacore.com>
7650
7651 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7652 update.
7653
71ce852c
JB
76542011-01-01 Joel Brobecker <brobecker@adacore.com>
7655
7656 * server.c (gdbserver_version): Update copyright year in version
7657 output.
7658 * gdbreplay.c (gdbreplay_version): Ditto.
7659
eb826dc6
MF
76602010-12-29 Jie Zhang <jie.zhang@analog.com>
7661
7662 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7663 * linux-bfin-low.c: New file.
7664 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7665 PT_DATA_ADDR for BFIN targets.
7666 * Makefile.in (SFILES): Add linux-bfin-low.c.
7667 (clean): Remove reg-bfin.c.
7668 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7669 * README: Mention supported Blackfin targets.
7670
39ab222a
MF
76712010-12-23 Mike Frysinger <vapier@gentoo.org>
7672
7673 * .gitignore: New file.
7674
a1f2ce7d
MF
76752010-11-16 Mike Frysinger <vapier@gentoo.org>
7676
7677 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7678
f474844c
JZ
76792010-10-22 Jie Zhang <jie@codesourcery.com>
7680
7681 * Makefile.in: Add FLAGS_TO_PASS variable.
7682 (install): Remove dependency of install-only and recursively
7683 invoke make for install-only.
7684
f1048712
DE
76852010-10-04 Doug Evans <dje@google.com>
7686
7687 * Makefile.in (uninstall): Use $(DESTDIR).
7688
b53a1623
PA
76892010-09-24 Pedro Alves <pedro@codesourcery.com>
7690
e6ee044d
PA
7691 PR gdb/11842
7692
b53a1623
PA
7693 * linux-x86-low.c (compat_siginfo_from_siginfo)
7694 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7695 si_code is < 0. Check for si_code == SI_TIMER before checking for
7696 si_code < 0.
7697
fa1bd1e4
JB
76982010-09-13 Joel Brobecker <brobecker@adacore.com>
7699
7700 * lynx-i386-low.c: New file.
7701 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7702
47fac8f8
JB
77032010-09-13 Joel Brobecker <brobecker@adacore.com>
7704
7705 * lynx-low.c (ptrace_request_to_str): Remove handling for
7706 request values that have been removed in LynxOS 5.x.
7707
1adfc54d
JB
77082010-09-13 Joel Brobecker <brobecker@adacore.com>
7709
7710 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7711 <ptrace.h>
7712
c2a66c29
NS
77132010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7714
7715 * configure.ac: Add --enable-inprocess-agent option.
7716 * configure: Rebuilt.
7717
32fcada3
YQ
77182010-09-06 Yao Qi <yao@codesourcery.com>
7719
7720 * linux-low.c (linux_kill): Remove unused variable.
7721 (linux_stabilize_threads): Likewise.
7722 * server.c (start_inferior): Likewise.
7723 (queue_stop_reply_callback): Likewise.
7724 * tracepoint.c (do_action_at_tracepoint): Likewise.
7725
0cccb683
YQ
77262010-09-06 Yao Qi <yao@codesourcery.com>
7727
7728 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7729 on return.
7730
423ec54c
JK
77312010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7732
7733 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7734
12ac6819
PA
77352010-09-06 Pedro Alves <pedro@codesourcery.com>
7736
7737 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7738 "$(IPA_DEPFILES)".
7739
8ed54b31
JB
77402010-09-01 Joel Brobecker <brobecker@adacore.com>
7741
7742 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7743 gdbserver/lynx-ppc-low.c: New files.
7744 * Makefile.in (lynx_low_h): New variable.
7745 (lynx-low.o, lynx-ppc-low.o): New rules.
7746 * configure.ac: On LynxOS, link with -lnetinet.
7747 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7748 * configure: regenerate.
7749
bb0116a4
JB
77502010-09-01 Joel Brobecker <brobecker@adacore.com>
7751
7752 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7753 * configure.ac: Add check for vasprintf and vsnprintf.
7754 * configure, config.in: Regenerate.
7755 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7756
a778ab81 77572010-09-01 Joel Brobecker <brobecker@adacore.com>
7758
7759 * gdbreplay.c: Move include of alloca.h up, next to include of
7760 malloc.h.
7761 * server.h: Add include of malloc.h.
7762 * mem-break.c: Remove include of malloc.h.
7763 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7764
8b034a19 77652010-09-01 Joel Brobecker <brobecker@adacore.com>
7766
7767 * Makefile.in (memmem.o): Build with -Wno-error.
7768
77692010-09-01 Joel Brobecker <brobecker@adacore.com>
7770
7771 * utils.c (xsnprintf): Make non-static.
7772 * server.h: Add xsnprintf declaration.
7773 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7774 replace calls to snprintf by calls to xsnprintf throughout.
7775
77762010-09-01 Joel Brobecker <brobecker@adacore.com>
7777
7778 * configure.ac: Add configure check for alloca.
7779 * configure, config.in: Regenerate.
7780 * server.h: Include alloca.h if it exists.
7781 * gdbreplay.c: Include alloca.h if it exists.
7782
1a981360
PA
77832010-08-28 Pedro Alves <pedro@codesourcery.com>
7784
7785 * linux-low.c (__SIGRTMIN): Define if not already defined.
7786 (linux_create_inferior): Check for __ANDROID__ rather than
7787 __SIGRTMIN.
7788 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7789 are already deferred.
7790 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7791 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7792 stopped and already has a pending signal to report.
7793 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7794 a pending signal to report or is moving out of a jump pad.
7795 (linux_init_signals): Check for __ANDROID__ rather than
7796 __SIGRTMIN.
7797
b4d51a55
PA
77982010-08-28 Pedro Alves <pedro@codesourcery.com>
7799
7800 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7801 debug_threads check. Avoid a linear search when not doing debug
7802 output.
7803
ec48365d
PA
78042010-08-27 Pedro Alves <pedro@codesourcery.com>
7805
7806 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7807 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7808 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7809 (process_event): Change local fd's type to gdb_fildes_t.
7810 (create_file_handler): Adjust prototype.
7811 (delete_file_handler): Adjust prototype.
7812 (handle_file_event): Adjust prototype. Use pfildes.
7813 (create_file_event): Adjsut prototype.
7814 * remote-utils.c (remote_desc, listen_desc): Change type to
7815 gdb_fildes_t.
7816 * server.h: New gdb_fildes_t typedef.
7817 [USE_WIN32API]: Include winsock2.h.
7818 (delete_file_handler, add_file_handler): Adjust prototypes.
7819 (pfildes): Declare.
7820 * utils.c (pfildes): New.
7821
854d88f0
PA
78222010-08-27 Pedro Alves <pedro@codesourcery.com>
7823
7824 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7825 * configure: Regenerate.
7826
0146f85b
PA
78272010-08-27 Pedro Alves <pedro@codesourcery.com>
7828
7829 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7830 (linux_done_accessing_memory): ... this.
7831 (linux_target_ops): Adjust.
7832 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7833 * nto-low.c (nto_target_ops): Adjust comment.
7834 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7835 * spu-low.c (spu_target_ops): Adjust comment.
7836 * target.h (target_ops): Rename unprepare_to_access_memory field
7837 to done_accessing_memory.
7838 (unprepare_to_access_memory): Rename to ...
7839 (done_accessing_memory): ... this.
7840
90d74c30
PA
78412010-08-26 Pedro Alves <pedro@codesourcery.com>
7842
7843 * linux-low.c (linux_prepare_to_access_memory): New.
7844 (linux_unprepare_to_access_memory): New.
7845 (linux_target_ops): Install them.
7846 * server.c (read_memory): Rename to ...
7847 (gdb_read_memory): ... this. Use
7848 prepare_to_access_memory/prepare_to_access_memory.
7849 (write_memory): Rename to ...
7850 (gdb_write_memory): ... this. Use
7851 prepare_to_access_memory/prepare_to_access_memory.
7852 (handle_search_memory_1): Adjust.
7853 (process_serial_event): Adjust.
7854 * target.h (struct target_ops): New fields
7855 prepare_to_access_memory and unprepare_to_access_memory.
7856 (prepare_to_access_memory, unprepare_to_access_memory): New.
7857 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7858 prepare_to_access_memory/prepare_to_access_memory.
7859 * nto-low.c (nto_target_ops): Adjust.
7860 * spu-low.c (spu_target_ops): Adjust.
7861 * win32-low.c (win32_target_ops): Adjust.
7862
fd467969
PA
78632010-08-26 Pedro Alves <pedro@codesourcery.com>
7864
7865 * Makefile.in (WARN_CFLAGS): Get it from configure.
7866 (WERROR_CFLAGS): New.
7867 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7868 * configure.ac: Introduce --enable-werror, which adds -Werror to
7869 the compiler command line. Enabled by default. Disable with
7870 --disable-werror. Add -Wdeclaration-after-statement
7871 Wpointer-arith and -Wformat-nonliteral to warning flags.
7872 * configure: Regenerate.
7873
331e2f5f
PA
78742010-08-26 Pedro Alves <pedro@codesourcery.com>
7875
7876 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7877
e581f2b4
PA
78782010-08-26 Pedro Alves <pedro@codesourcery.com>
7879
7880 * gdbreplay.c (remote_error): New.
7881 (gdbchar): New.
7882 (expect): Use gdbchar. Check for error reading from GDB.
7883 Clarify sync error output.
7884 (play): Check for errors writing to GDB.
7885 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7886 * remote-utils.c (getpkt): Check for errors writing to the remote
7887 descriptor.
7888
3c11dd79
PA
78892010-08-25 Pedro Alves <pedro@codesourcery.com>
7890
7891 * linux-low.c (linux_wait_1): Move non-debugging code out of
7892 `debug_threads' control.
7893
d20a8ad9
PA
78942010-08-25 Pedro Alves <pedro@codesourcery.com>
7895
7896 * linux-low.c (linux_wait_1): Don't set last_status here.
7897 * server.c (push_event, queue_stop_reply_callback): Assert we're
7898 not pushing a TARGET_WAITKIND_IGNORE event.
7899 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7900 (myresume, handle_target_event): Set the thread's last_resume_kind
7901 and last_status from the target returned status.
7902
964e4306
PA
79032010-08-25 Pedro Alves <pedro@codesourcery.com>
7904
7905 PR threads/10729
7906
7907 * linux-x86-low.c (update_debug_registers_callback): New.
7908 (i386_dr_low_set_addr): Use it.
7909 (i386_dr_low_get_addr): New.
7910 (i386_dr_low_set_control): Use update_debug_registers_callback.
7911 (i386_dr_low_get_control): New.
7912 (i386_dr_low_get_status): Adjust.
7913 * linux-low.c (linux_stop_lwp): New.
7914 * linux-low.h (linux_stop_lwp): Declare.
7915
7916 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7917 argument instead of a i386_debug_reg_state.
7918 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7919 a i386_debug_reg_state.
7920 (i386_insert_aligned_watchpoint): Adjust.
7921 (i386_remove_aligned_watchpoint): Adjust.
7922 (i386_low_stopped_data_address): Read the debug registers from the
7923 inferior instead of from the mirrors.
7924 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7925 (i386_dr_low_get_addr): Declare.
7926 (i386_dr_low_get_control): Declare.
7927 (i386_dr_low_get_status): Change prototype.
7928
7929 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7930 (i386_dr_low_get_addr): New.
7931 (i386_dr_low_get_control): New.
7932 (i386_dr_low_get_status): Adjust prototype. Return
7933 dr_status_mirror.
7934 (i386_initial_stuff): Clear dr_status_mirror and
7935 dr_control_mirror.
7936 (i386_get_thread_context): Adjust.
7937 (i386_set_thread_context): Adjust.
7938 (i386_thread_added): Adjust.
7939
5f21a75b
PA
79402010-08-24 Pedro Alves <pedro@codesourcery.com>
7941
7942 * linux-low.h (linux_thread_area): Delete declaration.
7943
3e4c1235
TS
79442010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7945
7946 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7947 after its termination.
7948
1971b033
PA
79492010-08-09 Pedro Alves <pedro@codesourcery.com>
7950
7951 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7952 (gdb_wants_all_stopped): Delete.
7953 (linux_wait_1): Don't call them.
7954 * server.c (handle_v_cont): Tag all threads as want-stopped.
7955 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7956 stopped as "client-wants-stopped".
7957
310444ac
PA
79582010-07-31 Pedro Alves <pedro@codesourcery.com>
7959
7960 * Makefile.in (signals_h): New.
7961 (server_h): Depend on it.
7962 (server.o): Don't depend on $(signals_def).
7963 (signals.o): Depend on $(signals_def).
7964
a19cae16
JK
79652010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7966
7967 * Makefile.in (signals_def): New.
7968 (server_h): Append include/gdb/signals.h and signals_def.
7969 (server.o): Append signals_def.
7970
30d50328
JK
79712010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7972
7973 * server.c (handle_target_event): Use target_signal_to_host for
7974 resume_info.sig initialization.
7975 * target.h (struct thread_resume) <sig>: New comment.
7976
5c3216e2
OS
79772010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7978
c6f46ca0
OS
7979 * server.c (handle_query): strcpy() the returned string from paddress()
7980 instead of sprintf().
5c3216e2
OS
7981 * utils.c (paddress): Return phex_nz().
7982
6bd31874
JB
79832010-07-07 Joel Brobecker <brobecker@adacore.com>
7984
7985 * server.c (handle_v_cont): Call mourn_inferior if process
7986 just exited.
7987 (myresume): Likewise.
7988
0fb4aa4b
PA
79892010-07-01 Pedro Alves <pedro@codesourcery.com>
7990
7991 Static tracepoints, and integration with UST.
7992
7993 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7994 * mem-break.c (uninsert_all_breakpoints)
7995 (reinsert_all_breakpoints): New.
7996 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7997 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7998 (gdb_agent_ust_loaded, helper_thread_id)
7999 (gdb_agent_helper_thread_id): New macros.
8000 (struct ipa_sym_addresses): Add addr_ust_loaded,
8001 addr_helper_thread_id, addr_cmd_buf.
8002 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8003 (in_process_agent_loaded_ust): New.
8004 (write_e_ust_not_loaded): New.
8005 (maybe_write_ipa_ust_not_loaded): New.
8006 (struct collect_static_trace_data_action): New.
8007 (enum tracepoint_type) <static_tracepoint>: New.
8008 (struct tracepoint) <handle>: Mention static tracepoints.
8009 (struct static_tracepoint_ctx): New.
8010 (CMD_BUF_SIZE): New.
8011 (add_tracepoint_action): Handle static tracepoint actions.
8012 (unprobe_marker_at): New.
8013 (clear_installed_tracepoints): Handle static tracepoints.
8014 (cmd_qtdp): Handle static tracepoints.
8015 (probe_marker_at): New.
8016 (cmd_qtstart): Handle static tracepoints.
8017 (response_tracepoint): Handle static tracepoints.
8018 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8019 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8020 (get_context_regcache): Handle static tracepoints.
8021 (do_action_at_tracepoint): Handle static tracepoint actions.
8022 (traceframe_find_block_type): Handle static trace data blocks.
8023 (traceframe_read_sdata): New.
8024 (download_tracepoints): Download static tracepoint actions.
8025 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8026 (GDB_PROBE_NAME): New.
8027 (ust_ops): New.
8028 (GET_UST_SYM): New.
8029 (USTF): New.
8030 (dlsym_ust): New.
8031 (ust_marker_to_static_tracepoint): New.
8032 (gdb_probe): New.
8033 (collect_ust_data_at_tracepoint): New.
8034 (gdb_ust_probe): New.
8035 (UNIX_PATH_MAX, SOCK_DIR): New.
8036 (gdb_ust_connect_sync_socket): New.
8037 (resume_thread, stop_thread): New.
8038 (run_inferior_command): New.
8039 (init_named_socket): New.
8040 (gdb_ust_socket_init): New.
8041 (cstr_to_hexstr): New.
8042 (next_st): New.
8043 (first_marker, next_marker): New.
8044 (response_ust_marker): New.
8045 (cmd_qtfstm, cmd_qtsstm): New.
8046 (unprobe_marker_at, probe_marker_at): New.
8047 (cmd_qtstmat, gdb_ust_thread): New.
8048 (gdb_ust_init): New.
8049 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8050 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8051 (ST_REGENTRY): New.
8052 (x86_64_st_collect_regmap): New.
8053 (X86_64_NUM_ST_COLLECT_GREGS): New.
8054 (AMD64_RIP_REGNUM): New.
8055 (supply_static_tracepoint_registers): New.
8056 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8057 (ST_REGENTRY): New.
8058 (i386_st_collect_regmap): New.
8059 (i386_NUM_ST_COLLECT_GREGS): New.
8060 (supply_static_tracepoint_registers): New.
8061 * server.c (handle_query): Handle qXfer:statictrace:read.
8062 <qSupported>: Report support for StaticTracepoints, and
8063 qXfer:statictrace:read features.
8064 * server.h (traceframe_read_sdata)
8065 (supply_static_tracepoint_registers): Declare.
8066 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8067 (unpack_varlen_hex): Include in IPA build.
8068 * Makefile.in (ustlibs, ustinc): New.
8069 (IPA_OBJS): Add remote-utils-ipa.o.
8070 ($(IPA_LIB)): Link -ldl and -lpthread.
8071 (UST_CFLAGS): New.
8072 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8073 * config.in, configure: Regenerate.
8074
9e4344e5
PA
80752010-06-20 Ian Lance Taylor <iant@google.com>
8076 Pedro Alves <pedro@codesourcery.com>
8077
8078 * linux-x86-low.c (always_true): Delete.
8079 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8080 trying to fool the compiler with always_true.
8081
c6beb2cb
PA
80822010-06-20 Pedro Alves <pedro@codesourcery.com>
8083
8084 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8085 conditions in gdbserver.
8086
d2ed6730
UW
80872010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8088
8089 * spu-low.c (spu_read_memory): Wrap around local store limit.
8090 (spu_write_memory): Likewise.
8091
4e29fb54
PA
80922010-06-15 Pedro Alves <pedro@codesourcery.com>
8093
8094 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8095 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8096 LONGEST uses.
8097 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8098 uses.
8099 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8100 uses with LONGEST uses.
8101
6a271cae
PA
81022010-06-14 Stan Shebs <stan@codesourcery.com>
8103 Pedro Alves <pedro@codesourcery.com>
8104
8105 Bytecode compiler.
8106
8107 * linux-x86-low.c: Include limits.h.
8108 (add_insns): New.
8109 (always_true): New.
8110 (EMIT_ASM): New.
8111 (EMIT_ASM32): New.
8112 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8113 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8114 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8115 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8116 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8117 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8118 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8119 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8120 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8121 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8122 (amd64_emit_void_call_2): New.
8123 (amd64_emit_ops): New.
8124 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8125 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8126 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8127 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8128 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8129 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8130 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8131 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8132 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8133 (i386_emit_stack_adjust, i386_emit_int_call_1)
8134 (i386_emit_void_call_2): New.
8135 (i386_emit_ops): New.
8136 (x86_emit_ops): New.
8137 (the_low_target): Install x86_emit_ops.
8138 * server.h (struct emit_ops): New.
8139 (get_raw_reg_func_addr): Declare.
8140 (current_insn_ptr, emit_error): Declare.
8141 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8142 (set_trace_state_variable_value): New defines.
8143 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8144 addr_get_trace_state_variable_value and
8145 addr_set_trace_state_variable_value.
8146 (symbol_list): New fields for get_raw_reg,
8147 get_trace_state_variable_value and set_trace_state_variable_value.
8148 (condfn): New typedef.
8149 (struct tracepoint): New field `compiled_cond'.
8150 (do_action_at_tracepoint): Clear compiled_cond.
8151 (get_trace_state_variable_value, set_trace_state_variable_value):
8152 Export in the IPA.
8153 (condition_true_at_tracepoint): If there's a compiled condition,
8154 run that.
8155 (current_insn_ptr, emit_error): New globals.
8156 (struct bytecode_address): New.
8157 (get_raw_reg_func_addr): New.
8158 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8159 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8160 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8161 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8162 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8163 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8164 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8165 (compile_tracepoint_condition, compile_bytecodes): New.
8166 * target.h (emit_ops): Forward declare.
8167 (struct target_ops): New field emit_ops.
8168 (target_emit_ops): New.
8169 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8170 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8171 * linux-low.c (linux_emit_ops): New.
8172 (linux_target_ops): Install it.
8173 * linux-low.h (struct linux_target_ops): New field emit_ops.
8174
92b72907
UW
81752010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8176
8177 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8178 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8179
fa593d66
PA
81802010-06-01 Pedro Alves <pedro@codesourcery.com>
8181 Stan Shebs <stan@codesourcery.com>
8182
8183 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8184 (all): Depend on $(extra_libraries).
8185 (install-only): Install the IPA.
8186 (IPA_OBJS, IPA_LIB): New.
8187 (clean): Remove the IPA lib.
8188 (IPAGENT_CFLAGS): New.
8189 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8190 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8191 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8192 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8193 * configure.ac: Check for atomic builtins support in the compiler.
8194 (IPA_DEPFILES, extra_libraries): Define.
8195 * configure.srv (ipa_obj): Add description.
8196 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8197 (i[34567]86-*-linux*): Set ipa_obj.
8198 (x86_64-*-linux*): Set ipa_obj.
8199 * linux-low.c (stabilizing_threads): New.
8200 (supports_fast_tracepoints): New.
8201 (linux_detach): Stabilize threads before detaching.
8202 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8203 the lwp is either not stabilizing, or is moving out of a jump pad.
8204 (linux_fast_tracepoint_collecting): New.
8205 (maybe_move_out_of_jump_pad): New.
8206 (enqueue_one_deferred_signal): New.
8207 (dequeue_one_deferred_signal): New.
8208 (linux_wait_for_event_1): If moving out of a jump pad, defer
8209 pending signals to later.
8210 (linux_stabilize_threads): New.
8211 (linux_wait_1): Check if threads need moving out of jump pads, and
8212 do it if so.
8213 (stuck_in_jump_pad_callback): New.
8214 (move_out_of_jump_pad_callback): New.
8215 (lwp_running): New.
8216 (linux_resume_one_lwp): Handle moving out of jump pads.
8217 (linux_set_resume_request): Dequeue deferred signals.
8218 (need_step_over_p): Also step over fast tracepoint jumps.
8219 (start_step_over): Also uninsert fast tracepoint jumps.
8220 (finish_step_over): Also reinsert fast tracepoint jumps.
8221 (linux_install_fast_tracepoint_jump): New.
8222 (linux_target_ops): Install linux_stabilize_threads and
8223 linux_install_fast_tracepoint_jump_pad.
8224 * linux-low.h (linux_target_ops) <get_thread_area,
8225 install_fast_tracepoint_jump_pad>: New fields.
8226 (struct lwp_info) <collecting_fast_tracepoint,
8227 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8228 (linux_get_thread_area): Declare.
8229 * linux-x86-low.c (jump_insn): New.
8230 (x86_get_thread_area): New.
8231 (append_insns): New.
8232 (push_opcode): New.
8233 (amd64_install_fast_tracepoint_jump_pad): New.
8234 (i386_install_fast_tracepoint_jump_pad): New.
8235 (x86_install_fast_tracepoint_jump_pad): New.
8236 (the_low_target): Install x86_get_thread_area and
8237 x86_install_fast_tracepoint_jump_pad.
8238 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8239 (struct fast_tracepoint_jump): New.
8240 (fast_tracepoint_jump_insn): New.
8241 (fast_tracepoint_jump_shadow): New.
8242 (find_fast_tracepoint_jump_at): New.
8243 (fast_tracepoint_jump_here): New.
8244 (delete_fast_tracepoint_jump): New.
8245 (set_fast_tracepoint_jump): New.
8246 (uninsert_fast_tracepoint_jumps_at): New.
8247 (reinsert_fast_tracepoint_jumps_at): New.
8248 (set_breakpoint_at): Use write_inferior_memory.
8249 (uninsert_raw_breakpoint): Use write_inferior_memory.
8250 (check_mem_read): Mask out fast tracepoint jumps.
8251 (check_mem_write): Mask out fast tracepoint jumps.
8252 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8253 (set_fast_tracepoint_jump): Declare.
8254 (delete_fast_tracepoint_jump)
8255 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8256 (reinsert_fast_tracepoint_jumps_at): Declare.
8257 * regcache.c: Don't compile many functions when building the
8258 in-process agent library.
8259 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8260 the register buffer in the heap.
8261 (free_register_cache): If the register buffer isn't owned by the
8262 regcache, don't free it.
8263 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8264 pre-existing register caches.
8265 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8266 type.
8267 (convert_ascii_to_int): : Constify `from' parameter type.
8268 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8269 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8270 the needed buffer in-place.
8271 (relocate_instruction): New.
8272 * server.c (handle_query) <qSymbols>: If the target supports
8273 tracepoints, give it a chance of looking up symbols. Report
8274 support for fast tracepoints.
8275 (handle_status): Stabilize threads.
8276 (process_serial_event): Adjust.
8277 * server.h (struct fast_tracepoint_jump): Forward declare.
8278 (struct process_info) <fast_tracepoint_jumps>: New field.
8279 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8280 (decode_X_packet, decode_M_packet): Adjust.
8281 (relocate_instruction): Declare.
8282 (in_process_agent_loaded): Declare.
8283 (tracepoint_look_up_symbols): Declare.
8284 (struct fast_tpoint_collect_status): Declare.
8285 (fast_tracepoint_collecting): Declare.
8286 (force_unlock_trace_buffer): Declare.
8287 (handle_tracepoint_bkpts): Declare.
8288 (initialize_low_tracepoint)
8289 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8290 * target.h (struct target_ops) <stabilize_threads,
8291 install_fast_tracepoint_jump_pad>: New fields.
8292 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8293 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8294 [HAVE_STDINT_H]: Include stdint.h.
8295 (trace_debug_1): Rename to ...
8296 (trace_vdebug): ... this.
8297 (trace_debug): Rename to ...
8298 (trace_debug_1): ... this. Add `level' parameter.
8299 (trace_debug): New.
8300 (ATTR_USED, ATTR_NOINLINE): New.
8301 (IP_AGENT_EXPORT): New.
8302 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8303 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8304 (about_to_request_buffer_space, trace_buffer_is_full)
8305 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8306 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8307 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8308 (traceframe_write_count, traceframes_created)
8309 (trace_state_variables)
8310 New renaming defines.
8311 (struct ipa_sym_addresses): New.
8312 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8313 (symbol_list): New.
8314 (ipa_sym_addrs): New.
8315 (all_tracepoint_symbols_looked_up): New.
8316 (in_process_agent_loaded): New.
8317 (write_e_ipa_not_loaded): New.
8318 (maybe_write_ipa_not_loaded): New.
8319 (tracepoint_look_up_symbols): New.
8320 (debug_threads) [IN_PROCESS_AGENT]: New.
8321 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8322 (UNKNOWN_SIDE_EFFECTS): New.
8323 (stop_tracing): New.
8324 (flush_trace_buffer): New.
8325 (stop_tracing_bkpt): New.
8326 (flush_trace_buffer_bkpt): New.
8327 (read_inferior_integer): New.
8328 (read_inferior_uinteger): New.
8329 (read_inferior_data_pointer): New.
8330 (write_inferior_data_pointer): New.
8331 (write_inferior_integer): New.
8332 (write_inferior_uinteger): New.
8333 (struct collect_static_trace_data_action): Delete.
8334 (enum tracepoint_type): New.
8335 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
8336 <actions_str, step_actions, step_actions_str>: Only include in
8337 GDBserver.
fa593d66
PA
8338 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8339 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8340 (tracepoints): Use IP_AGENT_EXPORT.
8341 (last_tracepoint): Don't include in the IPA.
8342 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8343 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8344 (alloced_trace_state_variables): New.
8345 (trace_state_variables): Use IP_AGENT_EXPORT.
8346 (traceframe_t): Delete unused variable.
8347 (circular_trace_buffer): Don't include in the IPA.
8348 (trace_buffer_start): Delete.
8349 (struct trace_buffer_control): New.
8350 (trace_buffer_free): Delete.
8351 (struct ipa_trace_buffer_control): New.
8352 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8353 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8354 New.
8355 (trace_buffer_ctrl): New.
8356 (TRACE_BUFFER_CTRL_CURR): New.
8357 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8358 Reimplement as macros.
8359 (trace_buffer_wrap): Delete.
8360 (traceframe_write_count, traceframe_read_count)
8361 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8362 (struct tracepoint_hit_ctx) <type>: New field.
8363 (struct fast_tracepoint_ctx): New.
8364 (memory_barrier): New.
8365 (cmpxchg): New.
8366 (record_tracepoint_error): Update atomically in the IPA.
8367 (clear_inferior_trace_buffer): New.
8368 (about_to_request_buffer_space): New.
8369 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8370 updating the same buffer.
8371 (add_tracepoint): Default the tracepoint's type to trap
8372 tracepoint, and orig_size to -1.
8373 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8374 internal variables.
8375 (create_trace_state_variable): New parameter `gdb'. Handle it.
8376 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8377 (cmd_qtdp): Handle fast tracepoints.
8378 (cmd_qtdv): Adjust.
8379 (max_jump_pad_size): New.
8380 (gdb_jump_pad_head): New.
8381 (get_jump_space_head): New.
8382 (claim_jump_space): New.
8383 (sort_tracepoints): New.
8384 (MAX_JUMP_SIZE): New.
8385 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8386 IPA.
8387 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8388 support. Upload fast traceframes, and delete internal IPA
8389 breakpoints.
8390 (stop_tracing_handler): New.
8391 (flush_trace_buffer_handler): New.
8392 (cmd_qtstop): Upload fast tracepoints.
8393 (response_tracepoint): Handle fast tracepoints.
8394 (tracepoint_finished_step): Upload fast traceframes. Set the
8395 tracepoint hit context's tracepoint type.
8396 (handle_tracepoint_bkpts): New.
8397 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8398 type. Add comment about fast tracepoints.
8399 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8400 non-existing action_str field.
8401 (get_context_regcache): Handle fast tracepoints.
8402 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8403 to the regcache.
8404 (fast_tracepoint_from_jump_pad_address): New.
8405 (fast_tracepoint_from_ipa_tpoint_address): New.
8406 (collecting_t): New.
8407 (force_unlock_trace_buffer): New.
8408 (fast_tracepoint_collecting): New.
8409 (collecting): New.
8410 (gdb_collect): New.
8411 (write_inferior_data_ptr): New.
8412 (target_tp_heap): New.
8413 (target_malloc): New.
8414 (download_agent_expr): New.
8415 (UALIGN): New.
8416 (download_tracepoints): New.
8417 (download_trace_state_variables): New.
8418 (upload_fast_traceframes): New.
8419 (IPA_FIRST_TRACEFRAME): New.
8420 (IPA_NEXT_TRACEFRAME_1): New.
8421 (IPA_NEXT_TRACEFRAME): New.
8422 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8423 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8424 (gdb_jump_pad_buffer_end): New.
8425 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8426 (initialize_tracepoint): Adjust.
8427 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8428 buffer. Initialize the low module.
8429 * utils.c (PREFIX, TOOLNAME): New.
8430 (malloc_failure): Use PREFIX.
8431 (error): In the IPA, an error causes an exit.
8432 (fatal, warning): Use PREFIX.
8433 (internal_error): Use TOOLNAME.
8434 (NUMCELLS): Increase to 10.
8435 * configure, config.in: Regenerate.
8436
d149dd1d
PA
84372010-06-01 Pedro Alves <pedro@codesourcery.com>
8438
8439 * server.c (handle_query) <qSupported>: Do two passes over the
8440 qSupported string to avoid nesting strtok.
8441
f6528abd
JK
84422010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8443
8444 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8445 (CDEPS): New.
8446 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8447 -Wl,--dynamic-list.
8448 * configure: Regenerate.
8449 * proc-service.list: New.
8450
ca2a87a0
JK
84512010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8452
8453 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8454 New comment.
8455
363a6e9f
OS
84562010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8457
8458 * gdbreplay.c (remote_open): Check error return from socket() call by
8459 its equality to -1 not by it being negative.
8460 * remote-utils.c (remote_open): Likewise.
8461
d23b6cb1
PA
84622010-05-23 Pedro Alves <pedro@codesourcery.com>
8463
8464 * config.h: Regenerate.
8465
28d3cf85
MK
84662010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8467
8468 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8469 doesn't provide PTRACE_GET_THREAD_AREA.
8470
fea36a59
MK
84712010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8472
8473 * linux-m68k-low.c: Include <asm/ptrace.h>
8474 (ps_get_thread_area): Implement.
8475
24b066ba
DE
84762010-05-03 Doug Evans <dje@google.com>
8477
8478 * event-loop.c (struct callback_event): New struct.
8479 (callback_list): New global.
8480 (append_callback_event, delete_callback_event): New functions.
8481 (process_callback): New function.
8482 (start_event_loop): Call it.
8483 * remote-utils.c (NOT_SCHEDULED): Define.
8484 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8485 moved out of readchar.
8486 (readchar): Rewrite. Call reschedule before returning.
8487 (reset_readchar): New function.
8488 (remote_close): Call it.
8489 (process_remaining, reschedule): New functions.
8490 * server.h (callback_handler_func): New typedef.
8491 (append_callback_event, delete_callback_event): Declare.
8492
9836d6ea
PA
84932010-05-03 Pedro Alves <pedro@codesourcery.com>
8494
8495 * proc-service.c (ps_pglobal_lookup): Use
8496 thread_db_look_up_one_symbol.
8497 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8498 parameter. Use it instead of all_symbols_looked_up.
8499 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8500 field.
8501 (all_symbols_looked_up): Don't declare.
8502 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8503 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8504 field.
8505 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8506 Set all_symbols_looked_up here.
8507 (thread_db_look_up_one_symbol): New.
8508 (thread_db_get_tls_address): Adjust.
8509 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8510 thread_db object on the heap, and tentatively set it in the
8511 process structure.
8512 (thread_db_init): Don't set all_symbols_looked_up here.
8513 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8514
7984d532
PA
85152010-05-03 Pedro Alves <pedro@codesourcery.com>
8516
8517 * linux-low.c (linux_kill, linux_detach): Adjust.
8518 (status_pending_p_callback): Remove redundant statement. Check
8519 for !TARGET_WAITIKIND_IGNORE, instead of
8520 TARGET_WAITKIND_STOPPED.
8521 (handle_tracepoints): Make sure LWP is locked. Adjust.
8522 (linux_wait_for_event_1): Adjust.
8523 (linux_cancel_breakpoints): New.
8524 (unsuspend_one_lwp): New.
8525 (unsuspend_all_lwps): New.
8526 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8527 (send_sigstop_callback): Change return type to int, add new
8528 `except' parameter and handle it.
8529 (suspend_and_send_sigstop_callback): New.
8530 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8531 pass them down. If SUSPEND, also increment the lwp's suspend
8532 count.
8533 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8534 (need_step_over_p): Don't consider suspended LWPs.
8535 (start_step_over): Adjust.
8536 (proceed_one_lwp): Change return type to int, add new `except'
8537 parameter and handle it.
8538 (unsuspend_and_proceed_one_lwp): New.
8539 (proceed_all_lwps): Use find_inferior instead of
8540 for_each_inferior.
8541 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8542 also decrement the suspend count of LWPs. Pass `except' down,
8543 instead of hacking its suspend count.
8544 (linux_pause_all): Add `freeze' parameter. Adjust.
8545 (linux_unpause_all): New.
8546 (linux_target_ops): Install linux_unpause_all.
8547 * server.c (handle_status): Adjust.
8548 * target.h (struct target_ops): New fields `unpause_all' and
8549 `cancel_breakpoints'. Add new parameter to `pause_all'.
8550 (pause_all): Add new `freeze' parameter.
8551 (unpause_all): New.
8552 (cancel_breakpoints): New.
8553 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8554 cancel breakpoints.
8555 (cmd_qtstart): Pause threads.
8556 (stop_tracing): Pause threads, and cancel breakpoints.
8557 * win32-low.c (win32_target_ops): Adjust.
8558
e471f25b
PA
85592010-05-03 Pedro Alves <pedro@codesourcery.com>
8560
8561 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8562 the inferior right away from here...
8563 (linux_wait_1): ... to here, and adjust to check the thread's
8564 last_resume_kind instead of the lwp's step or stop_expected flags.
8565
1915ef4f
PA
85662010-05-02 Pedro Alves <pedro@codesourcery.com>
8567
8568 * README: Use consistent `GDB' and `GDBserver' spellings.
8569
f9e39928
PA
85702010-05-02 Pedro Alves <pedro@codesourcery.com>
8571
8572 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8573 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8574 (linux_detach_one_lwp): Assume the lwp is stopped.
8575 (any_thread_of): Delete.
8576 (linux_detach): Stop all lwps here. Don't blindly delete all
8577 breakpoints.
8578 (delete_lwp_callback): New.
8579 (linux_mourn): Delete all lwps of the process that is gone.
8580 (linux_wait_1): Don't delete the last lwp of the process here.
8581 * mem-break.h (mark_breakpoints_out): Declare.
8582 * mem-break.c (mark_breakpoints_out): New.
8583 (free_all_breakpoints): Use it.
8584 * server.c (handle_target_event): If the process is gone, mark
8585 breakpoints out.
8586 * thread-db.c (struct thread_db) <create_bp>: New field.
8587 (thread_db_enable_reporting): Fix prototype. Store a thread event
8588 breakpoint reference in the thread_db struct.
8589 (thread_db_load_search): Clear the thread_db object.
8590 (try_thread_db_load_1): Ditto.
8591 (switch_to_process): New.
8592 (disable_thread_event_reporting): Use it.
8593 (remove_thread_event_breakpoints): New.
8594 (thread_db_detach, thread_db_mourn): Use it.
8595
1e7fc18c
PA
85962010-05-01 Pedro Alves <pedro@codesourcery.com>
8597
8598 * linux-low.c (linux_enable_event_reporting): New.
8599 (linux_wait_for_event_1, handle_extended_wait): Use it.
8600
02fc4de7
PA
86012010-04-30 Pedro Alves <pedro@codesourcery.com>
8602
8603 * linux-low.c (linux_kill_one_lwp, linux_kill)
8604 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8605 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8606 SIGSTOP even if the LWP is stopped.
8607 (send_sigstop_callback): New.
8608 (stop_all_lwps): Use send_sigstop_callback instead.
8609 (linux_resume_one_thread): Adjust.
8610 (proceed_one_lwp): Still proceed an LWP that the client has
8611 requested to stop, if we haven't reported it as stopped yet. Make
8612 sure that LWPs the client want stopped, have a pending SIGSTOP.
8613
bc3b5632
DE
86142010-04-26 Doug Evans <dje@google.com>
8615
ae1ada35
DE
8616 * server.c (handle_general_set): Make static.
8617
bc3b5632
DE
8618 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8619 Print received char after testing for error/eof instead of before.
8620 (input_interrupt): Tweak comment.
8621
65730243
DE
86222010-04-23 Doug Evans <dje@google.com>
8623
8624 * server.c (start_inferior): Print inferior argv if --debug.
8625
a8ae7dc0
AR
86262010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8627
8628 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8629 * nto-x86-low.c: Include server.h
8630
1c07cc19
PM
86312010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8632
8633 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8634 be consistent with other sources of this directory.
8635 (init_registers_amd64): Correct name of source file of this function
8636 in the comment.
8637
e0a61e09
PM
86382010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8639
8640 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8641 64-bit executables.
8642
54709339
PM
86432010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8644
8645 * win32-i386-low.c: Add 64-bit support.
8646 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8647 (init_registers_amd64): Declare.
8648 (mappings): Add 64-bit version of array.
8649 (init_windows_x86): New function.
8650 (the_low_target): Change init_arch field to init_windows_x86.
8651
e8f0053d
PM
86522010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8653
8654 * win32-low.c: Adapt to support also 64-bit architecture.
8655 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8656 (get_image_name): Use SIZE_T type for local variable `done'.
8657 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8658 (toolhelp_get_dll_name): Idem.
8659 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8660 Use uintptr_t typecast to avoid warning.
8661 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8662 (handle_exception): Use phex_nz to avoid warning.
8663 (win32_wait): Remove unused local variable `process'.
8664
c481e77e
PM
86652010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8666
8667 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8668 `amd64-avx.o'.
8669
12ea4b69
PM
86702010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8671
8672 * configure.ac: Use `ws2_32' library for srv_mingw.
8673 * configure: Regenerate.
8674 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8675 * remote-utils.c: Likewise.
8676
f6d1620c
L
86772010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8678
8679 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8680 if __x86_64__ is defined.
8681
8e642873
PM
86822010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8683
8684 * configure: Regenerate.
8685
711e434b
PM
86862010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8687
8688 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8689 * target.h (target_ops): New get_tib_address field.
8690 * win32-low.h (win32_thread_info): Add thread_local_base field.
8691 * win32-low.c (child_add_thread): Add tlb argument.
8692 Set thread_local_base field to TLB.
8693 (get_child_debug_event): Adapt to child_add_thread change.
8694 (win32_get_tib_address): New function.
8695 (win32_target_ops): Set get_tib_address field to
8696 win32_get_tib_address.
8697 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8698
505106cd
PA
86992010-04-12 Pedro Alves <pedro@codesourcery.com>
8700
505106cd
PA
8701 * linux-low.c (linux_mourn): Also remove the process.
8702 * server.c (handle_target_event): Don't remove the process here.
8703 * nto-low.c (nto_mourn): New.
8704 (nto_target_ops): Install it.
8705 * spu-low.c (spu_mourn): New.
8706 (spu_target_ops): Install it.
8707 * win32-low.c (win32_mourn): New.
8708 (win32_target_ops): Install it.
8709
e8470a06
PA
87102010-04-12 Pedro Alves <pedro@codesourcery.com>
8711
8712 * server.h (buffer_xml_printf): Remove redundant `;'.
8713
45ba0d02
PA
87142010-04-12 Pedro Alves <pedro@codesourcery.com>
8715
8716 * regcache.c (set_register_cache): Invalidate regcaches before
8717 changing the register cache layout.
8718 (regcache_invalidate_one): Allow a NULL regcache.
8719 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8720 regcaches before changing the register cache layout or the target
8721 regsets.
8722
59e04013
L
87232010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8724
8725 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8726 variable warning on Linux/x86-64.
8727
8336d594
PA
87282010-04-11 Pedro Alves <pedro@codesourcery.com>
8729
8730 GDBserver disconnected tracing support.
8731
8732 * linux-low.c (linux_remove_process): Delete.
8733 (add_lwp): Don't set last_resume_kind here.
8734 (linux_kill): Use `mourn'.
8735 (linux_detach): Use `thread_db_detach', and `mourn'.
8736 (linux_mourn): New.
8737 (linux_attach_lwp_1): Adjust comment.
8738 (linux_attach): last_resume_kind moved the thread_info; adjust.
8739 (status_pending_p_callback): Adjust.
8740 (linux_wait_for_event_1): Adjust.
8741 (count_events_callback, select_singlestep_lwp_callback)
8742 (select_event_lwp_callback, cancel_breakpoints_callback)
8743 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8744 (proceed_one_lwp): Adjust.
8745 (linux_async): Add debug output.
8746 (linux_thread_stopped): New.
8747 (linux_pause_all): New.
8748 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8749 linux_pause_all.
8750 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8751 (thread_db_free): Delete declaration.
8752 (thread_db_detach, thread_db_mourn): Declare.
8753 * thread-db.c (thread_db_init): Use thread_db_mourn.
8754 (thread_db_free): Delete, split in two.
8755 (disable_thread_event_reporting): New.
8756 (thread_db_detach): New.
8757 (thread_db_mourn): New.
8758
8759 * server.h (struct thread_info) <last_resume_kind>: New field.
8760 <attached>: Add comment.
8761 <gdb_detached>: New field.
8762 (handler_func): Change return type to int.
8763 (handle_serial_event, handle_target_event): Ditto.
8764 (gdb_connected): Declare.
8765 (tracing): Delete.
8766 (disconnected_tracing): Declare.
8767 (stop_tracing): Declare.
8768
8769 * server.c (handle_query) <qSupported>: Report support for
8770 disconnected tracing.
8771 (queue_stop_reply_callback): Account for running threads.
8772 (gdb_wants_thread_stopped): New.
8773 (gdb_wants_all_threads_stopped): New.
8774 (gdb_reattached_process): New.
8775 (handle_status): Clear the `gdb_detached' flag of all processes.
8776 In all-stop, stop all threads.
8777 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8778 (process_serial_event): If the remote connection breaks, or if an
8779 exit was forced with "monitor exit", force an event loop exit.
8780 Handle disconnected tracing on detach.
8781 (handle_serial_event): Adjust.
8782 (handle_target_event): If GDB isn't connected, forward events back
8783 to the inferior, unless the last process exited, in which case,
8784 exit gdbserver. Adjust interface.
8785
8786 * remote-utils.c (remote_open): Don't block in accept. Instead
8787 register an event loop source on the listen socket file
8788 descriptor. Refactor bits into ...
8789 (listen_desc): ... this new global.
8790 (gdb_connected): ... this new function.
8791 (enable_async_notification): ... this new function.
8792 (handle_accept_event): ... this new function.
8793 (remote_close): Clear remote_desc.
8794
8795 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8796
8797 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8798 New fields.
8799 (mourn_inferior): Define.
8800 (target_process_qsupported): Avoid the dangling else problem.
8801 (thread_stopped): Define.
8802 (pause_all): Define.
8803 (target_waitstatus_to_string): Declare.
8804 * target.c (target_waitstatus_to_string): New.
8805
8806 * tracepoint.c (tracing): Make extern.
8807 (disconnected_tracing): New.
8808 (stop_tracing): Make extern. Handle tracing stops due to GDB
8809 disconnecting.
8810 (cmd_qtdisconnected): New.
8811 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8812 (handle_tracepoint_general_set): Handle QTDisconnected.
8813
8814 * event-loop.c (event_handler_func): Change return type to int.
8815 (process_event): Bail out if the event handler wants the event
8816 loop to stop.
8817 (handle_file_event): Ditto.
8818 (start_event_loop): Bail out if the event handler wants the event
8819 loop to stop.
8820
8821 * nto-low.c (nto_target_ops): Adjust.
8822 * spu-low.c (spu_wait): Don't remove the process here.
8823 (spu_target_ops): Adjust.
8824 * win32-low.c (win32_wait): Don't remove the process here.
8825 (win32_target_ops): Adjust.
8826
5d267c4c
PA
88272010-04-11 Pedro Alves <pedro@codesourcery.com>
8828
8829 * regcache.c (realloc_register_cache): Invalidate inferior's
8830 regcache before recreating it.
8831
623ccd72
PA
88322010-04-09 Pedro Alves <pedro@codesourcery.com>
8833
8834 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8835
219f2f23
PA
88362010-04-09 Stan Shebs <stan@codesourcery.com>
8837 Pedro Alves <pedro@codesourcery.com>
8838
8839 * server.h (LONGEST): New.
8840 (struct thread_info) <while_stepping>: New field.
8841 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8842 Declare.
8843 (initialize_tracepoint, handle_tracepoint_general_set)
8844 (handle_tracepoint_query, tracepoint_finished_step)
8845 (tracepoint_was_hit, release_while_stepping_state_list):
8846 (current_traceframe): Declare.
8847 * server.c (handle_general_set): Handle tracepoint packets.
8848 (read_memory): New.
8849 (write_memory): New.
8850 (handle_search_memory_1): Use read_memory.
8851 (handle_query): Report support for conditional tracepoints, trace
8852 state variables, and tracepoint sources. Handle tracepoint
8853 queries.
8854 (main): Initialize the tracepoints module.
8855 (process_serial_event): Handle traceframe reads/writes.
8856
8857 * linux-low.c (handle_tracepoints): New.
8858 (linux_wait_1): Call it.
8859 (linux_resume_one_lwp): Handle while-stepping.
8860 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8861 (linux_target_ops): Install them.
8862 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8863 New field.
8864 * linux-x86-low.c (x86_supports_tracepoints): New.
8865 (the_low_target). Install it.
8866
8867 * mem-break.h (delete_breakpoint): Declare.
8868 * mem-break.c (delete_breakpoint): Make external.
8869
8870 * target.h (struct target_ops): Add `supports_tracepoints',
8871 `read_pc', and `write_pc' fields.
8872 (target_supports_tracepoints): Define.
8873 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8874 (phex_nz): New.
8875
8876 * regcache.h (struct regcache) <registers_owned>: New field.
8877 (init_register_cache, regcache_cpy): Declare.
8878 (regcache_read_pc, regcache_write_pc): Declare.
8879 (register_cache_size): Declare.
8880 (supply_regblock): Declare.
8881 * regcache.c (init_register_cache): New.
8882 (new_register_cache): Use it.
8883 (regcache_cpy): New.
8884 (register_cache_size): New.
8885 (supply_regblock): New.
8886 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 8887
219f2f23
PA
8888 * tracepoint.c: New.
8889
8890 * Makefile.in (OBS): Add tracepoint.o.
8891 (tracepoint.o): New rule.
8892
3a13a53b
L
88932010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8894
8895 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8896 (i386-mmx.o): New.
8897 (i386-mmx.c): Likewise.
8898 (i386-mmx-linux.o): Likewise.
8899 (i386-mmx-linux.c): Likewise.
8900
8901 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8902 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8903 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8904 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8905
8906 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8907 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8908 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8909
1570b33e
L
89102010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8911
8912 * Makefile.in (clean): Updated.
8913 (i386-avx.o): New.
8914 (i386-avx.c): Likewise.
8915 (i386-avx-linux.o): Likewise.
8916 (i386-avx-linux.c): Likewise.
8917 (amd64-avx.o): Likewise.
8918 (amd64-avx.c): Likewise.
8919 (amd64-avx-linux.o): Likewise.
8920 (amd64-avx-linux.c): Likewise.
8921
8922 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8923 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8924 (srv_amd64_regobj): Add amd64-avx.o.
8925 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8926 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8927 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8928 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8929 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8930 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8931 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8932
8933 * i387-fp.c: Include "i386-xstate.h".
8934 (i387_xsave): New.
8935 (i387_cache_to_xsave): Likewise.
8936 (i387_xsave_to_cache): Likewise.
8937 (x86_xcr0): Likewise.
8938
8939 * i387-fp.h (i387_cache_to_xsave): Likewise.
8940 (i387_xsave_to_cache): Likewise.
8941 (x86_xcr0): Likewise.
8942
8943 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8944 * linux-crisv32-low.c (target_regsets): Likewise.
8945 * linux-m68k-low.c (target_regsets): Likewise.
8946 * linux-mips-low.c (target_regsets): Likewise.
8947 * linux-ppc-low.c (target_regsets): Likewise.
8948 * linux-s390-low.c (target_regsets): Likewise.
8949 * linux-sh-low.c (target_regsets): Likewise.
8950 * linux-sparc-low.c (target_regsets): Likewise.
8951 * linux-xtensa-low.c (target_regsets): Likewise.
8952
8953 * linux-low.c: Include <sys/uio.h>.
8954 (regsets_fetch_inferior_registers): Support nt_type.
8955 (regsets_store_inferior_registers): Likewise.
8956 (linux_process_qsupported): New.
8957 (linux_target_ops): Add linux_process_qsupported.
8958
8959 * linux-low.h (regset_info): Add nt_type.
8960 (linux_target_ops): Add process_qsupported.
8961
8962 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8963 and <sys/uio.h>.
8964 (init_registers_i386_avx_linux): New.
8965 (init_registers_amd64_avx_linux): Likewise.
8966 (xmltarget_i386_linux_no_xml): Likewise.
8967 (xmltarget_amd64_linux_no_xml): Likewise.
8968 (PTRACE_GETREGSET): Likewise.
8969 (PTRACE_SETREGSET): Likewise.
8970 (x86_fill_xstateregset): Likewise.
8971 (x86_store_xstateregset): Likewise.
8972 (use_xml): Likewise.
8973 (x86_linux_update_xmltarget): Likewise.
8974 (x86_linux_process_qsupported): Likewise.
8975 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8976 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8977 init_registers_i386_linux here. Call
8978 x86_linux_update_xmltarget.
8979 (the_low_target): Add x86_linux_process_qsupported.
8980
8981 * server.c (handle_query): Call target_process_qsupported.
8982
8983 * target.h (target_ops): Add process_qsupported.
8984 (target_process_qsupported): New.
8985
fc7238bb
PA
89862010-04-03 Pedro Alves <pedro@codesourcery.com>
8987
8988 * inferiors.c (add_thread): Set last_status kind to
8989 TARGET_WAITKIND_IGNORE.
8990 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8991 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8992 (linux_wait_1): Move `thread' local definition to block that uses
8993 it. Don't NULL initialize `event_child'.
8994 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8995 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8996 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8997
bdabb078
PA
89982010-04-01 Pedro Alves <pedro@codesourcery.com>
8999
9000 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9001 an extended waitstatus, or by a watchpoint.
9002 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9003 thread was stepping or has been stopped by a watchpoint.
9004
d3bbe7a0
PA
90052010-04-01 Pedro Alves <pedro@codesourcery.com>
9006
9007 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9008 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9009 of another, then delete the previous, and validate all
9010 breakpoints.
9011 (validate_inserted_breakpoint): New.
9012 (delete_disabled_breakpoints): New.
9013 (validate_breakpoints): New.
9014 (check_mem_read): Validate breakpoints before trusting their
9015 shadow. Delete disabled breakpoints.
9016 (check_mem_write): Validate breakpoints before trusting they
9017 should be inserted. Delete disabled breakpoints.
9018 * mem-break.h (validate_breakpoints):
9019 * server.c (handle_query): Validate breakpoints when we see a
9020 qSymbol query.
9021
8b07ae33
PA
90222010-04-01 Pedro Alves <pedro@codesourcery.com>
9023
9024 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9025 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9026 if we could tell there's a GDB breakpoint at stop_pc.
9027 (need_step_over_p): Don't do a step over if we find a GDB
9028 breakpoint at the resume PC.
9029
9030 * mem-break.c (struct raw_breakpoint): New.
9031 (enum bkpt_type): New type `gdb_breakpoint'.
9032 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9033 fields. New field `raw'.
9034 (find_raw_breakpoint_at): New.
9035 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9036 breakpoint instead.
9037 (set_breakpoint_at): Adjust.
9038 (delete_raw_breakpoint): New.
9039 (release_breakpoint): New.
9040 (delete_breakpoint): Rename to...
9041 (delete_breakpoint_1): ... this. Add proc parameter. Use
9042 release_breakpoint. Return ENOENT.
9043 (delete_breakpoint): Reimplement.
9044 (find_breakpoint_at): Delete.
9045 (find_gdb_breakpoint_at): New.
9046 (delete_breakpoint_at): Delete.
9047 (set_gdb_breakpoint_at): New.
9048 (delete_gdb_breakpoint_at): New.
9049 (gdb_breakpoint_here): New.
9050 (set_reinsert_breakpoint): Use release_breakpoint.
9051 (uninsert_breakpoint): Rename to ...
9052 (uninsert_raw_breakpoint): ... this.
9053 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9054 (reinsert_raw_breakpoint): Change parameter type to
9055 raw_breakpoint.
9056 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9057 instead.
9058 (check_breakpoints): Adjust. Use release_breakpoint.
9059 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9060 (breakpoint_inserted_here): Ditto.
9061 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9062 Don't trust the breakpoint's shadow if it is not inserted.
9063 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9064 (delete_all_breakpoints): Adjust.
9065 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9066 use delete_breakpoint_1.
9067
9068 * mem-break.h (breakpoints_supported): Delete declaration.
9069 (set_gdb_breakpoint_at): Declare.
9070 (gdb_breakpoint_here): Declare.
9071 (delete_breakpoint_at): Delete.
9072 (delete_gdb_breakpoint_at): Declare.
9073
9074 * server.h (struct raw_breakpoint): Forward declare.
9075 (struct process_info): New field `raw_breakpoints'.
9076
9077 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9078 breakpoints.
9079
6bf5e0ba
PA
90802010-03-24 Pedro Alves <pedro@codesourcery.com>
9081
9082 * linux-low.c (status_pending_p_callback): Fix comment.
9083 (linux_wait_for_event_1): Move most of the internal breakpoint
9084 handling from here...
9085 (linux_wait_1): ... to here.
9086 (count_events_callback): New.
9087 (select_singlestep_lwp_callback): New.
9088 (select_event_lwp_callback): New.
9089 (cancel_breakpoints_callback): New.
9090 (select_event_lwp): New.
9091 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9092 priority to all LWPs that have had events that should be reported
9093 to the client. Cancel breakpoints when about to reporting the
9094 event to the client, not while stopping lwps. No longer cancel
9095 finished single-steps here.
9096 (cancel_finished_single_step): Delete.
9097 (cancel_finished_single_steps): Delete.
9098
414a389f
PA
90992010-03-24 Pedro Alves <pedro@codesourcery.com>
9100
9101 * mem-break.c (enum bkpt_type): New.
9102 (struct breakpoint): New field `type'.
9103 (set_breakpoint_at): Change return type to struct breakpoint
9104 pointer. Set type to `other_breakpoint' by default.
9105 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9106 in the breakpoint list.
9107 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9108 (reinsert_breakpoint): Rename to ...
9109 (reinsert_raw_breakpoint): ... this.
9110 (reinsert_breakpoints_at): Adjust.
9111 * mem-break.h (struct breakpoint): Declare.
9112 (set_breakpoint_at): Change return type to struct breakpoint
9113 pointer.
9114
2280c721
PA
91152010-03-24 Pedro Alves <pedro@codesourcery.com>
9116
9117 * server.c (handle_query): Assign, not compare.
9118
d50171e4
PA
91192010-03-24 Pedro Alves <pedro@codesourcery.com>
9120
9121 Teach linux gdbserver to step-over-breakpoints.
9122
9123 * linux-low.c (can_hardware_single_step): New.
9124 (supports_breakpoints): New.
9125 (handle_extended_wait): If stopping threads, read the stop pc of
9126 the new cloned LWP.
9127 (get_pc): New.
9128 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9129 low target doesn't support retrieving the PC.
9130 (add_lwp): Set last_resume_kind to resume_continue.
9131 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9132 (linux_attach): Don't clear stop_expected. Set the lwp's
9133 last_resume_kind to resume_stop.
9134 (linux_detach_one_lwp): Don't check for removed breakpoints.
9135 (check_removed_breakpoint): Delete.
9136 (status_pending_p): Rename to ...
9137 (status_pending_p_callback): ... this. Don't check for removed
9138 breakpoints. Don't consider threads that are stopped from GDB's
9139 perspective.
9140 (linux_wait_for_lwp): Always read the stop_pc here.
9141 (cancel_breakpoint): New.
9142 (step_over_bkpt): New global.
9143 (linux_wait_for_event_1): Implement stepping over breakpoints.
9144 (gdb_wants_lwp_stopped): New.
9145 (gdb_wants_all_stopped): New.
9146 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9147 single-step traps here. Store the thread's last reported target
9148 wait status.
9149 (send_sigstop): Don't clear stop_expected. Always set it,
9150 instead.
9151 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9152 (cancel_finished_single_step): New.
9153 (cancel_finished_single_steps): New.
9154 (wait_for_sigstop): Don't cancel finished single-step traps here.
9155 (linux_resume_one_lwp): Don't check for removed breakpoints.
9156 Don't set `step' on non-hardware step archs.
9157 (linux_set_resume_request): Ignore resume_stop requests if already
9158 stopping or stopped. Set the lwp's last_resume_kind.
9159 (resume_status_pending_p): Don't check for removed breakpoints.
9160 (need_step_over_p): New.
9161 (start_step_over): New.
9162 (finish_step_over): New.
9163 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9164 requests. Clear the thread's last reported target waitstatus.
9165 Don't use the `suspended' flag. Don't consider pending breakpoints.
9166 (linux_resume): Start a step-over if necessary.
9167 (proceed_one_lwp): New.
9168 (proceed_all_lwps): New.
9169 (unstop_all_lwps): New.
9170 * linux-low.h (struct lwp_info): Rewrite comment for the
9171 `suspended' flag. Add the `stop_pc' field. Delete the
9172 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9173 Add `'last_resume_kind' and `need_step_over' fields.
9174 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9175 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9176 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9177 (set_raw_breakpoint_at): New.
9178 (set_breakpoint_at): Rewrite to use it.
9179 (reinsert_breakpoint_handler): Delete.
9180 (set_reinsert_breakpoint): New.
9181 (reinsert_breakpoint_by_bp): Delete.
9182 (delete_reinsert_breakpoints): New.
9183 (uninsert_breakpoint): Rewrite.
9184 (uninsert_breakpoints_at): New.
9185 (reinsert_breakpoint): Rewrite.
9186 (reinsert_breakpoints_at): New.
9187 (check_breakpoints): Rewrite.
9188 (breakpoint_here): New.
9189 (breakpoint_inserted_here): New.
9190 (check_mem_read): Adjust.
9191 * mem-break.h (breakpoints_supported, breakpoint_here)
9192 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9193 (reinsert_breakpoint_by_bp): Delete declaration.
9194 (delete_reinsert_breakpoints): Declare.
9195 (reinsert_breakpoint): Delete declaration.
9196 (reinsert_breakpoints_at): Declare.
9197 (uninsert_breakpoint): Delete declaration.
9198 (uninsert_breakpoints_at): Declare.
9199 (check_breakpoints): Adjust prototype.
9200 * server.h: Adjust include order.
9201 (struct thread_info): Declare here. Add a `last_status' field.
9202
30ba68cb
MS
92032010-03-23 Michael Snyder <msnyder@vmware.com>
9204
9205 * server.c (crc32): New function.
9206 (handle_query): Add handling for 'qCRC:' request.
9207
b9a881c2
PA
92082010-03-23 Pedro Alves <pedro@codesourcery.com>
9209
9210 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9211 lwp had been stopped by a watchpoint.
9212
e92d13d5
PA
92132010-03-16 Pedro Alves <pedro@codesourcery.com>
9214
9215 * server.h (internal_error): Declare.
9216 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9217 * utils.c (internal_error): New function.
9218
64daa791
AS
92192010-03-15 Andreas Schwab <schwab@redhat.com>
9220
9221 * configure.srv: Fix typo setting srv_regobj.
9222
f52cd8cd
PA
92232010-03-15 Pedro Alves <pedro@codesourcery.com>
9224
9225 * linux-low.c (fetch_register): Avoid passing a non string literal
9226 format to `error'.
9227 (usr_store_inferior_registers): Ditto.
9228
93ae6fdc
PA
92292010-03-14 Pedro Alves <pedro@codesourcery.com>
9230
9231 * linux-low.c (linux_write_memory): Bail out early if peeking
9232 memory failed.
9233
c3adc08c
PA
92342010-03-14 Pedro Alves <pedro@codesourcery.com>
9235
9236 * linux-low.h (struct lwp_info): New fields
9237 `stopped_by_watchpoint' and `stopped_data_address'.
9238 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9239 here, and cache them in the lwp object.
9240 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9241 directly.
9242 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9243 field.
9244 (linux_stopped_by_watchpoint): Rewrite.
9245 (linux_stopped_data_address): Rewrite.
9246
bce522a2
PA
92472010-03-06 Simo Melenius <simo.melenius@iki.fi>
9248
9249 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9250 switching the current inferior, not before.
9251
90884b2b
L
92522010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9253
9254 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9255 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9256 i386-linux.c and amd64-linux.c.
9257 (reg-i386.o): Removed.
9258 (reg-i386.c): Likewise.
9259 (reg-i386-linux.o): Likewise.
9260 (reg-i386-linux.c): Likewise.
9261 (reg-x86-64.o): Likewise.
9262 (reg-x86-64.c): Likewise.
9263 (reg-x86-64-linux.o): Likewise.
9264 (reg-x86-64-linux.c): Likewise.
9265 (i386.o): New.
9266 (i386.c): Likewise.
9267 (i386-linux.o): Likewise.
9268 (i386-linux.c): Likewise.
9269 (amd64.o): Likewise.
9270 (amd64.c): Likewise.
9271 (amd64-linux.o): Likewise.
9272 (amd64-linux.c): Likewise.
9273
9274 * configure.srv (srv_i386_regobj): New.
9275 (srv_i386_linux_regobj): Likewise.
9276 (srv_amd64_regobj): Likewise.
9277 (srv_amd64_linux_regobj): Likewise.
9278 (srv_i386_32bit_xmlfiles): Likewise.
9279 (srv_i386_64bit_xmlfiles): Likewise.
9280 (srv_i386_xmlfiles): Likewise.
9281 (srv_amd64_xmlfiles): Likewise.
9282 (srv_i386_linux_xmlfiles): Likewise.
9283 (srv_amd64_linux_xmlfiles): Likewise.
9284 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9285 srv_xmlfiles to $srv_i386_xmlfiles.
9286 (i[34567]86-*-mingw32ce*): Likewise.
9287 (i[34567]86-*-mingw*): Likewise.
9288 (i[34567]86-*-nto*): Likewise.
9289 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9290 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9291 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9292 (x86_64-*-linux*): Likewise.
9293
9294 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9295 (init_registers_amd64_linux): New.
9296 (x86_arch_setup): Replace init_registers_x86_64_linux with
9297 init_registers_amd64_linux.
9298
193f13e6
MK
92992010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9300
9301 * configure.ac: Check for libdl. If it is not available link against
9302 static libthread_db.
9303 * configure: Regenerate.
9304
85d721b8
PA
93052010-02-22 Pedro Alves <pedro@codesourcery.com>
9306
9307 PR9605
9308
9309 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9310 handing a read watchpoint.
9311 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9312
6076632b
DE
93132010-02-12 Doug Evans <dje@google.com>
9314
9315 * linux-low.c (linux_supports_tracefork_flag): Document.
9316 (linux_look_up_symbols): Add comment.
9317
3327ccf7
L
93182010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9319
9320 * regcache.c (supply_register): Clear regcache if buf is NULL.
9321
0718675c 93222010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 9323 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
9324
9325 * inferiors.c (find_inferior): Add function documentation.
9326 (unloaded_dll): Handle the case where the unloaded dll has not
9327 been previously registered in the dll list.
9328
177321bd
DJ
93292010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9330
9331 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9332 (thumb2_breakpoint): New.
9333 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9334
2b009048
DJ
93352010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9336
9337 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9338 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9339 breakpoints.
9340
3be029c7
PA
93412010-01-21 Pedro Alves <pedro@codesourcery.com>
9342
9343 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9344
18f5de3b
JK
93452010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9346
9347 * linux-s390-low.c (s390_collect_ptrace_register)
9348 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9349
3743bb4f
DE
93502010-01-21 Doug Evans <dje@google.com>
9351
14ce3065
DE
9352 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9353 (PTRACE_ARG4_TYPE): New macro.
9354 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9355 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9356 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9357 (usr_store_inferior_registers): Ditto.
9358 (linux_read_memory, linux_write_memory): Ditto.
9359 (linux_test_for_tracefork): Ditto.
9360
3743bb4f
DE
9361 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9362 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9363
8b315be5
PA
93642010-01-21 Pedro Alves <pedro@codesourcery.com>
9365
9366 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9367 target.
9368
85492558
PA
93692010-01-21 Pedro Alves <pedro@codesourcery.com>
9370
9371 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9372 prototype to take a regcache. Adjust.
9373
442ea881
PA
93742010-01-20 Pedro Alves <pedro@codesourcery.com>
9375
9376 * regcache.h (struct thread_info): Forward declare.
9377 (struct regcache): New.
9378 (new_register_cache): Adjust prototype.
9379 (get_thread_regcache): Declare.
9380 (free_register_cache): Adjust prototype.
9381 (registers_to_string, registers_from_string): Ditto.
9382 (supply_register, supply_register_by_name, collect_register)
9383 (collect_register_as_string, collect_register_by_name): Ditto.
9384 * regcache.c (struct inferior_regcache_data): Delete.
9385 (get_regcache): Rename to ...
9386 (get_thread_regcache): ... this. Adjust. Switch inferior before
9387 fetching registers.
9388 (regcache_invalidate_one): Adjust.
9389 (regcache_invalidate): Fix prototype.
9390 (new_register_cache): Return the new register cache.
9391 (free_register_cache): Change prototype.
9392 (realloc_register_cache): Adjust.
9393 (registers_to_string): Change prototype to take a regcache. Adjust.
9394 (registers_from_string): Ditto.
9395 (register_data): Ditto.
9396 (supply_register): Ditto.
9397 (supply_register_by_name): Ditto.
9398 (collect_register): Ditto.
9399 (collect_register_as_string): Ditto.
9400 (collect_register_by_name): Ditto.
9401 * server.c (process_serial_event): Adjust.
9402 * linux-low.h (regset_fill_func, regset_store_func): Change
9403 prototype.
9404 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9405 Change prototype.
9406 * linux-low.c (get_stop_pc): Adjust.
9407 (check_removed_breakpoint): Adjust.
9408 (linux_wait_for_event): Adjust.
9409 (linux_resume_one_lwp): Adjust.
9410 (fetch_register): Add regcache parameter. Adjust.
9411 (usr_store_inferior_registers): Ditto.
9412 (regsets_fetch_inferior_registers): Ditto.
9413 (regsets_store_inferior_registers): Ditto.
9414 (linux_fetch_registers, linux_store_registers): Ditto.
9415 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9416 regcache. Adjust.
43aaf8b6
PA
9417 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9418 Ditto.
442ea881
PA
9419 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9420 prototype to take a regcache.
9421 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9422 * remote-utils.c (convert_ascii_to_int, outreg)
9423 (prepare_resume_reply): Change prototype to take a regcache.
9424 Adjust.
9425 * target.h (struct target_ops) <fetch_registers, store_registers>:
9426 Change prototype to take a regcache.
9427 (fetch_inferior_registers, store_inferior_registers): Change
9428 prototype to take a regcache. Adjust.
9429 * proc-service.c (ps_lgetregs): Adjust.
9430 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9431 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9432 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9433 take a regcache. Adjust.
9434 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9435 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9436 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9437 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9438 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9439 (cris_cannot_fetch_register):
9440 (cris_breakpoint_at): Change prototype to take a regcache.
9441 Adjust.
9442 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9443 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9444 to take a regcache. Adjust.
9445 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9446 Adjust.
9447 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9448 take a regcache. Adjust.
9449 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9450 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9451 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9452 * linux-mips-low.c (mips_get_pc):
9453 (mips_set_pc): Change prototype to take a regcache. Adjust.
9454 (mips_reinsert_addr): Adjust.
9455 (mips_collect_register): Change prototype to take a regcache.
9456 Adjust.
9457 (mips_supply_register):
9458 (mips_collect_register_32bit, mips_supply_register_32bit)
9459 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9460 (mips_store_fpregset): Ditto.
43aaf8b6
PA
9461 * linux-ppc-low.c (ppc_supply_ptrace_register)
9462 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
9463 (parse_spufs_run): Adjust.
9464 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9465 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9466 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9467 take a regcache. Adjust.
9468 * linux-s390-low.c (s390_collect_ptrace_register)
9469 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9470 (s390_set_pc): Change prototype to take a regcache. Adjust.
9471 (s390_arch_setup): Adjust.
9472 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9473 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9474 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9475 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9476 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9477 regcache. Adjust.
9478 (sparc_breakpoint_at): Adjust.
9479 * linux-xtensa-low.c (xtensa_fill_gregset):
9480 (xtensa_store_gregset):
9481 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9482 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9483 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9484 prototype to take a regcache. Adjust.
9485 * win32-arm-low.c (arm_fetch_inferior_register)
9486 (arm_store_inferior_register): Change prototype to take a
9487 regcache. Adjust.
9488 * win32-i386-low.c (i386_fetch_inferior_register)
9489 (i386_store_inferior_register): Change prototype to take a
9490 regcache. Adjust.
9491 * win32-low.c (child_fetch_inferior_registers)
9492 (child_store_inferior_registers): Change prototype to take a
9493 regcache. Adjust.
9494 (win32_wait): Adjust.
9495 (win32_fetch_inferior_registers): Change prototype to take a
9496 regcache. Adjust.
9497 (win32_store_inferior_registers): Adjust.
9498 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9499 store_inferior_register>: Change prototype to take a regcache.
9500
60c3d7b0
DE
95012010-01-20 Doug Evans <dje@google.com>
9502
9503 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9504 #ifdef.
9505 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 9506 (W_STOPCODE): Provide definition if missing.
60c3d7b0 9507
dc146f7c
VP
95082010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9509
9510 * linux-low.c (linux_core_of_thread): New.
9511 (compare_ints, show_process, list_threads): New.
9512 (linux_qxfer_osdata): Report threads and cores.
9513 (linux_target_op): Register linux_core_of_thread.
9514 * remote-utils.c (prepare_resume_reply): Report the core.
9515 (buffer_xml_printf): Support %d specifier.
9516 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9517 New.
9518 (handle_query): Handle qXfer:threads. Announce availability
9519 thereof.
9520 * target.h (struct target_ops): New field core_of_thread.
9521
7803799a
UW
95222010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9523
9524 * Makefile.in (clean): Remove new generated files.
9525 (reg-s390.o, reg-s390.c): Remove rules.
9526 (reg-s390x.o, reg-s390x.c): Likewise.
9527 (s390-linux32.o, s390-linux32.c): Add rules.
9528 (s390-linux64.o, s390-linux64.c): Likewise.
9529 (s390x-linux64.o, s390x-linux64.c): Likewise.
9530 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9531 * linux-s390-low.c: Include <elf.h>.
9532 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9533 (init_registers_s390): Remove prototype.
9534 (init_registers_s390x): Likewise.
9535 (init_registers_s390_linux32): Add prototype.
9536 (init_registers_s390_linux64): Likewise.
9537 (init_registers_s390x_linux64): Likewise.
9538 (s390_num_regs_3264): New define.
9539 (s390_regmap_3264): New global variable.
9540 (s390_cannot_fetch_register): Remove obsolete check.
9541 (s390_cannot_store_register): Likewise.
9542 (s390_collect_ptrace_register): Handle upper/lower register halves.
9543 (s390_supply_ptrace_register): Likewise.
9544 (s390_fill_gregset): Update to register number changes.
9545 (s390_get_hwcap): New routine.
9546 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9547 Install appropriate regmap and register set.
9548
6e7ffa39
JB
95492010-01-01 Joel Brobecker <brobecker@adacore.com>
9550
9551 * server.c (gdbserver_version): Update copyright year to 2010.
9552 * gdbreplay.c (gdbreplay_version): Likewise.
9553
957f3f49
DE
95542009-12-28 Doug Evans <dje@google.com>
9555
9556 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9557 elf/external.h. Include <elf.h> instead but only if necessary.
9558
ca5c370d
PA
95592009-12-28 Pedro Alves <pedro@codesourcery.com>
9560
9561 * linux-low.c (linux_remove_process): Remove `detaching'
9562 parameter. Don't release/detach from thread_db here.
9563 (linux_kill): Release/detach from thread_db here, ...
9564 (linux_detach): ... and here, before actually detaching.
9565 (linux_wait_1): ... and here, when a process exits.
9566 * thread-db.c (any_thread_of): New.
9567 (thread_db_free): Switch the current inferior to a thread of the
9568 passed in process.
9569
4ee62156
DE
95702009-12-21 Doug Evans <dje@google.com>
9571
d90e6a88
DE
9572 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9573
c5f62d5f
DE
9574 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9575 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9576 warning ifndef __NR_tkill. Move setting of errno there too.
9577 Delete unnecessary resetting of errno after syscall.
9578 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9579
10e86dd7
DE
9580 * configure.ac: Check for dladdr.
9581 * config.in: Regenerate.
9582 * configure: Regenerate.
9583 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9584 (try_thread_db_load): Update.
9585
4ee62156
DE
9586 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9587
00f515da
DE
95882009-12-18 Doug Evans <dje@google.com>
9589
e9464885
DE
9590 * event-loop.c: Include unistd.h if it exists.
9591
07d4f67e
DE
9592 * linux-low.c (my_waitpid): Move definition away from being in
9593 between linux_tracefork_child/linux_test_for_tracefork.
9594
00f515da
DE
9595 * gdb_proc_service.h (psaddr_t): Fix type.
9596 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9597 signature to match glibc.
9598
1de1badb
DE
95992009-12-16 Doug Evans <dje@google.com>
9600
9601 * linux-low.c (linux_read_memory): Fix argument to read.
9602
aeeb81d1
PA
96032009-11-26 Pedro Alves <pedro@codesourcery.com>
9604
9605 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9606 events, don't leave current_inferior pointing at null.
9607
10357975
PA
96082009-11-26 Pedro Alves <pedro@codesourcery.com>
9609
9610 * win32-low.c (LOG): Delete.
9611 (OUTMSG): Output to stderr.
9612 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9613 on compile time LOG macro.
9614 (win32_wait): Fix debug output.
9615
cf6e3471
PA
96162009-11-26 Pedro Alves <pedro@codesourcery.com>
9617
9618 * win32-low.c (win32_add_one_solib): If the dll name is
9619 "ntdll.dll", prepend the system directory to the dll path.
9620
0c85e18e
MK
96212009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9622
9623 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9624
9ac544ce 96252009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9626 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9627
9628 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9629 * configure.ac: Check for __mcoldfire__ and set
9630 gdb_cv_m68k_is_coldfire.
9631 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9632 reg-cf.o and reg-m68k.o.
9633 * configure: Regenerated.
9634
fd7dd3e6
PA
96352009-11-16 Pedro Alves <pedro@codesourcery.com>
9636
9637 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9638 Pass it to thread_db_free.
9639 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9640 proper `detaching' argument to linux_remove_process.
9641 * linux-low.h (thread_db_free): Add `detaching' parameter.
9642 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9643 to thread_db_free.
9644 (thread_db_free): Add `detaching' parameter. Only
9645 call td_ta_clear_event if detaching from process.
9646
75aa492e
MK
96472009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9648
9649 * thread-db.c (thread_db_free): Fix typo.
9650
21e1bee4
PP
96512009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9652
9653 PR gdb/10838
9654 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9655
8838b45e
NS
96562009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9657
9658 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9659 with an i686 compiler.
9660 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9661 needed.
9662 * configure: Rebuilt.
9663
8a35fb51
SL
96642009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9665
9666 PR gdb/10783
9667
9668 * server.c (handle_search_memory_1): Correct read_addr initialization
9669 in loop for searching subsequent chunks.
9670
96f15937
PP
96712009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9672
9673 * configure.ac: New --with-libthread-db option.
9674 * thread-db.c: Allow direct dependence on libthread_db.
9675 (thread_db_free): Adjust.
9676 * config.in: Regenerate.
9677 * configure: Likewise.
889bf7c5 9678
5f7d1694
PP
96792009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9680
9681 PR gdb/10757
9682 * thread-db.c (attach_thread): New function.
9683 (maybe_attach_thread): Return success/failure.
9684 (find_new_threads_callback): Adjust.
889bf7c5
PA
9685 (thread_db_find_new_threads): Loop until no new threads.
9686
88e3b899
PA
96872009-10-13 Pedro Alves <pedro@codesourcery.com>
9688
9689 * proc-service.c (ps_lgetregs): Formatting.
9690
cdbfd419
PP
96912009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9692
9693 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9694 * configure.ac: Adjust.
9695 * linux-low.h (struct process_info_private): Move members to struct
9696 thread_db.
9697 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9698 * linux-low.c (linux_remove_process): Adjust.
9699 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9700 * server.c (handle_query): Move code ...
9701 (handle_monitor_command): ... here. New function.
9702 * target.h (struct target_ops): New member.
9703 * thread-db.c (struct thread_db): New.
9704 (libthread_db_search_path): New variable.
9705 (thread_db_create_event, thread_db_enable_reporting)
9706 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9707 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9708 (try_thread_db_load_1, dladdr_to_soname): New functions.
9709 (try_thread_db_load, thread_db_load_search): New functions.
9710 (thread_db_init): Search for libthread_db.
9711 (thread_db_free): New function.
9712 (thread_db_handle_monitor_command): Likewise.
9713 * config.in: Regenerate.
9714 * configure: Regenerate.
889bf7c5 9715
4168d2d6
UW
97162009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9717
9718 * spu-low.c (spu_kill): Wait for inferior to terminate.
9719 Call clear_inferiors.
9720 (spu_detach): Call clear_inferiors.
9721
81ecdfbb
RW
97222009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9723
9724 * aclocal.m4: Regenerate.
9725 * config.in: Likewise.
9726 * configure: Likewise.
9727
0b9ff2c0
UW
97282009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9729
9730 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9731 (parse_spufs_run): New function.
9732 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9733 (ppc_breakpoint_at): Handle SPU breakpoints.
9734
efcbbd14
UW
97352009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9736
9737 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9738 (SPUFS_MAGIC): Define.
9739 (spu_enumerate_spu_ids): New function.
9740 (linux_qxfer_spu): New function.
9741 (linux_target_ops): Install linux_qxfer_spu.
9742
f4d9bade
UW
97432009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9744
9745 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9746 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9747 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9748 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9749 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9750 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9751 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9752 (init_registers_powerpc_cell32l): Add prototype.
9753 (init_registers_powerpc_cell64l): Likewise.
9754 (ppc_arch_setup): Detect Cell/B.E. architecture.
9755
96e946ca
RW
97562009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9757
9758 * Makefile.in (datarootdir): New variable.
9759
58d6951d
DJ
97602009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9761
9762 * linux-low.c (linux_write_memory): Update debugging output.
9763 * Makefile.in (clean): Add new descriptions.
9764 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9765 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9766 * configure.srv: Add new files for arm*-*-linux*.
9767 * linux-arm-low.c: Add new declarations.
9768 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9769 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9770 (HWCAP_VFPv3D16): New.
9771 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9772 instead of __IWMMXT__.
9773 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9774 (arm_arch_setup): New.
9775 (target_regsets): Remove #ifdef. Add VFP regset.
9776 (the_low_target): Use arm_arch_setup.
9777
12b42a12
DJ
97782009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9779
9780 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9781 the main thread again.
9782
ac8c974e
AR
97832009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9784
9785 Adding Neutrino gdbserver.
9786 * configure: Regenerated.
9787 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9788 * configure.srv (i[34567]86-*-nto*): New target.
9789 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9790 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9791 (nto_comctrl) [__QNX__]: New function.
9792 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9793
4424e0c3 97942009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
9795
9796 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9797 srv_tgtobj.
9798
912cf4ba
PA
97992009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9800 Pedro Alves <pedro@codesourcery.com>
9801
9802 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9803 don't support CONTEXT_EXTENDED_REGISTERS.
9804 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9805 (the_low_target): Install them.
9806 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9807 failing with ERROR_PIPE_NOT_CONNECTED.
9808
aa5ca48f
DE
98092009-06-30 Doug Evans <dje@google.com>
9810 Pierre Muller <muller@ics.u-strasbg.fr>
9811
9812 Add h/w watchpoint support to x86-linux, win32-i386.
9813 * Makefile.in (SFILES): Add i386-low.c
9814 (i386_low_h): Define.
9815 (i386-low.o): Add dependencies.
9816 (linux-x86-low.o): Add i386-low.h dependency.
9817 (win32-i386-low.o): Ditto.
9818 * i386-low.c: New file.
9819 * i386-low.h: New file.
9820 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9821 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9822 * linux-low.c (linux_add_process): Initialize arch_private.
9823 (linux_remove_process): Free arch_private.
9824 (add_lwp): Initialize arch_private.
9825 (delete_lwp): Free arch_private.
9826 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9827 provided.
9828 * linux-low.h (process_info_private): New member arch_private.
9829 (lwp_info): New member arch_private.
9830 (linux_target_ops): New members new_process, new_thread,
9831 prepare_to_resume.
9832 (ptid_of): New macro.
9833 * linux-x86-low.c: Include stddef.h, i386-low.h.
9834 (arch_process_info): New struct.
9835 (arch_lwp_info): New struct.
9836 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9837 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9838 (i386_dr_low_get_status): New function.
9839 (x86_insert_point, x86_remove_point): New functions.
9840 (x86_stopped_by_watchpoint): New function.
9841 (x86_stopped_data_address): New function.
9842 (x86_linux_new_process, x86_linux_new_thread): New functions.
9843 (x86_linux_prepare_to_resume): New function.
9844 (the_low_target): Add entries for insert_point, remove_point,
9845 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9846 prepare_to_resume.
9847 * server.c (debug_hw_points): New global.
9848 (monitor_show_help): Document set debug-hw-points.
9849 (handle_query): Process "set debug-hw-points".
9850 * server.h (debug_hw_points): Declare.
9851 (paddress): Declare.
9852 * utils.c (NUMCELLS, CELLSIZE): New macros.
9853 (get_sell, xsnprintf, paddress): New functions.
9854 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9855 remove_point, stopped_by_watchpoint, stopped_data_address.
9856 * win32-i386-low.c: Include i386-low.h.
9857 (debug_reg_state): Replaces dr.
9858 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9859 (i386_dr_low_get_status): New function.
9860 (i386_insert_point, i386_remove_point): New functions.
9861 (i386_stopped_by_watchpoint): New function.
9862 (i386_stopped_data_address): New function.
9863 (i386_initial_stuff): Update.
9864 (get_thread_context,set_thread_context,i386_thread_added): Update.
9865 (the_low_target): Add entries for insert_point,
9866 remove_point, stopped_by_watchpoint, stopped_data_address.
9867 * win32-low.c (win32_insert_watchpoint): New function.
9868 (win32_remove_watchpoint): New function.
9869 (win32_stopped_by_watchpoint): New function.
9870 (win32_stopped_data_address): New function.
9871 (win32_target_ops): Add entries for insert_watchpoint,
9872 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9873 * win32-low.h (win32_target_ops): New members insert_point,
9874 remove_point, stopped_by_watchpoint, stopped_data_address.
9875
d993e290
PA
98762009-06-25 Pedro Alves <pedro@codesourcery.com>
9877
9878 * server.c (process_serial_event): Re-return unsupported, not
9879 error, if the type isn't recognized. Re-allow supporting only
9880 insert or remove packets. Also call require_running for
9881 breakpoints. Add missing break statement to default case. Tidy.
9882 * target.h (struct target_ops): Rename insert_watchpoint to
9883 insert_point, and remove_watchpoint to remove_point.
9884
9885 * linux-low.h (struct linux_target_ops): Likewise.
9886 * linux-low.c (linux_insert_watchpoint): Rename to ...
9887 (linux_insert_point): ... this. Adjust.
9888 (linux_remove_watchpoint): Rename to ...
9889 (linux_remove_point): ... this. Adjust.
9890 (linux_target_ops): Adjust.
9891 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9892 (cris_insert_point): ... this.
9893 (cris_remove_watchpoint): Rename to ...
9894 (cris_remove_point): ... this.
9895 (the_low_target): Adjust.
9896
0f54c268
PM
98972009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9898
9899 * server.c (handle_v_kill): Pass signal_pid to
9900 kill_inferior if multi_process is zero.
9901
c6314022
AR
99022009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9903
9904 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9905 * target.h (target_ops): Comment for *_watchpoint to make it clear
9906 the functions can get types '0' and '1'.
9907
4463ce24
AR
99082009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9909
9910 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9911 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9912 * regcache.c (get_regcache): Likewise.
9913 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9914 * win32-low.c (child_fetch_inferior_registers): Remove check for
9915 regno 0.
9916
cf8fd78b
PA
99172009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9918 Pedro Alves <pedro@codesourcery.com>
9919
9920 * target.h (struct target_ops) <supports_multi_process>: New
9921 callback.
9922 (target_supports_multi_process): New.
9923 * server.c (handle_query): Even if GDB reports support, only
9924 enable multi-process if the target also supports it. Report
9925 multi-process support only if the target backend supports it.
9926 * linux-low.c (linux_supports_multi_process): New function.
9927 (linux_target_ops): Install it as target_supports_multi_process
9928 callback.
9929
47c0c975
DE
99302009-05-24 Doug Evans <dje@google.com>
9931
e09875d4
DE
9932 Global renaming of find_thread_pid to find_thread_ptid.
9933 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9934 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9935 All callers updated.
9936
e27d73f6
DE
9937 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9938 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9939 directly.
9940
47c0c975
DE
9941 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9942 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9943 (linux_resume_one_lwp): Ditto.
9944
2acc282a
DE
99452009-05-23 Doug Evans <dje@google.com>
9946
9947 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9948 from struct inferior_list_entry * to struct lwp_info *.
9949 All callers updated.
9950
9f1036c1
DE
99512009-05-13 Doug Evans <dje@google.com>
9952
9953 * linux-x86-low.c: Don't include assert.h.
9954 (x86_siginfo_fixup): Use fatal, not assert.
9955 (x86_arch_setup): Fix comment.
9956
d0722149
DE
99572009-05-12 Doug Evans <dje@google.com>
9958
9959 Biarch support for i386/amd64 gdbserver.
9960 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9961 Add linux-x86-low.c.
9962 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9963 (linux-x86-low.o): Add.
9964 * linux-x86-64-low.c: Delete.
9965 * linux-i386-low.c: Delete.
9966 * linux-x86-low.c: New file.
9967 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9968 linux-x86-low.o.
9969 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9970 linux-x86-low.o.
9971 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9972 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9973 (linux_child_pid_to_exec_file): New function.
9974 (elf_64_header_p, elf_64_file_p): New functions.
9975 (siginfo_fixup): New function.
9976 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9977 give target a chance to convert layout.
9978 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9979 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9980
fdeb2a12
DE
99812009-05-07 Doug Evans <dje@google.com>
9982
9983 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9984 (regsets_store_inferior_registers): Ditto.
9985
a6dbe5df
PA
99862009-05-06 Pedro Alves <pedro@codesourcery.com>
9987
9988 PR server/10048
9989
9990 * linux-low.c (must_set_ptrace_flags): Delete.
9991 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9992 of the global.
9993 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9994 `lwp->must_set_ptrace_flags' instead.
ba42693b 9995 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
9996 (linux_wait_1): ... not here.
9997
5091eb23
DE
99982009-04-30 Doug Evans <dje@google.com>
9999
9f767825
DE
10000 * inferiors.c (started_inferior_callback): New function.
10001 (attached_inferior_callback): New function.
10002 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10003 * server.c (print_started_pid, print_attached_pid): New functions.
10004 (detach_or_kill_for_exit): New function.
10005 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10006 * server.h (have_started_inferiors_p): Declare.
10007 (have_attached_inferiors_p): Declare.
10008
5091eb23
DE
10009 * inferiors.c (remove_process): Fix memory leak, free process.
10010 * linux-low.c (linux_remove_process): New function.
10011 (linux_kill): Call it instead of remove_process.
10012 (linux_detach, linux_wait_1): Ditto.
10013
155c8968
PA
100142009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10015
10016 * configure.srv: Add x86 Windows CE target.
10017
7fe519cb
UW
100182009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10019
10020 * inferiors.c (get_thread_process): Make global.
10021 * server.h (get_thread_process): Add prototype.
10022 * thread-db.c (find_one_thread): Use get_thread_process
10023 instead of current_process.
10024 (thread_db_get_tls_address): Do not crash if called when
10025 thread layer is not yet initialized.
10026
5472f405
UW
100272009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10028
10029 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10030 * spu-low.c (current_tid): Rename to ...
10031 (current_ptid): ... this.
10032 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10033 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10034 ptid_get_lwp (current_ptid) instead of current_tid.
10035 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10036 instead of current_tid. Use find_process_pid to verify pid
10037 argument is valid. Pass proper argument to remove_process.
10038 (spu_thread_alive): Compare current_ptid instead of current_tid.
10039 (spu_resume): Likewise.
10040
55ac2b99
PA
100412009-04-02 Pedro Alves <pedro@codesourcery.com>
10042
10043 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10044 variable.
10045
95954743
PA
100462009-04-01 Pedro Alves <pedro@codesourcery.com>
10047
10048 Implement the multiprocess extensions, and add linux multiprocess
10049 support.
10050
10051 * server.h (ULONGEST): Declare.
10052 (struct ptid, ptid_t): New.
10053 (minus_one_ptid, null_ptid): Declare.
10054 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10055 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10056 (struct inferior_list_entry): Change `id' type from unsigned from
10057 to ptid_t.
10058 (struct sym_cache, struct breakpoint, struct
10059 process_info_private): Forward declare.
10060 (struct process_info): Declare.
10061 (current_process): Declare.
10062 (all_processes): Declare.
10063 (initialize_inferiors): Declare.
10064 (add_thread): Adjust to use ptid_t.
10065 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10066 (add_process, remove_process, find_thread_pid): Declare.
10067 (find_inferior_id): Adjust to use ptid_t.
10068 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10069 (multi_process): Declare.
10070 (push_event): Adjust to use ptid_t.
10071 (read_ptid, write_ptid): Declare.
10072 (prepare_resume_reply): Adjust to use ptid_t.
10073 (clear_symbol_cache): Declare.
10074 * inferiors.c (all_processes): New.
10075 (null_ptid, minus_one_ptid): New.
10076 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10077 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10078 (add_thread): Change unsigned long to ptid. Remove gdb_id
10079 parameter. Adjust.
10080 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10081 (gdb_id_to_thread): Rename to ...
10082 (find_thread_pid): ... this. Change unsigned long to ptid.
10083 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10084 (loaded_dll, pull_pid_from_list): Adjust.
10085 (add_process, remove_process, find_process_pid)
10086 (get_thread_process, current_process, initialize_inferiors): New.
10087 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10088 (struct target_waitstatus) <related_pid>: Ditto.
10089 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10090 return type to int.
10091 (struct target_ops) <join>: Add `pid' argument.
10092 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10093 (struct target_ops) <wait>: Add `ptid' field. Change return type
10094 to ptid.
10095 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10096 (mywait): Add `ptid' argument. Change return type to ptid_t.
10097 (target_pid_to_str): Declare.
10098 * target.c (set_desired_inferior): Adjust to use ptids.
10099 (mywait): Add new `ptid' argument. Adjust.
10100 (target_pid_to_str): New.
10101 * mem-break.h (free_all_breakpoints): Declare.
10102 * mem-break.c (breakpoints): Delelete.
10103 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10104 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10105 to use per-process breakpoint list.
10106 (free_all_breakpoints): New.
10107 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10108 (symbol_cache, all_symbols_looked_up): Delete.
10109 (hexchars): New.
10110 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10111 read_ptid): New.
10112 (prepare_resume_reply): Change ptid argument's type from unsigned
10113 long to ptid_t. Adjust. Implement W;process and X;process.
10114 (free_sym_cache, clear_symbol_cache): New.
10115 (look_up_one_symbol): Adjust to per-process symbol cache. *
10116 * server.c (cont_thread, general_thread, step_thread): Change type
10117 to ptid_t.
10118 (attached): Delete.
10119 (multi_process): New.
10120 (last_ptid): Change type to ptid_t.
10121 (struct vstop_notif) <ptid>: Change type to ptid_t.
10122 (queue_stop_reply, push_event): Change `ptid' argument's type to
10123 ptid_t.
10124 (discard_queued_stop_replies): Add `pid' argument.
10125 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10126 changes. Don't reference the `attached' global.
10127 (attach_inferior): Adjust to mywait interface changes.
10128 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10129 features. Handle and report "multiprocess+". Handle
10130 "qAttached:PID".
10131 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10132 changes.
10133 (handle_v_kill): New.
10134 (handle_v_stopped): Adjust to use target_pid_to_str.
10135 (handle_v_requests): Allow multiple attaches and runs when
10136 multiprocess extensions are in effect. Handle "vKill".
10137 (myresume): Adjust to use ptids.
10138 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10139 (handle_status): Adjust to discard_queued_stop_replies interface
10140 change.
10141 (first_thread_of, kill_inferior_callback)
10142 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10143 (main): Call initialize_inferiors. Adjust to use ptids, killing
10144 and detaching from all inferiors. Handle multiprocess packet
10145 variants.
10146 * linux-low.h: Include gdb_proc_service.h.
10147 (struct process_info_private): New.
10148 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10149 <lwpid_of>: Use ptid_get_lwp.
10150 (get_lwp_thread): Adjust.
10151 (struct lwp_info): Add `dead' member.
10152 (find_lwp_pid): Declare.
10153 * linux-low.c (thread_db_active): Delete.
10154 (new_inferior): Adjust comment.
10155 (inferior_pid): Delete.
10156 (linux_add_process): New.
10157 (handle_extended_wait): Adjust.
10158 (add_lwp): Change unsigned long to ptid.
10159 (linux_create_inferior): Add process to processes table. Adjust
10160 to use ptids. Don't set new_inferior here.
10161 (linux_attach_lwp): Rename to ...
10162 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10163 it. Adjust to use ptids.
10164 (linux_attach_lwp): New.
10165 (linux_attach): Add process to processes table. Don't set
10166 new_inferior here.
10167 (struct counter): New.
10168 (second_thread_of_pid_p, last_thread_of_process_p): New.
10169 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10170 multiple processes.
10171 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10172 processes. Remove process from process table.
10173 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10174 to multiple processes.
10175 (any_thread_of): New.
10176 (linux_detach): Add `pid' argument, and handle it. Remove process
10177 from processes table.
10178 (linux_join): Add `pid' argument. Handle it.
10179 (linux_thread_alive): Change unsighed long argument to ptid_t.
10180 Consider dead lwps as not being alive.
10181 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10182 threads we're not interested in.
10183 (same_lwp, find_lwp_pid): New.
10184 (linux_wait_for_lwp): Change `pid' argument's type from int to
10185 ptid_t. Adjust.
10186 (linux_wait_for_event): Rename to ...
10187 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10188 from int to ptid_t. Adjust.
10189 (linux_wait_for_event): New.
10190 (linux_wait_1): Add `ptid' argument. Change return type to
10191 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10192 that exit from the process table.
10193 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10194 Adjust.
10195 (mark_lwp_dead): New.
10196 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10197 stopping all threads, mark its main lwp as dead.
10198 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10199 ptids.
10200 (fetch_register, usr_store_inferior_registers)
10201 (regsets_fetch_inferior_registers)
10202 (regsets_store_inferior_registers, linux_read_memory)
10203 (linux_write_memory): Inline `inferior_pid'.
10204 (linux_look_up_symbols): Adjust to use per-process
10205 `thread_db_active'.
10206 (linux_request_interrupt): Adjust to use ptids.
10207 (linux_read_auxv): Inline `inferior_pid'.
10208 (initialize_low): Don't reference thread_db_active.
10209 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10210 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10211 (ps_getpid): Return the pid of the current inferior.
10212 * thread-db.c (proc_handle, thread_agent): Delete.
10213 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10214 per-process data.
10215 (find_one_thread): Change argument type to ptid_t. Adjust to
10216 per-process data.
10217 (maybe_attach_thread): Adjust to per-process data and ptids.
10218 (thread_db_find_new_threads): Ditto.
10219 (thread_db_init): Ditto.
10220 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10221 processes table. Adjust to use ptids.
10222 (spu_kill, spu_detach): Adjust interface. Remove process from
10223 processes table.
10224 (spu_join, spu_thread_alive): Adjust interface.
10225 (spu_wait): Adjust interface. Remove process from processes
10226 table. Adjust to use ptids.
10227 * win32-low.c (current_inferior_tid): Delete.
10228 (current_inferior_ptid): New.
10229 (debug_event_ptid): New.
10230 (thread_rec): Take a ptid. Adjust.
10231 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10232 (child_delete_thread): Ditto.
10233 (do_initial_child_stuff): Add `attached' argument. Add process to
10234 processes table.
10235 (child_fetch_inferior_registers, child_store_inferior_registers):
10236 Adjust.
10237 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10238 (win32_attach): Pass 1 to do_initial_child_stuff.
10239 (win32_kill): Adjust interface. Remove process from processes
10240 table.
10241 (win32_detach): Ditto.
10242 (win32_join): Adjust interface.
10243 (win32_thread_alive): Take a ptid.
10244 (win32_resume): Adjust to use ptids.
10245 (get_child_debug_event): Ditto.
10246 (win32_wait): Adjust interface. Remove exiting process from
10247 processes table.
10248
bd99dc85
PA
102492009-04-01 Pedro Alves <pedro@codesourcery.com>
10250
10251 Non-stop mode support.
10252
10253 * server.h (non_stop): Declare.
10254 (gdb_client_data, handler_func): Declare.
10255 (delete_file_handler, add_file_handler, start_event_loop):
10256 Declare.
10257 (handle_serial_event, handle_target_event, push_event)
10258 (putpkt_notif): Declare.
10259 * target.h (enum resume_kind): New.
10260 (struct thread_resume): Replace `step' field by `kind' field.
10261 (TARGET_WNOHANG): Define.
10262 (struct target_ops) <wait>: Add `options' argument.
10263 <supports_non_stop, async, start_non_stop>: New fields.
10264 (target_supports_non_stop, target_async): New.
10265 (start_non_stop): Declare.
10266 (mywait): Add `options' argument.
10267 * target.c (mywait): Add `options' argument. Print child exit
10268 notifications here.
10269 (start_non_stop): New.
10270 * server.c (non_stop, own_buf, mem_buf): New globals.
10271 (struct vstop_notif): New.
10272 (notif_queue): New global.
10273 (queue_stop_reply, push_event, discard_queued_stop_replies)
10274 (send_next_stop_reply): New.
10275 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10276 interface changes.
10277 (attach_inferior): In non-stop mode, don't wait for the target
10278 here.
10279 (handle_general_set): Handle QNonStop.
10280 (handle_query): When handling qC, return the current general
10281 thread, instead of the first thread of the list.
10282 (handle_query): If the backend supports non-stop mode, include
10283 QNonStop+ in the qSupported query response.
10284 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10285 and non-stop mode.
10286 (handle_v_attach, handle_v_run): Handle non-stop mode.
10287 (handle_v_stopped): New.
10288 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10289 (myresume): Adjust to use resume_kind. Handle non-stop.
10290 (queue_stop_reply_callback): New.
10291 (handle_status): Handle non-stop mode.
10292 (main): Clear non_stop flag on reconnection. Use the event-loop.
10293 Refactor serial protocol handling from here ...
10294 (process_serial_event): ... to this new function. When GDB
10295 selects any thread, select one here. In non-stop mode, wait until
10296 GDB acks all pending events before exiting.
10297 (handle_serial_event, handle_target_event): New.
10298 * remote-utils.c (remote_open): Install remote_desc in the event
10299 loop.
10300 (remote_close): Remove remote_desc from the event loop.
10301 (putpkt_binary): Rename to...
10302 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10303 (putpkt_binary): New as wrapper around putpkt_binary_1.
10304 (putpkt_notif): New.
10305 (prepare_resume_reply): In non-stop mode, don't change the
10306 general_thread.
10307 * event-loop.c: New.
10308 * Makefile.in (OBJ): Add event-loop.o.
10309 (event-loop.o): New rule.
10310
10311 * linux-low.h (pid_of): Moved here.
10312 (lwpid_of): New.
10313 (get_lwp_thread): Use lwpid_of.
10314 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10315 * linux-low.c (pid_of): Delete.
10316 (inferior_pid): Use lwpid_of.
10317 (linux_event_pipe): New.
10318 (target_is_async_p): New.
10319 (delete_lwp): New.
10320 (handle_extended_wait): Use lwpid_of.
10321 (add_lwp): Don't set lwpid field.
10322 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10323 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10324 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10325 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10326 first. Adjust to linux_wait_for_event interface changes. Use
10327 lwpid_of.
10328 (linux_detach): Don't delete the main lwp here.
10329 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10330 (status_pending_p): Don't consider explicitly suspended lwps.
10331 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10332 pointer. Add OPTIONS argument. Change return type to int. Use
10333 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10334 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10335 pointer. Add status pointer argument. Return a pid instead of a
10336 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10337 changes. In non-stop mode, don't switch to a random thread.
10338 (linux_wait): Rename to...
10339 (linux_wait_1): ... this. Add target_options argument, and handle
10340 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10341 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10342 clean exit and signal exit code. Don't stop all threads in
10343 non-stop mode. In all-stop mode, only stop all threads when
10344 reporting a stop to GDB. Handle explicit thread stop requests.
10345 (async_file_flush, async_file_mark): New.
10346 (linux_wait): New.
10347 (send_sigstop): Use lwpid_of.
10348 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10349 interface changes. In non-stop mode, don't switch to a random
10350 thread.
10351 (linux_resume_one_lwp): Use lwpid_of.
10352 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10353 (linux_resume_one_thread): ... this. Handle resume_stop. In
10354 non-stop mode, don't look for pending flag in all threads.
10355 (resume_status_pending_p): Don't consider explicitly suspended
10356 threads.
10357 (my_waitpid): Reimplement. Emulate __WALL.
10358 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10359 Use lwpid_of.
10360 (sigchld_handler, linux_supports_non_stop, linux_async)
10361 (linux_start_non_stop): New.
10362 (linux_target_ops): Register linux_supports_non_stop, linux_async
10363 and linux_start_non_stop.
10364 (initialize_low): Install SIGCHLD handler.
10365 * thread-db.c (thread_db_create_event, find_one_thread)
10366 (thread_db_get_tls_address): Use lwpid_of.
10367 * win32-low.c (win32_detach): Adjust to use resume_kind.
10368 (win32_wait): Add `options' argument.
10369 * spu-low.c (spu_resume): Adjust to use resume_kind.
10370 (spu_wait): Add `options' argument.
10371
5b1c542e
PA
103722009-04-01 Pedro Alves <pedro@codesourcery.com>
10373
10374 Decouple target code from remote protocol.
10375
10376 * target.h (enum target_waitkind): New.
10377 (struct target_waitstatus): New.
10378 (struct target_ops) <wait>: Return an unsigned long. Take a
10379 target_waitstatus pointer instead of a char pointer.
10380 (mywait): Likewise.
10381 * target.c (mywait): Change prototype to return an unsigned long.
10382 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10383 * server.h (thread_from_wait, old_thread_from_wait): Delete
10384 declarations.
10385 (prepare_resume_reply): Change prototype to take a
10386 target_waitstatus.
10387 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10388 (last_status, last_ptid): New.
10389 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10390 pid instead of a signal.
10391 (attach_inferior): Remove "status" and "signal" parameters.
10392 Adjust.
10393 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10394 not as an address.
10395 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10396 (handle_v_requests, myresume): Remove "status" and "signal"
10397 parameters. Adjust.
10398 (handle_status): New.
10399 (main): Delete local `status'. Adjust.
10400 * remote-utils.c: Include target.h.
10401 (prepare_resume_reply): Change prototype to take a
10402 target_waitstatus. Adjust.
10403
10404 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10405 interface.
10406 * spu-low.c (spu_wait): Adjust.
10407 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10408 Delete.
10409 (win32_wait): Adjust.
10410
2bd7c093
PA
104112009-04-01 Pedro Alves <pedro@codesourcery.com>
10412
10413 * target.h (struct thread_resume): Delete leave_stopped member.
10414 (struct target_ops): Add a `n' argument to the `resume' callback.
10415 * server.c (start_inferior): Adjust.
10416 (handle_v_cont, myresume): Adjust.
10417 * linux-low.c (check_removed_breakpoint): Adjust to resume
10418 interface change, and to removed leave_stopped field.
10419 (resume_ptr): Delete.
10420 (struct thread_resume_array): New.
10421 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10422 resume interface change.
10423 (linux_continue_one_thread, linux_queue_one_thread)
10424 (resume_status_pending_p): Check if the resume field is NULL
10425 instead of checking the leave_stopped member.
10426 (linux_resume): Adjust to the target resume interface change.
10427 * spu-low.c (spu_resume): Adjust to the target resume interface
10428 change.
10429 * win32-low.c (win32_detach, win32_resume): Ditto.
10430
c35fafde
PA
104312009-04-01 Pedro Alves <pedro@codesourcery.com>
10432
10433 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10434 flag.
10435 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10436 pending.
10437 (linux_continue_one_thread): Only preserve the stepping flag if
10438 there's a pending breakpoint.
10439
0a59d50b
PA
104402009-03-31 Pedro Alves <pedro@codesourcery.com>
10441
10442 * server.c (main): After the inferior having exited, call
10443 remote_close before exiting gdbserver.
10444
f04c6d38
TJB
104452009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10446
10447 Fix size of FPSCR in Power 7 processors.
10448 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10449 (PPC_FEATURE_HAS_DFP): New #define.
10450 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10451 size of the FPSCR.
10452
78e5cee6
PA
104532009-03-23 Pedro Alves <pedro@codesourcery.com>
10454
10455 * server.c (handle_query) Whitespace and formatting.
10456
1b3f6016
PA
104572009-03-22 Pedro Alves <pedro@codesourcery.com>
10458
10459 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10460 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10461 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10462 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10463 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10464 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10465 Makefile.in, configure.ac: Fix whitespace throughout.
10466 * configure: Regenerate.
10467
a07b2135
PA
104682009-03-22 Pedro Alves <pedro@codesourcery.com>
10469
10470 * inferiors.c (find_inferior): Make it safe for the callback
10471 function to delete the currently iterated inferior.
10472
67cc2626
PA
104732009-03-22 Pedro Alves <pedro@codesourcery.com>
10474
10475 * Makefile.in (linuw_low_h): Move higher.
10476 (thread-db.o): Depend on $(linux_low_h).
10477
54a0b537
PA
104782009-03-17 Pedro Alves <pedro@codesourcery.com>
10479
10480 Rename "process" to "lwp" throughout.
10481
10482 * linux-low.c (all_processes): Rename to...
10483 (all_lwps): ... this.
10484 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10485 (add_process): Rename to ...
10486 (add_lwp): ... this. Adjust.
10487 (linux_create_inferior): Adjust.
10488 (linux_attach_lwp): Adjust.
10489 (linux_attach): Adjust.
10490 (linux_kill_one_process): Rename to ...
10491 (linux_kill_one_lwp): ... this. Adjust.
10492 (linux_kill): Adjust.
10493 (linux_detach_one_process): Rename to ...
10494 (linux_detach_one_lwp): ... this. Adjust.
10495 (linux_detach): Adjust.
10496 (check_removed_breakpoint): Adjust.
10497 (status_pending_p): Adjust.
10498 (linux_wait_for_process): Rename to ...
10499 (linux_wait_for_lwp): ... this. Adjust.
10500 (linux_wait_for_event): Adjust.
10501 (send_sigstop): Adjust.
10502 (wait_for_sigstop): Adjust.
10503 (stop_all_processes): Rename to ...
10504 (stop_all_lwps): ... this.
10505 (linux_resume_one_process): Rename to ...
10506 (linux_resume_one_lwp): ... this. Adjust.
10507 (linux_set_resume_request, linux_continue_one_thread)
10508 (linux_queue_one_thread, resume_status_pending_p)
10509 (usr_store_inferior_registers, regsets_store_inferior_registers)
10510 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10511 Adjust.
10512 * linux-low.h (get_process): Rename to ...
10513 (get_lwp): ... this. Adjust.
10514 (get_thread_process): Rename to ...
10515 (get_thread_lwp): ... this. Adjust.
10516 (get_process_thread): Rename to ...
10517 (get_lwp_thread): ... this. Adjust.
10518 (struct process_info): Rename to ...
10519 (struct lwp_info): ... this.
10520 (all_processes): Rename to ...
10521 (all_lwps): ... this.
10522 * proc-service.c (ps_lgetregs): Adjust.
10523 * thread-db.c (thread_db_create_event, find_one_thread)
10524 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10525
0b16c5cf
PA
105262009-03-14 Pedro Alves <pedro@codesourcery.com>
10527
10528 * server.c (handle_query): Handle "qAttached".
10529
32de4b9d
NS
105302009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10531
10532 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10533 GPLv3, update license URL.
10534
2aecd87f
DE
105352009-03-01 Doug Evans <dje@google.com>
10536
93efd302 10537 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
10538 (server_h): Add gdb_signals.h.
10539 (signals.o): Update.
10540 * server.h (target_signal_from_host,target_signal_to_host_p)
10541 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10542
86b1f9c5
PM
105432009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10544
10545 * remote-utils.c (getpkt): Also generate remote-debug
10546 information if noack_mode is set.
10547
4aa995e1
PA
105482009-02-06 Pedro Alves <pedro@codesourcery.com>
10549
10550 * server.c (handle_query): Report qXfer:siginfo:read and
10551 qXfer:siginfo:write as supported and handle them.
10552 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10553 * linux-low.c (linux_xfer_siginfo): New.
10554 (linux_target_ops): Set it.
10555
62709adf
PA
105562009-01-26 Pedro Alves <pedro@codesourcery.com>
10557
10558 * server.c (gdbserver_usage): Mention --remote-debug.
10559 (main): Accept '--remote-debug' switch.
10560
aef93bd7
DE
105612009-01-18 Doug Evans <dje@google.com>
10562
10563 * regcache.c (new_register_cache): No need to check result of xcalloc.
10564 * server.c (handle_search_memory): Back out calls to xmalloc,
10565 result is checked and error is returned to user upon failure.
10566 (handle_query): Ditto. Add more checks for result of malloc.
10567 (handle_v_cont): Check result of malloc, report error back to
10568 user upon failure.
10569 (handle_v_run): Ditto. Call freeargv.
10570 * server.h (freeargv): Declare.
10571 * utils.c (freeargv): New fn.
10572
54363045
DE
105732009-01-15 Doug Evans <dje@google.com>
10574
f626972c
DE
10575 * gdbreplay.c (perror_with_name): Make arg const char *.
10576 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10577 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10578 * utils.c (perror_with_name): Make arg const char *.
54363045 10579
18aae699
PA
105802009-01-14 Pedro Alves <pedro@codesourcery.com>
10581
10582 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10583 when handling a EXIT_PROCESS_DEBUG_EVENT.
10584
ff703abe
JB
105852009-01-06 Joel Brobecker <brobecker@adacore.com>
10586
10587 * gdbreplay.c (gdbreplay_version): Update copyright year.
10588 * server.c (gdbserver_version): Likewise.
10589
f21cc1a2 105902009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10591
10592 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10593 (handle_extended_wait): Improve comment.
0e21c1ec 10594
bca929d3
DE
105952008-12-13 Doug Evans <dje@google.com>
10596
10597 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10598 * server.h (ATTR_MALLOC): New macro.
10599 (xmalloc,xcalloc,xstrdup): Declare.
10600 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10601 * inferiors.c: Ditto.
10602 * linux-low.c: Ditto.
10603 * mem-break.c: Ditto.
10604 * regcache.c: Ditto.
10605 * remote-utils.c: Ditto.
10606 * server.c: Ditto.
10607 * target.c: Ditto.
10608 * win32-low.c: Ditto.
10609
97438e3f
DE
106102008-12-12 Doug Evans <dje@google.com>
10611
896c7fbb
DE
10612 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10613 in debugging printf.
10614
97438e3f
DE
10615 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10616
e3b886f8
DE
106172008-12-09 Doug Evans <dje@google.com>
10618
10619 * linux-low.h (struct process_info): Delete member tid, unused.
10620 * thread-db.c (find_one_thread): Update.
10621 (maybe_attach_thread): Update.
10622
07e059b5
VP
106232008-12-02 Pedro Alves <pedro@codesourcery.com>
10624
889bf7c5
PA
10625 * target.h (struct target_ops): Add qxfer_osdata member.
10626 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10627 and dirent.h.
10628 (linux_qxfer_osdata): New functions.
10629 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10630 callback.
10631 * server.c (handle_query): Handle "qXfer:osdata:read:".
10632 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10633 (buffer_xml_printf): New functions.
10634 * server.h (struct buffer): New.
10635 (buffer_grow_str, buffer_grow_str0): New macros.
10636 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10637 (buffer_xml_printf): Declare.
07e059b5 10638
4cab47ab
DE
106392008-11-24 Doug Evans <dje@google.com>
10640
10641 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10642
f142445f
DJ
106432008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10644
10645 * server.c (handle_v_run): Always use the supplied argument list.
10646
d0107bb6 106472008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 10648
d0107bb6
BW
10649 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10650 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 10651
2c4ad781
TJB
106522008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10653
10654 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10655 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10656 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10657 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10658 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10659 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10660 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10661 XML target descriptions.
10662 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10663 when inferior is running on an ISA 2.05 or later processor. Add
10664 special case to return offset for full 64-bit slot of FPSCR when
10665 in 32-bits.
10666
dfb64f85
DJ
106672008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10668
10669 * Makefile.in (SFILES, clean): Added sparc64 files.
10670 (reg-sparc64.o, reg-sparc64.c): New.
10671 * configure.srv (sparc*-*-linux*): New configuration.
10672 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10673 syscall arguments for SPARC.
10674 (regsets_store_inferior_registers): Likewise.
10675 * linux-sparc-low.c: New file.
10676
66b6e1dd
DE
106772008-10-21 Doug Evans <dje@google.com>
10678
10679 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10680 (READLINE_DIR,READLINE_DEP): Delete.
10681 (INTERNAL_CFLAGS): Update.
10682 (LINTFLAGS): Update.
10683
9b710a42
PA
106842008-10-10 Pedro Alves <pedro@codesourcery.com>
10685
10686 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10687 whole argv from the last run, not just argv[0].
10688
5822d809
PA
106892008-09-08 Pedro Alves <pedro@codesourcery.com>
10690
10691 * regcache.c (new_register_cache): Return NULL if the register
10692 cache size isn't known yet.
10693 (free_register_cache): Avoid dereferencing a NULL regcache.
10694
74aac56f
DJ
106952008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10696
10697 * configure.srv: Merge MIPS and MIPS64.
10698
400b20f5
MR
106992008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10700
10701 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10702
677c5bb1
LM
107032008-08-18 Luis Machado <luisgpm@br.ibm.com>
10704
10705 * Makefile.in: Add required vsx dependencies.
10706
10707 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10708 Declare init_registers_powerpc_vsx32l.
10709 Declare init_registers_powerpc_vsx64l.
10710 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10711 (ppc_arch_setup): Check for VSX in hwcap.
10712 (ppc_fill_vsxregset): New function.
10713 (ppc_store_vsxregset): New function.
10714 Add new VSX entry in regset_info target_regsets.
10715
10716 * configure.srv: Add new VSX dependencies.
10717
a6f3e723
SL
107182008-08-12 Pedro Alves <pedro@codesourcery.com>
10719
10720 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10721 (remote_open): Set or clear transport_is_reliable.
10722 (putpkt_binary): Don't expect acks in noack mode.
10723 (getpkt): Don't send ack/nac in noack mode.
10724 * server.c (handle_general_set): Handle QStartNoAckMode.
10725 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10726 qSupported.
10727 (main): Reset noack_mode on every connection.
10728 * server.h (noack_mode): Declare.
10729
a417dc56
RW
107302008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10731
10732 * Makefile.in (GDBREPLAY_OBS): New variable.
10733 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10734
3221518c
UW
107352008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10736 Daniel Jacobowitz <dan@codesourcery.com>
10737
10738 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10739 (usr_store_inferior_registers): Likewise.
10740 (regsets_store_inferior_registers): Likewise.
10741
ec56be1b
PA
107422008-07-31 Rolf Jansen <rj@surtec.com>
10743 Pedro Alves <pedro@codesourcery.com>
10744
10745 * configure.ac: Check for memmem declaration.
10746 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10747 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10748 (disable_packet_qfThreadInfo): Unconditionally compile.
10749 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10750 * configure, config.in: Regenerate.
10751
2fe5e3ff
DE
107522008-07-28 Doug Kwan <dougkwan@google.com>
10753
10754 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10755 (linux_write_memory): Remove declaration of errno.
10756
836acd6d
UW
107572008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10758
10759 * linux-low.c (handle_extended_wait): Do not use "status"
10760 variable uninitialized.
10761
aeba519e
PA
107622008-07-07 Pedro Alves <pedro@codesourcery.com>
10763
10764 * server.c (handle_v_attach): Inhibit reporting dll changes.
10765
db42f210
PA
107662008-06-27 Pedro Alves <pedro@codesourcery.com>
10767
10768 * remote-utils.c (prepare_resume_reply): If requested, don't
10769 output "thread:TID" in the T stop reply.
10770
10771 * server.c (disable_packet_vCont, disable_packet_Tthread)
10772 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10773 (handle_query): If requested, disable support for qC, qfThreadInfo
10774 and qsThreadInfo.
10775 (handle_v_requests): If requested, disable support for vCont.
10776 (gdbserver_show_disableable): New.
10777 (main): Handle --disable-packet and --disable-packet=LIST.
10778
10779 * server.h (disable_packet_vCont, disable_packet_Tthread)
10780 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10781
8e4c5421
CD
107822008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10783
10784 * server.c (gdbserver_usage): Mention --version.
10785
6e23a804
DJ
107862008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10787
10788 * Makefile.in (gdbreplay.o): New rule.
10789
90aa6a40
JM
107902008-06-06 Joseph Myers <joseph@codesourcery.com>
10791
10792 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10793 message, not gdbserver.
10794
c16158bc 107952008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
10796 Nathan Sidwell <nathan@codesourcery.com>
10797 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
10798
10799 * acinclude.m4: Include ../../config/acx.m4.
10800 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10801 * configure, config.in: Regenerate.
10802 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10803 * server.c (gdbserver_version): Print PKGVERSION.
10804 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10805 (main): Adjust gdbserver_usage calls.
10806 * gdbreplay.c (version, host_name): Add declarations.
10807 (gdbreplay_version, gdbreplay_usage): New.
10808 (main): Accept --version and --help options.
10809
aeb75bf5
DJ
108102008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10811
10812 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10813 (arm_breakpoint_at): Handle Thumb.
10814 (the_low_target): Add comment.
10815
76b233dd
UW
108162008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10817
10818 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10819
08388c79
DE
108202008-05-09 Doug Evans <dje@google.com>
10821
a3c83fae
DE
10822 * server.h (decode_search_memory_packet): Declare.
10823 * remote-utils.c (decode_search_memory_packet): New fn.
10824 * server.c (handle_search_memory_1): New fn.
08388c79
DE
10825 (handle_search_memory): New fn.
10826 (handle_query): Process qSearch:memory packets.
10827
bb9c3d36
UW
108282008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10829
10830 * regcache.c (registers_length): Remove.
10831 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10832 full register packet.
10833 * regcache.h (registers_length): Remove prototype.
10834 * server.h (PBUFSIZ): Define to 16384.
10835
7284e1be
UW
108362008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10837
10838 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10839 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10840 powerpc-64l.o, and powerpc-altivec64l.o.
10841 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10842 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10843 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10844 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10845 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10846 to srv_xmlfiles.
10847
10848 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10849 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10850 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10851 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10852 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10853 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10854 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10855 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10856 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10857 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10858 (clean): Update.
10859
10860 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10861 (init_registers_powerpc_32l): ... this new prototype.
10862 (init_registers_powerpc_32): Remove, replace by ...
10863 (init_registers_powerpc_altivec32l): ... this new prototype.
10864 (init_registers_powerpc_e500): Remove, replace by ...
10865 (init_registers_powerpc_e500l): ... this new prototype.
10866 (init_registers_ppc64): Remove, replace by ...
10867 (init_registers_powerpc_64l): ... this new prototype.
10868 (init_registers_powerpc_64): Remove, replace by ...
10869 (init_registers_powerpc_altivec64l): ... this new prototype.
10870 (ppc_num_regs): Set to 73.
10871 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10872 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10873 (ppc_cannot_store_register): Handle orig_r3 and trap.
10874 (ppc_arch_setup): Update init_registers_... calls.
10875 (ppc_fill_gregset): Handle orig_r3 and trap.
10876
10877 * inferiors.c (clear_inferiors): Reset current_inferior.
10878
fdc59709
PB
108792008-04-23 Paolo Bonzini <bonzini@gnu.org>
10880
889bf7c5
PA
10881 * acinclude.m4: Add override.m4.
10882 * configure: Regenerate.
fdc59709 10883
c9b2f845
UW
108842008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10885
10886 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10887 initial call to init_register_ppc64.
10888
550512b8
UW
108892008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10890
43aaf8b6
PA
10891 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10892 single powerpc*-*-linux* case.
550512b8
UW
10893 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10894
b6430ec3
UW
108952008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10896
10897 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 10898 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
10899 from reg_xmlfiles.
10900 * linux-ppc-low.c: Include <elf.h>.
10901 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10902 (ppc_hwcap): New global variable.
10903 (ppc_regmap): Remove __SPE__ #ifdef sections.
10904 (ppc_regmap_e500): New global variable.
10905 (ppc_cannot_store_register): Update __SPE__ special case.
10906 (ppc_get_hwcap): New function.
10907 (ppc_arch_setup): Use it to determine whether inferior supports
10908 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10909 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10910 Do not access registers if target does not support AltiVec.
10911 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10912 Do not access registers if target does not support SPE.
10913 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10914
52fa2412
UW
109152008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10916
10917 * linux-low.c (disabled_regsets, num_regsets): New.
10918 (use_regsets_p): Delete.
10919 (linux_wait_for_process): Clear disabled_regsets.
10920 (regsets_fetch_inferior_registers): Check and set it.
10921 (regsets_store_inferior_registers): Likewise.
10922 (linux_fetch_registers, linux_store_registers): Do not use
10923 use_regsets_p.
10924 (initialize_low): Allocate disabled_regsets.
10925
e28b3332
DJ
109262008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10927
10928 * Makefile.in (LIBOBJS): New.
10929 (OBS): Use LIBOBJS.
10930 (memmem.o): New rule.
10931 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10932 * configure: Regenerated.
10933
4536995d
UW
109342008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10935
10936 * server.c (handle_query): Never return "unsupported" for
10937 qXfer:features:read queries.
10938
221c031f
UW
109392008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10940
10941 * server.c (get_features_xml): Fix inverted condition.
10942 (handle_query): Always support qXfer:feature:read.
10943
ccd213ac
DJ
109442008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10945
10946 * server.c (wrapper_argv): New.
10947 (start_inferior): Handle wrapper_argv. If set, expect an extra
10948 trap.
10949 (gdbserver_usage): Document --wrapper.
10950 (main): Parse --wrapper.
10951
6fe305f7
UW
109522008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10953
10954 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10955 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10956 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10957 (ppc_set_pc): Likewise.
10958 (ppc_arch_setup): New function.
10959 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10960 of collect_register.
889bf7c5 10961 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 10962
5b0a002e
UW
109632008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10964
10965 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10966 instead of linux-ppc64-low.o.
10967 * linux-ppc64-low.c: Remove file.
10968 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10969 (linux-ppc64-low.o): Remove rule.
10970
10971 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10972 (init_registers_powerpc_64): Likewise.
10973 (ppc_regmap): Conditionally define depending on __powerpc64__.
10974 (ppc_cannot_store_register): Do not special-case "fpscr" when
10975 compiled on __powerpc64__.
10976 (ppc_collect_ptrace_register): New function.
10977 (ppc_supply_ptrace_register): New function.
10978 (ppc_breakpoint): Change type to "unsigned int".
10979 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10980 (the_low_target): Conditionally provide initializers for the
889bf7c5 10981 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
10982 collect_ptrace_register and supply_ptrace_register members.
10983
9b4b61c8
UW
109842008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10985
10986 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10987 * server.c (gdbserver_xmltarget): Define.
10988 (get_features_xml): Use it to replace "target.xml" and arch_string.
10989
10990 * configure.srv: Remove srv_xmltarget. Add XML files that were
10991 mentioned there to srv_xmlfiles instead. Remove conditional tests
10992 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10993 srv_xmlfiles and srv_regobj to include all possible choices.
10994 * configure.ac (srv_xmltarget): Remove.
10995 (srv_xmlfiles): Do not add "target.xml".
10996 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10997 checks for supplementary target information.
10998 * configure: Regenerate.
10999 * Makefile.in (XML_TARGET): Remove.
11000 (target.xml): Remove rule.
11001 (clean): Do not clean up target.xml.
11002 (.PRECIOUS): Do not mention target.xml.
11003
11004 * target.h (struct target_ops): Remove arch_string member.
11005 * linux-low.c (linux_arch_string): Remove.
11006 (linux_target_ops): Remove arch_string initializer.
11007 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11008 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11009 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11010 * spu-low.c (spu_arch_string): Remove.
11011 (spu_target_ops): Remove arch_string initializer.
11012 * win32-low.c (win32_arch_string): Remove.
11013 (win32_target_ops): Remove arch_string initializer.
11014 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11015 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11016 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11017
ee1a7ae4
UW
110182008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11019
11020 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11021 by collect_ptrace_register and supply_ptrace_register hooks.
11022 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11023 instead of checking for the_low_target.left_pad_xfer.
11024 (usr_store_inferior_registers): Use collect_ptrace_register callback
11025 instead of checking for the_low_target.left_pad_xfer.
11026
11027 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11028 (s390_supply_ptrace_register): Likewise.
11029 (s390_fill_gregset): Call s390_collect_ptrace_register.
11030 (the_low_target): Update.
11031
11032 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11033 (ppc_supply_ptrace_register): Likewise.
11034 (the_low_target): Update.
11035
11036 * linux-i386-low.c (the_low_target): Update.
11037 * linux-x86-64-low.c (the_low_target): Update.
11038
d61ddec4
UW
110392008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11040
11041 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11042 reg-s390.o and reg-s390x.o.
11043
11044 * linux-low.c (new_inferior): New global variable.
11045 (linux_create_inferior, linux_attach): Set it.
11046 (linux_wait_for_process): Call the_low_target.arch_setup after the
11047 target has stopped for the first time.
11048 (initialize_low): Do not call the_low_target.arch_setup.
11049
11050 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11051 (s390_set_pc): Likewise.
11052 (s390_arch_setup): New function.
11053 (the_low_target): Use s390_arch_setup as arch_setup routine.
11054
11055 * regcache.c (realloc_register_cache): New function.
11056 (set_register_cache): Call it for each existing regcache.
11057
d05b4ac3
UW
110582008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11059
11060 * server.h (init_registers): Remove prototype.
11061
11062 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11063 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11064 instead of init_registers ().
11065 * linux-arm-low.c (init_registers_arm): Add prototype.
11066 (init_registers_arm_with_iwmmxt): Likewise.
11067 (the_low_target): Add initializer for arch_setup field.
11068 * linux-cris-low.c (init_registers_cris): Add prototype.
11069 (the_low_target): Add initializer for arch_setup field.
11070 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11071 (the_low_target): Add initializer for arch_setup field.
11072 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11073 (the_low_target): Add initializer for arch_setup field.
11074 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11075 (the_low_target): Add initializer for arch_setup field.
11076 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11077 (the_low_target): Add initializer for arch_setup field.
11078 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11079 (the_low_target): Add initializer for arch_setup field.
11080 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11081 (init_registers_mips64_linux): Likewise.
11082 (the_low_target): Add initializer for arch_setup field.
11083 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11084 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11085 (the_low_target): Add initializer for arch_setup field.
11086 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11087 (init_registers_powerpc_64): Likewise.
11088 (the_low_target): Add initializer for arch_setup field.
11089 * linux-s390-low.c (init_registers_s390): Add prototype.
11090 (init_registers_s390x): Likewise.
11091 (the_low_target): Add initializer for arch_setup field.
11092 * linux-sh-low.c (init_registers_sh): Add prototype.
11093 (the_low_target): Add initializer for arch_setup field.
11094 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11095 (the_low_target): Add initializer for arch_setup field.
11096 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11097 (the_low_target): Add initializer for arch_setup field.
11098
11099 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11100 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11101 instead of init_registers ().
11102 * win32-arm-low.c (init_registers_arm): Add prototype.
11103 (the_low_target): Add initializer for arch_setup field.
11104 * win32-i386-low.c (init_registers_i386): Add prototype.
11105 (the_low_target): Add initializer for arch_setup field.
11106
11107 * spu-low.c (init_registers_spu): Add prototype.
11108 (initialize_low): Call initialie_registers_spu () instead of
11109 initialize_registers ().
11110
fd96d250
PA
111112008-02-19 Pedro Alves <pedro@codesourcery.com>
11112
11113 * server.c (handle_v_requests): When handling the vRun and vAttach
11114 packets, if already debugging a process, don't kill it. Return an
11115 error instead.
11116
d41b6bb4
DJ
111172008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11118
11119 * server.c (handle_query): Correct length check.
11120
5ac588cf
PA
111212008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11122
11123 * win32-low.c (do_initial_child_stuff): Add process handle
11124 parameter. Set current_process_handle and current_process_id from the
11125 parameters. Clear globals.
11126 (win32_create_inferior): Don't set current_process_handle and
11127 current_process_id here. Instead pass them on the call to
11128 do_initial_child_stuff.
11129 (win32_attach): Likewise.
11130 (win32_clear_inferiors): New.
11131 (win32_kill): Don't close the current process handle or the
11132 current thread handle here. Instead call win32_clear_inferiors.
11133 (win32_detach): Don't open a new handle to the process. Call
11134 win32_clear_inferiors.
11135 (win32_join): Don't rely on current_process_handle; open a new
11136 handle using the process id.
11137 (win32_wait): Call win32_clear_inferiors when the inferior process
11138 has exited.
11139
ecd7ecbc
DJ
111402008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11141
11142 * server.c (monitor_show_help): Add "exit".
11143
1525d545
MG
111442008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11145
ecd7ecbc 11146 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
11147 (clean): Add reg-xtensa.c.
11148 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
11149 * configure.srv (xtensa*-*-linux*) New target.
11150 * linux-xtensa-low.c: New.
11151 * xtensa-xtregs.c: New.
1525d545 11152
59a016f0
PA
111532008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11154
11155 * hostio.c: Don't include errno.h.
11156 (errno_to_fileio_errno): Move to hostio-errno.
11157 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11158 error number outputting to the target->hostio_last_error callback.
11159 (hostio_packet_error): Use FILEIO_EINVAL directly.
11160 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11161 calls to hostio_error.
11162 * hostio-errno.c: New.
11163 * server.h (hostio_last_error_from_errno): Declare.
11164 * target.h (target_ops): Add hostio_last_error member.
11165 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11166 as hostio_last_error handler.
889bf7c5 11167 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
11168 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11169 (wince_hostio_last_error): New functions.
11170 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11171 as hostio_last_error handler.
11172 (win32_target_ops) [!_WIN32_WCE]: Register
11173 hostio_last_error_from_errno as hostio_last_error handler.
11174 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11175 (hostio-errno.o): New rule.
11176 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11177 * configure.srv (srv_hostio_err_objs): New variable. Default to
11178 hostio-errno.o.
11179 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11180 * configure: Regenerate.
11181
2d717e4f
DJ
111822008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11183
11184 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11185 (linux_kill, linux_detach): Clean up the process list.
11186 * remote-utils.c (remote_open): Improve port number parsing.
11187 (putpkt_binary, input_interrupt): Only send interrupts if the target
11188 is running.
11189 * server.c (extended_protocol): Make static.
11190 (attached): Define earlier.
11191 (exit_requested, response_needed, program_argv): New variables.
11192 (target_running): New.
11193 (start_inferior): Clear attached here.
11194 (attach_inferior): Set attached here.
11195 (require_running): Define.
11196 (handle_query): Use require_running and target_running. Implement
11197 "monitor exit".
11198 (handle_v_attach, handle_v_run): New.
11199 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11200 (gdbserver_usage): Update.
11201 (main): Redo argument parsing. Handle --debug and --multi. Handle
11202 --attach along with other options or after the port. Save
11203 program_argv. Support no initial program. Resynchronize
11204 communication with GDB after an error. Handle "monitor exit".
11205 Use require_running and target_running. Always allow the extended
11206 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11207 restart in extended mode.
11208 * README: Refer to the GDB manual. Update --attach usage.
11209
7407e2de
AS
112102007-12-20 Andreas Schwab <schwab@suse.de>
11211
11212 * linux-low.c (STACK_SIZE): Define.
11213 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11214 (linux_test_for_tracefork): Likewise.
11215
b65d95c5
DJ
112162007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11217
11218 * linux-low.c (linux_wait_for_event): Update messages. Do not
11219 reinsert auto-delete breakpoints.
11220 * mem-break.c (struct breakpoint): Change return type of handler to
11221 int.
11222 (set_breakpoint_at): Update handler type.
11223 (reinsert_breakpoint_handler): Return 1 instead of calling
11224 delete_breakpoint.
11225 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11226 setting a new one.
11227 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11228 * mem-break.h (set_breakpoint_at): Update handler type.
11229 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11230 * win32-low.c (auto_delete_breakpoint): New.
11231 (get_child_debug_event): Use it.
11232
4e799345
DJ
112332007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11234
11235 * configure.ac: Check for pread and pwrite.
11236 * hostio.c (handle_pread): Fall back to lseek and read.
11237 (handle_pwrite): Fall back to lseek and write.
11238 * config.in, configure: Regenerated.
11239
27524b67
DJ
112402007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11241
11242 * server.c (myresume): Add own_buf argument.
11243 (main): Update calls.
11244
a20d5e98
DJ
112452007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11246
11247 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11248 * remote-utils.c (remote_open): Do not call disable_async_io.
11249 (block_async_io): Delete.
11250 (unblock_async_io): Make static.
11251 (initialize_async_io): New.
11252 * server.c (handle_v_cont): Handle async I/O here.
11253 (myresume): Likewise. Move other common resume tasks here...
11254 (main): ... from here. Call initialize_async_io. Disable async
11255 I/O before the main loop.
11256 * server.h (initialize_async_io): Declare.
11257 (block_async_io, unblock_async_io): Delete prototypes.
11258 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11259
b79d787e
DJ
112602007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11261
11262 * remote-utils.c (readchar): Allow binary data in received messages.
11263
d97903b2
PA
112642007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11265
11266 * win32-low.c (attaching): New global.
11267 (win32_create_inferior): Clear the `attaching' global.
11268 (win32_attach): Set the `attaching' global.
11269 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11270 attaching. Only set a breakpoint at the entry point if not
11271 attaching.
11272
311de423
PA
112732007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11274
11275 * server.c (main): Don't report dll events on the initial
11276 connection on attaches.
11277
6c2d16d2
PA
112782007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11279
11280 * server.c (main): Relax numerical bases supported for the pid of
11281 the --attach command line argument.
11282
5ca906e6
PA
112832007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11284
11285 * win32-low.c (win32_attach): Call OpenProcess before
11286 DebugActiveProcess, not after. Add last error output to error
11287 call.
11288
9c6c8194
PA
112892007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11290
11291 * win32-low.c (win32_get_thread_context)
11292 (win32_set_thread_context): New functions.
11293 (thread_rec): Use win32_get_thread_context.
11294 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11295 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11296 field.
11297
4d5d1aaa
PA
112982007-12-03 Leo Zayas
11299 Pedro Alves <pedro_alves@portugalmail.pt>
11300
11301 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11302 global variables.
11303 (child_add_thread): Minor cleanup.
11304 (child_continue): Resume artificially suspended threads before
11305 calling ContinueDebugEvent.
11306 (suspend_one_thread): New.
11307 (fake_breakpoint_event): New.
11308 (get_child_debug_event): Change return type to int. Check here if
11309 gdb sent an interrupt request. If a soft interrupt was requested,
11310 fake a breakpoint event. Return 0 if there is no event to handle,
11311 and 1 otherwise.
11312 (win32_wait): Don't check here if gdb sent an interrupt request.
11313 Ensure there is a valid event to handle.
11314 (win32_request_interrupt): Add soft interruption method as last
11315 resort.
11316
c436e841
PA
113172007-12-03 Leo Zayas
11318 Pedro Alves <pedro_alves@portugalmail.pt>
11319
11320 * win32-low.h (win32_thread_info): Add descriptions to the
11321 structure members. Replace `suspend_count' counter by a
11322 `suspended' flag.
11323 * win32-low.c (thread_rec): Update condition of when to get the
11324 context from the inferior. Rely on ContextFlags being set if it
11325 has already been retrieved. Only suspend the inferior thread if
11326 we haven't already. Warn if that fails.
11327 (continue_one_thread): s/suspend_count/suspended/. Only call
11328 ResumeThread once. Warn if that fails.
11329
e7b5fa67
PA
113302007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11331
11332 * win32-low.c (win32_wait): Don't read from the inferior when it
11333 has already exited.
11334
a385171d
PA
113352007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11336
11337 * Makefile.in (win32_low_h): New variable.
11338 (win32-low.o): Add dependency on $(win32_low_h).
11339 (win32-arm-low.o, win32-i386-low.o): New rules.
11340
f80c84b3
DJ
113412007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11342
11343 * hostio.c: Correct copyright year.
11344
a6b151f1
DJ
113452007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11346
11347 * Makefile.in (OBS): Add hostio.o.
11348 (hostio.o): New rule.
11349 * server.h (handle_vFile): Declare.
11350 * hostio.c: New file.
11351 * server.c (handle_v_requests): Take packet_len and new_packet_len
11352 for binary packets. Call handle_vFile.
11353 (main): Update call to handle_v_requests.
11354
f9387fc3
DJ
113552007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11356
11357 * linux-low.c: Include <sched.h>.
11358
51c2684e
DJ
113592007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11360
11361 * linux-low.c (linux_tracefork_grandchild): New.
11362 (linux_tracefork_child): Use clone.
11363 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11364
75f83163
JB
113652007-10-31 Joel Brobecker <brobecker@adacore.com>
11366
11367 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11368
da5898ce
DJ
113692007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11370
11371 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11372
24a09b5f
DJ
113732007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11374
11375 * inferiors.c (change_inferior_id): Delete.
11376 (add_pid_to_list, pull_pid_from_list): New.
11377 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11378 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11379 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11380 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11381 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11382 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11383 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11384 (using_threads): Always set to 1.
11385 (handle_extended_wait): New.
11386 (add_process): Do not set TID.
11387 (linux_create_inferior): Set must_set_ptrace_flags.
11388 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11389 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11390 (linux_thread_alive): Rename TID argument to LWPID.
11391 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11392 (linux_wait_for_event): Do not use TID or check using_threads. Update
11393 call to dead_thread_notify. Call handle_extended_wait.
11394 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11395 (send_sigstop): Delete sigstop_sent.
11396 (wait_for_sigstop): Avoid TID.
11397 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11398 (linux_test_for_tracefork): New.
11399 (linux_lookup_signals): Use thread_db_active and
11400 linux_supports_tracefork_flag.
11401 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11402 * linux-low.h (get_process_thread): Avoid TID.
11403 (struct process_ifo): Move thread_known and tid to the end. Remove
11404 sigstop_sent.
11405 (linux_attach_lwp, thread_db_init): Update prototypes.
11406 * server.h (change_inferior_id): Delete prototype.
11407 (add_pid_to_list, pull_pid_from_list): New prototypes.
11408 * thread-db.c (thread_db_use_events): New.
11409 (find_first_thread): Rename to...
11410 (find_one_thread): ...this. Update callers and messages. Do not
11411 call fatal. Check thread_db_use_events. Do not call
11412 change_inferior_id or new_thread_notify.
11413 (maybe_attach_thread): Update. Do not call new_thread_notify.
11414 (thread_db_init): Set thread_db_use_events. Check use_events.
11415 * utils.c (fatal, warning): Correct message prefix.
11416
30ed0a8f
DJ
114172007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11418
11419 * Makefile.in (clean): Remove new files.
11420 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11421 (powerpc-64.o, powerpc-64.c): New rules.
11422 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11423 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11424 with SPE.
11425 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11426 SPE targets.
11427 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11428 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11429 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11430 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11431 (target_regsets): Add AltiVec and SPE register sets.
11432 * configure.ac: Check for AltiVec and SPE.
11433 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11434 (ppc_fill_vrregset, ppc_store_vrregset): New.
11435 (target_regsets): Add AltiVec register set.
11436 * configure: Regenerated.
11437
fd462a61
DJ
114382007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11439
11440 * linux-low.c (O_LARGEFILE): Define.
11441 (linux_read_memory): Use /proc/PID/mem.
11442 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11443 * configure, config.in: Regenerated.
11444
69f223ed
DJ
114452007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11446
11447 * linux-low.c (linux_wait_for_event): Do not pass signals while
11448 single-stepping.
11449
aec18585
PA
114502007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11451
11452 * win32-low.c (create_process): New.
11453 (win32_create_inferior): Use create_process instead of
11454 CreateProcess. If create_process failed retry appending an ".exe"
11455 suffix. Store the GetLastError result immediatelly after
11456 create_process calls and use it on the call to error.
11457
34d86ddd
PA
114582007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11459
11460 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11461
5a0e3bd0
JB
114622007-08-23 Joel Brobecker <brobecker@adacore.com>
11463
11464 * configure.ac: Switch license to GPLv3.
11465
f88c79e6
MS
114662007-08-01 Michael Snyder <msnyder@access-company.com>
11467
11468 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11469
6b3d9b83
PA
114702007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11471
11472 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11473 typedef.
11474 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11475 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11476 CloseToolhelp32Snapshot.
11477 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11478 CloseToolhelp32Snapshot.
11479
c588c53c
MS
114802007-07-27 Michael Snyder <michael.snyder@access-company.com>
11481
11482 * server.c (main): Check for inferior exit before main loop.
11483
aa0403d9
PA
114842007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11485
11486 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11487 instead of on tmp_desc.
11488
255e7678
DJ
114892007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11490 Daniel Jacobowitz <dan@codesourcery.com>
11491
11492 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11493 (add_thread): Minor cleanups.
11494 (clear_inferiors): Move lower in the file. Clear the DLL
11495 list.
11496 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11497 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11498 (xml_escape_text): New.
11499 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11500 for qSupported.
11501 (handle_v_cont): Report errors.
11502 (gdbserver_version): Update.
11503 (main): Correct size of own_buf. Do not report initial DLL events.
11504 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11505 (unloaded_dll, xml_escape_text): New.
11506 * win32-low.c (enum target_waitkind): Update comments.
11507 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11508 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11509 (win32_EnumProcessModules, win32_GetModuleInformation)
11510 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11511 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11512 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11513 (win32_Module32First, win32_Module32Next, load_toolhelp)
11514 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11515 (get_child_debug_event): Handle DLL events.
11516 (win32_wait): Likewise.
11517
0d37add9
DJ
115182007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11519
11520 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11521 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11522
45e2715e
PA
115232007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11524
11525 * win32-low.c (handle_output_debug_string): Ignore event if not
11526 waiting.
11527
c5674cf1
PA
115282007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11529
11530 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11531
2bbe3cc1
DJ
115322007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11533
11534 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11535
ae13219e
DJ
115362007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11537
11538 * inferiors.c (change_inferior_id): Add comment.
11539 * linux-low.c (check_removed_breakpoint): Add an early
11540 prototype. Improve debug output.
11541 (linux_attach): Doc update.
11542 (linux_detach_one_process, linux_detach): Clean up before releasing
11543 each process.
11544 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11545 * linux-low.h (struct process_info): Doc improvement.
11546 * mem-break.c (delete_all_breakpoints): New.
11547 * mem-break.h (delete_all_breakpoints): New prototype.
11548 * thread-db.c (find_first_thread): New.
11549 (thread_db_create_event): Call it instead of
11550 thread_db_find_new_threads. Clean up unused variables.
11551 (maybe_attach_thread): Remove first thread handling.
11552 (thread_db_find_new_threads): Use find_first_thread.
11553 (thread_db_get_tls_address): Likewise.
11554
4105de34
DJ
115552007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11556
11557 * thread-db.c (thread_db_find_new_threads): Add prototype.
11558 (thread_db_create_event): Check for the main thread before adding
11559 a new thread.
11560 (maybe_attach_thread): Only enable event reporting if TID == 0.
11561 (thread_db_get_tls_address): Check for new threads.
11562
2b876972
DJ
115632007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11564
11565 * linux-low.c (linux_create_inferior): Try execv before execvp.
11566 * spu-low.c (spu_create_inferior): Likewise.
11567
7a245884
DJ
115682007-06-13 Mike Frysinger <vapier@gentoo.org>
11569
11570 * linux-low.c (linux_create_inferior): Change execv to execvp.
11571 * spu-low.c (spu_create_inferior): Likewies.
11572
117ce543
DJ
115732007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11574
11575 * Makefile.in (clean): Clean new files instead of deleted ones.
11576 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11577 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11578 rules.
11579 * configure.srv: Specify XML files and new regformats for MIPS and
11580 MIPS64 GNU/Linux.
11581 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11582 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11583 an entry for the restart register.
11584 (mips_cannot_fetch_register, mips_cannot_store_register)
11585 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11586 register names to match the XML descriptions.
11587 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11588 restart register instead of $0.
11589
0e7f50da
UW
115902007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11591 Markus Deuling <deuling@de.ibm.com>
11592
11593 * remote-utils.c (decode_xfer_write): New function.
11594 * server.h (decode_xfer_write): Add prototype.
11595 * server.c (handle_query): Add PACKET_LEN argument. Support
11596 qXfer:spu:read and qXfer:spu:write packets.
11597 (main): Pass packet_len to handle_query.
11598 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11599 * target.h (target_ops): Add qxfer_spu.
11600
374c1d38
UW
116012007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11602
11603 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11604 accessing non-seekable spufs files.
11605
bb63802a
UW
116062007-05-16 Markus Deuling <deuling@de.ibm.com>
11607
889bf7c5 11608 * server.c (handle_query): Add reply for qC packet.
bb63802a 11609
7390519e
PA
116102007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11611 Leo Zayas <lerele@champenstudios@com>
11612
11613 * server.h (check_remote_input_interrupt_request): New function.
11614 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11615 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11616 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11617 (check_remote_input_interrupt_request): New function.
11618 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11619 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11620 winapi_GenerateConsoleCtrlEvent): New typedefs.
11621 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11622 to 250 ms.
11623 (win32_wait): Check for remote interrupt request
11624 with check_remote_input_interrupt_request.
11625 (win32_request_interrupt): New function.
11626 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11627
34b34921
PA
116282007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11629
11630 * win32-low.c (debug_registers_changed,
11631 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11632 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11633 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11634 (thread_rec): Get context using the low target.
11635 (child_add_thread): Call thread_added on the low target,
11636 which does the same thing.
11637 (regptr): Delete.
11638 (do_initial_child_stuff): Remove debug registers references.
11639 Set context using the low target. Resume threads after
11640 setting the contexts.
11641 (child_continue): Remove dead variable. Remove debug
11642 registers references.
11643 (child_fetch_inferior_registers): Go through the low target.
11644 (do_child_store_inferior_registers): Remove.
11645 (child_store_inferior_registers): Go through the low target.
11646 (win32_resume): Remove debug registers references.
11647 Set context using the low target.
11648 (handle_exception): Change return type to void. Don't record
11649 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11650 first chance exception.
889bf7c5 11651 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
11652 goto loop. Always return after waiting for debug event.
11653 (win32_wait): Convert to switch statement. Handle spurious
11654 events.
11655
11656 * win32-i386-low.c (debug_registers_changed,
11657 debug_registers_used): New.
11658 (initial_stuff): Rename to ...
11659 (i386_initial_stuff): ... this. Clear debug registers
11660 state variables.
11661 (store_debug_registers): Delete.
11662 (i386_get_thread_context): New.
11663 (load_debug_registers): Delete.
11664 (i386_set_thread_context): New.
11665 (i386_thread_added): New.
11666 (single_step): Rename to ...
11667 (i386_single_step): ... this.
11668 (do_fetch_inferior_registers): Rename to ...
11669 (i386_fetch_inferior_register): ... this.
11670 (i386_store_inferior_register): New.
11671 (the_low_target): Adapt to new interface.
11672
11673 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11674 (arm_get_thread_context): New.
11675 (arm_set_thread_context): New.
11676 (regptr): New.
11677 (do_fetch_inferior_registers): Rename to ...
11678 (arm_fetch_inferior_register): ... this.
11679 (arm_store_inferior_register): New.
11680 (arm_wince_breakpoint): Reimplement as unsigned long.
11681 (arm_wince_breakpoint_len): Define.
11682 (the_low_target): Adapt to new interface.
11683
11684 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11685 load_debug_registers. Add get_thread_context, set_thread_context,
11686 thread_added and store_inferior_register. Rename
11687 fetch_inferior_registers to fetch_inferior_register.
11688 (regptr): Remove declaration.
11689
dd6953e1
PA
116902007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11691
11692 * linux-low.c (linux_detach): Change return type to int. Return 0.
11693 * spu-low.c (spu_detach): Likewise.
11694
444d6139
PA
116952007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11696
11697 * target.h (target_ops): Change return type of detach to int.
11698 Add join.
11699 (join_inferior): New.
11700 * server.c (main): Don't skip detach support on mingw32.
11701 If the inferior doesn't support detaching return error.
11702 Call join_inferior instead of using waitpid.
11703 * linux-low.c (linux_join): New.
11704 (linux_target_op): Add linux_join.
11705 * spu-low.c (spu_join): New.
11706 (spu_target_ops): Add spu_join.
11707 * win32-low.c (win32_detach): Adapt to new interface.
11708 Reopen current_process_handle before detaching. Issue a child
11709 resume before detaching.
11710 (win32_join): New.
11711 (win32_target_op): Add win32_join.
11712
1d5315fe
PA
117132007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11714
11715 * win32-low.c (win32-attach): Fix return value.
11716 * target.h (target_ops): Describe ATTACH return values.
11717
bf914831
PA
117182007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11719
11720 * win32-low.c (GETPROCADDRESS): Define.
11721 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11722 (winapi_DebugSetProcessKillOnExit): Likewise.
11723 (win32_create_inferior): Force usage of ansi CreateProcessA.
11724 (win32_attach): Use GETPROCADDRESS.
11725 (win32_detach): Likewise.
11726
f72f3e60
PA
117272007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11728
11729 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11730
ed50f18f
PA
117312007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11732
11733 * win32-low.c: Commit leftover changes from 2007-03-29.
11734
0c2ead7e
DJ
117352007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11736
11737 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11738 fields short instead of int. Add explicit padding.
11739 (i387_cache_to_fsave): Remove unnecessary casts.
11740 (i387_fsave_to_cache): Doc fix.
11741 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11742
73725ff3
DJ
117432007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11744
11745 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11746 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11747
d99f33d8
PA
117482007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11749
11750 * configure.srv (arm*-*-mingw32ce*): Move near the other
11751 arm targets.
11752
68070c10
PA
117532007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11754
2482afc6 11755 * configure.ac: Add errno checking.
68070c10
PA
11756 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11757 sys/file.h and malloc.h.
11758 (AC_CHECK_DECLS): Add perror.
11759 (srv_mingwce): Handle.
2482afc6 11760 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
11761 win32-i386-low.o to srv_tgtobj.
11762 (i[34567]86-*-mingw*): Likewise.
11763 (arm*-*-mingw32ce*): Add case.
11764 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11765 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11766 [__MINGW32CE__] (strerror): New function.
11767 [__MINGW32CE__] (errno): Define to GetLastError.
11768 [__MINGW32CE__] (COUNTOF): New macro.
11769 (remote_open): Remove extra close call.
11770 * mem-break.c (delete_breakpoint_at): New function.
11771 * mem-break.h (delete_breakpoint_at): Declare.
11772 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11773 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11774 [USE_WIN32API] (read, write): Add char* casts.
11775 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11776 * server.h: Include wincecompat.h on Windows CE.
11777 [HAVE_ERRNO_H]: Check.
11778 (perror): Declare if not declared.
11779 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11780 (perror_with_name): Remove errno declaration.
11781 * wincecompat.h: New.
11782 * wincecompat.c: New.
11783 * win32-low.h: New.
11784 * win32-arm-low.c: New.
11785 * win32-i386-low.c: New.
11786 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11787 (OUTMSG2): Make it safe.
11788 (_T): New macro.
11789 (COUNTOF): New macro.
11790 (NUM_REGS): Get it from the low target.
11791 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11792 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11793 (thread_rec): Let low target handle debug registers.
11794 (child_add_thread): Likewise.
11795 (child_init_thread_list): Likewise.
11796 (continue_one_thread): Likewise.
11797 (regptr): New.
11798 (do_child_fetch_inferior_registers): Move to ...
11799 * win32-i386-low.c: ... here, and rename to ...
11800 (do_fetch_inferior_registers): ... this.
889bf7c5 11801 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
11802 Go through the low target.
11803 (do_child_store_inferior_registers): Use regptr.
11804 (strwinerror): New function.
11805 (win32_create_inferior): Handle Windows CE.
11806 Use strwinerror instead of strerror on Windows error
11807 codes. Add program to the error output.
11808 Don't close the main thread handle on Windows CE.
11809 (win32_attach): Use coredll.dll on Windows CE.
11810 (win32_kill): Close current process and current
11811 thread handles.
11812 (win32_detach): Use coredll.dll on Windows CE.
11813 (win32_resume): Let low target handle debug registers, and
11814 step request.
11815 (handle_exception): Add/Remove initial breakpoint. Avoid
11816 non-existant WSTOPSIG on Windows CE.
11817 (win32_read_inferior_memory): Cast to remove warning.
11818 (win32_arch_string): Go through the low target.
11819 (initialize_low): Call set_breakpoint_data with the low
11820 target's breakpoint.
11821 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11822 FOP_REGNUM, mappings): Move to ...
11823 * win32-i386-low.c: ... here.
11824 * win32-low.c (win32_thread_info): Move to ...
11825 * win32-low.h: ... here.
11826 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11827 win32-arm-low.c and wincecompat.c.
11828 (all:): Add $EXEEXT.
11829 (install-only:): Likewise.
11830 (gdbserver:): Likewise.
11831 (gdbreplay:): Likewise.
11832 * config.in: Regenerate.
11833 * configure: Regenerate.
11834
41093d81
PA
118352007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11836
11837 * win32-low.c: Rename typedef thread_info to
11838 win32_thread_info throughout.
11839
544afa54
PA
118402007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11841
11842 * win32-i386-low.c: Rename to ...
11843 * win32-low.c: ... this.
11844 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11845 * Makefile.in: Likewise.
11846
bce7165d
PA
118472007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11848
11849 * remote-utils.c (monitor_output): Constify msg parameter.
11850 * server.h (monitor_output): Likewise.
11851 * win32-i386-low.c (handle_output_debug_string): New.
11852 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11853 handle_output_debug_string.
11854 (get_child_debug_event): Likewise.
11855
506c7aa0
DJ
118562007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11857
11858 * server.c (main): Correct strtoul check.
11859
42c81e2a
DJ
118602007-03-27 Jon Ringle <jon@ringle.org>
11861
11862 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11863
9453113a
DJ
118642007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11865
11866 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11867
64a69107
DJ
118682007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11869
11870 * terminal.h: Check HAVE_SGTTY_H.
11871
118722007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
11873
11874 * remote-utils.c (remote_open): Print out the assigned port number.
11875
c74d0ad8
DJ
118762007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11877
11878 * remote-utils.c (monitor_output): New function.
11879 * server.c (debug_threads): Define here.
11880 (monitor_show_help): New function.
11881 (handle_query): Handle qRcmd.
11882 (main): Do not handle 'd' packet.
11883 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11884 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11885 of debug_threads.
11886
de7c3b4a
PA
118872007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11888
11889 * Makefile.in (EXEEXT): New.
11890 (clean): Use $(EXEEXT).
11891
ef57601b
PA
118922007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11893
11894 * target.h (target_ops): Rename send_signal to request_interrupt,
11895 and remove enum target_signal parameter.
11896 * linux-low.c (linux_request_interrupt): Rename from
11897 linux_send_signal, and always send SIGINT.
11898 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11899 and always send SIGINT.
11900 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11901 of send_signal.
11902 (input_interrupt): Likewise.
11903
820f2bda
PA
119042007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11905
11906 * server.c (get_features_xml): Check if target implemented
11907 arch_string.
11908 * win32-i386-low.c (win32_arch_string): New.
11909 (win32_target_ops): Add win32_arch_string as arch_string member.
11910
ab39bf24
UW
119112007-02-22 Markus Deuling <deuling@de.ibm.com>
11912
11913 * spu-low.c (spu_arch_string): New.
11914 (spu_target_ops): Add spu_arch_string.
11915
61ff6e04
DJ
119162007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11917
11918 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11919 * configure.ac: Do not check for terminal.h.
11920 * configure, config.in: Regenerated.
11921
fb1e4ffc
DJ
119222007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11923
11924 * Makefile.in (OBS): Add $(XML_BUILTIN).
11925 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11926 (clean): Update.
11927 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11928 (arm-with-iwmmxt.c): New.
11929 * config.in, configure: Regenerate.
11930 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11931 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11932 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11933 (arm*-*-linux*): Add iWMMXt and regset support.
11934 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11935 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11936 (arm_store_wmmxregset, target_regsets): New.
11937 * server.c (get_features_xml): Take annex argument. Check builtin
11938 XML documents.
11939 (handle_query): Handle multiple annexes.
11940
0f48aa01
DJ
119412007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11942
11943 * remote-utils.c [USE_WIN32API] (read, write): Define.
11944 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11945 write.
11946
23181151
DJ
119472007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11948
11949 * linux-i386-low.c (the_low_target): Set arch_string.
11950 * linux-x86-64-low.c (the_low_target): Likewise.
11951 * linux-low.c (linux_arch_string): New.
11952 (linux_target_ops): Add it.
11953 * linux-low.h (struct linux_target_ops): Add arch_string.
11954 * server.c (write_qxfer_response): Use const void * for DATA.
11955 (get_features_xml): New.
11956 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11957 * target.h (struct target_ops): Add arch_string method.
11958
9d606399
DJ
119592007-01-03 Denis Pilat <denis.pilat@st.com>
11960 Daniel Jacobowitz <dan@codesourcery.com>
11961
11962 * linux-low.c (linux_kill): Handle being called with no threads.
11963 * win32-i386-low.c (win32_kill): Likewise.
11964 (get_child_debug_event): Clear current_process_handle.
11965
119662006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
11967 Daniel Jacobowitz <dan@codesourcery.com>
11968
11969 * remote-utils.c (remote_open): Check the type of specified
11970 serial port devices before opening them.
11971 * server.c (main): Kill the inferior if an error occurs during
11972 the first remote_open.
11973
a5e13d24
DJ
119742006-12-05 Markus Deuling <deuling@de.ibm.com>
11975
11976 * README: Update supported targets.
11977
186947f7
DJ
119782006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11979
11980 * Makefile.in (clean): Remove reg-mips64.c.
11981 (reg-mips64.c, reg-mips64.o): New rules.
11982 * configure.srv: Handle mips64. Include regset support for mips.
11983 * linux-mips-low.c (union mips_register): New.
11984 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11985 (mips_breakpoint, mips_breakpoint_at): Use int.
11986 (mips_collect_register, mips_supply_register)
11987 (mips_collect_register_32bit, mips_supply_register_32bit)
11988 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11989 (mips_store_fpregset, target_regsets): New.
11990 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11991
a13e2c95
UW
119922006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11993
11994 * configure.srv: Add target "spu*-*-*".
11995 * Makefile.in (clean): Remove reg-spu.c.
11996 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11997 * spu-low.c: New file.
11998
cb7283db
DJ
119992006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12000
12001 * configure.ac: Correct td_thr_tls_get_addr test.
12002 * configure: Regenerated.
12003
89be2091
DJ
120042006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12005
12006 * linux-low.c (linux_wait_for_event): Reformat. Use the
12007 pass_signals array.
12008 * remote-utils.c (decode_address_to_semicolon): New.
12009 * server.c (pass_signals, handle_general_set): New.
12010 (handle_query): Mention QPassSignals for qSupported.
12011 (main): Call handle_general_set.
12012 * server.h (pass_signals, decode_address_to_semicolon): New.
12013
000ef4f0
DJ
120142006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12015
12016 * server.c (handle_query): Correct error handling for read_auxv.
12017
b7149293
UW
120182005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12019
12020 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12021 and srv_linux_thread_db to yes.
12022 * linux-s390-low.c (s390_fill_gregset): New function.
12023 (target_regsets): Define data structure.
12024
dae5f5cf
DJ
120252006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12026
12027 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12028 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12029 * config.in, configure: Regenerated.
12030 * inferiors.c (gdb_id_to_thread): New function.
12031 (gdb_id_to_thread_id): Use it.
12032 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12033 * linux-low.h (struct process_info): Add th member.
12034 (thread_db_get_tls_address): New prototype.
12035 * remote-utils.c (decode_address): Make non-static.
12036 * server.c (handle_query): Handle qGetTLSAddr.
12037 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12038 * target.h (struct target_ops): Add get_tls_address.
12039 * thread-db.c (maybe_attach_thread): Save the thread handle.
12040 (thread_db_get_tls_address): New.
12041
32ca6d61
DJ
120422006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12043
12044 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12045 (linux_resume_one_process): Take a siginfo_t *. Update all
12046 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12047 (struct pending_signals): Add a siginfo_t.
12048 (linux_wait_for_process): Always set last_status.
12049 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12050 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12051 * linux-low.h (struct process_info): Add last_status.
12052
5ffff7c1
DJ
120532006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12054
12055 * remote-utils.c (try_rle): New function.
12056 (putpkt_binary): Use it.
12057
8695c747
DJ
120582006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12059
12060 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12061 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12062 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12063 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12064 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12065 point registers.
12066
290fadea
RS
120672006-08-08 Richard Sandiford <richard@codesourcery.com>
12068
12069 * server.c (terminal_fd): New variable.
12070 (old_foreground_pgrp): Likewise.
12071 (restore_old_foreground_pgrp): New function.
12072 (start_inferior): Record the terminal file descriptor in terminal_fd
12073 and its original foreground group in old_foreground_pgrp. Register
12074 restore_old_foreground_pgrp with atexit().
12075
9f2e1e63
DJ
120762006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12077
12078 * server.c (handle_query): Correct qPart to qXfer.
12079
b80864fb
DJ
120802006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12081
12082 * configure.ac: Check for more headers which are missing on
12083 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12084 * configure.srv: Add Cygwin and mingw32.
12085 * remote-utils.c: Don't include headers unconditionally which
12086 are missing on mingw32. Include <winsock.h> for mingw32.
12087 (remote_open): Adjust for mingw32 support. Flush
12088 standard error after writing to it.
12089 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12090 (unblock_async_io, enable_async_io, disable_async_io)
12091 (readchar, getpkt): Update for Winsock support.
12092 (prepare_resume_reply): Expect a protocol signal number.
12093 * server.c: Disable <sys/wait.h> on mingw32.
12094 (start_inferior): Adjust for mingw32 support. Flush
12095 standard error after writing to it.
12096 (attach_inferior): Likewise. Use protocol signal
12097 numbers.
12098 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12099 and names.
12100 * win32-i386-low.c: New file.
12101 * Makefile.in (XM_CLIBS): Set.
12102 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12103 (win32-i386-low.o): New dependency rule.
12104 * linux-low.c (linux_wait): Use target signal numbers.
12105 * target.h (struct target_ops): Doc fix.
12106 * server.h (target_signal_to_name): New prototype.
12107 * gdbreplay.c: Don't include headers unconditionally which
12108 are missing on mingw32. Include <winsock.h> for mingw32.
12109 (remote_close, remote_open): Adjust for Winsock support.
12110 * configure, config.in: Regenerated.
12111
0876f84a
DJ
121122006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12113
12114 * server.c (decode_xfer_read, write_qxfer_response): New.
12115 (handle_query): Take a packet length argument. Handle
12116 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12117 the qSupported response.
12118 (main): Update call to handle_query.
12119
01f9e8fa
DJ
121202006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12121
12122 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12123 (putpkt_binary): Renamed from putpkt and adjusted for binary
12124 data.
12125 (putpkt): New wrapper for putpkt_binary.
12126 (readchar): Don't mask off the high bit.
12127 (decode_X_packet): New function.
12128 * server.c (main): Call putpkt_binary if a handler sets the packet
12129 length. Save the length of the incoming packet. Handle 'X'.
12130 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12131
be2a5f71
DJ
121322006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12133
12134 * server.c (handle_query): Handle qSupported.
12135
ea025f5f
DJ
121362006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12137
12138 * remote-utils.c (all_symbols_looked_up): New variable.
12139 (look_up_one_symbol): Check it.
12140 * server.h (look_up_one_symbol): New declaration.
12141 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12142
9308fc88
DJ
121432006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12144
12145 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 12146 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
12147 (PTRACE_GET_THREAD_AREA): Define.
12148 (ps_get_thread_area): New function.
12149
52fb6437
NS
121502006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12151
12152 * configure.srv (m68k*-*-uclinux*): New target.
12153 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12154 (linux_resume_one_process): Remove extraneous cast.
12155 (linux_read_offsets): New.
12156 (linux_target_op): Add linux_read_offsets on mmuless systems.
12157 * server.c (handle_query): Add qOffsets logic.
12158 * target.h (struct target_ops): Add read_offsets.
12159
21b0f40c
DJ
121602006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12161
12162 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12163 (PTRACE_GET_THREAD_AREA): Define.
12164 (ps_get_thread_area): New function.
12165 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12166 (linux-x86-64-low.o): Update.
12167
0050a760
DJ
121682006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12169
12170 * configure.ac: Remove checks for prfpregset_t.
12171 * gdb_proc_service.h: New file.
12172 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12173 new "gdb_proc_service.h".
12174 * proc-service.c: Likewise.
12175 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12176 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12177 * Makefile.in (gdb_proc_service_h): Updated.
12178 * configure, config.in: Regenerated.
12179
b92a518e
DJ
121802006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12181
12182 * remote-utils.c (prepare_resume_reply): Move declaration
12183 of gdb_id_from_wait to the top of the block.
12184
545587ee
DJ
121852006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12186
12187 * linux-low.c (regsets_store_inferior_registers): Read the regset
12188 from the target before filling it.
12189
9db87ebd
DJ
121902006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12191
12192 * server.c (attach_inferior): Return SIGTRAP for a successful
12193 attach.
12194
dd24457d
DJ
121952006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12196
12197 * Makefile.in (OBS): Add version.o.
12198 (STAGESTUFF): Delete.
12199 (version.o): Add dependencies.
12200 (version.c): Replace rule.
12201 (clean): Remove version.c.
12202 * server.c (gdbserver_version): New.
12203 (gdbserver_usage): Use printf.
12204 (main): Handle --version and --help.
12205 * server.h (version, host_name): Add declarations.
12206
6f0f660e
EZ
122072005-12-23 Eli Zaretskii <eliz@gnu.org>
12208
889bf7c5
PA
12209 * linux-arm-low.c:
12210 * linux-arm-low.c:
12211 * inferiors.c:
12212 * i387-fp.h:
12213 * i387-fp.c:
12214 * gdbreplay.c:
12215 * regcache.c:
12216 * proc-service.c:
12217 * mem-break.h:
12218 * mem-break.c:
12219 * linux-x86-64-low.c:
12220 * linux-sh-low.c:
12221 * linux-s390-low.c:
12222 * linux-ppc64-low.c:
12223 * linux-ppc-low.c:
12224 * linux-mips-low.c:
12225 * linux-m68k-low.c:
12226 * linux-m32r-low.c:
12227 * linux-low.h:
12228 * linux-low.c:
12229 * linux-ia64-low.c:
12230 * linux-i386-low.c:
12231 * linux-crisv32-low.c:
12232 * thread-db.c:
12233 * terminal.h:
12234 * target.h:
12235 * target.c:
12236 * server.h:
12237 * server.c:
12238 * remote-utils.c:
12239 * regcache.h:
12240 * utils.c:
12241 * Makefile.in:
12242 * configure.ac:
6f0f660e
EZ
12243 * gdbserver.1: Add (C) after Copyright. Update the FSF
12244 address.
12245
9d1fb177
DJ
122462005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12247
12248 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12249 (arm_breakpoint_at): Recognize both breakpoints.
12250 (the_low_target): Use the correct breakpoint instruction.
12251
011a70c2
DJ
122522005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12253
12254 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12255 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12256 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12257 (the_low_target): Update.
12258
7fb85e41
AS
122592005-10-25 Andreas Schwab <schwab@suse.de>
12260
12261 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12262
12263 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12264 (ia64_num_regs): Reduce to 462.
12265
3db0444b
DJ
122662005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12267
12268 * acinclude.m4: Correct quoting.
12269 * aclocal.m4: Regenerated.
12270
12271 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12272 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12273 (thread_db_init): Call thread_db_err_str.
12274 * configure.ac: Check for TD_VERSION.
12275 * config.in, configure: Regenerated.
12276
bee0189a
DJ
122772005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12278
12279 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12280
e9d25b98
DJ
122812005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12282
12283 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12284 is not available. Define HAVE_PTRACE_GETREGS if it is.
12285 * config.in, configure: Regenerated.
12286 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12287 * linux-i386-low.c, linux-m68k-low.c: Update to use
12288 HAVE_PTRACE_GETREGS.
12289 * linux-low.c (regsets_fetch_inferior_registers)
12290 (regsets_store_inferior_registers): Only return 0 if we processed
12291 GENERAL_REGS.
12292 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12293 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12294
a06660f7
DJ
122952005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12296
12297 * inferiors.c (struct thread_info): Add gdb_id.
12298 (add_thread): Add gdb_id argument.
12299 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12300 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12301 calls to add_thread.
12302 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12303 * server.c (handle_query): Use thread_to_gdb_id.
12304 (handle_v_cont, main): Use gdb_id_to_thread_id.
12305 * server.h (add_thread): Update prototype.
12306 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12307 prototypes.
12308
5a1f5858
DJ
123092005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12310
12311 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12312 left-padded registers.
12313 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12314 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12315
e122f1f5
SE
123162005-07-01 Steve Ellcey <sje@cup.hp.com>
12317
12318 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12319 * configure: Regenerate.
12320 * config.in: Regenerate.
12321 * server.h (NEED_DECLARATION_STRERROR):
12322 Replace with !HAVE_DECL_STRERROR.
12323
d592fa2f
DJ
123242005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12325
12326 * linux-low.c (linux_wait, linux_send_signal): Don't test
12327 an unsigned long variable for > 0 if it could be MAX_ULONG.
12328 * server.c (myresume): Likewise.
12329 * target.c (set_desired_inferior): Likewise.
12330
ccbd4912
MK
123312005-06-13 Mark Kettenis <kettenis@gnu.org>
12332
12333 * configure.ac: Simplify and improve check for socklen_t.
12334 * configure, config.in: Regenerate.
12335
f450004a
DJ
123362005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12337
12338 * acconfig.h: Remove.
12339 * configure.ac: Add a test for socklen_t. Use three-argument
12340 AC_DEFINE throughout.
12341 * config.in: Regenerated using autoheader 2.59.
12342 * configure: Regenerated.
12343
12344 * gdbreplay.c (socklen_t): Provide a default.
12345 (remote_open): Use socklen_t.
12346 * remote-utils.c (socklen_t): Provide a default.
12347 (remote_open): Use socklen_t.
12348 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12349 unsigned char.
12350
12351 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12352 char for buffers.
12353 * linux-low.c (linux_read_memory, linux_write_memory)
12354 (linux_read_auxv): Likewise.
12355 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12356 (check_mem_write): Likewise.
12357 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12358 Likewise.
12359 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12360 (registers_from_string, register_data): Likewise.
12361 * server.c (handle_query, main): Likewise.
12362 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12363 (decode_M_packet): Likewise.
12364 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12365 * target.h (struct target_ops): Update read_memory, write_memory,
12366 and read_auxv.
12367 (read_inferior_memory, write_inferior_memory): Update.
12368 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12369 to unsigned char *.
12370 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12371 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12372 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12373 linux-s390-low.c, linux-sh-low.c: Update for changes in
12374 read_inferior_memory and the_low_target->breakpoint.
12375
eee84df1
DJ
123762005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12377
12378 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12379 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12380 * configure.srv: Add powerpc64-*-linux*.
12381 * linux-ppc64-low.c: New file.
12382
45b134e5
OF
123832005-05-23 Orjan Friberg <orjanf@axis.com>
12384
12385 * linux-cris-low.c: New file with support for CRIS.
12386 * linux-crisv32-low.c: Ditto for CRISv32.
12387 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12388 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 12389 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
12390 reg-crisv32.o, and reg-crisv32.c to make rules.
12391 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12392 recognized targets.
12393
48d93c75
UW
123942005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12395
12396 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12397 of sizeof (PTRACE_XFER_TYPE).
12398 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12399
e013ee27
OF
124002005-05-12 Orjan Friberg <orjanf@axis.com>
12401
889bf7c5 12402 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
12403 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12404 pointers for hardware watchpoint support.
12405 * linux-low.h (struct linux_target_ops): Ditto.
12406 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12407 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12408 to linux_target_ops.
12409 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12410 reply packet.
12411 * server.c (main): Recognize 'Z' and 'z' packets.
12412
b0ded00b
UW
124132005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12414
12415 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12416 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12417 (the_low_target): Add new members.
12418
8643e2ad
DJ
124192005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12420
12421 * proc-service.c (ps_lgetregs): Search all_processes instead of
12422 all_threads.
12423
fc620387
DJ
124242005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12425
12426 * server.c (start_inferior): Change return type to int.
12427 (attach_inferior): Change sigptr to int *.
12428 (handle_v_cont, handle_v_requests): Change signal to int *.
12429 (main): Change signal to int.
12430
124312005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
12432
12433 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12434 * configure.srv: Add m32r*-*-linux*.
12435 * linux-m32r-low.c: New file.
12436
e0e76420
DJ
124372005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12438
12439 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12440
a1928bad
DJ
124412005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12442
12443 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12444 Take unsigned long arguments for PIDs.
12445 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12446 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12447 (wait_for_sigstop, linux_resume_one_process)
12448 (regsets_fetch_inferior_registers, linux_send_signal)
12449 (linux_read_auxv): Likewise. Update the types of variables holding
12450 PIDs. Update format string specifiers.
12451 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12452 * remote-utils.c (prepare_resume_reply): Likewise.
12453 * server.c (cont_thread, general_thread, step_thread)
12454 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12455 unsigned long.
12456 (handle_query): Update format specifiers.
12457 (handle_v_cont, main): Use strtoul for thread IDs.
12458 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12459 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12460 (general_thread, step_thread, thread_from_wait)
12461 (old_thread_from_wait): Update.
12462 * target.h (struct thread_resume): Use unsigned long for THREAD.
12463 (struct target_ops): Use unsigned long for arguments to attach and
12464 thread_alive.
12465
dcdb98d2
DJ
124662005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12467
12468 * acinclude.m4: Include bfd/bfd.m4 directly.
12469 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12470 <agriffis@toolchain.org>.
12471 * aclocal.m4, configure: Regenerated.
12472
bec39cab
AC
124732005-01-07 Andrew Cagney <cagney@gnu.org>
12474
12475 * configure.ac: Rename configure.in, require autoconf 2.59.
12476 * configure: Re-generate.
12477
434c4c77
DJ
124782004-12-08 Daniel Jacobowitz <dan@debian.org>
12479
12480 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12481 LIBS when finished.
12482 * aclocal.m4: Regenerated.
12483 * configure: Regenerated.
12484
db1d3e1b
AS
124852004-11-21 Andreas Schwab <schwab@suse.de>
12486
12487 * linux-m68k-low.c (m68k_num_gregs): Define.
12488 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12489 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12490 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12491 (m68k_breakpoint_at): New. Add to the_low_target.
12492
12493 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12494 srv_linux_thread_db to yes.
12495
43360365
JB
124962004-10-20 Joel Brobecker <brobecker@gnat.com>
12497
12498 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12499 (ARCH_SET_FS): Likewise.
12500 (ARCH_GET_FS): Likewise.
12501 (ARCH_GET_GS): Likewise.
12502
fd500816
DJ
125032004-10-16 Daniel Jacobowitz <dan@debian.org>
12504
12505 * linux-i386-low.c (ps_get_thread_area): New.
12506 * linux-x86-64-low.c (ps_get_thread_area): New.
12507 * linux-low.c: Include <sys/syscall.h>.
12508 (linux_kill_one_process): Don't kill the first thread here.
12509 (linux_kill): Kill the first thread here.
12510 (kill_lwp): New function.
12511 (send_sigstop, linux_send_signal): Use it.
12512 * proc-service.c: Clean up #ifdefs.
12513 (fpregset_info): Delete.
12514 (ps_lgetregs): Update and enable implementation.
12515 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12516 implementations.
12517 * remote-utils.c (struct sym_cache, symbol_cache): New.
12518 (input_interrupt): Print a clearer message.
12519 (async_io_enabled): New variable.
12520 (enable_async_io, disable_async_io): Use it. Update comments.
12521 (look_up_one_symbol): Use the symbol cache.
12522 * thread-db.c (thread_db_look_up_symbols): New function.
12523 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12524
f6de3c42
DJ
125252004-10-16 Daniel Jacobowitz <dan@debian.org>
12526
12527 * configure.in: Test for -rdynamic.
12528 * configure: Regenerated.
12529 * Makefile (INTERNAL_LDFLAGS): New.
12530 (gdbserver, gdbreplay): Use it.
12531
2c0fc042
AC
125322004-09-02 Andrew Cagney <cagney@gnu.org>
12533
12534 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12535
075b3282
DJ
125362004-03-23 Daniel Jacobowitz <drow@mvista.com>
12537
12538 * linux-low.c (linux_wait): Clear all_processes list also.
12539
fa6a77dc
DJ
125402004-03-12 Daniel Jacobowitz <drow@mvista.com>
12541
12542 * linux-low.c: Include <errno.h>. Remove extern declaration of
12543 errno.
12544
6d782a97
DJ
125452004-03-12 Daniel Jacobowitz <drow@mvista.com>
12546
12547 * gdbreplay.c, server.h, utils.c: Update copyright years.
12548
3a7fb99b
DJ
125492004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12550
12551 * server.c (main): Print child status or termination signal from
12552 variable 'signal', not 'sig'.
12553
c3e735a6
DJ
125542004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12555
12556 * linux-low.c (linux_read_memory): Change return type to
12557 int. Check for and return error from ptrace().
12558 * target.c (read_inferior_memory): Change return type to int. Pass
12559 back return status from the_target->read_memory().
12560 * target.h (struct target_ops): Adapt *read_memory() prototype.
12561 Update comment.
12562 (read_inferior_memory): Adapt prototype.
12563 * server.c (main): Return an error packet if
12564 read_inferior_memory() returns an error.
12565
a59d1c82
DJ
125662004-03-04 Daniel Jacobowitz <drow@mvista.com>
12567
12568 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12569 Unify with other clean targets.
12570
dc3f8883
DJ
125712004-02-29 Daniel Jacobowitz <drow@mvista.com>
12572
12573 * server.c (handle_v_cont): Call set_desired_inferior.
12574
89a208da
DJ
125752004-02-29 Daniel Jacobowitz <drow@mvista.com>
12576
12577 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12578
62ea82f5
DJ
125792004-02-29 Daniel Jacobowitz <drow@mvista.com>
12580
12581 * linux-low.c (linux_wait): Unblock async I/O.
12582 (linux_resume): Block and enable async I/O.
12583 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12584 * server.h (block_async_io, unblock_async_io): Add prototypes.
12585
6910d122
DJ
125862004-02-29 Daniel Jacobowitz <drow@mvista.com>
12587
12588 * remote-utils.c (remote_open): Print a status notice after
12589 opening a TCP port.
12590 * server.c (attach_inferior): Print a status notice after
12591 attaching.
12592
125932004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12594
12595 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12596
c89dc5d4
DJ
125972004-02-26 Daniel Jacobowitz <drow@mvista.com>
12598
12599 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12600 error packet.
12601 * server.c, target.h: Update copyright years.
12602
4b8dad4a
RM
126032004-02-25 Roland McGrath <roland@redhat.com>
12604
12605 * target.h (struct target_ops): New member `read_auxv'.
12606 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12607 * linux-low.c (linux_read_auxv): New function.
12608 (linux_target_ops): Initialize `read_auxv' member to that.
12609
d7446758
JB
126102004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12611
12612 Committed by Jim Blandy <jimb@redhat.com>.
12613
12614 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12615 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12616 instead of GPR_SIZE to distiguish s390 and s390x targets.
12617
5544ad89
DJ
126182004-01-31 Daniel Jacobowitz <drow@mvista.com>
12619
12620 * linux-low.c: Update copyright year.
12621 (check_removed_breakpoint): Clear pending_is_breakpoint.
12622 (linux_set_resume_request, linux_queue_one_thread)
12623 (resume_status_pending_p): New functions.
12624 (linux_continue_one_thread): Use process->resume.
12625 (linux_resume): Only resume threads if there are no pending events.
12626 * linux-low.h (struct process_info): Add resume request
12627 pointer.
12628
2a68b70e
DJ
126292004-01-30 Daniel Jacobowitz <drow@mvista.com>
12630
12631 * regcache.c (new_register_cache): Clear the allocated register
12632 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12633
64386c31
DJ
126342003-10-13 Daniel Jacobowitz <drow@mvista.com>
12635
12636 * linux-low.c (linux_resume): Take a struct thread_resume *
12637 argument.
12638 (linux_wait): Update call.
12639 (resume_ptr): New static variable.
12640 (linux_continue_one_thread): Renamed from
12641 linux_continue_one_process. Use resume_ptr.
12642 (linux_resume): Use linux_continue_one_thread.
12643 * server.c (handle_v_cont, handle_v_requests): New functions.
12644 (myresume): New function.
12645 (main): Handle 'v' case.
12646 * target.h (struct thread_resume): New type.
12647 (struct target_ops): Change argument of "resume" to struct
12648 thread_resume *.
12649 (myresume): Delete macro.
12650
c938e9b0
L
126512003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12652
12653 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12654 (uninstall): Support DESTDIR.
12655
7f313d07
BC
12656Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12657
12658 * configure.srv: Add xscale*linux copy of arm*linux entry.
12659
3b2fc2ea
DJ
126602003-07-24 Daniel Jacobowitz <drow@mvista.com>
12661
12662 * linux-arm-low.c (arm_reinsert_addr): New function.
12663 (the_low_target): Add arm_reinsert_addr.
12664
1c0a559e
MK
126652003-07-08 Mark Kettenis <kettenis@gnu.org>
12666
12667 * mem-break.c: Remove whitespace at end of file.
12668
43d5792c
DJ
126692003-06-28 Daniel Jacobowitz <drow@mvista.com>
12670
12671 * configure.in: Check whether we need to prototype strerror.
12672 * server.h: Optionally prototype strerror.
12673 * gdbreplay.c (perror_with_name): Use strerror.
12674 * linux-low.c (linux_attach_lwp): Use strerror.
12675 * utils.c (perror_with_name): Use strerror.
12676 * config.in, configure: Regenerated.
12677
c8a86edf
DJ
126782003-06-28 Daniel Jacobowitz <drow@mvista.com>
12679
12680 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12681 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12682
73d37363
DJ
126832003-06-20 Daniel Jacobowitz <drow@mvista.com>
12684
12685 * Makefile.in (SFILES): Update.
12686 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12687 low-sun3.c: Remove files.
12688
6ad8ae5c
DJ
126892003-06-17 Daniel Jacobowitz <drow@mvista.com>
12690
12691 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12692 (linux_detach_one_process, linux_detach): New functions.
12693 (linux_target_ops): Add linux_detach.
12694 * server.c (main): Handle 'D' packet.
12695 * target.h (struct target_ops): Add "detach" member.
12696 (detach_inferior): Define.
12697
1581182a
MK
126982003-06-13 Mark Kettenis <kettenis@gnu.org>
12699
12700 From Kelley Cook <kelleycook@wideopenwest.com>:
12701 * configure.srv: Accept i[34567]86 variants.
12702
e5379b03
DJ
127032003-06-05 Daniel Jacobowitz <drow@mvista.com>
12704
12705 * linux-low.c (linux_wait_for_event): Correct comment typos.
12706 (linux_resume_one_process): Call check_removed_breakpoint.
12707 (linux_send_signal): New function.
12708 (linux_target_ops): Add linux_send_signal.
12709 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12710 of kill.
12711 * target.h (struct target_ops): Add send_signal.
12712
2ff29de4
JB
127132003-05-29 Jim Blandy <jimb@redhat.com>
12714
12715 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12716 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12717 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12718 away part of the register's value.
12719
254787d4
DJ
127202003-03-26 Daniel Jacobowitz <drow@mvista.com>
12721
12722 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12723 (linux_wait_for_event, linux_init_signals): Likewise.
12724
94e10508
DJ
127252003-03-17 Daniel Jacobowitz <drow@mvista.com>
12726
12727 * configure.in: Check for stdlib.h.
12728 * configure: Regenerated.
12729 * config.in: Regenerated.
12730
4c0711e0
DJ
127312003-01-04 Andreas Schwab <schwab@suse.de>
12732
12733 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12734
ef66e766
AC
127352003-01-02 Andrew Cagney <ac131313@redhat.com>
12736
12737 * Makefile.in: Remove obsolete code.
12738
a1358604
DJ
127392002-11-20 Daniel Jacobowitz <drow@mvista.com>
12740
12741 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12742 defined(PT_FPR0_HI).
12743
23ce3b1c
DJ
127442002-11-17 Stuart Hughes <seh@zee2.com>
12745
12746 * linux-arm-low.c (arm_num_regs): Increase.
12747 (arm_regmap): Include status register.
12748
127492002-11-17 Daniel Jacobowitz <drow@mvista.com>
12750
12751 * linux-low.c (register_addr): Remove incorrect -1 check.
12752
a9fa9f7d
DJ
127532002-08-29 Daniel Jacobowitz <drow@mvista.com>
12754
12755 * linux-low.c (linux_create_inferior): Call setpgid. Return
12756 the new PID.
12757 (unstopped_p, linux_signal_pid): Remove.
12758 (linux_target_ops): Remove linux_signal_pid.
12759 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12760 global instead of target method.
12761 * target.h (struct target_ops): Remove signal_pid. Update comment
12762 for create_inferior.
12763 * server.c (signal_pid): New variable.
12764 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 12765 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
12766 (attach_inferior): Set signal_pid.
12767
17574093
DJ
127682002-08-23 Daniel Jacobowitz <drow@mvista.com>
12769
12770 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12771
127722002-08-20 Jim Blandy <jimb@redhat.com>
12773
12774 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12775 default for this.
12776
127772002-08-01 Andrew Cagney <cagney@redhat.com>
12778
12779 * Makefile.in: Make chill references obsolete.
12780
127812002-07-24 Kevin Buettner <kevinb@redhat.com>
12782
12783 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12784 * configure: Regenerate.
12785 * config.in: Regenerate.
12786
127872002-07-09 David O'Brien <obrien@FreeBSD.org>
12788
12789 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12790 (perror_with_name, remote_close, remote_open, expect, play): Static.
12791
127922002-07-04 Michal Ludvig <mludvig@suse.cz>
12793
4b8dad4a 12794 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
12795 byte offsets instead of an array of indexes.
12796 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12797
127982002-06-13 Daniel Jacobowitz <drow@mvista.com>
12799
12800 * regcache.c: Add comment.
12801
128022002-06-11 Daniel Jacobowitz <drow@mvista.com>
12803
12804 * thread-db.c: New file.
12805 * proc-service.c: New file.
12806 * acinclude.m4: New file.
12807 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12808 proc-service.o, and thread-db.o.
12809 (linux-low.o): Add USE_THREAD_DB.
12810 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12811 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12812 * aclocal.m4: Regenerated.
12813 * config.in: Regenerated.
12814 * configure: Regenerated.
12815 * configure.in: Check for proc_service.h, sys/procfs.h,
12816 thread_db.h, and linux/elf.h headrs.
12817 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12818 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12819 Check for -lthread_db and thread support.
12820 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12821 PowerPC, and SuperH.
12822 * i387-fp.c: Constify arguments.
12823 * i387-fp.h: Likewise.
12824 * inferiors.c: (struct thread_info): Renamed from
12825 `struct inferior_info'. Remove PID member. Use generic inferior
12826 list header. All uses updated.
12827 (inferiors, signal_pid): Removed.
12828 (all_threads): New variable.
12829 (get_thread): Define.
12830 (add_inferior_to_list): New function.
12831 (for_each_inferior): New function.
12832 (change_inferior_id): New function.
12833 (add_inferior): Removed.
12834 (remove_inferior): New function.
12835 (add_thread): New function.
12836 (free_one_thread): New function.
12837 (remove_thread): New function.
12838 (clear_inferiors): Use for_each_inferior and free_one_thread.
12839 (find_inferior): New function.
12840 (find_inferior_id): New function.
12841 (inferior_target_data): Update argument type.
12842 (set_inferior_target_data): Likewise.
12843 (inferior_regcache_data): Likewise.
12844 (set_inferior_regcache_data): Likewise.
12845 * linux-low.c (linux_bp_reinsert): Remove.
12846 (all_processes, stopping_threads, using_thrads)
12847 (struct pending_signals, debug_threads, pid_of): New.
12848 (inferior_pid): Replace with macro.
12849 (struct inferior_linux_data): Remove.
12850 (get_stop_pc, add_process): New functions.
12851 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12852 Use add_process and add_thread.
12853 (linux_attach_lwp): New function, based on old linux_attach. Use
12854 add_process and add_thread. Set stop_expected for new threads.
12855 (linux_attach): New function.
12856 (linux_kill_one_process): New function.
12857 (linux_kill): Kill all LWPs.
12858 (linux_thread_alive): Use find_inferior_id.
12859 (check_removed_breakpoints, status_pending_p): New functions.
12860 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12861 Update. Use WNOHANG. Wait for cloned processes also. Update process
12862 struct for the found process.
12863 (linux_wait_for_event): New function.
12864 (linux_wait): Use it. Support LWPs.
12865 (send_sigstop, wait_for_sigstop, stop_all_processes)
12866 (linux_resume_one_process, linux_continue_one_process): New functions.
12867 (linux_resume): Support LWPs.
12868 (REGISTER_RAW_SIZE): Remove.
12869 (fetch_register): Use register_size instead. Call supply_register.
12870 (usr_store_inferior_registers): Likewise. Call collect_register.
12871 Fix recursive case.
12872 (regsets_fetch_inferior_registers): Improve error message.
12873 (regsets_store_inferior_registers): Add debugging.
12874 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12875 (unstopped_p, linux_signal_pid): New functions.
12876 (linux_target_ops): Add linux_signal_pid.
12877 (linux_init_signals): New function.
12878 (initialize_low): Call it. Initialize using_threads.
12879 * regcache.c (inferior_regcache_data): Add valid
12880 flag.
12881 (get_regcache): Fetch registers lazily. Add fetch argument
12882 and update all callers.
12883 (regcache_invalidate_one, regcache_invalidate): New
12884 functions.
12885 (new_register_cache): Renamed from create_register_cache.
12886 Return the new regcache.
12887 (free_register_cache): Change argument to a void *.
12888 (registers_to_string, registers_from_string): Call get_regcache
12889 with fetch flag set.
12890 (register_data): Make static. Pass fetch flag to get_regcache.
12891 (supply_register): Call get_regcache with fetch flag clear.
12892 (collect_register): Call get_regcache with fetch flag set.
12893 (collect_register_as_string): New function.
12894 * regcache.h: Update.
12895 * remote-utils.c (putpkt): Flush after debug output and use
12896 stderr.
12897 Handle input interrupts while waiting for an ACK.
12898 (input_interrupt): Use signal_pid method.
12899 (getpkt): Flush after debug output and use stderr.
12900 (outreg): Use collect_register_as_string.
12901 (new_thread_notify, dead_thread_notify): New functions.
12902 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12903 and general_thread.
12904 (look_up_one_symbol): Flush after debug output.
12905 * server.c (step_thread, server_waiting): New variables.
12906 (start_inferior): Don't use signal_pid. Update call to mywait.
12907 (attach_inferior): Update call to mywait.
12908 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12909 (main): Don't fetch/store registers explicitly. Use
12910 set_desired_inferior. Support proposed ``Hs'' packet. Update
12911 calls to mywait.
12912 * server.h: Update.
12913 (struct inferior_list, struct_inferior_list_entry): New.
12914 * target.c (set_desired_inferior): New.
12915 (write_inferior_memory): Constify.
12916 (mywait): New function.
12917 * target.h: Update.
12918 (struct target_ops): New signal_pid method.
12919 (mywait): Removed macro, added prototype.
12920
12921 * linux-low.h (regset_func): Removed.
12922 (regset_fill_func, regset_store_func): New.
12923 (enum regset_type): New.
12924 (struct regset_info): Add type field. Use new operation types.
12925 (struct linux_target_ops): stop_pc renamed to get_pc.
12926 Add decr_pc_after_break and breakpoint_at.
12927 (get_process, get_thread_proess, get_process_thread)
12928 (strut process_info, all_processes, linux_attach_lwp)
12929 (thread_db_init): New.
12930
12931 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12932 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12933 (the_low_target): Add new members.
12934 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12935 (i386_store_fpxregset): Constify.
12936 (target_regsets): Add new kind identifier.
12937 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12938 (i386_set_pc): Add debugging.
12939 (i386_breakpoint_at): New function.
12940 (the_low_target): Add new members.
12941 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12942 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12943 (mips_breakpoint_at): New.
12944 (the_low_target): Add new members.
12945 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12946 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12947 (the_low_target): Add new members.
12948 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12949 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12950 (the_low_target): Add new members.
12951 * linux-x86-64-low.c (target_regsets): Add new kind
12952 identifier.
12953
129542002-05-15 Daniel Jacobowitz <drow@mvista.com>
12955
12956 From Martin Pool <mbp@samba.org>:
12957 * server.c (gdbserver_usage): New function.
12958 (main): Call it.
12959
129602002-05-14 Daniel Jacobowitz <drow@mvista.com>
12961
12962 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12963 stop_at -> stop_pc.
12964
129652002-05-04 Andrew Cagney <ac131313@redhat.com>
12966
12967 * Makefile.in: Remove obsolete code.
12968
129692002-04-24 Michal Ludvig <mludvig@suse.cz>
12970
12971 * linux-low.c (regsets_fetch_inferior_registers),
12972 (regsets_store_inferior_registers): Removed cast to int from
12973 ptrace() calls.
12974 * regcache.h: Added declaration of struct inferior_info.
12975
129762002-04-20 Daniel Jacobowitz <drow@mvista.com>
12977
12978 * inferiors.c (struct inferior_info): Add regcache_data.
12979 (add_inferior): Call create_register_cache.
12980 (clear_inferiors): Call free_register_cache.
12981 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12982 * regcache.c (struct inferior_regcache_data): New.
12983 (registers): Remove.
12984 (get_regcache): New function.
12985 (create_register_cache, free_register_cache): New functions.
12986 (set_register_cache): Don't initialize the register cache here.
12987 (registers_to_string, registers_from_string, register_data): Call
12988 get_regcache.
12989 * regcache.h: Add prototypes.
12990 * server.h: Likewise.
12991
129922002-04-20 Daniel Jacobowitz <drow@mvista.com>
12993
12994 * mem-break.c: New file.
12995 * mem-break.h: New file.
12996 * Makefile.in: Add mem-break.o rule; update server.h
12997 dependencies.
12998 * inferiors.c (struct inferior_info): Add target_data
12999 member.
13000 (clear_inferiors): Free target_data member if set.
13001 (inferior_target_data, set_inferior_target_data): New functions.
13002 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13003 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13004 * linux-low.c (linux_bp_reinsert): New variable.
13005 (struct inferior_linux_data): New.
13006 (linux_create_inferior): Use set_inferior_target_data.
13007 (linux_attach): Likewise. Call add_inferior.
13008 (linux_wait_for_one_inferior): New function.
13009 (linux_wait): Call it.
13010 (linux_write_memory): Add const.
13011 (initialize_low): Call set_breakpoint_data.
13012 * linux-low.h (struct linux_target_ops): Add breakpoint
13013 handling members.
13014 * server.c (attach_inferior): Remove extra add_inferior
13015 call.
13016 * server.h: Include mem-break.h. Update inferior.c
13017 prototypes.
13018 * target.c (read_inferior_memory)
13019 (write_inferior_memory): New functions.
13020 * target.h (read_inferior_memory)
13021 (write_inferior_memory): Change macros to prototypes.
13022 (struct target_ops): Update comments. Add const to write_memory
13023 definition.
13024
130252002-04-11 Daniel Jacobowitz <drow@mvista.com>
13026
13027 * linux-low.c (usr_store_inferior_registers): Support
13028 registers which are allowed to fail to store.
13029 * linux-low.h (linux_target_ops): Likewise.
13030 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13031 (ppc_cannot_store_register): FPSCR may not be storable.
13032
130332002-04-09 Daniel Jacobowitz <drow@mvista.com>
13034
13035 * server.h: Include <string.h> if HAVE_STRING_H.
13036 * ChangeLog: Correct paths in last ChangeLog entry.
13037
130382002-04-09 Daniel Jacobowitz <drow@mvista.com>
13039
13040 * linux-low.h: Remove obsolete prototypes.
13041 (struct linux_target_ops): New.
13042 (extern the_low_target): New.
13043 * linux-low.c (num_regs, regmap): Remove declarations.
13044 (register_addr): Use the_low_target explicitly.
13045 (fetch_register): Likewise.
13046 (usr_fetch_inferior_registers): Likewise.
13047 (usr_store_inferior_registers): Likewise.
13048 * linux-arm-low.c (num_regs): Remove.
13049 (arm_num_regs): Define.
13050 (arm_regmap): Renamed from regmap, made static.
13051 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13052 made static.
13053 (arm_cannot_store_register): Renamed from cannot_store_register,
13054 made static.
13055 (the_low_target): New.
13056 * linux-i386-low.c (num_regs): Remove.
13057 (i386_num_regs): Define.
13058 (i386_regmap): Renamed from regmap, made static.
13059 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13060 made static.
13061 (i386_cannot_store_register): Renamed from cannot_store_register,
13062 made static.
13063 (the_low_target): New.
13064 * linux-ia64-low.c (num_regs): Remove.
13065 (ia64_num_regs): Define.
13066 (ia64_regmap): Renamed from regmap, made static.
13067 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13068 made static.
13069 (ia64_cannot_store_register): Renamed from cannot_store_register,
13070 made static.
13071 (the_low_target): New.
13072 * linux-m68k-low.c (num_regs): Remove.
13073 (m68k_num_regs): Define.
13074 (m68k_regmap): Renamed from regmap, made static.
13075 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13076 made static.
13077 (m68k_cannot_store_register): Renamed from cannot_store_register,
13078 made static.
13079 (the_low_target): New.
13080 * linux-mips-low.c (num_regs): Remove.
13081 (mips_num_regs): Define.
13082 (mips_regmap): Renamed from regmap, made static.
13083 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13084 made static.
13085 (mips_cannot_store_register): Renamed from cannot_store_register,
13086 made static.
13087 (the_low_target): New.
13088 * linux-ppc-low.c (num_regs): Remove.
13089 (ppc_num_regs): Define.
13090 (ppc_regmap): Renamed from regmap, made static.
13091 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13092 made static.
13093 (ppc_cannot_store_register): Renamed from cannot_store_register,
13094 made static.
13095 (the_low_target): New.
13096 * linux-s390-low.c (num_regs): Remove.
13097 (s390_num_regs): Define.
13098 (s390_regmap): Renamed from regmap, made static.
13099 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13100 made static.
13101 (s390_cannot_store_register): Renamed from cannot_store_register,
13102 made static.
13103 (the_low_target): New.
13104 * linux-sh-low.c (num_regs): Remove.
13105 (sh_num_regs): Define.
13106 (sh_regmap): Renamed from regmap, made static.
13107 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13108 made static.
13109 (sh_cannot_store_register): Renamed from cannot_store_register,
13110 made static.
13111 (the_low_target): New.
13112 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13113 (the_low_target): New.
13114
131152002-04-09 Daniel Jacobowitz <drow@mvista.com>
13116
13117 * Makefile.in: Add stamp-h target.
13118 * configure.in: Create stamp-h.
13119 * configure: Regenerated.
13120
131212002-04-09 Daniel Jacobowitz <drow@mvista.com>
13122
13123 * inferiors.c: New file.
13124 * target.c: New file.
13125 * target.h: New file.
13126 * Makefile.in: Add target.o and inferiors.o. Update
13127 dependencies.
13128 * linux-low.c (inferior_pid): New static variable,
13129 moved from server.c.
13130 (linux_create_inferior): Renamed from create_inferior.
13131 Call add_inferior. Return 0 on success instead of a PID.
13132 (linux_attach): Renamed from myattach.
13133 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13134 (linux_thread_alive): Renamed from mythread_alive.
13135 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13136 child dies.
13137 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13138 (regsets_store_inferior_registers): Correct error message.
13139 Add missing ``return 0''.
13140 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13141 (linux_store_registers): Renamed from store_inferior_registers.
13142 (linux_read_memory): Renamed from read_inferior_memory.
13143 (linux_write_memory): Renamed from write_inferior_memory.
13144 (linux_target_ops): New structure.
13145 (initialize_low): Call set_target_ops ().
13146 * remote-utils.c (unhexify): New function.
13147 (hexify): New function.
13148 (input_interrupt): Send signals to ``signal_pid''.
13149 * server.c (inferior_pid): Remove.
13150 (start_inferior): Update create_inferior call.
13151 (attach_inferior): Call add_inferior.
13152 (handle_query): New function.
13153 (main): Call handle_query for `q' packets.
13154 * server.h: Include "target.h". Remove obsolete prototypes.
13155 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13156
131572002-04-09 Daniel Jacobowitz <drow@mvista.com>
13158
13159 * Makefile.in: Add WARN_CFLAGS. Update configury
13160 dependencies.
13161 * configure.in: Check for <string.h>
13162 * configure: Regenerate.
13163 * config.in: Regenerate.
13164 * gdbreplay.c: Include needed system headers.
13165 (remote_open): Remove strchr prototype.
13166 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13167 * regcache.c (supply_register): Change buf argument to const void *.
13168 (supply_register_by_name): Likewise.
13169 (collect_register): Change buf argument to void *.
13170 (collect_register_by_name): Likewise.
13171 * regcache.h: Add missing prototypes.
13172 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13173 * server.c (handle_query): New function.
13174 (attached): New static variable, moved out of main.
13175 (main): Quiet longjmp clobber warnings.
13176 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13177 * utils.c (error): Remove NORETURN.
13178 (fatal): Likewise.
This page took 1.584563 seconds and 4 git commands to generate.