]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
[win32] cannot automatically find executable file [...] warning at GDB startup
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
35adc03f
YQ
12015-12-21 Yao Qi <yao.qi@linaro.org>
2
3 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4 arm breakpoint.
5
bd2b2909
AT
62015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
7
8 * server.c (handle_query): Call target_supports_software_single_step.
9
7fe5e27e
AT
102015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
11
12 * linux-low.c (single_step): New function.
13 (linux_resume_one_lwp_throw): Call single_step.
14 (start_step_over): Likewise.
15
d9311bfa
AT
162015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
17
18 * Makefile.in (SFILES): Append arch/arm-linux.c,
19 arch/arm-get-next-pcs.c.
20 (arm-linux.o): New rule.
21 (arm-get-next-pcs.o): New rule.
22 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
23 arm-linux.o.
24 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
25 to linux-aarch32-low.c.
26 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
27 (arm_breakpoint_len, thumb_breakpoint): Likewise.
28 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
29 (thumb2_breakpoint_len): Likewise.
30 (arm_is_thumb_mode): Make non-static.
31 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
32 from linux-aarch32-low.c.
33 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
34 (arm_breakpoint_len, thumb_breakpoint): Likewise.
35 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
36 (thumb2_breakpoint_len): Likewise.
37 (arm_is_thumb_mode): New declaration.
38 * linux-arm-low.c: Include arch/arm-linux.h
39 aarch/arm-get-next-pcs.h, sys/syscall.h.
40 (get_next_pcs_ops): New struct.
41 (get_next_pcs_addr_bits_remove): New function.
42 (get_next_pcs_is_thumb): New function.
43 (get_next_pcs_read_memory_unsigned_integer): Likewise.
44 (arm_sigreturn_next_pc): Likewise.
45 (get_next_pcs_syscall_next_pc): Likewise.
46 (arm_gdbserver_get_next_pcs): Likewise.
47 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
48 Initialize.
49 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
50 * server.h: Include gdb_vecs.h.
51
68ce2059
AT
522015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
53
54 * Makefile.in (SFILES): Append common/common-regcache.c.
55 (OBS): Append common-regcache.o.
56 (common-regcache.o): New rule.
57 * regcache.c (init_register_cache): Initialize cache to
58 REG_UNAVAILABLE.
59 (regcache_raw_read_unsigned): New function.
60 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
61 register_status enum.
62
fa5308bd
AT
632015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
64
65 * linux-aarch64-low.c (the_low_targets): Rename
66 breakpoint_reinsert_addr to get_next_pcs.
67 * linux-arm-low.c (the_low_targets): Likewise.
68 * linux-bfin-low.c (the_low_targets): Likewise.
69 * linux-cris-low.c (the_low_targets): Likewise.
70 * linux-crisv32-low.c (the_low_targets): Likewise.
71 * linux-low.c (can_software_single_step): Likewise.
72 (install_software_single_step_breakpoints): New function.
73 (start_step_over): Use install_software_single_step_breakpoints.
74 * linux-low.h: New CORE_ADDR vector.
75 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
76 get_next_pcs.
77 * linux-mips-low.c (the_low_targets): Likewise.
78 * linux-nios2-low.c (the_low_targets): Likewise.
79 * linux-sparc-low.c (the_low_targets): Likewise.
80
4a6ed09b
PA
812015-12-17 Pedro Alves <palves@redhat.com>
82
83 * linux-low.c (linux_kill_one_lwp): Remove references to
84 LinuxThreads.
85 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
86 to 'kill'.
87 (linux_init_signals): Delete.
88 (initialize_low): Adjust.
89 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
90
7544db95
PA
912015-12-16 Pedro Alves <palves@redhat.com>
92
93 * configure.ac (compiler warning flags): When testing a
94 -Wno-foo option, check whether -Wfoo works instead.
95 * configure: Regenerate.
96
8020350c
DB
972015-12-11 Don Breazeal <donb@codesourcery.com>
98
99 * server.c (process_serial_event): Don't exit from gdbserver
100 in remote mode if there are still active inferiors.
101
db91f502
YQ
1022015-12-11 Yao Qi <yao.qi@linaro.org>
103
104 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
105 arm_breakpoint_at if the process is 32-bit.
106
b37a6290
YQ
1072015-12-11 Yao Qi <yao.qi@linaro.org>
108
109 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
110 arm breakpoint.
111
17b1509a
YQ
1122015-12-07 Yao Qi <yao.qi@linaro.org>
113
114 * configure.srv: Append arm.o to srv_tgtobj for
115 aarch64*-*-linux* target.
116 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
117 from linux-arm-low.c.
118 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
119 (arm_breakpoint_len, thumb_breakpoint): Likewise.
120 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
121 (thumb2_breakpoint_len): Likewise.
122 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
123 (arm_breakpoint_kinds): Likewise.
124 (arm_breakpoint_kind_from_pc): Likewise.
125 (arm_sw_breakpoint_from_kind): Likewise.
126 (arm_breakpoint_kind_from_current_state): Likewise.
127 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
128 (arm_sw_breakpoint_from_kind): Declare.
129 (arm_breakpoint_kind_from_current_state): Declare.
130 (arm_breakpoint_at): Declare.
131 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
132 arm_sw_breakpoint_from_kind if process is 32-bit.
133 (aarch64_breakpoint_kind_from_pc): New function.
134 (aarch64_breakpoint_kind_from_current_state): New function.
135 (the_low_target): Initialize fields breakpoint_kind_from_pc
136 and breakpoint_kind_from_current_state.
137 * linux-arm-low.c (arm_breakpoint_kinds): Move to
138 linux-aarch32-low.c.
139 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
140 (arm_breakpoint, arm_breakpoint_len): Likewise.
141 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
142 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
143 (arm_is_thumb_mode): Likewise.
144 (arm_breakpoint_at): Likewise.
145 (arm_breakpoint_kind_from_pc): Likewise.
146 (arm_sw_breakpoint_from_kind): Likewise.
147 (arm_breakpoint_kind_from_current_state): Likewise.
148
149 Revert:
150 2015-08-04 Yao Qi <yao.qi@linaro.org>
151
152 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
153 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
154 * server.c (extended_protocol): Remove "static".
155 * server.h (extended_protocol): Declare it.
156
ece66d65
JS
1572015-12-04 Josh Stone <jistone@redhat.com>
158
159 * target.h (struct target_ops) <arch_setup>: Rename to ...
160 (struct target_ops) <post_create_inferior>: ... this.
161 (target_arch_setup): Rename to ...
162 (target_post_create_inferior): ... this, calling post_create_inferior.
163 * server.c (start_inferior): Update target_arch_setup calls to
164 target_post_create_inferior.
165 * linux-low.c (linux_low_ptrace_options): Forward declare.
166 (linux_arch_setup): Update its comment for general use.
167 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
168 (struct linux_target_ops): Use linux_post_create_inferior.
169 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
170 to post_create_inferior.
171 * nto-low.c (struct nto_target_ops): Likewise.
172 * spu-low.c (struct spu_target_ops): Likewise.
173 * win32-low.c (struct win32_target_ops): Likewise.
174
e58c48b4
AT
1752015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
176
177 * linux-arm-low.c: Remove duplicate arch/arm.h include.
178
fbec8956
AT
1792015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
180
181 * linux-arm-low.c (arm_reinsert_addr): Remove function.
182 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
183 * linux-cris-low.c (cris_reinsert_addr> Remove function.
184 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
185 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
186 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
187 * linux-mips-low.c (mips_reinsert_addr): Remove function.
188 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
189 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
190 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
191 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
192 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
193
9b4c5f87
AT
1942015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
195
196 * linux-low.c (linux_look_up_symbols): Don't call
197 linux_supports_traceclone.
198 * linux-low.h (thread_db_init): Remove use_events argument.
199 * thread-db.c (thread_db_use_event): Remove global variable.
200 (struct thread_db) <td_thr_event_enable_p>: Remove field.
201 (struct thread_db) <td_create_bp>: Remove field.
202 (thread_db_create_event): Remove function.
203 (thread_db_enable_reporting): Likewise.
204 (find_one_thread): Don't check for thread_db_use_events.
205 (attach_thread): Likewise.
206 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
207 (try_thread_db_load_1): Don't check for thread_db_use_events.
208 (thread_db_init): Remove use_events argument and thread events
209 handling.
210 (remove_thread_event_breakpoints): Remove function.
211 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
212
7d00775e
AT
2132015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
214
215 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
216 New function.
217 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
218 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
219 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
220 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
221 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
222 Initialize.
223 * linux-crisv32-low.c (cris_supports_hardware_single_step):
224 New function.
225 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
226 * linux-low.c (can_hardware_single_step): Use
227 supports_hardware_single_step.
228 (can_software_single_step): New function.
229 (start_step_over): Call can_software_single_step.
230 (linux_supports_hardware_single_step): New function.
231 (struct target_ops) <supports_software_single_step>: Initialize.
232 * linux-low.h (struct linux_target_ops)
233 <supports_hardware_single_step>: Initialize.
234 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
235 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
236 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
237 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
238 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
239 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
240 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
241 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
242 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
243 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
244 Initialize.
245 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
246 (struct linux_target_ops) <tile_supports_hardware_single_step>:
247 Initialize.
248 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
249 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
250 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
251 New function.
252 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
253 * target.h (struct target_ops): <supports_software_single_step>:
254 New field.
255 (target_supports_software_single_step): New macro.
256
2d97cd35
AT
2572015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
258
259 * linux-low.c (linux_wait_1): Fix pc advance condition.
260 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
261 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
262
769ef81f
AT
2632015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
264
265 * linux-arm-low.c (arm_is_thumb_mode): New function.
266 (arm_breakpoint_at): Use arm_is_thumb_mode.
267 (arm_breakpoint_kind_from_current_state): New function.
268 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
269 Initialize.
270 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
271 (linux_breakpoint_kind_from_current_state): New function.
272 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
273 * linux-low.h (struct linux_target_ops)
274 <breakpoint_kind_from_current_state>: New field.
275 * target.h (struct target_ops): Likewise.
276 (target_breakpoint_kind_from_current_state): New macro.
277
1bebeeca
PA
2782015-11-30 Pedro Alves <palves@redhat.com>
279
280 * linux-low.c (linux_resume): Wake up the event loop before
281 returning.
282
a67a9fae
PA
2832015-11-30 Pedro Alves <palves@redhat.com>
284
285 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
286 check.
287 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
288 to -1.
289 * target.c (struct thread_search): New structure.
290 (thread_search_callback): New function.
291 (prev_general_thread): New global.
292 (prepare_to_access_memory, done_accessing_memory): New functions.
293 * target.h (prepare_to_access_memory, done_accessing_memory):
294 Replace macros with function declarations.
295
f2faf941
PA
2962015-11-30 Pedro Alves <palves@redhat.com>
297
298 PR 14618
299 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
300 report TARGET_WAITKIND_NO_RESUMED.
301 * remote-utils.c (prepare_resume_reply): Handle
302 TARGET_WAITKIND_NO_RESUMED.
303 * server.c (report_no_resumed): New global.
304 (handle_query) <qSupported>: Handle "no-resumed+". Report
305 "no-resumed+" support.
306 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
307 return error if the client doesn't support no-resumed events.
308 (push_stop_notification): New function.
309 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
310 events if the client supports them.
311
a681f9c9
PA
3122015-11-30 Pedro Alves <palves@redhat.com>
313
314 * linux-low.c (thread_still_has_status_pending_p): Don't check
315 vCont;t here.
316 (lwp_resumed): New function.
317 (status_pending_p_callback): Return early if the LWP is not
318 supposed to be resumed.
319
65706a29
PA
3202015-11-30 Pedro Alves <palves@redhat.com>
321
322 * linux-low.c (handle_extended_wait): Assert that the LWP's
323 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
324 thread create events, leave the new child's status pending.
325 (linux_low_filter_event): If GDB wants to hear about thread exit
326 events, leave the LWP marked dead and don't delete it.
327 (linux_wait_for_event_filtered): Don't check for thread exit.
328 (filter_exit_event): New function.
329 (linux_wait_1): Use it, when returning an exit event.
330 (linux_resume_one_lwp_throw): Assert that the LWP's
331 waitstatus is TARGET_WAITKIND_IGNORE.
332 * remote-utils.c (prepare_resume_reply): Handle
333 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
334 * server.c (report_thread_events): New global.
335 (handle_general_set): Handle QThreadEvents.
336 (handle_query) <qSupported>: Handle and report QThreadEvents+;
337 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
338 TARGET_WAITKIND_THREAD_EXITED.
339 * server.h (report_thread_events): Declare.
340
56cf4bed
PA
3412015-11-30 Pedro Alves <palves@redhat.com>
342
343 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
344 the thread's last_resume_kind was resume_stop.
345
500c1d85
PA
3462015-11-30 Pedro Alves <palves@redhat.com>
347
348 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
349 before returning.
350
de979965
PA
3512015-11-30 Pedro Alves <palves@redhat.com>
352
353 * server.c (handle_v_requests): Handle vCtrlC.
354
34c65914
PA
3552015-11-30 Pedro Alves <palves@redhat.com>
356
357 * gdbthread.h (find_any_thread_of_pid): Declare.
358 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
359 functions.
360 * server.c (handle_query): If current_thread is NULL, look for
361 another thread of the selected process.
362
79efa585 3632015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 364 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
365
366 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
367 * server.c (handle_qxfer_threads_worker): Refactor to include thread
368 name in reply.
369 * target.h (struct target_ops) <thread_name>: New field.
370 (target_thread_name): New macro.
371
80d82c19
JB
3722015-11-23 Joel Brobecker <brobecker@adacore.com>
373
374 * regcache.h (regcache_invalidate_pid): Add declaration.
375 * regcache.c (regcache_invalidate_pid): New function, extracted
376 from regcache_invalidate.
377 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
378 Add trivial documentation comment.
379 * lynx-low.c: Use regcache_invalidate_pid instead of
380 regcache_invalidate.
381
64da5dd5
JB
3822015-11-23 Joel Brobecker <brobecker@adacore.com>
383
384 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
385 and Elf64_auxv_t if the target is Android.
386
37ce4055
DE
3872015-11-22 Doug Evans <xdje42@gmail.com>
388
389 * target.h: #include <sys/types.h>.
390
06e03fff
PA
3912015-11-19 Pedro Alves <palves@redhat.com>
392
393 * linux-low.c (linux_process_qsupported): Change prototype.
394 Adjust.
395 * linux-low.h (struct linux_target_ops) <process_qsupported>:
396 Change prototype.
397 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
398 and adjust to loop over all features.
399 * server.c (handle_query) <qSupported>: Adjust to call
400 target_process_qsupported once, passing it a vector of unprocessed
401 features.
402 * target.h (struct target_ops) <process_qsupported>: Change
403 prototype.
404 (target_process_qsupported): Adjust.
405
9a084706
PA
4062015-11-19 Pedro Alves <palves@redhat.com>
407
408 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
409 mode.
410 * configure: Regenerate.
411
dad44a1f
PA
4122015-11-19 Pedro Alves <palves@redhat.com>
413
414 * configure: Regenerate.
415
231c0592
YQ
4162015-11-19 Yao Qi <yao.qi@linaro.org>
417
418 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
419 type to uint32_t.
420
6c1c9a8b
YQ
4212015-11-19 Yao Qi <yao.qi@linaro.org>
422
423 * linux-aarch64-low.c (enum aarch64_operand_type): New.
424 (struct aarch64_operand): Move enum out.
425
9caa3311
YQ
4262015-11-19 Yao Qi <yao.qi@linaro.org>
427
428 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
429 struct user_fpsimd_state *.
430 (aarch64_store_fpregset): Likewise.
431
6a69a054
YQ
4322015-11-19 Yao Qi <yao.qi@linaro.org>
433
434 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
435 struct user_pt_regs *.
436 (aarch64_store_gregset): Likewise.
437
1798301e
PA
4382015-11-18 Pedro Alves <palves@redhat.com>
439
440 * Makefile.in (all_object_files): Add $IPA_OBJS.
441
ce7715e2
PA
4422015-11-17 Pedro Alves <palves@redhat.com>
443
444 * win32-low.c (win32_resume): Use gdb_signal_from_host,
445 GDB_SIGNAL_0 and gdb_signal_to_string.
446
c0879059
PA
4472015-11-17 Pedro Alves <palves@redhat.com>
448
449 * win32-low.c (handle_output_debug_string): Remove parameter.
450 (win32_kill): Remove our_status local and adjust call to
451 handle_output_debug_string.
452 (get_child_debug_event): Adjust call to
453 handle_output_debug_string.
454
1996e237
SM
4552015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
456
457 * linux-mips-low.c (mips_fill_gregset): Add cast.
458 (mips_store_gregset): Likewise.
459 (mips_fill_fpregset): Likewise.
460 (mips_store_fpregset): Likewise.
461
cbec665b
SM
4622015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
463
464 * linux-mips-low.c (mips_add_watchpoint): Rename private to
465 priv.
466
eb3e3c67
SM
4672015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
468
469 * linux-mips-low.c (mips_linux_new_thread): Change type of
470 watch_type to enum target_hw_bp_type.
471
171de4b8
SM
4722015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
473
474 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
475 Change return type to arm_hwbp_type.
476
04248ead
SM
4772015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
478
479 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
480 (arm_store_gregset): Likewise.
481 * linux-arm-low.c (arm_get_hwcap): Likewise.
482 (arm_read_description): Likewise.
483
04b3479c
SM
4842015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
485
486 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
487
2bc84e8a
SM
4882015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
489
490 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
491 (ppc_fill_vsxregset): Likewise.
492 (ppc_store_vsxregset): Likewise.
493 (ppc_fill_vrregset): Likewise.
494 (ppc_store_vrregset): Likewise.
495 (ppc_fill_evrregset): Likewise.
496 (ppc_store_evrregset): Likewise.
497
e6c5bb05
SM
4982015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
499
500 * linux-ppc-low.c (ppc_usrregs_info): Remove
501 forward-declaration.
502 (ppc_arch_setup): Move lower in file.
503
7ea45d72
SM
5042015-10-30 Simon Marchi <simon.marchi@ericsson.com>
505
506 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
507 (ps_pdwrite): Likewise.
508
69291610
HW
5092015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
510
511 * linux-arm-low.c (arm_new_thread): Move pointer dereference
512 to after assert checks.
513
b42945fd
SM
5142015-10-29 Simon Marchi <simon.marchi@ericsson.com>
515
516 * proc-service.c (ps_pdread): Add/adjust casts.
517 (ps_pdwrite): Add/adjust casts.
518
d6f85c84
SM
5192015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
520
521 * server.c (handle_search_memory_1): Cast return value of
522 memmem.
523
f98cd059
SM
5242015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
525
526 * server.c (write_qxfer_response): Change type of data to
527 gdb_byte *.
528
d2412fa5
PA
5292015-10-29 Pedro Alves <palves@redhat.com>
530
531 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
532
c17414a2
PA
5332015-10-29 Pedro Alves <palves@redhat.com>
534
535 * tracepoint.c (clear_installed_tracepoints): Add casts.
536
e053fbc4
PA
5372015-10-29 Pedro Alves <palves@redhat.com>
538
539 * server.c (handle_v_cont, process_serial_event): Add enum
540 gdb_signal casts to signal parsing code.
541
add67df8
PA
5422015-10-29 Pedro Alves <palves@redhat.com>
543
544 * linux-low.h (NULL_REGSET): Define.
545 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
546 * linux-arm-low.c (arm_regsets): Likewise.
547 * linux-crisv32-low.c (cris_regsets): Likewise.
548 * linux-m68k-low.c (m68k_regsets): Likewise.
549 * linux-mips-low.c (mips_regsets): Likewise.
550 * linux-nios2-low.c (nios2_regsets): Likewise.
551 * linux-ppc-low.c (ppc_regsets): Likewise.
552 * linux-s390-low.c (s390_regsets): Likewise.
553 * linux-sh-low.c (sh_regsets): Likewise.
554 * linux-sparc-low.c (sparc_regsets): Likewise.
555 * linux-tic6x-low.c (tic6x_regsets): Likewise.
556 * linux-tile-low.c (tile_regsets): Likewise.
557 * linux-x86-low.c (x86_regsets): Likewise.
558 * linux-xtensa-low.c (xtensa_regsets): Likewise.
559
50bc912a
PA
5602015-10-29 Pedro Alves <palves@redhat.com>
561
562 * linux-low.h (NULL_REGSET): Define.
563 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
564 * linux-arm-low.c (arm_regsets): Likewise.
565 * linux-crisv32-low.c (cris_regsets): Likewise.
566 * linux-m68k-low.c (m68k_regsets): Likewise.
567 * linux-mips-low.c (mips_regsets): Likewise.
568 * linux-nios2-low.c (nios2_regsets): Likewise.
569 * linux-ppc-low.c (ppc_regsets): Likewise.
570 * linux-s390-low.c (s390_regsets): Likewise.
571 * linux-sh-low.c (sh_regsets): Likewise.
572 * linux-sparc-low.c (sparc_regsets): Likewise.
573 * linux-tic6x-low.c (tic6x_regsets): Likewise.
574 * linux-tile-low.c (tile_regsets): Likewise.
575 * linux-x86-low.c (x86_regsets): Likewise.
576 * linux-xtensa-low.c (xtensa_regsets): Likewise.
577
682b2546
DE
5782015-10-26 Doug Evans <dje@google.com>
579
580 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
581
963843d4
DE
5822015-10-26 Doug Evans <dje@google.com>
583
584 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
585
d41401ac
DE
5862015-10-26 Doug Evans <dje@google.com>
587
588 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
589 for debug_printf.
590 (attach_thread, find_new_threads_callback): Ditto.
591
3db28855
AT
5922015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
593
594 * mem-break.h (set_breakpoint_data): Remove.
595
fb78e89c
AT
5962015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
597
598 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
599 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
600 (initialize_low): Remove set_breakpoint_data call.
601 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
602 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
603 (initialize_low): Remove set_breakpoint_data call.
604 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
605 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
606 (initialize_low): Remove set_breakpoint_data call.
607
2e6ee069
AT
6082015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
609
610 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
611 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
612 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
613 * target.h (target_breakpoint_kind_from_pc): New macro.
614
1652a986
AT
6152015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
616
617 * linux-low.c (default_breakpoint_kind_from_pc): New function.
618 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
619 the default breakpoint kind.
620
abeead09
AT
6212015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
622
623 * linux-arm-low.c (arm_supports_z_point_type): Add software
624 breakpoint support.
625
b0b4b501
AT
6262015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
627
628 * linux-arm-low.c: Refactor breakpoint definitions.
629 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
630 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
631
8689682c
AT
6322015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
633
634 * Makefile.in: Add arm.c/o.
635 * configure.srv: Likewise.
636 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
637 (arm_breakpoint_kind_from_pc): New function.
638 (arm_sw_breakpoint_from_kind): Return proper kind.
639 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
640
27165294
AT
6412015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
642
643 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
644 removal.
645 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
646 (struct raw_breakpoint) <size>: Remove.
647 (struct raw_breakpoint) <kind>: Add.
648 (bp_size): New function.
649 (bp_opcode): Likewise.
650 (find_raw_breakpoint_at): Adjust for kind.
651 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
652 (remove_memory_breakpoint): Adjust for kind call bp_size.
653 (set_raw_breakpoint_at): Adjust for kind.
654 (set_breakpoint): Likewise.
655 (set_breakpoint_at): Call breakpoint_kind_from_pc.
656 (delete_raw_breakpoint): Adjust for kind.
657 (delete_breakpoint): Likewise.
658 (find_gdb_breakpoint): Likewise.
659 (set_gdb_breakpoint_1): Likewise.
660 (set_gdb_breakpoint): Likewise.
661 (delete_gdb_breakpoint_1): Likewise.
662 (delete_gdb_breakpoint): Likewise.
663 (uninsert_raw_breakpoint): Likewise.
664 (reinsert_raw_breakpoint): Likewise.
665 (set_breakpoint_data): Remove.
666 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
667 (check_mem_read): Adjust for kind call bp_size.
668 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
669 (clone_one_breakpoint): Adjust for kind.
670 * mem-break.h (set_gdb_breakpoint): Likewise.
671 (delete_gdb_breakpoint): Likewise.
672 * server.c (process_serial_event): Likewise.
673
dd373349
AT
6742015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
675
676 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
677 (struct linux_target_ops) <breakpoint>: Remove.
678 (struct linux_target_ops) <breakpoint_len>: Remove.
679 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
680 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
681 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
682 (arm_sw_breakpoint_from_kind): New function.
683 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
684 (struct linux_target_ops) <breakpoint>: Remove.
685 (struct linux_target_ops) <breakpoint_len>: Remove.
686 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
687 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
688 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
689 (struct linux_target_ops) <breakpoint>: Remove.
690 (struct linux_target_ops) <breakpoint_len>: Remove.
691 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
692 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
693 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
694 (struct linux_target_ops) <breakpoint>: Remove.
695 (struct linux_target_ops) <breakpoint_len>: Remove.
696 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
697 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
698 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
699 and sw_breakpoint_from_kind to increment the pc.
700 (linux_breakpoint_kind_from_pc): New function.
701 (linux_sw_breakpoint_from_kind): New function.
702 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
703 (initialize_low): Call breakpoint_kind_from_pc and
704 sw_breakpoint_from_kind to replace breakpoint_data/len.
705 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
706 New field.
707 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
708 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
709 (struct linux_target_ops) <breakpoint>: Remove.
710 (struct linux_target_ops) <breakpoint_len>: Remove.
711 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
712 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
713 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
714 (struct linux_target_ops) <breakpoint>: Remove.
715 (struct linux_target_ops) <breakpoint_len>: Remove.
716 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
717 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
718 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
719 (struct linux_target_ops) <breakpoint>: Remove.
720 (struct linux_target_ops) <breakpoint_len>: Remove.
721 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
722 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
723 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
724 (struct linux_target_ops) <breakpoint>: Remove.
725 (struct linux_target_ops) <breakpoint_len>: Remove.
726 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
727 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
728 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
729 (struct linux_target_ops) <breakpoint>: Remove.
730 (struct linux_target_ops) <breakpoint_len>: Remove.
731 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
732 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
733 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
734 (struct linux_target_ops) <breakpoint>: Remove.
735 (struct linux_target_ops) <breakpoint_len>: Remove.
736 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
737 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
738 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
739 (struct linux_target_ops) <breakpoint>: Remove.
740 (struct linux_target_ops) <breakpoint_len>: Remove.
741 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
742 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
743 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
744 (struct linux_target_ops) <breakpoint>: Remove.
745 (struct linux_target_ops) <breakpoint_len>: Remove.
746 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
747 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
748 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
749 (struct linux_target_ops) <breakpoint>: Remove.
750 (struct linux_target_ops) <breakpoint_len>: Remove.
751 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
752 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
753 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
754 * linux-x86-low.c (x86_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-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
760 (struct linux_target_ops) <breakpoint>: Remove.
761 (struct linux_target_ops) <breakpoint_len>: Remove.
762 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
763 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
764
4cd98a19
AT
7652015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
766
767 * linux-cris-low.c (cris_get_pc): Remove void arg.
768
774ee6d2
AR
7692015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
770
771 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
772 variable name.
773
833dcd29
AR
7742015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
775
776 * inferiors.c (thread_pid_matches_callback): New function.
777 (find_thread_process): New function.
778 (remove_thread): Reset current_thread.
779 (remove_process): Assert threads have been removed first.
780
8d689ee5
YQ
7812015-10-15 Yao Qi <yao.qi@linaro.org>
782
783 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
784 if it is 3.
785 (aarch64_remove_point): Likewise.
786 * regcache.c (regcache_register_size): New function.
787
1c2e1515
YQ
7882015-10-12 Yao Qi <yao.qi@linaro.org>
789
790 * linux-aarch64-low.c: Update all callers as emit_load_store
791 is renamed to aarch64_emit_load_store.
792
e1c587c3
YQ
7932015-10-12 Yao Qi <yao.qi@linaro.org>
794
795 * linux-aarch64-low.c: Update all callers of function renaming
796 from emit_insn to aarch64_emit_insn.
797
b6542f81
YQ
7982015-10-12 Yao Qi <yao.qi@linaro.org>
799
800 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
801 arch/aarch64-insn.h.
802 (struct aarch64_memory_operand): Likewise.
803 (ENCODE): Likewise.
804 (emit_insn): Move to arch/aarch64-insn.c.
805 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
806 (emit_load_store): Move to arch/aarch64-insn.c.
807 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
808 (can_encode_int32): Remove.
809
246994ce
YQ
8102015-10-12 Yao Qi <yao.qi@linaro.org>
811
812 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
813 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
814 (aarch64_relocate_instruction): Likewise.
815 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
816 (struct aarch64_insn_visitor): Likewise.
817
0badd99f
YQ
8182015-10-12 Yao Qi <yao.qi@linaro.org>
819
820 * linux-aarch64-low.c (struct aarch64_insn_data): New.
821 (struct aarch64_insn_visitor): New.
822 (struct aarch64_insn_relocation_data): New.
823 (aarch64_ftrace_insn_reloc_b): New function.
824 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
825 (aarch64_ftrace_insn_reloc_cb): Likewise.
826 (aarch64_ftrace_insn_reloc_tb): Likewise.
827 (aarch64_ftrace_insn_reloc_adr): Likewise.
828 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
829 (aarch64_ftrace_insn_reloc_others): Likewise.
830 (visitor): New.
831 (aarch64_relocate_instruction): Use visitor.
832
dfaffe9d
YQ
8332015-10-12 Yao Qi <yao.qi@linaro.org>
834
835 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
836 int. Add argument buf.
837 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
838 aarch64_relocate_instruction.
839
70b439f0
YQ
8402015-10-12 Yao Qi <yao.qi@linaro.org>
841
842 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
843 argument insn. Remove local variable insn. Don't call
844 target_read_uint32.
845 (aarch64_install_fast_tracepoint_jump_pad): Call
846 target_read_uint32.
847
7781c06f
YQ
8482015-09-30 Yao Qi <yao.qi@linaro.org>
849
850 * linux-aarch64-low.c (emit_movk): Shorten a long line.
851 (emit_load_store_pair): Likewise.
852
9a3c8263
SM
8532015-09-25 Simon Marchi <simon.marchi@ericsson.com>
854
855 * dll.c (match_dll): Add cast(s).
856 (unloaded_dll): Likewise.
857 * linux-low.c (second_thread_of_pid_p): Likewise.
858 (delete_lwp_callback): Likewise.
859 (count_events_callback): Likewise.
860 (select_event_lwp_callback): Likewise.
861 (linux_set_resume_request): Likewise.
862 * server.c (accumulate_file_name_length): Likewise.
863 (emit_dll_description): Likewise.
864 (handle_qxfer_threads_worker): Likewise.
865 (visit_actioned_threads): Likewise.
866 * thread-db.c (any_thread_of): Likewise.
867 * tracepoint.c (same_process_p): Likewise.
868 (match_blocktype): Likewise.
869 (build_traceframe_info_xml): Likewise.
870
224c3ddb
SM
8712015-09-25 Simon Marchi <simon.marchi@ericsson.com>
872
873 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
874 assignment.
875 (gdb_unparse_agent_expr): Likewise.
876 * hostio.c (require_data): Likewise.
877 (handle_pread): Likewise.
878 * linux-low.c (disable_regset): Likewise.
879 (fetch_register): Likewise.
880 (store_register): Likewise.
881 (get_dynamic): Likewise.
882 (linux_qxfer_libraries_svr4): Likewise.
883 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
884 (set_fast_tracepoint_jump): Likewise.
885 (uninsert_fast_tracepoint_jumps_at): Likewise.
886 (reinsert_fast_tracepoint_jumps_at): Likewise.
887 (validate_inserted_breakpoint): Likewise.
888 (clone_agent_expr): Likewise.
889 * regcache.c (init_register_cache): Likewise.
890 * remote-utils.c (putpkt_binary_1): Likewise.
891 (decode_M_packet): Likewise.
892 (decode_X_packet): Likewise.
893 (look_up_one_symbol): Likewise.
894 (relocate_instruction): Likewise.
895 (monitor_output): Likewise.
896 * server.c (handle_search_memory): Likewise.
897 (handle_qxfer_exec_file): Likewise.
898 (handle_qxfer_libraries): Likewise.
899 (handle_qxfer): Likewise.
900 (handle_query): Likewise.
901 (handle_v_cont): Likewise.
902 (handle_v_run): Likewise.
903 (captured_main): Likewise.
904 * target.c (write_inferior_memory): Likewise.
905 * thread-db.c (try_thread_db_load_from_dir): Likewise.
906 * tracepoint.c (init_trace_buffer): Likewise.
907 (add_tracepoint_action): Likewise.
908 (add_traceframe): Likewise.
909 (add_traceframe_block): Likewise.
910 (cmd_qtdpsrc): Likewise.
911 (cmd_qtdv): Likewise.
912 (cmd_qtstatus): Likewise.
913 (response_source): Likewise.
914 (response_tsv): Likewise.
915 (cmd_qtnotes): Likewise.
916 (gdb_collect): Likewise.
917 (initialize_tracepoint): Likewise.
918
afbe19f8
PL
9192015-09-21 Pierre Langlois <pierre.langlois@arm.com>
920
921 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
922 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
923 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
924 <NOP>: New.
925 (enum aarch64_condition_codes): New enum.
926 (w0): New static global.
927 (fp): Likewise.
928 (lr): Likewise.
929 (struct aarch64_memory_operand) <type>: New
930 MEMORY_OPERAND_POSTINDEX type.
931 (postindex_memory_operand): New helper function.
932 (emit_ret): New function.
933 (emit_load_store_pair): New function, factored out of emit_stp
934 with support for MEMORY_OPERAND_POSTINDEX.
935 (emit_stp): Rewrite using emit_load_store_pair.
936 (emit_ldp): New function.
937 (emit_load_store): Likewise.
938 (emit_ldr): Mention post-index instruction in comment.
939 (emit_ldrh): New function.
940 (emit_ldrb): New function.
941 (emit_ldrsw): Mention post-index instruction in comment.
942 (emit_str): Likewise.
943 (emit_subs): New function.
944 (emit_cmp): Likewise.
945 (emit_and): Likewise.
946 (emit_orr): Likewise.
947 (emit_orn): Likewise.
948 (emit_eor): Likewise.
949 (emit_mvn): Likewise.
950 (emit_lslv): Likewise.
951 (emit_lsrv): Likewise.
952 (emit_asrv): Likewise.
953 (emit_mul): Likewise.
954 (emit_sbfm): Likewise.
955 (emit_sbfx): Likewise.
956 (emit_ubfm): Likewise.
957 (emit_ubfx): Likewise.
958 (emit_csinc): Likewise.
959 (emit_cset): Likewise.
960 (emit_nop): Likewise.
961 (emit_ops_insns): New helper function.
962 (emit_pop): Likewise.
963 (emit_push): Likewise.
964 (aarch64_emit_prologue): New function.
965 (aarch64_emit_epilogue): Likewise.
966 (aarch64_emit_add): Likewise.
967 (aarch64_emit_sub): Likewise.
968 (aarch64_emit_mul): Likewise.
969 (aarch64_emit_lsh): Likewise.
970 (aarch64_emit_rsh_signed): Likewise.
971 (aarch64_emit_rsh_unsigned): Likewise.
972 (aarch64_emit_ext): Likewise.
973 (aarch64_emit_log_not): Likewise.
974 (aarch64_emit_bit_and): Likewise.
975 (aarch64_emit_bit_or): Likewise.
976 (aarch64_emit_bit_xor): Likewise.
977 (aarch64_emit_bit_not): Likewise.
978 (aarch64_emit_equal): Likewise.
979 (aarch64_emit_less_signed): Likewise.
980 (aarch64_emit_less_unsigned): Likewise.
981 (aarch64_emit_ref): Likewise.
982 (aarch64_emit_if_goto): Likewise.
983 (aarch64_emit_goto): Likewise.
984 (aarch64_write_goto_address): Likewise.
985 (aarch64_emit_const): Likewise.
986 (aarch64_emit_call): Likewise.
987 (aarch64_emit_reg): Likewise.
988 (aarch64_emit_pop): Likewise.
989 (aarch64_emit_stack_flush): Likewise.
990 (aarch64_emit_zero_ext): Likewise.
991 (aarch64_emit_swap): Likewise.
992 (aarch64_emit_stack_adjust): Likewise.
993 (aarch64_emit_int_call_1): Likewise.
994 (aarch64_emit_void_call_2): Likewise.
995 (aarch64_emit_eq_goto): Likewise.
996 (aarch64_emit_ne_goto): Likewise.
997 (aarch64_emit_lt_goto): Likewise.
998 (aarch64_emit_le_goto): Likewise.
999 (aarch64_emit_gt_goto): Likewise.
1000 (aarch64_emit_ge_got): Likewise.
1001 (aarch64_emit_ops_impl): New static global variable.
1002 (aarch64_emit_ops): New target function, return
1003 &aarch64_emit_ops_impl.
1004 (struct linux_target_ops): Install it.
1005
bb903df0
PL
10062015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1007
1008 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1009 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1010 aarch64-ipa.o.
1011 * linux-aarch64-ipa.c: New file.
1012 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1013 and endian.h.
1014 (aarch64_get_thread_area): New target method.
1015 (extract_signed_bitfield): New helper function.
1016 (aarch64_decode_ldr_literal): New function.
1017 (enum aarch64_opcodes): New enum.
1018 (struct aarch64_register): New struct.
1019 (struct aarch64_operand): New struct.
1020 (x0): New static global.
1021 (x1): Likewise.
1022 (x2): Likewise.
1023 (x3): Likewise.
1024 (x4): Likewise.
1025 (w2): Likewise.
1026 (ip0): Likewise.
1027 (sp): Likewise.
1028 (xzr): Likewise.
1029 (aarch64_register): New helper function.
1030 (register_operand): Likewise.
1031 (immediate_operand): Likewise.
1032 (struct aarch64_memory_operand): New struct.
1033 (offset_memory_operand): New helper function.
1034 (preindex_memory_operand): Likewise.
1035 (enum aarch64_system_control_registers): New enum.
1036 (ENCODE): New macro.
1037 (emit_insn): New helper function.
1038 (emit_b): New function.
1039 (emit_bcond): Likewise.
1040 (emit_cb): Likewise.
1041 (emit_tb): Likewise.
1042 (emit_blr): Likewise.
1043 (emit_stp): Likewise.
1044 (emit_ldp_q_offset): Likewise.
1045 (emit_stp_q_offset): Likewise.
1046 (emit_load_store): Likewise.
1047 (emit_ldr): Likewise.
1048 (emit_ldrsw): Likewise.
1049 (emit_str): Likewise.
1050 (emit_ldaxr): Likewise.
1051 (emit_stxr): Likewise.
1052 (emit_stlr): Likewise.
1053 (emit_data_processing_reg): Likewise.
1054 (emit_data_processing): Likewise.
1055 (emit_add): Likewise.
1056 (emit_sub): Likewise.
1057 (emit_mov): Likewise.
1058 (emit_movk): Likewise.
1059 (emit_mov_addr): Likewise.
1060 (emit_mrs): Likewise.
1061 (emit_msr): Likewise.
1062 (emit_sevl): Likewise.
1063 (emit_wfe): Likewise.
1064 (append_insns): Likewise.
1065 (can_encode_int32_in): New helper function.
1066 (aarch64_relocate_instruction): New function.
1067 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1068 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1069 (struct linux_target_ops): Install aarch64_get_thread_area,
1070 aarch64_install_fast_tracepoint_jump_pad and
1071 aarch64_get_min_fast_tracepoint_insn_len.
1072
787749ea
PL
10732015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1074
1075 * Makefile.in (aarch64-insn.o): New rule.
1076 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1077
9812b2e6
YQ
10782015-09-21 Yao Qi <yao.qi@linaro.org>
1079
1080 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1081
18fe412b
YQ
10822015-09-21 Yao Qi <yao.qi@linaro.org>
1083
1084 * tracepoint.c (max_jump_pad_size): Remove.
1085
a0cc84cd
YQ
10862015-09-18 Yao Qi <yao.qi@linaro.org>
1087
1088 * linux-aarch64-low.c: Don't include sys/uio.h.
1089 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1090
d78908cf
WW
10912015-09-16 Wei-cheng Wang <cole945@gmail.com>
1092
1093 * tracepoint.c (eval_result_type): Change prototype.
1094 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1095
d57e0d50
PA
10962015-09-15 Pedro Alves <palves@redhat.com>
1097
1098 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1099 Check whether to report exec events instead of checking whether
1100 multiprocess is enabled.
1101
5a676acc
PA
11022015-09-15 Pedro Alves <palves@redhat.com>
1103
1104 PR remote/18965
1105 * remote-utils.c (prepare_resume_reply): Merge
1106 TARGET_WAITKIND_VFORK_DONE switch case with the
1107 TARGET_WAITKIND_FORKED case.
1108
7c5d0fad
YQ
11092015-09-15 Yao Qi <yao.qi@linaro.org>
1110
1111 * server.c (handle_query): Check string comparison using
1112 "else if" instead of "if".
1113
750ce8d1
YQ
11142015-09-15 Yao Qi <yao.qi@linaro.org>
1115
1116 * server.c (vCont_supported): New global variable.
1117 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1118 matches. Append ";vContSupported+" to own_buf.
1119 (handle_v_requests): Append ";s;S" to own_buf if target supports
1120 hardware single step or vCont_supported is false.
1121 (capture_main): Set vCont_supported to zero.
1122
70b90b91
YQ
11232015-09-15 Yao Qi <yao.qi@linaro.org>
1124
1125 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1126 it to ...
1127 (linux_supports_hardware_single_step): ... New function.
1128 (linux_target_ops): Update.
1129 * lynx-low.c (lynx_target_ops): Set field
1130 supports_hardware_single_step to target_can_do_hardware_single_step.
1131 * nto-low.c (nto_target_ops): Likewise.
1132 * spu-low.c (spu_target_ops): Likewise.
1133 * win32-low.c (win32_target_ops): Likewise.
1134 * target.c (target_can_do_hardware_single_step): New function.
1135 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1136 Remove. <supports_hardware_single_step>: New field.
1137 (target_supports_conditional_breakpoints): Remove.
1138 (target_supports_hardware_single_step): New macro.
1139 (target_can_do_hardware_single_step): Declare.
1140 * server.c (handle_query): Use target_supports_hardware_single_step
1141 instead of target_supports_conditional_breakpoints.
1142
ade90bde
YQ
11432015-09-15 Yao Qi <yao.qi@linaro.org>
1144
1145 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1146 function.
1147 (struct linux_target_ops the_low_target): Install
1148 aarch64_linux_siginfo_fixup.
1149
94585166
DB
11502015-09-11 Don Breazeal <donb@codesourcery.com>
1151 Luis Machado <lgustavo@codesourcery.com>
1152
1153 * linux-low.c (linux_mourn): Static declaration.
1154 (linux_arch_setup): Move in front of
1155 handle_extended_wait.
1156 (linux_arch_setup_thread): New function.
1157 (handle_extended_wait): Handle exec events. Call
1158 linux_arch_setup_thread. Make event_lwp argument a
1159 pointer-to-a-pointer.
1160 (check_zombie_leaders): Do not check stopped threads.
1161 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1162 (linux_low_filter_event): Add lwp and thread for exec'ing
1163 non-leader thread if leader thread has been deleted.
1164 Refactor code into linux_arch_setup_thread and call it.
1165 Pass child lwp pointer by reference to handle_extended_wait.
1166 (linux_wait_for_event_filtered): Update comment.
1167 (linux_wait_1): Prevent clobbering exec event status.
1168 (linux_supports_exec_events): New function.
1169 (linux_target_ops) <supports_exec_events>: Initialize new member.
1170 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1171 new member.
1172 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1173 * server.c (report_exec_events): New global variable.
1174 (handle_query): Handle qSupported query for exec-events feature.
1175 (captured_main): Initialize report_exec_events.
1176 * server.h (report_exec_events): Declare new global variable.
1177 * target.h (struct target_ops) <supports_exec_events>: New
1178 member.
1179 (target_supports_exec_events): New macro.
1180 * win32-low.c (win32_target_ops) <supports_exec_events>:
1181 Initialize new member.
1182
0568462b
MM
11832015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1184
1185 * linux-low.c (linux_low_enable_btrace): Remove.
1186 (linux_target_ops): Replace linux_low_enable_btrace with
1187 linux_enable_btrace.
1188
39edd165
YQ
11892015-09-03 Yao Qi <yao.qi@linaro.org>
1190
1191 * linux-aarch64-low.c (aarch64_insert_point): Call
1192 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1193 returns true.
1194
1db33b5a
UW
11952015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1196
1197 * linux-low.c (check_stopped_by_breakpoint): Use
1198 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1199
ab290430
PA
12002015-08-27 Pedro Alves <palves@redhat.com>
1201
1202 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1203
8d749320
SM
12042015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1205
6711b7f8
SM
1206 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1207 the XNEW-family equivalent.
8d749320
SM
1208 (compile_bytecodes): Likewise.
1209 * dll.c (loaded_dll): Likewise.
1210 * event-loop.c (append_callback_event): Likewise.
1211 (create_file_handler): Likewise.
1212 (create_file_event): Likewise.
1213 * hostio.c (handle_open): Likewise.
1214 * inferiors.c (add_thread): Likewise.
1215 (add_process): Likewise.
1216 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1217 * linux-arm-low.c (arm_new_process): Likewise.
1218 (arm_new_thread): Likewise.
1219 * linux-low.c (add_to_pid_list): Likewise.
1220 (linux_add_process): Likewise.
1221 (handle_extended_wait): Likewise.
1222 (add_lwp): Likewise.
1223 (enqueue_one_deferred_signal): Likewise.
1224 (enqueue_pending_signal): Likewise.
1225 (linux_resume_one_lwp_throw): Likewise.
1226 (linux_resume_one_thread): Likewise.
1227 (linux_read_memory): Likewise.
1228 (linux_write_memory): Likewise.
1229 * linux-mips-low.c (mips_linux_new_process): Likewise.
1230 (mips_linux_new_thread): Likewise.
1231 (mips_add_watchpoint): Likewise.
1232 * linux-x86-low.c (initialize_low_arch): Likewise.
1233 * lynx-low.c (lynx_add_process): Likewise.
1234 * mem-break.c (set_raw_breakpoint_at): Likewise.
1235 (set_breakpoint): Likewise.
1236 (add_condition_to_breakpoint): Likewise.
1237 (add_commands_to_breakpoint): Likewise.
1238 (clone_agent_expr): Likewise.
1239 (clone_one_breakpoint): Likewise.
1240 * regcache.c (new_register_cache): Likewise.
1241 * remote-utils.c (look_up_one_symbol): Likewise.
1242 * server.c (queue_stop_reply): Likewise.
1243 (start_inferior): Likewise.
1244 (queue_stop_reply_callback): Likewise.
1245 (handle_target_event): Likewise.
1246 * spu-low.c (fetch_ppc_memory): Likewise.
1247 (store_ppc_memory): Likewise.
1248 * target.c (set_target_ops): Likewise.
1249 * thread-db.c (thread_db_load_search): Likewise.
1250 (try_thread_db_load_1): Likewise.
1251 * tracepoint.c (add_tracepoint): Likewise.
1252 (add_tracepoint_action): Likewise.
1253 (create_trace_state_variable): Likewise.
1254 (cmd_qtdpsrc): Likewise.
1255 (cmd_qtro): Likewise.
1256 (add_while_stepping_state): Likewise.
1257 * win32-low.c (child_add_thread): Likewise.
1258 (get_image_name): Likewise.
1259
ed8b7b42
YQ
12602015-08-25 Yao Qi <yao.qi@linaro.org>
1261
1262 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1263
db3cb7cb
YQ
12642015-08-25 Yao Qi <yao.qi@linaro.org>
1265
1266 * Makefile.in (aarch64-linux.o): New rule.
1267 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1268 srv_tgtobj.
1269 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1270 (aarch64_init_debug_reg_state): Make it extern.
1271 (aarch64_linux_prepare_to_resume): Remove.
1272
f6011a1c
YQ
12732015-08-25 Yao Qi <yao.qi@linaro.org>
1274
1275 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1276 lwp_arch_private_info and ptid_of_lwp.
1277
88e2cf7e
YQ
12782015-08-25 Yao Qi <yao.qi@linaro.org>
1279
1280 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1281 Find proc_info by find_process_pid. All callers updated.
1282
5e35436e
YQ
12832015-08-25 Yao Qi <yao.qi@linaro.org>
1284
1285 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1286 Remove.
1287 (debug_reg_change_callback): Remove.
1288 (aarch64_notify_debug_reg_change): Remove.
1289
4a8a7965
YQ
12902015-08-25 Yao Qi <yao.qi@linaro.org>
1291
1292 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1293 Call current_lwp_ptid.
1294
32a271ee
YQ
12952015-08-25 Yao Qi <yao.qi@linaro.org>
1296
1297 * linux-aarch64-low.c (debug_reg_change_callback): Use
1298 debug_printf.
1299
0d51c8d7
YQ
13002015-08-25 Yao Qi <yao.qi@linaro.org>
1301
1302 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1303
31a43dd5
YQ
13042015-08-25 Yao Qi <yao.qi@linaro.org>
1305
1306 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1307
8ee52567
YQ
13082015-08-25 Yao Qi <yao.qi@linaro.org>
1309
1310 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1311 the code.
1312
ff3f0f45
YQ
13132015-08-25 Yao Qi <yao.qi@linaro.org>
1314
1315 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1316 Remove.
1317 (debug_reg_change_callback): Remove argument entry and add argument
1318 lwp. Remove local variable thread. Don't print thread id in the
1319 debugging output. Don't check whether pid of thread equals to pid.
1320 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1321 iterate_over_lwps instead find_inferior.
1322
3d40fbb5
PA
13232015-08-24 Pedro Alves <palves@redhat.com>
1324
1325 * inferiors.c (get_first_process): New function.
1326 * inferiors.h (get_first_process): New declaration.
1327 * remote-utils.c (read_ptid): Default to the first process in the
1328 list, instead of to the current thread's process.
1329
438e1e42
PA
13302015-08-24 Pedro Alves <palves@redhat.com>
1331
1332 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1333 * event-loop.c: Likewise.
1334 * remote-utils.c: Likewise.
1335 * tracepoint.c: Likewise.
1336
a8c6d4fc
PA
13372015-08-24 Pedro Alves <palves@redhat.com>
1338
1339 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1340 ptid_get_lwp.
1341
99b0bb12
PA
13422015-08-21 Pedro Alves <palves@redhat.com>
1343
1344 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1345 instead of literal 1.
1346
f8904751
PA
13472015-08-21 Pedro Alves <palves@redhat.com>
1348
1349 * tdesc.c (default_description): Explicitly zero-initialize.
1350
465a859e
PA
13512015-08-21 Pedro Alves <palves@redhat.com>
1352
1353 PR gdb/18749
1354 * inferiors.c (remove_thread): Discard any pending stop reply for
1355 this thread.
1356 * server.c (remove_all_on_match_pid): Rename to ...
1357 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1358 instead of a pid.
1359 (discard_queued_stop_replies): Change parameter to a ptid. Now
1360 extern.
1361 (handle_v_kill, kill_inferior_callback, captured_main)
1362 (process_serial_event): Adjust.
1363 * server.h (discard_queued_stop_replies): Declare.
1364
f0db101d
PA
13652015-08-21 Pedro Alves <palves@redhat.com>
1366
1367 * linux-low.c (wait_for_sigstop): Always switch to no thread
1368 selected if the previously current thread dies.
1369 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1370 process instead of the current thread's.
1371 * remote-utils.c (input_interrupt): Don't check if there's no
1372 current thread.
1373 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1374 current thread to the general thread fails, error out.
1375 (handle_qxfer_auxv, handle_qxfer_libraries)
1376 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1377 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1378 (handle_query): Check if there's a thread selected instead of
1379 checking whether there's any thread in the thread list.
1380 (handle_qxfer_threads, handle_qxfer_btrace)
1381 (handle_qxfer_btrace_conf): Don't error out early if there's no
1382 thread in the thread list.
1383 (handle_v_cont, myresume): Don't set the current thread to the
1384 continue thread.
1385 (process_serial_event) <Hg handling>: Also set thread_id if the
1386 previous general thread is still alive.
1387 (process_serial_event) <g/G handling>: If setting the current
1388 thread to the general thread fails, error out.
1389 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1390 thread's lwp instead of the current thread's.
1391 * target.c (set_desired_thread): If the desired thread was not
1392 found, leave the current thread pointing to NULL. Return an int
1393 (boolean) indicating success.
1394 * target.h (set_desired_thread): Change return type to int.
1395
40045d91
MF
13962015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1397
1398 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1399 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1400 #includes.
1401 (ps_get_thread_area): New function.
1402
45face3b
GB
14032015-08-19 Gary Benson <gbenson@redhat.com>
1404
1405 * hostio.c (handle_pread): Do not attempt to read more data
1406 than hostio_reply_with_data can fit in a packet.
1407
16d5f642
JB
14082015-08-18 Joel Brobecker <brobecker@adacore.com>
1409
1410 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1411
a738da3a
MF
14122015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1413
1414 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1415
33ebda9d
PA
14162015-08-06 Pedro Alves <palves@redhat.com>
1417
1418 * tracepoint.c (expr_eval_result): Now an int.
1419
a44892be
PA
14202015-08-06 Pedro Alves <palves@redhat.com>
1421
1422 * gdbthread.h (struct regcache): Forward declare.
1423 (struct thread_info) <regcache_data>: Now a struct regcache
1424 pointer.
1425 * inferiors.c (inferior_regcache_data)
1426 (set_inferior_regcache_data): Now work with struct regcache
1427 pointers.
1428 * inferiors.h (struct regcache): Forward declare.
1429 (inferior_regcache_data, set_inferior_regcache_data): Now work
1430 with struct regcache pointers.
1431 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1432 (free_register_cache_thread): Remove struct regcache pointer
1433 casts.
1434
608a1e46
PA
14352015-08-06 Pedro Alves <palves@redhat.com>
1436
1437 * server.c (captured_main): On error, print the exception message
1438 to stderr, and if run_once is set, throw a quit.
1439
f0ce0d3a
PA
14402015-08-06 Pedro Alves <palves@redhat.com>
1441
1442 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1443 the current thread.
1444
bf47e248
PA
14452015-08-06 Pedro Alves <palves@redhat.com>
1446
1447 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1448 reading beyond the passed in buffer length.
1449
b6b9ffcc
PL
14502015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1451
1452 * tracepoint.c (symbol_list) <required>: Remove.
1453
863d01bd
PA
14542015-08-06 Pedro Alves <palves@redhat.com>
1455
1456 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1457 count if stopping and suspending threads.
1458 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1459 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1460 (linux_detach): Complete an ongoing step-over.
1461 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1462 throughout.
1463 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1464 (linux_wait_1): If passing a signal to the inferior after
1465 finishing a step-over, unsuspend and re-resume all lwps. If we
1466 see a single-step event but the thread should be continuing, don't
1467 pass the trap to gdb.
1468 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1469 internal_error instead of gdb_assert.
1470 (enqueue_pending_signal): New function.
1471 (check_ptrace_stopped_lwp_gone): Add debug output.
1472 (start_step_over): Use internal_error instead of gdb_assert.
1473 (complete_ongoing_step_over): New function.
1474 (linux_resume_one_thread): Don't resume a suspended thread.
1475 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1476 it stepping.
1477
00db26fa
PA
14782015-08-06 Pedro Alves <palves@redhat.com>
1479
1480 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1481 (linux_thread_alive): Use lwp_is_marked_dead.
1482 (extended_event_reported): Delete.
1483 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1484 instead of extended_event_reported.
1485 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1486 as well.
1487 (lwp_is_marked_dead): New function.
1488 (lwp_running): Use lwp_is_marked_dead.
1489 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1490 comment.
1491
ad071a30
PA
14922015-08-06 Pedro Alves <palves@redhat.com>
1493
1494 * linux-low.c (linux_wait_1): Move fork event output out of the
1495 !report_to_gdb check. Pass event_child->waitstatus to
1496 target_waitstatus_to_string instead of ourstatus.
1497
524b57e6
YQ
14982015-08-04 Yao Qi <yao.qi@linaro.org>
1499
1500 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1501 if current_thread is 32 bit.
1502
6085d6f6
YQ
15032015-08-04 Yao Qi <yao.qi@linaro.org>
1504
1505 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1506 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1507 * server.c (extended_protocol): Remove "static".
1508 * server.h (extended_protocol): Declare it.
1509
8a7e4587
YQ
15102015-08-04 Yao Qi <yao.qi@linaro.org>
1511
1512 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1513 both aarch64 and aarch32.
1514 (aarch64_set_pc): Likewise.
1515
3b53ae99
YQ
15162015-08-04 Yao Qi <yao.qi@linaro.org>
1517
1518 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1519 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1520 arm-with-neon.xml to srv_xmlfiles.
1521 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1522 (is_64bit_tdesc): New function.
1523 (aarch64_linux_read_description): New function.
1524 (aarch64_arch_setup): Call aarch64_linux_read_description.
1525 (regs_info): Rename to regs_info_aarch64.
1526 (aarch64_regs_info): Return right regs_info.
1527 (initialize_low_arch): Call initialize_low_arch_aarch32.
1528
bd9e6534
YQ
15292015-08-04 Yao Qi <yao.qi@linaro.org>
1530
1531 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1532 * linux-aarch32-low.c: New file.
1533 * linux-aarch32-low.h: New file.
1534 * linux-arm-low.c (arm_fill_gregset): Move it to
1535 linux-aarch32-low.c.
1536 (arm_store_gregset): Likewise.
1537 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1538 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1539 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1540 (regs_info): Rename to regs_info_arm.
1541 (arm_regs_info): Return regs_info_aarch32 if
1542 have_ptrace_getregset is 1 and target description is
1543 arm_with_neon or arm_with_vfpv3.
1544 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1545 Call initialize_low_arch_aarch32 instead.
1546
ded48a5e
YQ
15472015-08-04 Yao Qi <yao.qi@linaro.org>
1548
1549 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1550 * linux-low.c: ... here.
1551 * linux-low.h (have_ptrace_getregset): Declare it.
1552
96e9210f
PA
15532015-08-04 Pedro Alves <palves@redhat.com>
1554
1555 * thread-db.c (struct thread_db): Use new typedefs.
1556 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1557 CHK calls.
1558 (disable_thread_event_reporting): Cast result of dlsym to
1559 destination function pointer type.
1560 (thread_db_mourn): Use td_ta_delete_ftype.
1561
af60a1ef
SL
15622015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1563
1564 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1565 arch variant.
1566 (CDX_BREAKPOINT): Define for R2.
1567 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1568 (the_low_target): Add comments.
1569
e8b41681
YQ
15702015-07-30 Yao Qi <yao.qi@linaro.org>
1571
1572 * linux-arm-low.c (arm_hwcap): Remove it.
1573 (arm_read_description): New local variable arm_hwcap. Don't
1574 set arm_hwcap to zero.
1575
89abb039
YQ
15762015-07-30 Yao Qi <yao.qi@linaro.org>
1577
1578 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1579 Use regcache->tdesc instead.
1580 (arm_store_wmmxregset): Likewise.
1581 (arm_fill_vfpregset): Likewise.
1582 (arm_store_vfpregset): Likewise.
1583
deca266c
YQ
15842015-07-30 Yao Qi <yao.qi@linaro.org>
1585
1586 * linux-arm-low.c: Include arch/arm.h.
1587 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1588 (arm_store_gregset): Likewise.
1589
aa58a496
SM
15902015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1591
1592 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1593 ptrace's 4th parameter.
1594
50904b25
YQ
15952015-07-27 Yao Qi <yao.qi@linaro.org>
1596
1597 * configure.srv (case aarch64*-*-linux*): Don't set
1598 srv_linux_usrregs.
1599
5826e159
PA
16002015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1601
1602 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1603 sys/ptrace.h.
1604 * linux-arm-low.c: Likewise.
1605 * linux-cris-low.c: Likewise.
1606 * linux-crisv32-low.c: Likewise.
1607 * linux-low.c: Likewise.
1608 * linux-m68k-low.c: Likewise.
1609 * linux-mips-low.c: Likewise.
1610 * linux-nios2-low.c: Likewise.
1611 * linux-s390-low.c: Likewise.
1612 * linux-sparc-low.c: Likewise.
1613 * linux-tic6x-low.c: Likewise.
1614 * linux-tile-low.c: Likewise.
1615 * linux-x86-low.c: Likewise.
1616
54019719
PA
16172015-07-24 Pedro Alves <palves@redhat.com>
1618
1619 * config.in: Regenerate.
1620 * configure: Regenerate.
1621
eb7aa561
PA
16222015-07-24 Pedro Alves <palves@redhat.com>
1623
1624 * acinclude.m4: Include ../ptrace.m4.
1625 * configure.ac: Call GDB_AC_PTRACE.
1626 * config.in, configure: Regenerate.
1627
55d7b841
YQ
16282015-07-24 Yao Qi <yao.qi@linaro.org>
1629
1630 * linux-low.c (linux_create_inferior): Remove setting to
1631 proc->priv->new_inferior.
1632 (linux_attach): Likewise.
1633 (linux_low_filter_event): Likewise.
1634 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1635
c06cbd92
YQ
16362015-07-24 Yao Qi <yao.qi@linaro.org>
1637
1638 * linux-low.c (linux_arch_setup): New function.
1639 (linux_low_filter_event): If proc->tdesc is NULL and
1640 proc->attached is true, call the_low_target.arch_setup.
1641 Otherwise, keep status pending, and return.
1642 (linux_resume_one_lwp_throw): Don't call get_pc if
1643 thread->while_stepping isn't NULL. Don't call
1644 get_thread_regcache if proc->tdesc is NULL.
1645 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1646 (linux_target_ops): Install arch_setup.
1647 * server.c (start_inferior): Call the_target->arch_setup.
1648 * target.h (struct target_ops) <arch_setup>: New field.
1649 (target_arch_setup): New marco.
1650 * lynx-low.c (lynx_target_ops): Update.
1651 * nto-low.c (nto_target_ops): Update.
1652 * spu-low.c (spu_target_ops): Update.
1653 * win32-low.c (win32_target_ops): Update.
1654
5ae3ebba
YQ
16552015-07-24 Yao Qi <yao.qi@linaro.org>
1656
1657 * linux-low.c (linux_add_process): Don't set
1658 proc->priv->new_inferior.
1659 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1660 (linux_attach): Likewise.
1661
eb97750b
YQ
16622015-07-24 Yao Qi <yao.qi@linaro.org>
1663
1664 * server.c (start_inferior): Code refactor.
1665
51aee833
YQ
16662015-07-24 Yao Qi <yao.qi@linaro.org>
1667
1668 * server.c (process_serial_event): Set general_thread.
1669
af1b22f3
YQ
16702015-07-21 Yao Qi <yao.qi@linaro.org>
1671
1672 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1673 aarch64_linux_get_debug_reg_capacity.
1674
554717a3
YQ
16752015-07-17 Yao Qi <yao.qi@linaro.org>
1676
1677 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1678 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1679 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1680 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1681 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1682 (AARCH64_HWP_ALIGNMENT): Likewise.
1683 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1684 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1685 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1686 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1687 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1688 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1689 (struct aarch64_debug_reg_state): Likewise.
1690 (struct arch_lwp_info): Likewise.
1691 (aarch64_align_watchpoint): Likewise.
1692 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1693 (aarch64_watchpoint_length): Likewise.
1694 (aarch64_point_encode_ctrl_reg): Likewise
1695 (aarch64_point_is_aligned): Likewise.
1696 (aarch64_align_watchpoint): Likewise.
1697 (aarch64_linux_set_debug_regs):
1698 (aarch64_dr_state_insert_one_point): Likewise.
1699 (aarch64_dr_state_remove_one_point): Likewise.
1700 (aarch64_handle_breakpoint): Likewise.
1701 (aarch64_handle_aligned_watchpoint): Likewise.
1702 (aarch64_handle_unaligned_watchpoint): Likewise.
1703 (aarch64_handle_watchpoint): Likewise.
1704
c67ca4de
YQ
17052015-07-17 Yao Qi <yao.qi@linaro.org>
1706
1707 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1708 and don't aarch64_get_debug_reg_state. All callers update.
1709 (aarch64_handle_aligned_watchpoint): Likewise.
1710 (aarch64_handle_unaligned_watchpoint): Likewise.
1711 (aarch64_handle_watchpoint): Likewise.
1712 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1713 (aarch64_remove_point): Likewise.
1714
25abf979
YQ
17152015-07-17 Yao Qi <yao.qi@linaro.org>
1716
1717 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1718 debug_printf.
1719 (aarch64_handle_unaligned_watchpoint): Likewise.
1720
db1ff28b
JK
17212015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1722
1723 Revert the previous 3 commits:
1724 Move gdb_regex* to common/
1725 Move linux_find_memory_regions_full & co.
1726 gdbserver build-id attribute generator
1727
700ca40f
JK
17282015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1729 Jan Kratochvil <jan.kratochvil@redhat.com>
1730
1731 gdbserver build-id attribute generator.
1732 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1733 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1734 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1735 (find_phdr): New.
1736 (get_dynamic): Use find_pdhr to traverse program headers.
1737 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1738 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1739 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1740 (get_hex_build_id): New.
1741 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1742 to reply XML document.
1743
9904185c
JK
17442015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1745 Jan Kratochvil <jan.kratochvil@redhat.com>
1746
1747 * target.c: Include target/target-utils.h and fcntl.h.
1748 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1749 (target_fileio_read_stralloc): New functions.
1750
6e5b4429
JK
17512015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1752
1753 * Makefile.in (OBS): Add gdb_regex.o.
1754 (gdb_regex.o): New.
1755 * config.in: Rebuilt.
1756 * configure: Rebuilt.
1757
ddc98fbf
JK
17582015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1759 Jan Kratochvil <jan.kratochvil@redhat.com>
1760
1761 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1762 * Makefile.in (OBS): Add target-utils.o.
1763 (linux-maps.o, target-utils.o): New.
1764 * configure.srv (srv_linux_obj): Add linux-maps.o.
1765
e57bb7a0
PL
17662015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1767
1768 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1769 function, return 1.
1770 (the_low_target): Install it.
1771
586b02a9
PA
17722015-07-14 Pedro Alves <palves@redhat.com>
1773
1774 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1775 Instead, ignore ECHILD, and throw an error for other errnos.
1776
58c1b36c
PA
17772015-07-10 Pedro Alves <palves@redhat.com>
1778
1779 * event-loop.c (struct callback_event) <data>: Change type to
1780 gdb_client_data instance instead of gdb_client_data pointer.
1781 (append_callback_event): Adjust.
1782
421530db
PL
17832015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1784
1785 * linux-aarch64-low.c: Add comments for each linux_target_ops
1786 method. Remove comments already covered in target_ops and
1787 linux_target_ops definitions.
1788 (the_low_target): Add comments for each unimplemented method.
1789
c2d65f38
YQ
17902015-07-09 Yao Qi <yao.qi@linaro.org>
1791
1792 * linux-aarch64-low.c (aarch64_regmap): Remove.
1793 (aarch64_usrregs_info): Remove.
1794 (regs_info): Set field usrregs to NULL.
1795
b20a6524
MM
17962015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1797
1798 * linux-low.c: Include "rsp-low.h"
1799 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1800 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1801 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1802 (handle_btrace_enable_pt): New.
1803 (handle_btrace_general_set): Support "pt".
1804 (handle_btrace_conf_general_set): Support "pt:size".
1805
96c97461
PL
18062015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1807
1808 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1809 Z_PACKET_SW_BP.
1810
37d66942
PL
18112015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1812
1813 * linux-aarch64-low.c: Remove comment about endianness.
1814 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1815 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1816 memcmp.
1817
dc06243f
GB
18182015-06-24 Gary Benson <gbenson@redhat.com>
1819
1820 * linux-i386-ipa.c (stdint.h): Do not include.
1821 * lynx-i386-low.c (stdint.h): Likewise.
1822 * lynx-ppc-low.c (stdint.h): Likewise.
1823 * mem-break.c (stdint.h): Likewise.
1824 * thread-db.c (stdint.h): Likewise.
1825 * tracepoint.c (stdint.h): Likewise.
1826 * win32-low.c (stdint.h): Likewise.
1827
124e13d9
SM
18282015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1829
1830 * server.c (write_qxfer_response): Update call to
1831 remote_escape_output.
1832
909c2cda
JK
18332015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1834 Jan Kratochvil <jan.kratochvil@redhat.com>
1835
1836 Merge multiple hex conversions.
1837 * gdbreplay.c (tohex): Rename to 'fromhex'.
1838 (logchar): Use fromhex.
1839
24c05f46
JK
18402015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1841
1842 * server.c (handle_qxfer_libraries): Set `version' attribute for
1843 <library-list>.
1844
14d2069a
GB
18452015-06-10 Gary Benson <gbenson@redhat.com>
1846
1847 * target.h (struct target_ops) <multifs_open>: New field.
1848 <multifs_unlink>: Likewise.
1849 <multifs_readlink>: Likewise.
1850 * linux-low.c (nat/linux-namespaces.h): New include.
1851 (linux_target_ops): Initialize the_target->multifs_open,
1852 the_target->multifs_unlink and the_target->multifs_readlink.
1853 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1854 * hostio.c (hostio_fs_pid): New static variable.
1855 (hostio_handle_new_gdb_connection): New function.
1856 (handle_setfs): Likewise.
1857 (handle_open): Use the_target->multifs_open as appropriate.
1858 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1859 (handle_readlink): Use the_target->multifs_readlink as
1860 appropriate.
1861 (handle_vFile): Handle vFile:setfs packets.
1862 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1863 after target_handle_new_gdb_connection.
1864
4b8b5e72
GB
18652015-06-10 Gary Benson <gbenson@redhat.com>
1866
1867 * configure.ac (AC_CHECK_FUNCS): Add setns.
1868 * config.in: Regenerate.
1869 * configure: Likewise.
1870 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1871 (linux-namespaces.o): New rule.
1872 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1873
3ac2e371
GB
18742015-06-09 Gary Benson <gbenson@redhat.com>
1875
1876 * hostio.c (handle_open): Process mode argument with
1877 fileio_to_host_mode.
1878
ca9b78ce
YQ
18792015-06-01 Yao Qi <yao.qi@linaro.org>
1880
1881 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1882 * linux-x86-low.c: Likewise.
1883
bfacd19d
DB
18842015-05-28 Don Breazeal <donb@codesourcery.com>
1885
1886 * linux-low.c (handle_extended_wait): Initialize
1887 thread_info.last_resume_kind for new fork children.
1888
452003ef
PA
18892015-05-15 Pedro Alves <palves@redhat.com>
1890
1891 * target.h (target_handle_new_gdb_connection): Rewrite using if
1892 wrapped in do/while.
1893
1041a03c
JB
18942015-05-14 Joel Brobecker <brobecker@adacore.com>
1895
1896 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1897 * configure, config.in: Regenerate.
1898 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1899 Declare typedef.
1900
c269dbdb
DB
19012015-05-12 Don Breazeal <donb@codesourcery.com>
1902
1903 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1904 PTRACE_EVENT_VFORK_DONE.
1905 (linux_low_ptrace_options, extended_event_reported): Add vfork
1906 events.
1907 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1908 and "vforkdone" for RSP 'T' Stop Reply Packet.
1909 * server.h (report_vfork_events): Declare
1910 global variable.
1911
3a8a0396
DB
19122015-05-12 Don Breazeal <donb@codesourcery.com>
1913
1914 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1915 (the_low_target) <new_fork>: Initialize new member.
1916 * linux-arm-low.c (arm_new_fork): New function.
1917 (the_low_target) <new_fork>: Initialize new member.
1918 * linux-low.c (handle_extended_wait): Call new target function
1919 new_fork.
1920 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1921 * linux-mips-low.c (mips_add_watchpoint): New function
1922 extracted from mips_insert_point.
1923 (the_low_target) <new_fork>: Initialize new member.
1924 (mips_linux_new_fork): New function.
1925 (mips_insert_point): Call mips_add_watchpoint.
1926 * linux-x86-low.c (x86_linux_new_fork): New function.
1927 (the_low_target) <new_fork>: Initialize new member.
1928
de0d863e
DB
19292015-05-12 Don Breazeal <donb@codesourcery.com>
1930
1931 * linux-low.c (handle_extended_wait): Implement return value,
1932 rename argument 'event_child' to 'event_lwp', handle
1933 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1934 (linux_low_ptrace_options): New function.
1935 (linux_low_filter_event): Call linux_low_ptrace_options,
1936 use different argument fo linux_enable_event_reporting,
1937 use return value from handle_extended_wait.
1938 (extended_event_reported): New function.
1939 (linux_wait_1): Call extended_event_reported and set
1940 status to report fork events.
1941 (linux_write_memory): Add pid to debug message.
1942 (reset_lwp_ptrace_options_callback): New function.
1943 (linux_handle_new_gdb_connection): New function.
1944 (linux_target_ops): Initialize new structure member.
1945 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1946 * lynx-low.c: Initialize new structure member.
1947 * remote-utils.c (prepare_resume_reply): Implement stop reason
1948 "fork" for "T" stop message.
1949 * server.c (handle_query): Call handle_new_gdb_connection.
1950 * server.h (report_fork_events): Declare global flag.
1951 * target.h (struct target_ops) <handle_new_gdb_connection>:
1952 New member.
1953 (target_handle_new_gdb_connection): New macro.
1954 * win32-low.c: Initialize new structure member.
1955
ddcbc397
DB
19562015-05-12 Don Breazeal <donb@codesourcery.com>
1957
1958 * mem-break.c (APPEND_TO_LIST): Define macro.
1959 (clone_agent_expr): New function.
1960 (clone_one_breakpoint): New function.
1961 (clone_all_breakpoints): New function.
1962 * mem-break.h: Declare new functions.
1963
89245bc0
DB
19642015-05-12 Don Breazeal <donb@codesourcery.com>
1965
1966 * linux-low.c (linux_supports_fork_events): New function.
1967 (linux_supports_vfork_events): New function.
1968 (linux_target_ops): Initialize new structure members.
1969 (initialize_low): Call linux_check_ptrace_features.
1970 * lynx-low.c (lynx_target_ops): Initialize new structure
1971 members.
1972 * server.c (report_fork_events, report_vfork_events):
1973 New global flags.
1974 (handle_query): Add new features to qSupported packet and
1975 response.
1976 (captured_main): Initialize new global variables.
1977 * target.h (struct target_ops) <supports_fork_events>:
1978 New member.
1979 <supports_vfork_events>: New member.
1980 (target_supports_fork_events): New macro.
1981 (target_supports_vfork_events): New macro.
1982 * win32-low.c (win32_target_ops): Initialize new structure
1983 members.
1984
835205d0
GB
19852015-05-12 Gary Benson <gbenson@redhat.com>
1986
1987 * server.c (handle_qxfer_exec_file): Use current process
1988 if annex is empty.
1989
21e94bd9
SL
19902015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1991
1992 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1993 Remove HAVE_PTRACE_GETREGS conditionals.
1994 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1995 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1996
45614f15
YQ
19972015-05-08 Yao Qi <yao.qi@linaro.org>
1998
1999 * linux-low.c (linux_supports_conditional_breakpoints): New
2000 function.
2001 (linux_target_ops): Install new target method.
2002 * lynx-low.c (lynx_target_ops): Install NULL hook for
2003 supports_conditional_breakpoints.
2004 * nto-low.c (nto_target_ops): Likewise.
2005 * spu-low.c (spu_target_ops): Likewise.
2006 * win32-low.c (win32_target_ops): Likewise.
2007 * server.c (handle_query): Check
2008 target_supports_conditional_breakpoints.
2009 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2010 New field.
2011 (target_supports_conditional_breakpoints): New macro.
2012
80ad801e
PA
20132015-05-06 Pedro Alves <palves@redhat.com>
2014
2015 PR server/18081
2016 * server.c (start_inferior): If the process exits, mourn it.
2017
819843c7
GB
20182015-04-21 Gary Benson <gbenson@redhat.com>
2019
2020 * hostio.c (fileio_open_flags_to_host): Factored out to
2021 fileio_to_host_openflags in common/fileio.c. Single use
2022 updated.
2023
a2d5a9d7
MF
20242015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2025
2026 * linux-xtensa-low.c (xtensa_fill_gregset)
2027 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2028 XCHAL_HAVE_LOOP.
2029
deb44829
MF
20302015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2031
2032 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2033 (regs_info): Replace usrregs pointer with NULL.
2034
e57f1de3
GB
20352015-04-17 Gary Benson <gbenson@redhat.com>
2036
2037 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2038 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2039 * server.c (handle_qxfer_exec_file): New function.
2040 (qxfer_packets): Add exec-file entry.
2041 (handle_query): Report qXfer:exec-file:read as supported packet.
2042
62828379
RN
20432015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2044
2045 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2046
b88bb450
GB
20472015-04-09 Gary Benson <gbenson@redhat.com>
2048
2049 * hostio-errno.c (errno_to_fileio_error): Remove function.
2050 Update caller to use remote_fileio_to_fio_error.
2051
c8f4bfdd
YQ
20522015-04-09 Yao Qi <yao.qi@linaro.org>
2053
2054 * linux-low.c (linux_insert_point): Call
2055 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2056 (linux_remove_point): Call remove_memory_breakpoint if type is
2057 raw_bkpt_type_sw.
2058 * linux-x86-low.c (x86_insert_point): Don't call
2059 insert_memory_breakpoint.
2060 (x86_remove_point): Don't call remove_memory_breakpoint.
2061
41f98f02
PA
20622015-04-01 Pedro Alves <palves@redhat.com>
2063 Cleber Rosa <crosa@redhat.com>
2064
2065 * server.c (gdbserver_usage): Reorganize and extend the usage
2066 message.
2067
2bf6fb9d
PA
20682015-03-24 Pedro Alves <palves@redhat.com>
2069
2070 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2071 output. Also dump TRAP_TRACE.
2072 (linux_low_filter_event): In debug output, distinguish a
2073 resume_stop SIGSTOP from a delayed SIGSTOP.
2074
369f6daa
GB
20752015-03-24 Gary Benson <gbenson@redhat.com>
2076
2077 * linux-x86-low.c (x86_linux_new_thread): Moved to
2078 nat/x86-linux.c.
2079 (x86_linux_prepare_to_resume): Likewise.
2080
8e5d4070
GB
20812015-03-24 Gary Benson <gbenson@redhat.com>
2082
2083 * Makefile.in (x86-linux-dregs.o): New rule.
2084 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2085 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2086 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2087 (x86_linux_dr_get): Likewise.
2088 (x86_linux_dr_set): Likewise.
2089 (update_debug_registers_callback): Likewise.
2090 (x86_linux_dr_set_addr): Likewise.
2091 (x86_linux_dr_get_addr): Likewise.
2092 (x86_linux_dr_set_control): Likewise.
2093 (x86_linux_dr_get_control): Likewise.
2094 (x86_linux_dr_get_status): Likewise.
2095 (x86_linux_update_debug_registers): Likewise.
2096
2b95d440
GB
20972015-03-24 Gary Benson <gbenson@redhat.com>
2098
2099 * linux-x86-low.c (x86_linux_update_debug_registers):
2100 New function, factored out from...
2101 (x86_linux_prepare_to_resume): ...this.
2102
14b0bc68
GB
21032015-03-24 Gary Benson <gbenson@redhat.com>
2104
2105 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2106 (x86_linux_dr_set): Likewise.
2107 (update_debug_registers_callback): Likewise.
2108 (x86_linux_dr_set_addr): Likewise.
2109 (x86_linux_dr_get_addr): Likewise.
2110 (x86_linux_dr_set_control): Likewise.
2111 (x86_linux_dr_get_control): Likewise.
2112 (x86_linux_dr_get_status): Likewise.
2113 (x86_linux_prepare_to_resume): Likewise.
2114
5dfe6ca8
GB
21152015-03-24 Gary Benson <gbenson@redhat.com>
2116
2117 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2118 Use perror_with_name. Pass string through gettext.
2119 (x86_linux_dr_set): Likewise.
2120
d33472ad
GB
21212015-03-24 Gary Benson <gbenson@redhat.com>
2122
2123 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2124 (x86_linux_dr_set_addr): ...this.
2125 (x86_dr_low_get_addr): Rename to...
2126 (x86_linux_dr_get_addr): ...this.
2127 (x86_dr_low_set_control): Rename to...
2128 (x86_linux_dr_set_control): ...this.
2129 (x86_dr_low_get_control): Rename to...
2130 (x86_linux_dr_get_control): ...this.
2131 (x86_dr_low_get_status): Rename to...
2132 (x86_linux_dr_get_status): ...this.
2133 (x86_dr_low): Update with new function names.
2134
4b134ca1
GB
21352015-03-24 Gary Benson <gbenson@redhat.com>
2136
2137 * Makefile.in (x86-linux.o): New rule.
2138 * configure.srv: Add x86-linux.o to relevant targets.
2139 * linux-low.c (lwp_set_arch_private_info): New function.
2140 (lwp_arch_private_info): Likewise.
2141 * linux-x86-low.c: Include nat/x86-linux.h.
2142 (arch_lwp_info): Removed structure.
2143 (update_debug_registers_callback):
2144 Use lwp_set_debug_registers_changed.
2145 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2146 and lwp_set_debug_registers_changed.
2147 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2148
34c703da
GB
21492015-03-24 Gary Benson <gbenson@redhat.com>
2150
2151 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2152 * linux-arm-low.c (arm_new_thread): Likewise.
2153 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2154 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2155 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2156 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2157
cff068da
GB
21582015-03-24 Gary Benson <gbenson@redhat.com>
2159
2160 * linux-low.c (ptid_of_lwp): New function.
2161 (lwp_is_stopped): Likewise.
2162 (lwp_stop_reason): Likewise.
2163 * linux-x86-low.c (update_debug_registers_callback):
2164 Use lwp_is_stopped.
2165 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2166 lwp_stop_reason.
2167
b2f7c7e8
GB
21682015-03-24 Gary Benson <gbenson@redhat.com>
2169
2170 * linux-low.h (linux_stop_lwp): Remove declaration.
2171
6d4ee8c6
GB
21722015-03-24 Gary Benson <gbenson@redhat.com>
2173
2174 * linux-low.h: Include nat/linux-nat.h.
2175 * linux-low.c (iterate_over_lwps_args): New structure.
2176 (iterate_over_lwps_filter): New function.
2177 (iterate_over_lwps): Likewise.
2178 * linux-x86-low.c (update_debug_registers_callback):
2179 Update signature to what iterate_over_lwps expects.
2180 Remove PID check that iterate_over_lwps now performs.
2181 (x86_dr_low_set_addr): Use iterate_over_lwps.
2182 (x86_dr_low_set_control): Likewise.
2183
70a0bb6b
GB
21842015-03-24 Gary Benson <gbenson@redhat.com>
2185
2186 * linux-x86-low.c (x86_debug_reg_state): New function.
2187 (x86_linux_prepare_to_resume): Use the above.
2188
7b669087
GB
21892015-03-24 Gary Benson <gbenson@redhat.com>
2190
2191 * linux-low.c (current_lwp_ptid): New function.
2192 * linux-x86-low.c: Include nat/linux-nat.h.
2193 (x86_dr_low_get_addr): Use current_lwp_ptid.
2194 (x86_dr_low_get_control): Likewise.
2195 (x86_dr_low_get_status): Likewise.
2196
eef49a3d
PA
21972015-03-20 Pedro Alves <palves@redhat.com>
2198
2199 * tracepoint.c (cmd_qtstatus): Make "str" const.
2200
b2333d22
PA
22012015-03-20 Pedro Alves <palves@redhat.com>
2202
2203 * server.c (handle_general_set): Make "req_str" const.
2204
23f238d3
PA
22052015-03-19 Pedro Alves <palves@redhat.com>
2206
2207 * linux-low.c (linux_resume_one_lwp): Rename to ...
2208 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2209 instead call perror_with_name.
2210 (check_ptrace_stopped_lwp_gone): New function.
2211 (linux_resume_one_lwp): Reimplement as wrapper around
2212 linux_resume_one_lwp_throw that swallows errors if the LWP is
2213 gone.
2214
91baf43f
PA
22152015-03-19 Pedro Alves <palves@redhat.com>
2216
2217 * linux-low.c (count_events_callback, select_event_lwp_callback):
2218 No longer check whether the thread has resume_stop as last resume
2219 kind.
2220
8bf3b159
PA
22212015-03-19 Pedro Alves <palves@redhat.com>
2222
2223 * linux-low.c (count_events_callback, select_event_lwp_callback):
2224 Use the lwp's status_pending_p field, not the thread's.
2225
b90fc188
PA
22262015-03-19 Pedro Alves <palves@redhat.com>
2227
2228 * linux-low.c (select_event_lwp_callback): Update comments to
2229 no longer mention SIGTRAP.
2230
464b0089
GB
22312015-03-18 Gary Benson <gbenson@redhat.com>
2232
2233 * server.c (handle_query): Do not report vFile:fstat as supported.
2234
aa9e327f
GB
22352015-03-11 Gary Benson <gbenson@redhat.com>
2236
2237 * hostio.c (sys/types.h): New include.
2238 (sys/stat.h): Likewise.
2239 (common-remote-fileio.h): Likewise.
2240 (handle_fstat): New function.
2241 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 2242
791c0056
GB
22432015-03-11 Gary Benson <gbenson@redhat.com>
2244
2245 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2246 struct stat.st_blocks and struct stat.st_blksize.
2247 * configure: Regenerate.
2248 * config.in: Likewise.
2249 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2250 (OBS): Add common-remote-fileio.o.
2251 (common-remote-fileio.o): New rule.
2252
9a9df970
PA
22532015-03-09 Pedro Alves <palves@redhat.com>
2254
2255 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2256 'struct sockaddr' pointer in 'accept' call.
2257
9eb1356e
PA
22582015-03-09 Pedro Alves <palves@redhat.com>
2259
2260 Revert:
2261 2015-03-07 Pedro Alves <palves@redhat.com>
2262 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2263 or <winsock2.h> here. Instead include "gdb_socket.h".
2264 (remote_open): Use union gdb_sockaddr_u.
2265 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2266 or <winsock2.h> here. Instead include "gdb_socket.h".
2267 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2268 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2269 or <sys/un.h>.
2270 (init_named_socket, gdb_agent_helper_thread): Use union
2271 gdb_sockaddr_u.
2272
aac331e4
PA
22732015-03-07 Pedro Alves <palves@redhat.com>
2274
2275 * configure.ac (build_warnings): Move
2276 -Wdeclaration-after-statement to the C-specific set.
2277 * configure: Regenerate.
2278
366c75fc
PA
22792015-03-07 Pedro Alves <palves@redhat.com>
2280
2281 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2282 or <winsock2.h> here. Instead include "gdb_socket.h".
2283 (remote_open): Use union gdb_sockaddr_u.
2284 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2285 or <winsock2.h> here. Instead include "gdb_socket.h".
2286 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2287 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2288 or <sys/un.h>.
2289 (init_named_socket, gdb_agent_helper_thread): Use union
2290 gdb_sockaddr_u.
2291
492d29ea
PA
22922015-03-07 Pedro Alves <palves@redhat.com>
2293
2294 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2295 instead.
2296
60a191ed
YQ
22972015-03-06 Yao Qi <yao.qi@linaro.org>
2298
2299 * linux-aarch64-low.c (aarch64_insert_point): Use
2300 show_debug_regs as a boolean.
2301 (aarch64_remove_point): Likewise.
2302
f5771b1d
PA
23032015-03-05 Pedro Alves <palves@redhat.com>
2304
2305 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2306 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2307 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2308 * nto-low.c (nto_target_ops): Likewise.
2309 * spu-low.c (spu_target_ops): Likewise.
2310 * win32-low.c (win32_target_ops): Likewise.
2311
3e572f71
PA
23122015-03-04 Pedro Alves <palves@redhat.com>
2313
72f4393d 2314 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
2315 Decide whether a breakpoint triggered based on the SIGTRAP's
2316 siginfo.si_code.
72f4393d
L
2317 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2318 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
2319 (linux_low_filter_event): Check for breakpoints before checking
2320 watchpoints.
2321 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2322 siginfo.si_code.
72f4393d
L
2323 (linux_stopped_by_sw_breakpoint)
2324 (linux_supports_stopped_by_sw_breakpoint)
2325 (linux_stopped_by_hw_breakpoint)
2326 (linux_supports_stopped_by_hw_breakpoint): New functions.
2327 (linux_target_ops): Install new target methods.
3e572f71 2328
1ec68e26
PA
23292015-03-04 Pedro Alves <palves@redhat.com>
2330
2331 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2332 * server.c (swbreak_feature, hwbreak_feature): New globals.
2333 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2334 (captured_main): Clear swbreak_feature and hwbreak_feature.
2335 * server.h (swbreak_feature, hwbreak_feature): Declare.
2336 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2337 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2338 supports_stopped_by_hw_breakpoint>: New fields.
2339 (target_supports_stopped_by_sw_breakpoint)
2340 (target_stopped_by_sw_breakpoint)
2341 (target_supports_stopped_by_hw_breakpoint)
2342 (target_stopped_by_hw_breakpoint): Declare.
2343
15c66dd6
PA
23442015-03-04 Pedro Alves <palves@redhat.com>
2345
2346 enum lwp_stop_reason -> enum target_stop_reason
2347 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2348 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2349 (linux_wait_1, stuck_in_jump_pad_callback)
2350 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2351 (linux_stopped_by_watchpoint):
2352 * linux-low.h (enum lwp_stop_reason): Delete.
2353 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2354 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2355
98fc70d6
YQ
23562015-03-04 Yao Qi <yao.qi@linaro.org>
2357
2358 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2359
dd2ac174
GB
23602015-03-03 Gary Benson <gbenson@redhat.com>
2361
2362 * hostio.c (handle_vFile): Fix prefix lengths.
2363
d68e53f4
MM
23642015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2365
2366 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2367 ptr_bits.
2368
bf2d68ab
AA
23692015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2370
2371 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2372 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2373 (clean): Add "rm -f" for above C files.
2374 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2375 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2376 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2377 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2378 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2379 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2380 (init_registers_s390x_vx_linux64)
2381 (init_registers_s390x_tevx_linux64)
2382 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2383 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2384 declarations.
2385 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2386 (s390_store_vxrs_high): New functions.
2387 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2388 NT_S390_VXRS_HIGH.
2389 (s390_arch_setup): Add logic for selecting one of the new target
2390 descriptions. Activate the new vector regsets if applicable.
2391 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2392 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2393 and init_registers_s390x_tevx_linux64.
2394
c966a859
PA
23952015-03-01 Pedro Alves <palves@redhat.com>
2396
2397 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2398 parameter.
2399
4180215b
PA
24002015-02-27 Pedro Alves <palves@redhat.com>
2401
2402 * linux-x86-low.c (u_debugreg_offset): New function.
2403 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2404
749bab01
PA
24052015-02-27 Pedro Alves <palves@redhat.com>
2406
2407 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2408 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2409 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2410 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2411 (ps_lsetfpregs, ps_getpid)
2412 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2413 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2414 (ps_lsetxregs, ps_plog): Declare.
2415
3c14e5a3
PA
24162015-02-27 Pedro Alves <palves@redhat.com>
2417
2418 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2419 IP_AGENT_EXPORT_FUNC.
2420 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2421 IP_AGENT_EXPORT_FUNC.
2422 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2423 (IP_AGENT_EXPORT): Delete.
2424 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2425 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2426 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2427 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2428 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2429 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2430 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2431 (traceframe_read_count, traceframe_write_count)
2432 (traceframes_created, trace_state_variables, get_raw_reg)
2433 (get_trace_state_variable_value, set_trace_state_variable_value)
2434 (ust_loaded, helper_thread_id, cmd_buf): Use
2435 IPA_SYM_EXPORTED_NAME.
2436 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2437 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2438 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2439 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2440 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2441 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2442 EXTERN_C_PUSH/EXTERN_C_POP.
2443 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2444 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2445 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2446 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2447 (traceframe_write_count, traceframe_read_count)
2448 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2449 (about_to_request_buffer_space, get_trace_state_variable_value)
2450 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2451 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2452 EXTERN_C_PUSH/EXTERN_C_POP.
2453 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2454 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2455 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2456 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2457 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2458 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2459 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2460 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2461 Define.
2462 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2463 (IP_AGENT_EXPORT_VAR_DECL): Define.
2464 (tracing): Declare.
2465 (gdb_agent_get_raw_reg): Declare.
2466
fe978cb0
PA
24672015-02-27 Tom Tromey <tromey@redhat.com>
2468 Pedro Alves <palves@redhat.com>
2469
2470 Rename symbols whose names are reserved C++ keywords throughout.
2471
3bc3d82a
PA
24722015-02-27 Pedro Alves <palves@redhat.com>
2473
2474 * Makefile.in (COMPILER): New, get it from autoconf.
2475 (CXX): Get from autoconf instead.
2476 (COMPILE.pre): Use COMPILER.
2477 (CC-LD): Rename to ...
2478 (CC_LD): ... this. Use COMPILER.
2479 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2480 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2481 * acinclude.m4: Include build-with-cxx.m4.
2482 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2483 Disable -Werror by default if building in C++ mode.
2484 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2485 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2486 the C++ compiler. Save/restore CXXFLAGS too.
2487 * configure: Regenerate.
2488
07697489
PA
24892015-02-27 Pedro Alves <palves@redhat.com>
2490
2491 * acinclude.m4: Include libiberty.m4.
2492 * configure.ac: Call libiberty_INIT.
2493 * config.in, configure: Regenerate.
2494
9beb7c4e
PA
24952015-02-26 Pedro Alves <palves@redhat.com>
2496
2497 * linux-low.c (linux_wait_1): When incrementing the PC past a
2498 program breakpoint always use the_low_target.breakpoint_len as
2499 increment, rather than the maximum between that and
2500 the_low_target.decr_pc_after_break.
2501
8090aef2
PA
25022015-02-23 Pedro Alves <palves@redhat.com>
2503
2504 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2505 thread was doing a step-over; always adjust the PC if
2506 we stepped over a permanent breakpoint.
2507 (linux_wait_1): If we stepped over breakpoint that was on top of a
2508 permanent breakpoint, manually advance the PC past it.
2509
bc9540e8
PA
25102015-02-23 Pedro Alves <palves@redhat.com>
2511
2512 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2513 modes.
2514 (x86_fill_gregset, x86_store_gregset): Use it when handling
2515 $orig_eax.
2516
2db9a427
PA
25172015-02-20 Pedro Alves <palves@redhat.com>
2518
2519 * thread-db.c: Include "nat/linux-procfs.h".
2520 (thread_db_init): Skip listing new threads if the kernel supports
2521 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2522
afa8d396
PA
25232015-02-20 Pedro Alves <palves@redhat.com>
2524
2525 * linux-low.c (status_pending_p_callback): Use ptid_match.
2526
c9587f88
AT
25272015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2528
2529 PR breakpoints/16812
2530 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2531 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2532 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2533
b05ec7a5
AT
25342015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2535
2536 PR breakpoints/15956
2537 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2538
d33501a5
MM
25392015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2540
2541 * linux-low.c (linux_low_btrace_conf): Print size.
2542 * server.c (handle_btrace_conf_general_set): New.
2543 (hanle_general_set): Call handle_btrace_conf_general_set.
2544 (handle_query): Report Qbtrace-conf:bts:size as supported.
2545
f4abbc16
MM
25462015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2547
2548 * linux-low.c (linux_low_enable_btrace): Update parameters.
2549 (linux_low_btrace_conf): New.
2550 (linux_target_ops)<to_btrace_conf>: Initialize.
2551 * server.c (current_btrace_conf): New.
2552 (handle_btrace_enable): Rename to ...
2553 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2554 to target_enable_btrace. Update comment. Update users.
2555 (handle_qxfer_btrace_conf): New.
2556 (qxfer_packets): Add btrace-conf entry.
2557 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2558 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2559 (target_ops)<read_btrace_conf>: New.
2560 (target_enable_btrace): Update parameters.
2561 (target_read_btrace_conf): New.
2562
043c3577
MM
25632015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2564
2565 * server.c (handle_btrace_general_set): Remove call to
2566 target_supports_btrace.
2567 (supported_btrace_packets): New.
2568 (handle_query): Call supported_btrace_packets.
2569 * target.h: include btrace-common.h.
2570 (btrace_target_info): Removed.
2571 (supports_btrace, target_supports_btrace): Update parameters.
2572
734b0e4b
MM
25732015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2574
2575 * Makefile.in (SFILES): Add common/btrace-common.c.
2576 (OBS): Add common/btrace-common.o.
2577 (btrace-common.o): Add build rules.
2578 * linux-low: Include btrace-common.h.
2579 (linux_low_read_btrace): Use struct btrace_data. Call
2580 btrace_data_init and btrace_data_fini.
2581
d6c146e9
PA
25822015-02-06 Pedro Alves <palves@redhat.com>
2583
2584 * thread-db.c (find_new_threads_callback): Add debug output.
2585
20ba1ce6
PA
25862015-02-04 Pedro Alves <palves@redhat.com>
2587
2588 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2589 (resume_stopped_resumed_lwps): New function.
2590 (linux_wait_for_event_filtered): Use it.
2591
8cc73a39
SDJ
25922015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2593
2594 * Makefile.in (SFILES): Add linux-personality.c.
2595 (linux-personality.o): New rule.
2596 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2597 list of objects to be built.
2598 * linux-low.c: Include nat/linux-personality.h.
2599 (linux_create_inferior): Remove code to disable address space
2600 randomization (moved to ../nat/linux-personality.c). Create
2601 cleanup to disable address space randomization.
2602
fb23d554
SDJ
26032015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2604
2605 * Makefile.in (posix-strerror.o): New rule.
2606 (mingw-strerror.o): Likewise.
2607 * configure: Regenerated.
2608 * configure.ac: Source file ../common/common.host. Initialize new
2609 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2610
cdf43629
YQ
26112015-01-14 Yao Qi <yao@codesourcery.com>
2612
2613 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2614 (ppc-linux.o): New rule.
2615 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2616 * configure.ac: AC_CHECK_FUNCS(getauxval).
2617 * config.in: Re-generated.
2618 * configure: Re-generated.
2619 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2620 ppc64_64bit_inferior_p
2621
514c5338
YQ
26222015-01-14 Yao Qi <yao@codesourcery.com>
2623
2624 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2625 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2626 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2627 (PT_ORIG_R3, PT_TRAP): Likewise.
2628 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2629 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2630 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2631
3368c1e5
JB
26322015-01-10 Joel Brobecker <brobecker@adacore.com>
2633
2634 * i387-fp.c (i387_cache_to_xsave): In look over
2635 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2636 zmmh_low_space field by use of zmmh_high_space.
2637
582511be
PA
26382015-01-09 Pedro Alves <palves@redhat.com>
2639
2640 * linux-low.c (step_over_bkpt): Move higher up in the file.
2641 (handle_extended_wait): Don't store the stop_pc here.
2642 (get_stop_pc): Adjust comments and rename to ...
2643 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2644 stopped for a software breakpoint or hardware breakpoint.
2645 (thread_still_has_status_pending_p): New function.
2646 (status_pending_p_callback): Use
2647 thread_still_has_status_pending_p. If the event is no longer
2648 interesting, resume the LWP.
2649 (handle_tracepoints): Add assert.
2650 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2651 (wstatus_maybe_breakpoint): New function.
2652 (cancel_breakpoint): Delete function.
2653 (check_stopped_by_watchpoint): New function, factored out from
2654 linux_low_filter_event.
2655 (lp_status_maybe_breakpoint): Delete function.
2656 (linux_low_filter_event): Remove filter_ptid argument.
2657 Leave thread group exits pending here. Store the LWP's stop PC.
2658 Always leave events pending.
2659 (linux_wait_for_event_filtered): Pull all events out of the
2660 kernel, and leave them all pending.
2661 (count_events_callback, select_event_lwp_callback): Consider all
2662 events.
2663 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2664 (select_event_lwp): Only give preference to the stepping LWP in
2665 all-stop mode. Adjust comments.
2666 (ignore_event): New function.
2667 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2668 references to cancel_breakpoints. Adjust to renames. Also give
2669 equal priority to all LWPs that have had events in non-stop mode.
2670 If reporting a software breakpoint event, unadjust the LWP's PC.
2671 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2672 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2673 Adjust.
2674 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2675 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2676 (linux_stopped_by_watchpoint): Adjust.
2677 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2678 * linux-low.h (enum lwp_stop_reason): New.
2679 (struct lwp_info) <stop_pc>: Adjust comment.
2680 <stopped_by_watchpoint>: Delete field.
2681 <stop_reason>: New field.
2682 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2683 * mem-break.c (software_breakpoint_inserted_here)
2684 (hardware_breakpoint_inserted_here): New function.
2685 * mem-break.h (software_breakpoint_inserted_here)
2686 (hardware_breakpoint_inserted_here): Declare.
2687 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2688 (cancel_breakpoints): Delete.
2689 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2690 (upload_fast_traceframes): Remove references to
2691 cancel_breakpoints.
2692
a33e3959
PA
26932015-01-09 Pedro Alves <palves@redhat.com>
2694
2695 * thread-db.c (find_new_threads_callback): Ignore thread if the
2696 kernel thread ID is -1.
2697
8784d563
PA
26982015-01-09 Pedro Alves <palves@redhat.com>
2699
2700 * linux-low.c (linux_attach_fail_reason_string): Move to
2701 nat/linux-ptrace.c, and rename.
2702 (linux_attach_lwp): Update comment.
2703 (attach_proc_task_lwp_callback): New function.
2704 (linux_attach): Adjust to rename and use
2705 linux_proc_attach_tgid_threads.
2706 (linux_attach_fail_reason_string): Delete declaration.
2707
76f2b779
JB
27082015-01-01 Joel Brobecker <brobecker@adacore.com>
2709
2710 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2711 * server.c (gdbserver_version): Likewise.
2712
fafcc06a
SDJ
27132014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2714
2715 * remote-utils.c: Include ctype.h.
2716 (input_interrupt): Explicitly handle the case when the char
2717 received is the NUL byte. Improve the printing of non-ASCII
2718 characters.
2719
beed38b8
JB
27202014-12-16 Joel Brobecker <brobecker@adacore.com>
2721
2722 * linux-low.c (linux_low_filter_event): Update call to
2723 linux_enable_event_reporting following the addition of
2724 a new parameter to that function.
2725
bf330350
CU
27262014-12-16 Catalin Udma <catalin.udma@freescale.com>
2727
2728 PR server/17457
2729 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2730 (AARCH64_FPCR_REGNO): Likewise.
2731 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2732 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2733 (aarch64_store_fpregset): Likewise.
2734
5227d625
JB
27352014-12-15 Joel Brobecker <brobecker@adacore.com>
2736
2737 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2738 Remove FIXME comment about assumption about N.
2739
f93b65a0
JB
27402014-12-13 Joel Brobecker <brobecker@adacore.com>
2741
2742 * configure.ac: If large-file support is disabled in GDBserver,
2743 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2744 * configure: Regenerate.
2745
e5a9158d
AA
27462014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2747
2748 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2749 warning upon ENODATA from ptrace.
2750 * linux-s390-low.c (s390_store_tdb): New.
2751 (s390_regsets): Add regset for NT_S390_TDB.
2752
feea5f36
AA
27532014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2754
2755 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2756 without a fill_function.
2757 * linux-s390-low.c (s390_fill_last_break): Remove.
2758 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2759 (s390_arch_setup): Use regset's size instead of fill_function for
2760 loop end condition.
2761
098dbe61
AA
27622014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2763
2764 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2765 the regset's store function when ptrace returned an error.
2766 * regcache.c (get_thread_regcache): Invalidate register cache
2767 before fetching inferior's registers.
2768
28eef672
AA
27692014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2770
2771 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2772 while-loop as for-loop.
2773 (regsets_store_inferior_registers): Likewise.
2774
bdca27a2
YQ
27752014-11-28 Yao Qi <yao@codesourcery.com>
2776
2777 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2778 * config.in, configure: Re-generate.
2779 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2780 is defined.
2781
9c232dda
YQ
27822014-11-21 Yao Qi <yao@codesourcery.com>
2783
2784 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2785 (AC_CHECK_HEADERS): Remove malloc.h.
2786 * configure: Re-generated.
2787 * config.in: Re-generated.
2788 * server.h: Don't include alloca.h and malloc.h.
2789 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2790 Don't include malloc.h.
2791
43968415
JB
27922014-11-17 Joel Brobecker <brobecker@adacore.com>
2793
2794 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2795 corresponding ERRNO check in same block.
2796
40e91bc7
PA
27972014-11-12 Pedro Alves <palves@redhat.com>
2798
2799 * server.c (cont_thread): Update comment.
2800 (start_inferior, attach_inferior): No longer clear cont_thread.
2801 (handle_v_cont): No longer set cont_thread.
2802 (captured_main): Clear cont_thread each time a GDB connects.
2803
c2c118cf
PA
28042014-11-12 Pedro Alves <palves@redhat.com>
2805
2806 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2807 thread, and don't resume all threads if the Hc thread has exited.
2808
78708b7c
PA
28092014-11-12 Pedro Alves <palves@redhat.com>
2810
2811 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2812 the process group instead of to a specific LWP.
2813
a2abc7de
PA
28142014-10-15 Pedro Alves <palves@redhat.com>
2815
2816 PR server/17487
2817 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2818 parameter.
2819 (arm_set_thread_context): Delete.
2820 (the_low_target): Adjust.
2821 * win32-i386-low.c (debug_registers_changed)
2822 (debug_registers_used): Delete.
2823 (update_debug_registers_callback): New function.
2824 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2825 needing to update their debug registers.
2826 (win32_get_current_dr): New function.
2827 (x86_dr_low_get_addr, x86_dr_low_get_control)
2828 (x86_dr_low_get_status): Fetch the debug register from the thread
2829 record's context.
2830 (i386_initial_stuff): Adjust.
2831 (i386_get_thread_context): Remove current_event parameter. Don't
2832 clear debug_registers_changed nor copy DR values to
2833 debug_reg_state.
2834 (i386_set_thread_context): Delete.
2835 (i386_prepare_to_resume): New function.
2836 (i386_thread_added): Mark the thread as needing to update irs
2837 debug registers.
2838 (the_low_target): Remove i386_set_thread_context and install
2839 i386_prepare_to_resume.
2840 * win32-low.c (win32_get_thread_context): Adjust.
2841 (win32_set_thread_context): Use SetThreadContext
2842 directly.
2843 (win32_prepare_to_resume): New function.
2844 (win32_require_context): New function, factored out from ...
2845 (thread_rec): ... this.
2846 (continue_one_thread): Call win32_prepare_to_resume on each thread
2847 we're about to continue.
2848 (win32_resume): Call win32_prepare_to_resume on the event thread.
2849 * win32-low.h (struct win32_thread_info)
2850 <debug_registers_changed>: New field.
2851 (struct win32_target_ops): Change prototype of set_thread_context,
2852 delete set_thread_context and add prepare_to_resume.
2853 (win32_require_context): New declaration.
2854
a442d071
GB
28552014-10-08 Gary Benson <gbenson@redhat.com>
2856
2857 * server.h: Do not include common-exceptions.h.
2858
6f1947e8
GB
28592014-10-08 Gary Benson <gbenson@redhat.com>
2860
2861 * server.h: Do not include cleanups.h.
2862
63b434a4
JH
28632014-09-30 James Hogan <james.hogan@imgtec.com>
2864
2865 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2866 mips64-dsp-linux.c.
2867
c4d9ceb6
YQ
28682014-09-23 Yao Qi <yao@codesourcery.com>
2869
2870 * linux-low.c (lp_status_maybe_breakpoint): New function.
2871 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2872 (count_events_callback): Likewise.
2873 (select_event_lwp_callback): Likewise.
2874 (cancel_breakpoints_callback): Likewise.
2875
89a5711c
DB
28762014-09-19 Don Breazeal <donb@codesourcery.com>
2877
2878 * linux-low.c (handle_extended_wait): Call
2879 linux_ptrace_get_extended_event.
2880 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2881 linux_is_extended_waitstatus.
2882
bffc0964
JB
28832014-09-16 Joel Brobecker <brobecker@adacore.com>
2884
2885 * Makefile.in (CPPFLAGS): Define.
2886 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2887 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2888
0bfdf32f
GB
28892014-09-16 Gary Benson <gbenson@redhat.com>
2890
2891 * inferiors.h (current_inferior): Renamed as...
2892 (current_thread): New variable. All uses updated.
2893 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2894 (maybe_move_out_of_jump_pad): Likewise.
2895 (cancel_breakpoint): Likewise.
2896 (linux_low_filter_event): Likewise.
2897 (wait_for_sigstop): Likewise.
2898 (linux_resume_one_lwp): Likewise.
2899 (need_step_over_p): Likewise.
2900 (start_step_over): Likewise.
2901 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2902 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2903 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2904 and save_inferior as saved_thread.
2905 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2906 saved_thread.
2907 (regcache_invalidate_thread): Likewise.
2908 * remote-utils.c (prepare_resume_reply): Likewise.
2909 * thread-db.c (thread_db_get_tls_address): Likewise.
2910 (disable_thread_event_reporting): Likewise.
2911 (remove_thread_event_breakpoints): Likewise.
2912 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2913 as saved_thread.
2914 * target.h (set_desired_inferior): Renamed as...
2915 (set_desired_thread): New declaration. All uses updated.
2916 * server.c (myresume): Updated comment to reference thread instead
2917 of inferior.
2918 (handle_serial_event): Likewise.
2919 (handle_target_event): Likewise.
2920
361c8ade
GB
29212014-09-12 Tom Tromey <tromey@redhat.com>
2922 Gary Benson <gbenson@redhat.com>
2923
2924 * regcache.h: Include common-regcache.h.
2925 (regcache_read_pc): Don't declare.
2926 * regcache.c (get_thread_regcache_for_ptid): New function.
2927
bd9269f7
GB
29282014-09-11 Tom Tromey <tromey@redhat.com>
2929 Gary Benson <gbenson@redhat.com>
2930
2931 * symbol.c: New file.
2932 * Makefile.in (SFILES): Add symbol.c.
2933 (OBS): Add symbol.o.
2934
f8c1d06b
GB
29352014-09-11 Gary Benson <gbenson@redhat.com>
2936
2937 * target.c (target_stop_ptid, target_continue_ptid): New
2938 functions.
2939
721ec300
GB
29402014-09-11 Tom Tromey <tromey@redhat.com>
2941 Gary Benson <gbenson@redhat.com>
2942
2943 * target.h: Include target/target.h.
2944 * target.c (target_read_memory, target_read_uint32)
2945 (target_write_memory): New functions.
2946
c5e92cca
GB
29472014-09-11 Gary Benson <gbenson@redhat.com>
2948
2949 * server.h (debug_hw_points): Don't declare.
2950 * server.c (debug_hw_points): Don't define. Replace all uses
2951 with show_debug_regs.
2952 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2953 all uses with show_debug_regs.
2954
2e4bb98a
EBM
29552014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2956
2957 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2958 endianness into account.
2959 (ppc_supply_ptrace_register): Likewise.
2960
ac740bc7
JH
29612014-09-03 James Hogan <james.hogan@imgtec.com>
2962
2963 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2964 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2965
97ea6506
GB
29662014-09-03 Gary Benson <gbenson@redhat.com>
2967
2968 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2969 ALL_DEBUG_ADDRESS_REGISTERS.
2970
df7e5265
GB
29712014-09-02 Gary Benson <gbenson@redhat.com>
2972
2973 * i386-low.h: Renamed as...
2974 * x86-low.h: New file. All type, function and variable name
2975 prefixes changed from "i386_" to "x86_". All references updated.
2976 * i386-low.c: Renamed as...
2977 * x86-low.c: New file. All type, function and variable name
2978 prefixes changed from "i386_" to "x86_". All references updated.
2979
ed859da7
GB
29802014-09-02 Gary Benson <gbenson@redhat.com>
2981
2982 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2983 (x86_linux_new_thread): Likewise.
2984
860789c7
GB
29852014-08-29 Gary Benson <gbenson@redhat.com>
2986
2987 * server.h (setjmp.h): Do not include.
2988 (toplevel): Do not declare.
2989 (common-exceptions.h): Include.
2990 (cleanups.h): Likewise.
2991 * server.c (toplevel): Do not define.
2992 (exit_code): New static global.
2993 (detach_or_kill_for_exit_cleanup): New function.
2994 (main): New function. Original main renamed to...
2995 (captured_main): New function.
2996 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2997
ff55e1b5
GB
29982014-08-29 Gary Benson <gbenson@redhat.com>
2999
3000 * Makefile.in (SFILES): Add common/common-exceptions.c.
3001 (OBS): Add common-exceptions.o.
3002 (common-exceptions.o): New rule.
3003 * utils.c (prepare_to_throw_exception): New function.
3004
e9bcb658
GB
30052014-08-29 Gary Benson <gbenson@redhat.com>
3006
3007 * config.in: Regenerate.
3008 * configure: Likewise.
3009
e3180625
GB
30102014-08-29 Gary Benson <gbenson@redhat.com>
3011
3012 * Makefile.in (SFILES): Add common/cleanups.c.
3013 (OBS): cleanups.o.
3014 (cleanups.o): New rule.
3015
e3d6ba5d
GB
30162014-08-29 Gary Benson <gbenson@redhat.com>
3017
3018 * utils.c (internal_vwarning): New function.
3019
7096e886
GB
30202014-08-28 Gary Benson <gbenson@redhat.com>
3021
3022 * utils.h (fatal): Remove declaration.
3023 * utils.c (fatal): Remove function.
3024
14ce3192
GB
30252014-08-28 Gary Benson <gbenson@redhat.com>
3026
3027 * tracepoint.c (gdb_agent_init): Replace fatal with
3028 perror_with_name.
3029 (initialize_tracepoint): Likewise.
3030
50278d59
GB
30312014-08-28 Gary Benson <gbenson@redhat.com>
3032
3033 * remote-utils.c (remote_prepare): Replace fatal with error.
3034
aa96c426
GB
30352014-08-28 Gary Benson <gbenson@redhat.com>
3036
3037 * linux-low.c (linux_async): Replace fatal with warning.
3038 Tidy up and return.
3039 (linux_start_non_stop): Return -1 if linux_async failed.
3040
f7160e97
GB
30412014-08-28 Gary Benson <gbenson@redhat.com>
3042
3043 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3044 gdb_assert.
3045 (i386_dr_low_get_addr): Remove vague comment.
3046 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3047 gdb_assert.
3048
38e08fca
GB
30492014-08-28 Gary Benson <gbenson@redhat.com>
3050
3051 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3052 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3053 internal_error.
3054 (linux_resume_one_lwp): Likewise.
3055 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3056 gdb_assert.
3057 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3058 with internal_error.
3059 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3060 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3061 (find_register_by_name): Replace fatal with internal_error.
3062 (find_regno): Likewise.
3063 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3064 * thread-db.c (thread_db_create_event): Likewise.
3065 (thread_db_load_search): Likewise.
3066 (try_thread_db_load_1): Likewise.
3067 * tracepoint.c (get_jump_space_head): Replace fatal with
3068 internal_error.
3069 (claim_trampoline_space): Likewise.
3070 (have_fast_tracepoint_trampoline_buffer): Likewise.
3071 (cmd_qtstart): Likewise.
3072 (stop_tracing): Likewise.
3073 (fast_tracepoint_collecting): Likewise.
3074 (target_malloc): Likewise.
3075 (download_tracepoint): Likewise.
3076 (download_trace_state_variables): Replace check with gdb_assert.
3077 (upload_fast_traceframes): Replace fatal with internal_error.
3078
34abf635
GB
30792014-08-19 Tom Tromey <tromey@redhat.com>
3080 Gary Benson <gbenson@redhat.com>
3081
3082 * Makefile.in (SFILES): Add common/common-debug.c.
3083 (OBS): Add common-debug.o.
3084 (common-debug.o): New rule.
3085 * debug.h (debug_printf): Don't declare.
3086 * debug.c (debug_printf): Renamed and rewritten as...
3087 (debug_vprintf): New function.
3088
f6e94d78
GB
30892014-08-19 Gary Benson <gbenson@redhat.com>
3090
3091 * utils.h: Do not include print-utils.h.
3092
9239eeab
GB
30932014-08-19 Tom Tromey <tromey@redhat.com>
3094 Gary Benson <gbenson@redhat.com>
3095
3096 * server.h: Add static assertion.
3097 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3098
ef87c8bb
GB
30992014-08-19 Tom Tromey <tromey@redhat.com>
3100 Gary Benson <gbenson@redhat.com>
3101
3102 * Makefile.in (SFILES): Add common/errors.c.
3103 (OBS): Add errors.o.
3104 (IPA_OBS): Add errors-ipa.o.
3105 (errors.o): New rule.
3106 (errors-ipa.o): Likewise.
3107 * utils.h (perror_with_name, error, warning): Don't declare.
3108 * utils.c (warning): Renamed and rewritten as...
3109 (vwarning): New function.
3110 (error): Renamed and rewritten as...
3111 (verror): New function.
3112 (internal_error): Renamed and rewritten as...
3113 (internal_verror): New function.
3114
bb974a24
GB
31152014-08-07 Gary Benson <gbenson@redhat.com>
3116
3117 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3118 * configure: Regenerate.
3119 * config.in: Likewise.
3120 * server.h: Do not include errno.h.
3121 * event-loop.c: Likewise.
3122 * hostio-errno.c: Likewise.
3123 * linux-low.c: Likewise.
3124 * remote-utils.c: Likewise.
3125 * spu-low.c: Likewise.
3126 * utils.c: Likewise.
3127 * gdbreplay.c: Unconditionally include errno.h.
3128
6d3d12eb
GB
31292014-08-07 Gary Benson <gbenson@redhat.com>
3130
3131 * server.h: Do not include string.h.
3132 * event-loop.c: Likewise.
3133 * linux-low.c: Likewise.
3134 * regcache.c: Likewise.
3135 * remote-utils.c: Likewise.
3136 * spu-low.c: Likewise.
3137 * utils.c: Likewise.
3138
dccbb609
GB
31392014-08-07 Gary Benson <gbenson@redhat.com>
3140
3141 * server.h: Do not include gdb_assert.h.
3142
e76df0d0
GB
31432014-08-07 Gary Benson <gbenson@redhat.com>
3144
3145 * server.h: Do not include common-utils.h.
3146
4cb9c816
GB
31472014-08-07 Gary Benson <gbenson@redhat.com>
3148
3149 * server.h: Do not include ptid.h.
3150 * notif.h: Likewise.
3151
3995eeee
GB
31522014-08-07 Gary Benson <gbenson@redhat.com>
3153
3154 * server.h: Do not include gdb_locale.h.
3155
cb9f1a9b
GB
31562014-08-07 Gary Benson <gbenson@redhat.com>
3157
3158 * server.h: Do not include gdb/signals.h.
3159 * win32-low.c: Likewise.
3160
a5fceff8
GB
31612014-08-07 Gary Benson <gbenson@redhat.com>
3162
3163 * server.h: Do not include pathmax.h.
3164
b9391142
GB
31652014-08-07 Gary Benson <gbenson@redhat.com>
3166
3167 * server.h: Do not include libiberty.h.
3168 * linux-bfin-low.c: Likewise.
3169
0e443c87
GB
31702014-08-07 Gary Benson <gbenson@redhat.com>
3171
3172 * server.h: Do not include ansidecl.h.
3173
8ebb3f56
GB
31742014-08-07 Gary Benson <gbenson@redhat.com>
3175
3176 * linux-x86-low.c: Do not include stddef.h.
3177 * lynx-ppc-low.c: Likewise.
3178 * tracepoint.c: Likewise.
3179
8980bdf6
GB
31802014-08-07 Gary Benson <gbenson@redhat.com>
3181
3182 * server.h: Do not include stdarg.h.
3183 * nto-low.c: Likewise.
3184
d7096f71
GB
31852014-08-07 Gary Benson <gbenson@redhat.com>
3186
3187 * server.h: Do not include stdlib.h.
3188 * inferiors.c: Likewise.
3189 * linux-low.c: Likewise.
3190 * regcache.c: Likewise.
3191 * spu-low.c: Likewise.
3192 * tracepoint.c: Likewise.
3193 * utils.c: Likewise.
3194
d02f550d
GB
31952014-08-07 Gary Benson <gbenson@redhat.com>
3196
3197 * server.h: Do not include stdio.h.
3198 * linux-low.c: Likewise.
3199 * remote-utils.c: Likewise.
3200 * spu-low.c: Likewise.
3201 * utils.c: Likewise.
3202 * wincecompat.c: Likewise.
3203
87f6c4e3
GB
32042014-08-06 Gary Benson <gbenson@redhat.com>
3205
3206 * regcache.c (init_register_cache): Move conditionals inside if.
3207
7089dca4
GB
32082014-08-06 Gary Benson <gbenson@redhat.com>
3209
3210 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3211
462f517e
GB
32122014-07-31 Gary Benson <gbenson@redhat.com>
3213
3214 * ax.h: Do not include server.h.
3215 * gdbthread.h: Likewise.
3216 * lynx-low.h: Likewise.
3217 * notif.h: Likewise.
3218
976411d6
GB
32192014-07-30 Gary Benson <gbenson@redhat.com>
3220
3221 * server.h: Include common-defs.h.
3222 Do not include config.h or build-gnulib-gdbserver/config.h.
3223
d41f6d8e
GB
32242014-07-30 Gary Benson <gbenson@redhat.com>
3225
3226 * hostio-errno.c: Move server.h to top of includes list.
3227 * inferiors.c: Likewise.
3228 * linux-x86-low.c: Likewise.
3229 * notif.c: Include server.h.
3230
314c6a35
TT
32312014-07-24 Tom Tromey <tromey@redhat.com>
3232 Gary Benson <gbenson@redhat.com>
3233
3234 * server.h (CORE_ADDR): Now unsigned.
3235
69ff6be5
PA
32362014-07-16 Pedro Alves <palves@redhat.com>
3237
3238 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3239
ce9e3fe7
PA
32402014-07-15 Pedro Alves <palves@redhat.com>
3241
3242 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3243 copy.
3244
e76126e8
PA
32452014-07-11 Pedro Alves <palves@redhat.com>
3246
3247 * linux-low.c (kill_wait_lwp): New function, based on
3248 kill_one_lwp_callback, but use my_waitpid directly.
3249 (kill_one_lwp_callback, linux_kill): Use it.
3250
8e9db26e
PA
32512014-06-23 Pedro Alves <palves@redhat.com>
3252
3253 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3254 before setting DR0..DR3.
3255
698b3e08
GB
32562014-06-20 Gary Benson <gbenson@redhat.com>
3257
3258 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3259 * configure: Regenerated.
3260 * config.in: Likewise.
3261
125f8a3d
GB
32622014-06-20 Gary Benson <gbenson@redhat.com>
3263
3264 * Makefile.in (SFILES): Update locations for files moved
3265 from common to nat.
3266 (object file files): Reordered.
3267
42995dbd
GB
32682014-06-20 Gary Benson <gbenson@redhat.com>
3269
3270 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3271 (i386_dr_low_set_addr): Likewise.
3272 (i386_dr_low_get_addr): Likewise.
3273 (i386_dr_low_can_set_control): Likewise.
3274 (i386_dr_low_set_control): Likewise.
3275 (i386_dr_low_get_control): Likewise.
3276 (i386_dr_low_get_status): Likewise.
3277 (i386_get_debug_register_length): Likewise.
3278 * linux-x86-low.c (i386_dr_low_set_addr):
3279 Changed signature. Made static.
3280 (i386_dr_low_get_addr): Likewise.
3281 (i386_dr_low_set_control): Likewise.
3282 (i386_dr_low_get_control): Likewise.
3283 (i386_dr_low_get_status): Likewise.
3284 (i386_dr_low): New global variable.
3285 * win32-i386-low.c (i386_dr_low_set_addr):
3286 Changed signature. Made static.
3287 (i386_dr_low_get_addr): Likewise.
3288 (i386_dr_low_set_control): Likewise.
3289 (i386_dr_low_get_control): Likewise.
3290 (i386_dr_low_get_status): Likewise.
3291 (i386_dr_low): New global variable.
3292
e1d2394b
MS
32932014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3294
3295 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3296 * Makefile.in (AR, AR_FLAGS): Define.
3297 * configure: Regenerate.
3298
3a8ee006
GB
32992014-06-19 Gary Benson <gbenson@redhat.com>
3300
3301 * Makefile.in (i386-dregs.o): New rule.
3302 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3303 * i386-low.c (target.h): Remove include.
3304 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3305 (DR_CONTROL_SHIFT): Likewise.
3306 (DR_CONTROL_SIZE): Likewise.
3307 (DR_RW_EXECUTE): Likewise.
3308 (DR_RW_WRITE): Likewise.
3309 (DR_RW_READ): Likewise.
3310 (DR_RW_IORW): Likewise.
3311 (DR_LEN_1): Likewise.
3312 (DR_LEN_2): Likewise.
3313 (DR_LEN_4): Likewise.
3314 (DR_LEN_8): Likewise.
3315 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3316 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3317 (DR_ENABLE_SIZE): Likewise.
3318 (DR_LOCAL_SLOWDOWN): Likewise.
3319 (DR_GLOBAL_SLOWDOWN): Likewise.
3320 (DR_CONTROL_RESERVED): Likewise.
3321 (I386_DR_CONTROL_MASK): Likewise.
3322 (I386_DR_VACANT): Likewise.
3323 (I386_DR_LOCAL_ENABLE): Likewise.
3324 (I386_DR_GLOBAL_ENABLE): Likewise.
3325 (I386_DR_DISABLE): Likewise.
3326 (I386_DR_SET_RW_LEN): Likewise.
3327 (I386_DR_GET_RW_LEN): Likewise.
3328 (I386_DR_WATCH_HIT): Likewise.
3329 (i386_wp_op_t): Likewise.
3330 (i386_show_dr): Likewise.
3331 (i386_length_and_rw_bits): Likewise.
3332 (i386_insert_aligned_watchpoint): Likewise.
3333 (i386_remove_aligned_watchpoint): Likewise.
3334 (i386_handle_nonaligned_watchpoint): Likewise.
3335 i386_update_inferior_debug_regs(): Likewise.
3336 (i386_dr_insert_watchpoint): Likewise.
3337 (i386_dr_remove_watchpoint): Likewise.
3338 (i386_dr_region_ok_for_watchpoint): Likewise.
3339 (i386_dr_stopped_data_address): Likewise.
3340 (i386_dr_stopped_by_watchpoint): Likewise.
3341
8f26655c
GB
33422014-06-19 Gary Benson <gbenson@redhat.com>
3343
3344 * i386-low.c (i386_dr_show): Renamed to
3345 i386_show_dr and made static. All uses updated.
3346 (i386_dr_length_and_rw_bits): Renamed to
3347 i386_length_and_rw_bits and made static.
3348 All uses updated.
3349 (i386_dr_insert_aligned_watchpoint): Renamed to
3350 i386_insert_aligned_watchpoint and made static.
3351 All uses updated.
3352 (i386_dr_remove_aligned_watchpoint): Renamed to
3353 i386_remove_aligned_watchpoint and made static.
3354 All uses updated.
3355 (i386_dr_update_inferior_debug_regs): Renamed to
3356 i386_update_inferior_debug_regs and made static.
3357 All uses updated.
3358
b9228891
GB
33592014-06-18 Gary Benson <gbenson@redhat.com>
3360
5171def3
GB
3361 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3362 (i386_dr_low_can_set_control): Likewise.
3363 (i386_get_debug_register_length): Likewise.
3364 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3365 (i386_dr_low_can_set_control): Likewise.
3366 (i386_get_debug_register_length): Likewise.
3367
33682014-06-17 Gary Benson <gbenson@redhat.com>
3369
b9228891
GB
3370 * i386-low.h (i386-dregs.h): New include.
3371 (DR_FIRSTADDR): Now in i386-dregs.h.
3372 (DR_LASTADDR): Likewise.
3373 (DR_NADDR): Likewise.
3374 (DR_STATUS): Likewise.
3375 (DR_CONTROL): Likewise.
3376 (i386_debug_reg_state): Likewise.
3377 (i386_dr_insert_watchpoint): Likewise.
3378 (i386_dr_remove_watchpoint): Likewise.
3379 (i386_dr_region_ok_for_watchpoint): Likewise.
3380 (i386_dr_stopped_data_address): Likewise.
3381 (i386_dr_stopped_by_watchpoint): Likewise.
3382 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3383
4be83cc2
GB
33842014-06-18 Gary Benson <gbenson@redhat.com>
3385
3386 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3387 i386_dr_insert_watchpoint.
3388 (i386_low_remove_watchpoint): Renamed to
3389 i386_dr_remove_watchpoint.
3390 (i386_low_region_ok_for_watchpoint): Renamed to
3391 i386_dr_region_ok_for_watchpoint.
3392 (i386_low_stopped_data_address): Renamed to
3393 i386_dr_stopped_data_address.
3394 (i386_low_stopped_by_watchpoint): Renamed to
3395 i386_dr_stopped_by_watchpoint.
3396 * i386-low.c (i386_show_dr): Renamed to
3397 i386_dr_show and made nonstatic. All uses updated.
3398 (i386_length_and_rw_bits): Renamed to
3399 i386_dr_length_and_rw_bits and made nonstatic.
3400 All uses updated.
3401 (i386_insert_aligned_watchpoint): Renamed to
3402 i386_dr_insert_aligned_watchpoint and made nonstatic.
3403 All uses updated.
3404 (i386_remove_aligned_watchpoint): Renamed to
3405 i386_dr_remove_aligned_watchpoint and made nonstatic.
3406 All uses updated.
3407 (i386_update_inferior_debug_regs): Renamed to
3408 i386_dr_update_inferior_debug_regs and made nonstatic.
3409 All uses updated.
3410 (i386_low_insert_watchpoint): Renamed to
3411 i386_dr_insert_watchpoint. All uses updated.
3412 (i386_low_remove_watchpoint): Renamed to
3413 i386_dr_remove_watchpoint. All uses updated.
3414 (i386_low_region_ok_for_watchpoint): Renamed to
3415 i386_dr_region_ok_for_watchpoint. All uses updated.
3416 (i386_low_stopped_data_address): Renamed to
3417 i386_dr_stopped_data_address. All uses updated.
3418 (i386_low_stopped_by_watchpoint): Renamed to
3419 i386_dr_stopped_by_watchpoint. All uses updated.
3420
131aa0d4
GB
34212014-06-18 Gary Benson <gbenson@redhat.com>
3422
3423 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3424 (i386_dr_low_can_set_control): Likewise.
3425 (i386_insert_aligned_watchpoint): New check.
3426
d9305f7f
GB
34272014-06-18 Gary Benson <gbenson@redhat.com>
3428
3429 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3430 Renamed to state.
3431
e927c9fc
GB
34322014-06-18 Gary Benson <gbenson@redhat.com>
3433
3434 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3435 instead of fatal and error.
3436 (i386_handle_nonaligned_watchpoint): Likewise.
3437
1b6d4134
GB
34382014-06-18 Gary Benson <gbenson@redhat.com>
3439
3440 * i386-low.c (i386_get_debug_register_length): New macro.
3441 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3442 (i386_show_dr): Use debug_printf instead of fprintf. Use
3443 phex to format values.
3444
6e62758f
GB
34452014-06-18 Gary Benson <gbenson@redhat.com>
3446
3447 * i386-low.h: Comment changes.
3448 * i386-low.c: Likewise.
3449
fc6e2f03
GB
34502014-06-18 Gary Benson <gbenson@redhat.com>
3451
3452 * i386-low.c: Whitespace changes.
3453
f9d1eeed
TT
34542014-06-12 Tom Tromey <tromey@redhat.com>
3455
3456 * utils.c (freeargv): Remove.
3457
0b04e523
TT
34582014-06-12 Tom Tromey <tromey@redhat.com>
3459
3460 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3461 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3462 (parse_debug_format_options): Likewise.
3463 (gdbserver_usage): Likewise.
3464 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3465 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3466 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3467 against libiberty.
3468 ($(LIBGNU)): Depend on libiberty.
3469 (all-lib): Recurse into all subdirs.
3470 (install-only): Invoke "install" target in subdirs.
3471 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3472 targets.
3473 * configure: Rebuild.
3474 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3475 for vasprintf, vsnprintf, or gettimeofday.
3476 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3477 srv_tgtobj.
3478
270c9937
JB
34792014-06-05 Joel Brobecker <brobecker@adacore.com>
3480
3481 * development.sh: Delete.
3482 * Makefile.in (config.status): Adjust dependency on development.sh.
3483 * configure.ac: Adjust development.sh source call.
3484 * configure: Regenerate.
3485
0a261ed8
PA
34862014-06-02 Pedro Alves <palves@redhat.com>
3487
3488 * ax.c (gdb_free_agent_expr): New function.
3489 * ax.h (gdb_free_agent_expr): New declaration.
3490 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3491 list.
3492 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3493 static.
3494 (clear_breakpoint_conditions_and_commands): New function.
3495 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3496 (clear_breakpoint_conditions_and_commands): New declaration.
3497
e9dae05e
RR
34982014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3499
3500 * linux-aarch64-low.c (asm/ptrace.h): Include.
3501
5876f503
JK
35022014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3503
3504 Fix TLS access for -static -pthread.
3505 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3506 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3507 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3508
802e8e6d
PA
35092014-05-20 Pedro Alves <palves@redhat.com>
3510
3511 * linux-aarch64-low.c (aarch64_insert_point)
3512 (aarch64_remove_point): No longer check whether the type is
3513 supported here. Adjust to new interface.
3514 (the_low_target): Install aarch64_supports_z_point_type as
3515 supports_z_point_type method.
3516 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3517 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3518 instead of a Z packet char. Adjust.
3519 (arm_supports_z_point_type): New function.
3520 (arm_insert_point, arm_remove_point): Adjust to new interface.
3521 (the_low_target): Install arm_supports_z_point_type.
3522 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3523 (cris_insert_point, cris_remove_point): Adjust to new interface.
3524 Don't check whether the type is supported here.
3525 (the_low_target): Install cris_supports_z_point_type.
3526 * linux-low.c (linux_supports_z_point_type): New function.
3527 (linux_insert_point, linux_remove_point): Adjust to new interface.
3528 * linux-low.h (struct linux_target_ops) <insert_point,
3529 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3530 raw_breakpoint pointer parameter.
3531 <supports_z_point_type>: New method.
3532 * linux-mips-low.c (mips_supports_z_point_type): New function.
3533 (mips_insert_point, mips_remove_point): Adjust to new interface.
3534 Use mips_supports_z_point_type.
3535 (the_low_target): Install mips_supports_z_point_type.
3536 * linux-ppc-low.c (the_low_target): Install NULL as
3537 supports_z_point_type method.
3538 * linux-s390-low.c (the_low_target): Install NULL as
3539 supports_z_point_type method.
3540 * linux-sparc-low.c (the_low_target): Install NULL as
3541 supports_z_point_type method.
3542 * linux-x86-low.c (x86_supports_z_point_type): New function.
3543 (x86_insert_point): Adjust to new insert_point interface. Use
3544 insert_memory_breakpoint. Adjust to new
3545 i386_low_insert_watchpoint interface.
3546 (x86_remove_point): Adjust to remove_point interface. Use
3547 remove_memory_breakpoint. Adjust to new
3548 i386_low_remove_watchpoint interface.
3549 (the_low_target): Install x86_supports_z_point_type.
3550 * lynx-low.c (lynx_target_ops): Install NULL as
3551 supports_z_point_type callback.
3552 * nto-low.c (nto_supports_z_point_type): New.
3553 (nto_insert_point, nto_remove_point): Adjust to new interface.
3554 (nto_target_ops): Install nto_supports_z_point_type.
3555 * mem-break.c: Adjust intro comment.
3556 (struct raw_breakpoint) <raw_type, size>: New fields.
3557 <inserted>: Update comment.
3558 <shlib_disabled>: Delete field.
3559 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3560 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3561 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3562 (raw_bkpt_type_to_target_hw_bp_type): New function.
3563 (find_enabled_raw_code_breakpoint_at): New function.
3564 (find_raw_breakpoint_at): New type and size parameters. Use them.
3565 (insert_memory_breakpoint): New function, based off
3566 set_raw_breakpoint_at.
3567 (remove_memory_breakpoint): New function.
3568 (set_raw_breakpoint_at): Reimplement.
3569 (set_breakpoint): New, based on set_breakpoint_at.
3570 (set_breakpoint_at): Reimplement.
3571 (delete_raw_breakpoint): Go through the_target->remove_point
3572 instead of assuming memory breakpoints.
3573 (find_gdb_breakpoint_at): Delete.
3574 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3575 (find_gdb_breakpoint): New function.
3576 (set_gdb_breakpoint_at): Delete.
3577 (z_type_supported): New function.
3578 (set_gdb_breakpoint_1): New function, loosely based off
3579 set_gdb_breakpoint_at.
3580 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3581 (delete_gdb_breakpoint_at): Delete.
3582 (delete_gdb_breakpoint_1): New function, loosely based off
3583 delete_gdb_breakpoint_at.
3584 (delete_gdb_breakpoint): New function.
3585 (clear_gdb_breakpoint_conditions): Rename to ...
3586 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3587 breakpoint.
3588 (add_condition_to_breakpoint): Make static.
3589 (add_breakpoint_condition): Take a struct breakpoint pointer
3590 instead of an address. Adjust.
3591 (gdb_condition_true_at_breakpoint): Rename to ...
3592 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3593 z_type parameter.
3594 (gdb_condition_true_at_breakpoint): Reimplement.
3595 (add_breakpoint_commands): Take a struct breakpoint pointer
3596 instead of an address. Adjust.
3597 (gdb_no_commands_at_breakpoint): Rename to ...
3598 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3599 parameter. Return true if no breakpoint was found. Change debug
3600 output.
3601 (gdb_no_commands_at_breakpoint): Reimplement.
3602 (run_breakpoint_commands): Rename to ...
3603 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3604 and change return type to boolean.
3605 (run_breakpoint_commands): New function.
3606 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3607 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3608 breakpoint. Go through the_target->remove_point instead of
3609 assuming memory breakpoint.
3610 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3611 software and hardware breakpoints.
3612 (reinsert_raw_breakpoint): Go through the_target->insert_point
3613 instead of assuming memory breakpoint.
3614 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3615 software and hardware breakpoints.
3616 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3617 Check both software and hardware breakpoints.
3618 (validate_inserted_breakpoint): Assert the breakpoint is a
3619 software breakpoint. Set the inserted flag to -1 instead of
3620 setting shlib_disabled.
3621 (delete_disabled_breakpoints): Adjust.
3622 (validate_breakpoints): Only validate software breakpoints.
3623 Adjust to inserted flag change.
3624 (check_mem_read, check_mem_write): Skip breakpoint types other
3625 than software breakpoints. Adjust to inserted flag change.
3626 * mem-break.h (enum raw_bkpt_type): New enum.
3627 (raw_breakpoint, struct process_info): Forward declare.
3628 (Z_packet_to_target_hw_bp_type): Delete declaration.
3629 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3630 (set_gdb_breakpoint, delete_gdb_breakpoint)
3631 (clear_breakpoint_conditions): New declarations.
3632 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3633 (breakpoint_inserted_here): Update comment.
3634 (add_breakpoint_condition, add_breakpoint_commands): Replace
3635 address parameter with a breakpoint pointer parameter.
3636 (gdb_breakpoint_here): Update comment.
3637 (delete_gdb_breakpoint_at): Delete.
3638 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3639 * server.c (process_point_options): Take a struct breakpoint
3640 pointer instead of an address. Adjust.
3641 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3642 delete_gdb_breakpoint.
3643 * spu-low.c (spu_target_ops): Install NULL as
3644 supports_z_point_type method.
3645 * target.h: Include mem-break.h.
3646 (struct target_ops) <prepare_to_access_memory>: Update comment.
3647 <supports_z_point_type>: New field.
3648 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3649 instead of a char. Also take a raw breakpoint pointer.
3650 * win32-arm-low.c (the_low_target): Install NULL as
3651 supports_z_point_type.
3652 * win32-i386-low.c (i386_supports_z_point_type): New function.
3653 (i386_insert_point, i386_remove_point): Adjust to new interface.
3654 (the_low_target): Install i386_supports_z_point_type.
3655 * win32-low.c (win32_supports_z_point_type): New function.
3656 (win32_insert_point, win32_remove_point): Adjust to new interface.
3657 (win32_target_ops): Install win32_supports_z_point_type.
3658 * win32-low.h (struct win32_target_ops):
3659 <supports_z_point_type>: New method.
3660 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3661 instead of a char. Also take a raw breakpoint pointer.
3662
932539e3
PA
36632014-05-20 Pedro Alves <palves@redhat.com>
3664
3665 * mem-break.h: Include break-common.h.
3666 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3667 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3668 (Z_packet_to_target_hw_bp_type): New declaration.
3669 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3670 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3671 (Z_PACKET_ACCESS_WP): Delete macros.
3672 (Z_packet_to_hw_type): Delete function.
3673 * i386-low.h: Don't include break-common.h here.
3674 (Z_packet_to_hw_type): Delete declaration.
3675 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3676 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3677 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3678 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3679 * linux-aarch64-low.c: Don't include break-common.h here.
3680 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3681 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3682 (Z_packet_to_target_hw_bp_type): Delete function.
3683 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3684 function.
3685 (mips_insert_point, mips_remove_point): Use
3686 Z_packet_to_target_hw_bp_type.
3687
4ff0d3d8
PA
36882014-05-20 Pedro Alves <palves@redhat.com>
3689
3690 * linux-aarch64-low.c: Include break-common.h.
3691 (enum target_point_type): Delete.
3692 (Z_packet_to_point_type): Rename to ...
3693 (Z_packet_to_target_hw_bp_type): ... this, and return a
3694 target_hw_bp_type instead.
3695 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3696 instead of an enum target_point_type.
3697 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3698 breakpoint type.
3699 (aarch64_dr_state_insert_one_point)
3700 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3701 (aarch64_handle_aligned_watchpoint)
3702 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3703 Take an enum target_hw_bp_type instead of an enum
3704 target_point_type.
3705 (aarch64_supports_z_point_type): New function.
3706 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3707 use Z_packet_to_target_hw_bp_type.
3708
786dc519
JB
37092014-05-20 Joel Brobecker <brobecker@adacore.com>
3710
3711 * configure.ac: Only use -Werror by default when DEVELOPMENT
3712 is true.
3713 * configure: Regenerate.
3714
9e0aa64f
JK
37152014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3716
3717 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3718 * linux-x86-low.c (X86_64_USER_REGS): New.
3719 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3720
2b577b92
YQ
37212014-04-28 Yao Qi <yao@codesourcery.com>
3722
3723 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3724 name.
3725
94611da2
PA
37262014-04-25 Pedro Alves <palves@redhat.com>
3727
3728 PR server/16255
3729 * linux-low.c (linux_attach_fail_reason_string): New function.
3730 (linux_attach_lwp): Delete.
3731 (linux_attach_lwp_1): Rename to ...
3732 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3733 argument. Remove "initial" parameter. Return int instead of
3734 void. Don't error or warn here.
3735 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3736 failure to attach to the tgid. Call warning when failing to
3737 attach to an lwp.
3738 * linux-low.h (linux_attach_lwp): 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_fail_reason_string): New declaration.
3742 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3743 interface change. Use linux_attach_fail_reason_string.
3744
01f9f808
MS
37452014-04-24 Michael Sturm <michael.sturm@mintel.com>
3746 Walfred Tedeschi <walfred.tedeschi@intel.com>
3747
3748 * Makefile.in: Added rules to handle new files
3749 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3750 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3751 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3752 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3753 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3754 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3755 x32-avx512-linux.o.
3756 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3757 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3758 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3759 i386/x32-avx512.xml.
3760 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3761 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3762 i386/x32-avx512-linux.xml.
3763 * i387-fp.c (num_avx512_k_registers): New constant for number
3764 of K registers.
3765 (num_avx512_zmmh_low_registers): New constant for number of
3766 lower ZMM registers (0-15).
3767 (num_avx512_zmmh_high_registers): New constant for number of
3768 higher ZMM registers (16-31).
3769 (num_avx512_ymmh_registers): New contant for number of higher
3770 YMM registers (ymm16-31 added by avx521 on x86_64).
3771 (num_avx512_xmm_registers): New constant for number of higher
3772 XMM registers (xmm16-31 added by AVX512 on x86_64).
3773 (struct i387_xsave): Add space for AVX512 registers.
3774 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3775 Add code to handle AVX512 registers.
3776 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3777 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3778 prototypei from generated file.
3779 (tdesc_amd64_avx512_linux): Likewise.
3780 (init_registers_x32_avx512_linux): Likewise.
3781 (tdesc_x32_avx512_linux): Likewise.
3782 (init_registers_i386_avx512_linux): Likewise.
3783 (tdesc_i386_avx512_linux): Likewise.
3784 (x86_64_regmap): Add AVX512 registers.
3785 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3786 mask.
3787 (initialize_low_arch): Add code to initialize AVX512 registers.
3788
51aa91f9
PA
37892014-04-23 Pedro Alves <palves@redhat.com>
3790
3791 * mem-break.c (find_gdb_breakpoint_at): Make static.
3792 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3793
a4165e94
PA
37942014-04-23 Pedro Alves <palves@redhat.com>
3795
3796 * i386-low.c: Don't include break-common.h here.
3797 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3798 prototype to take target_hw_bp_type as argument instead of a Z
3799 packet char.
3800 * i386-low.h: Include break-common.h here.
3801 (Z_packet_to_hw_type): Declare.
3802 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3803 prototypes.
3804 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3805 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3806 (x86_remove_point): Convert the packet number to a
3807 target_hw_bp_type before calling i386_low_remove_watchpoint.
3808 * win32-i386-low.c (i386_insert_point): Convert the packet number
3809 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3810 (i386_remove_point): Convert the packet number to a
3811 target_hw_bp_type before calling i386_low_remove_watchpoint.
3812
b8acf843
PA
38132014-04-23 Pedro Alves <palves@redhat.com>
3814
3815 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3816
d708bcd1
PA
38172014-04-10 Pedro Alves <palves@redhat.com>
3818
3819 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3820 Check if the condition or command is NULL before checking if the
3821 breakpoint is known. On success, return true.
3822 * mem-break.h (add_breakpoint_condition): Document return.
3823 (add_breakpoint_commands): Add describing comment.
3824 * server.c (skip_to_semicolon): New function.
3825 (process_point_options): Use it.
3826
2eec7d5b
PA
38272014-04-09 Pedro Alves <palves@redhat.com>
3828
3829 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3830 to lwpid_of.
3831
fa96cb38
PA
38322014-02-27 Pedro Alves <palves@redhat.com>
3833
3834 PR 12702
3835 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3836 macros.
3837 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3838 output.
3839 (last_thread_of_process_p): Take a PID argument instead of a
3840 thread pointer.
3841 (linux_wait_for_lwp): Delete.
3842 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3843 functions.
3844 (linux_low_filter_event): New function, party factored out from
3845 linux_wait_for_event.
3846 (linux_wait_for_event): Rename to ...
3847 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3848 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3849 sigsuspend. Check for zombie leaders.
3850 (linux_wait_for_event): Reimplement as wrapper around
3851 linux_wait_for_event_filtered.
3852 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3853 a normal or signal exit is seen, it's the whole process exiting.
3854 (wait_for_sigstop): No longer a for_each_inferior callback.
3855 Rewrite on top of linux_wait_for_event_filtered.
3856 (stop_all_lwps): Call wait_for_sigstop directly.
3857 * server.c (resume, handle_target_event): Handle
3858 TARGET_WAITKIND_NO_RESUMED.
3859
d763de10
JB
38602014-02-26 Joel Brobecker <brobecker@adacore.com>
3861
3862 * win32-low.c (psapi_get_dll_name,
3863 * win32_CreateToolhelp32Snapshot): Delete.
3864 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3865 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3866 Delete.
3867 (handle_load_dll): Add function description.
3868 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3869
850a0f76
JB
38702014-02-26 Joel Brobecker <brobecker@adacore.com>
3871
3872 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3873 Add comment.
3874 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3875 base address when calling win32_add_one_solib.
3876 (handle_load_dll): Delete local variable load_addr.
3877 Remove 0x1000 offset applied to DLL base address when calling
3878 win32_add_one_solib.
3879 (handle_unload_dll): Add comment.
3880
f25b3fc3
JB
38812014-02-26 Joel Brobecker <brobecker@adacore.com>
3882
3883 * win32-low.c (win32_add_all_dlls): Renames
3884 win32_ensure_ntdll_loaded. Rewrite function documentation.
3885 Adjust implementation to always load all DLLs.
3886 Add 0x1000 offset to DLL base address when calling
3887 win32_add_one_solib.
3888 (child_initialization_done): New static global.
3889 (do_initial_child_stuff): Set child_initialization_done to
3890 zero during child initialization, and 1 after. Replace call
3891 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3892 Add comment.
3893 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3894 (handle_unload_dll): Add function documentation.
3895 (get_child_debug_event): Ignore load and unload DLL events
3896 during child initialization.
3897
d86d4aaf
DE
38982014-02-20 Doug Evans <dje@google.com>
3899
3bc32da3 3900 Remove global all_lwps.
d86d4aaf
DE
3901 * inferiors.h (ptid_of): Move here from linux-low.h.
3902 (pid_of, lwpid_of): Ditto.
3903 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3904 parameter is a struct thread_info * now.
3905 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3906 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3907 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3908 directly.
3909 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3910 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3911 * linux-arm-low.c (update_registers_callback): Update, "entry"
3912 parameter is a struct thread_info * now.
3913 Fetch lwpid from current_inferior directly.
3914 (arm_insert_point): Pass &all_threads to find_inferior instead of
3915 &all_lwps.
3916 (arm_remove_point): Ditto.
3917 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3918 (arm_prepare_to_resume): Fetch pid from thread.
3919 (arm_read_description): Fetch lwpid from current_inferior directly.
3920 * linux-low.c (all_lwps): Delete.
3921 (delete_lwp): Delete call to remove_inferior.
3922 (handle_extended_wait): Fetch lwpid from thread.
3923 (add_lwp): Don't set lwp->entry.id. Remove call to
3924 add_inferior_to_list.
3925 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3926 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3927 (kill_one_lwp_callback): Ditto.
3928 (linux_kill): Don't dereference NULL pointer.
3929 Fetch ptid,lwpid from thread.
3930 (get_detach_signal): Fetch ptid from thread.
3931 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3932 Simplify call to regcache_invalidate_thread.
3933 (delete_lwp_callback): Update, "entry" parameter is a
3934 struct thread_info * now. Fetch pid from thread.
3935 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3936 (status_pending_p_callback): Update, "entry" parameter is a
3937 struct thread_info * now. Fetch ptid from thread.
3938 (find_lwp_pid): Update, "entry" parameter is a
3939 struct thread_info * now.
3940 (linux_wait_for_lwp): Fetch pid from thread.
3941 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3942 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3943 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3944 (dequeue_one_deferred_signal): Ditto.
3945 (cancel_breakpoint): Fetch ptid from current_inferior.
3946 (linux_wait_for_event): Pass &all_threads to find_inferior,
3947 not &all_lwps. Fetch ptid, lwpid from thread.
3948 (count_events_callback): Update, "entry" parameter is a
3949 struct thread_info * now.
3950 (select_singlestep_lwp_callback): Ditto.
3951 (select_event_lwp_callback): Ditto.
3952 (cancel_breakpoints_callback): Ditto.
3953 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3954 not &all_lwps.
3955 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3956 (unsuspend_one_lwp): Update, "entry" parameter is a
3957 struct thread_info * now.
3958 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3959 not &all_lwps.
3960 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3961 Fetch lwpid from thread, not lwp.
3962 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3963 Pass &all_threads to find_inferior, not &all_lwps.
3964 (send_sigstop): Fetch lwpid from thread, not lwp.
3965 (send_sigstop_callback): Update, "entry" parameter is a
3966 struct thread_info * now.
3967 (suspend_and_send_sigstop_callback): Ditto.
3968 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3969 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3970 struct thread_info * now.
3971 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3972 from thread, lwp.
3973 (lwp_running): Update, "entry" parameter is a
3974 struct thread_info * now.
3975 (stop_all_lwps): Fetch ptid from thread.
3976 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3977 (linux_resume_one_lwp): Fetch lwpid from thread.
3978 (linux_set_resume_request): Update, "entry" parameter is a
3979 struct thread_info * now. Fetch pid, lwpid from thread.
3980 (resume_status_pending_p): Update, "entry" parameter is a
3981 struct thread_info * now.
3982 (need_step_over_p): Ditto. Fetch lwpid from thread.
3983 (start_step_over): Fetch lwpid from thread.
3984 (linux_resume_one_thread): Update, "entry" parameter is a
3985 struct thread_info * now. Fetch lwpid from thread.
3986 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3987 (proceed_one_lwp): Update, "entry" parameter is a
3988 struct thread_info * now. Fetch lwpid from thread.
3989 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3990 struct thread_info * now.
3991 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3992 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3993 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3994 directly.
3995 (regsets_store_inferior_registers): Ditto.
3996 (fetch_register, store_register): Ditto.
3997 (linux_read_memory, linux_write_memory): Ditto.
3998 (linux_request_interrupt): Ditto.
3999 (linux_read_auxv): Ditto.
4000 (linux_xfer_siginfo): Ditto.
4001 (linux_qxfer_spu): Ditto.
4002 (linux_qxfer_libraries_svr4): Ditto.
4003 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4004 moved to inferiors.h.
4005 (get_lwp): Delete.
4006 (get_thread_lwp): Update.
4007 (struct lwp_info): Delete member "entry". Simplify comment for
4008 member "thread".
4009 (all_lwps): Delete.
4010 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4011 current_inferior directly.
4012 (update_watch_registers_callback): Update, "entry" parameter is a
4013 struct thread_info * now. Fetch pid from thread.
4014 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4015 (mips_insert_point): Fetch lwpid from current_inferior.
4016 Pass &all_threads to find_inferior, not &all_lwps.
4017 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4018 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4019 directly.
4020 (mips_stopped_data_address): Ditto.
4021 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4022 directly.
4023 * linux-tile-low.c (tile_arch_setup): Ditto.
4024 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4025 (update_debug_registers_callback): Update, "entry" parameter is a
4026 struct thread_info * now. Fetch pid from thread.
4027 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4028 Pass &all_threads to find_inferior, not &all_lwps.
4029 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4030 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4031 Pass &all_threads to find_inferior, not &all_lwps.
4032 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4033 (i386_dr_low_get_status): Ditto.
4034 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4035 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4036 (x86_linux_read_description): Ditto.
4037 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4038
3b8361aa
DE
40392014-02-20 Doug Evans <dje@google.com>
4040
4041 * inferiors.c (get_first_inferior): Fix buglet.
4042
f7667f0d
DE
40432014-02-19 Doug Evans <dje@google.com>
4044
4045 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4046 * inferiors.c (add_thread): Change result type to struct thread_info *.
4047 All callers updated.
4048 (add_lwp): Call add_thread here instead of in callers.
4049 All callers updated.
4050 * linux-low.h (get_lwp_thread): Rewrite.
4051 (struct lwp_info): New member "thread".
4052
b3312d80
DE
40532014-02-19 Doug Evans <dje@google.com>
4054
4055 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4056 All callers updated.
4057
ecc6f45c
DE
40582014-02-19 Doug Evans <dje@google.com>
4059
4060 * inferiors.c (add_thread): Fix whitespace.
4061
649ebbca
DE
40622014-02-19 Doug Evans <dje@google.com>
4063
4064 * dll.c (clear_dlls): Replace accessing list implemention details
4065 with API function.
4066 * gdbthread.h (get_first_thread): Declare.
4067 * inferiors.c (for_each_inferior_with_data): New function.
4068 (get_first_thread): New function.
4069 (find_thread_ptid): Simplify.
4070 (get_first_inferior): New function.
4071 (clear_list): Delete.
4072 (one_inferior_p): New function.
4073 (clear_inferior_list): New function.
4074 (clear_inferiors): Update.
4075 * inferiors.h (for_each_inferior_with_data): Declare.
4076 (clear_inferior_list): Declare.
4077 (one_inferior_p): Declare.
4078 (get_first_inferior): Declare.
4079 * linux-low.c (linux_wait_for_event): Replace accessing list
4080 implemention details with API function.
4081 * server.c (target_running): Ditto.
4082 (accumulate_file_name_length): New function.
4083 (emit_dll_description): New function.
4084 (handle_qxfer_libraries): Replace accessing list implemention
4085 details with API function.
4086 (handle_qxfer_threads_worker): New function.
4087 (handle_qxfer_threads_proper): Replace accessing list implemention
4088 details with API function.
4089 (handle_query): Ditto.
4090 (visit_actioned_threads_callback_ftype): New typedef.
4091 (visit_actioned_threads_data): New struct.
4092 (visit_actioned_threads): Rewrite to be find_inferior callback.
4093 (resume): Call find_inferior.
4094 (handle_status): Replace accessing list implemention
4095 details with API function.
4096 (process_serial_event): Replace accessing list implemention details
4097 with API function.
4098 * target.c (set_desired_inferior): Replace accessing list implemention
4099 details with API function.
4100 * tracepoint.c (same_process_p): New function.
4101 (gdb_agent_about_to_close): Replace accessing list implemention
4102 details with API function.
4103 * win32-low.c (child_delete_thread): Replace accessing list
4104 implemention details with API function.
4105 (match_dll_by_basename): New function.
4106 (dll_is_loaded_by_basename): New function.
4107 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4108 details call to dll_is_loaded_by_basename.
4109
80894984
DE
41102014-02-19 Doug Evans <dje@google.com>
4111
4112 * dll.h (struct dll_info): Add comment.
4113 * gdbthread.h (struct thread_info): Add comment.
4114 (current_ptid): Simplify.
4115 * inferiors.c (add_process): Update.
4116 (remove_process): Update.
4117 * inferiors.h (struct process_info): Rename member "head" to "entry".
4118 * linux-low.c (delete_lwp): Update.
4119 (add_lwp): Update.
4120 (last_thread_of_process_p): Update.
4121 (kill_one_lwp_callback, linux_kill): Update.
4122 (status_pending_p_callback): Update.
4123 (wait_for_sigstop): Update. Simplify read of ptid.
4124 (start_step_over): Update.
4125 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4126 (get_lwp_thread): Update.
4127 (struct lwp_info): Rename member "head" to "entry".
4128 * regcache.h (inferior_list_entry): Delete.
4129 * server.c (kill_inferior_callback): Update.
4130 (detach_or_kill_inferior_callback): Update.
4131 (print_started_pid): Update.
4132 (print_attached_pid): Update.
4133 (process_serial_event): Simplify read of ptid.
4134 * thread-db.c (thread_db_create_event): Update.
4135 (thread_db_get_tls_address): Update.
4136 * win32-low.c (current_inferior_ptid): Simplify.
4137
46917d26
TT
41382014-02-19 Tom Tromey <tromey@redhat.com>
4139
4140 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4141 argument.
4142 (target_supports_btrace): Update.
4143
0759a81e
YQ
41442014-02-14 Yao Qi <yao@codesourcery.com>
4145
4146 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4147 (rsp-low-ipa.o): New target.
4148
a7191e8b
TT
41492014-02-12 Tom Tromey <tromey@redhat.com>
4150
4151 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4152 convert_ascii_to_int.
4153 * regcache.c (registers_to_string): Likewise.
4154 * remote-utils.c (decode_M_packet): Likewise.
4155 * server.c (process_serial_event): Likewise.
4156
ff0e980e
TT
41572014-02-12 Tom Tromey <tromey@redhat.com>
4158
4159 * server.c (handle_query, handle_v_run): Use hex2bin, not
4160 unhexify.
4161 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4162
e9371aff
TT
41632014-02-12 Tom Tromey <tromey@redhat.com>
4164
4165 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4166 convert_int_to_ascii.
4167 * regcache.c (registers_to_string, collect_register_as_string):
4168 Likewise.
4169 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4170 Likewise.
4171 * server.c (process_serial_event): Likewise.
4172 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4173 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4174
971dc0b8
TT
41752014-02-12 Tom Tromey <tromey@redhat.com>
4176
4177 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4178 bin2hex, not hexify.
4179 * tracepoint.c (cmd_qtstatus): Likewise.
4180
0a822afb
TT
41812014-02-12 Tom Tromey <tromey@redhat.com>
4182
4183 * remote-utils.c (monitor_output): Pass explicit length to
4184 hexify.
4185
9c3d6531
TT
41862014-02-12 Tom Tromey <tromey@redhat.com>
4187
4188 * tracepoint.c: Include rsp-low.h.
4189 * server.c: Include rsp-low.h.
4190 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4191 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4192 declare.
4193 * remote-utils.c: Include rsp-low.h.
4194 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4195 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4196 (convert_int_to_ascii, convert_ascii_to_int): Move to
4197 common/rsp-low.c.
4198 * regcache.c: Include rsp-low.h.
4199 * ax.c: Include rsp-low.h.
4200 * Makefile.in (SFILES): Add common/rsp-low.c.
4201 (OBS): Add rsp-low.o.
4202 (rsp-low.o): New target.
4203
01fd3ea5
TT
42042014-02-12 Tom Tromey <tromey@redhat.com>
4205
4206 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4207 Include print-utils.h.
4208 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4209 (plongest, thirty_two, phex_nz): Remove.
4210 * Makefile.in (SFILES): Add common/print-utils.c.
4211 (OBS): Add print-utils.o.
4212 (print-utils-ipa.o): New target.
4213 (print-utils.o): New target.
4214 (IPA_OBJS): Add print-utils-ipa.o.
4215
e99dc820
TT
42162014-02-06 Tom Tromey <tromey@redhat.com>
4217
4218 * Makefile.in (SFILES): Fix indentation.
4219
ee1e2d4f
DE
42202014-02-05 Doug Evans <dje@google.com>
4221
4222 * linux-low.c (linux_wait_for_event): Improve comment.
4223 (linux_wait_1): Keep current_inferior in sync with event_child.
4224
f5a02773
DE
42252014-01-22 Doug Evans <dje@google.com>
4226
4227 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4228
87ce2a04
DE
42292014-01-22 Doug Evans <dje@google.com>
4230
4231 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4232 * configure: Regenerate.
4233 * config.in: Regenerate.
4234 * Makefile.in (SFILES): Add debug.c.
4235 (OBS): Add debug.o.
4236 * debug.c: New file.
4237 * debug.h: New file.
4238 * linux-aarch64-low.c (*): Update all debugging printfs to use
4239 debug_printf instead of fprintf.
4240 * linux-arm-low.c (*): Ditto.
4241 * linux-cris-low.c (*): Ditto.
4242 * linux-crisv32-low.c (*): Ditto.
4243 * linux-m32r-low.c (*): Ditto.
4244 * linux-sparc-low.c (*): Ditto.
4245 * linux-x86.c (*): Ditto.
4246 * linux-low.c (*): Ditto.
4247 (linux_wait_1): Add calls to debug_enter, debug_exit.
4248 (linux_wait): Remove redundant debugging printf.
4249 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4250 (linux_resume, unstop_all_lwps): Ditto.
4251 * mem-break.c (*): Update all debugging printfs to use
4252 debug_printf instead of fprintf.
4253 * remote-utils.c (*): Ditto.
4254 * thread-db.c (*): Ditto.
4255 * server.c #include <ctype.h>, "gdb_vecs.h".
4256 (debug_threads): Moved to debug.c.
4257 (*): Update all debugging printfs to use debug_printf instead of
4258 fprintf.
4259 (start_inferior): Replace call to fflush with call to debug_flush.
4260 (monitor_show_help): Mention set debug-format.
4261 (parse_debug_format_options): New function.
4262 (handle_monitor_command): Handle "monitor set debug-format".
4263 (gdbserver_usage): Mention --debug-format.
4264 (main): Parse --debug-format.
4265 * server.h (debug_threads): Declaration moved to debug.h.
4266 #include "debug.h".
4267 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4268 trace_debug_1 that uses debug_printf.
4269 (tracepoint_look_up_symbols): Update all debugging printfs to use
4270 debug_printf instead of fprintf.
4271
e671835b
BS
42722014-01-20 Baruch Siach <baruch@tkos.co.il>
4273
4274 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4275 sys/ptrace.h.
4276
b5737fa9
PA
42772014-01-17 Pedro Alves <palves@redhat.com>
4278
ea38d2a9 4279 PR build/16445
c7faa97a
PA
4280 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4281 defined after including gdb_proc_service.h.
b5737fa9 4282
40ed484e
DE
42832014-01-16 Doug Evans <dje@google.com>
4284
4285 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4286 (match_dll): Use it.
4287
969c39fb
MM
42882014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4289
4290 * target.h (target_ops) <read_btrace>: Change parameters and
4291 return type to allow error reporting.
4292 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4293 trace reading errors on.
4294 * linux-low.c (linux_low_read_btrace): Pass trace reading
4295 errors on.
4296 (linux_low_disable_btrace): New.
4297
ab7f45ba
DE
42982014-01-15 Doug Evans <dje@google.com>
4299
4300 * inferiors.c (thread_id_to_gdb_id): Delete.
4301 * inferiors.h (thread_id_to_gdb_id): Delete.
4302
66af0f44
EZ
43032014-01-13 Eli Zaretskii <eliz@gnu.org>
4304
4305 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4306 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4307 versions.
4308
9939e131
PA
43092014-01-08 Pedro Alves <palves@redhat.com>
4310
4311 * server.c (handle_status): Don't discard previous queued stop
4312 replies or thread's pending status here.
4313 (main) <disconnection>: Do it here instead.
4314
b7ea362b
PA
43152014-01-08 Pedro Alves <palves@redhat.com>
4316
4317 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4318 * server.c (visit_actioned_threads, handle_pending_status): New
4319 function.
4320 (handle_v_cont): Factor out parts to ...
4321 (resume): ... this new function. If in all-stop, and a thread
4322 being resumed has a pending status, report it without actually
4323 resuming.
4324 (myresume): Adjust to use the new 'resume' function.
4325 (clear_pending_status_callback, set_pending_status_callback)
4326 (find_status_pending_thread_callback): New functions.
4327 (handle_status): Handle the case of multiple threads having
4328 interesting statuses to report. Report threads' real last signal
4329 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4330 with an interesting thread to report the status for, instead of
4331 always reporting the status of the first thread.
4332
28498c42
JB
43332014-01-01 Joel Brobecker <brobecker@adacore.com>
4334
4335 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4336 * gdbreplay.c (gdbreplay_version): Likewise.
4337
f45c82da
YZ
43382013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4339
4340 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4341 iov.iov_len with the real length in use.
4342
379a5e2d
JB
43432013-12-13 Joel Brobecker <brobecker@adacore.com>
4344
4345 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4346 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4347 for all targets that use win32-low.c.
4348 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4349 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4350
4210d83e
PA
43512013-12-13 Pedro Alves <palves@redhat.com>
4352
4353 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4354 if equal to TARGET_WAITKIND_LOADED.
4355 * win32-low.c (cached_status): New static global.
4356 (win32_wait): Add declaration.
4357 (do_initial_child_stuff): Flush all initial pending debug events
4358 up to the initial breakpoint.
4359 (win32_wait): If CACHED_STATUS was set, return that instead
4360 of doing a real wait. Remove the code resuming the execution
4361 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4362 during the initial phase. Also remove the code changing
4363 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4364 TARGET_WAITKIND_STOPPED.
4365
e7f0d979
YQ
43662013-12-11 Yao Qi <yao@codesourcery.com>
4367
4368 * notif.c (handle_notif_ack): Return 0 if no notification
4369 matches.
4370
ebcf782c
DE
43712013-11-20 Doug Evans <dje@google.com>
4372
4373 * linux-low.c (linux_set_resume_request): Fix comment.
4374
20ad9378
DE
43752013-11-20 Doug Evans <dje@google.com>
4376
4377 * linux-low.c (resume_status_pending_p): Tweak comment.
4378
a196ebeb
WT
43792013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4380
4381 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4382 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4383 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4384 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4385 (srv_amd64_regobj): Add amd64-mpx.o.
4386 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4387 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4388 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4389 * i387-fp.c (num_pl_bnd_register) Added constant.
4390 (num_pl_bnd_cfg_registers) Added constant.
4391 (struct i387_xsave) Added reserved area and MPX fields.
4392 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4393 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4394 function.
4395 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4396 (init_registers_amd64_mpx_linux): Declare new function.
4397 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4398 (x86_64_regmap): Add MPX registers.
4399 (x86_linux_read_description): Add MPX case.
4400 (initialize_low_arch): Initialize MPX targets.
4401
0080a2f6
TT
44022013-11-18 Tom Tromey <tromey@redhat.com>
4403
4404 * configure: Rebuild.
4405 * configure.ac: Don't check for stdlib.h.
4406 * gdbreplay.c: Unconditionally include stdlib.h.
4407
2978b111
TT
44082013-11-18 Tom Tromey <tromey@redhat.com>
4409
4410 * config.in: Rebuild.
4411 * configure: Rebuild.
4412 * configure.ac: Don't use AC_HEADER_DIRENT.
4413
a3d08894
TT
44142013-11-18 Tom Tromey <tromey@redhat.com>
4415
4416 * server.h: Don't check HAVE_STRING_H.
4417 * gdbreplay.c: Don't check HAVE_STRING_H.
4418 * configure: Rebuild.
4419
0a5dd17d
TT
44202013-11-18 Tom Tromey <tromey@redhat.com>
4421
4422 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4423 LIBGNU.
4424
1bd2f0ba
TT
44252013-11-08 Tom Tromey <tromey@redhat.com>
4426
4427 * configure, config.in: Rebuild.
4428 * configure.ac: Remove unused configury.
4429
3266f10b
TT
44302013-11-08 Tom Tromey <tromey@redhat.com>
4431
4432 * acinclude.m4: Include common.m4, codeset.m4.
4433 * configure, config.in: Rebuild.
4434 * configure.ac: Use GDB_AC_COMMON.
4435
6682d959
AA
44362013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4437
4438 * linux-s390-low.c (HWCAP_S390_TE): New define.
4439 (s390_arch_setup): Consider the TE field in the HWCAP for
4440 determining 'have_regset_tdb'.
4441
fd0a4d76
SDJ
44422013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4443
4444 PR gdb/16014
4445 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4446 call to sizeof.
4447
1a3d890b
PA
44482013-10-02 Pedro Alves <palves@redhat.com>
4449
4450 * server.c (process_serial_event): Don't output "GDBserver
4451 exiting" if GDB is connected through stdio.
4452 * target.c (mywait): Likewise, be silent if GDB is connected
4453 through stdio.
4454
97ad4581
JB
44552013-10-01 Joel Brobecker <brobecker@adacore.com>
4456
4457 * lynx-low.c (lynx_add_threads_after_attach): New function.
4458 (lynx_attach): Remove call to add_thread. Add call to
4459 lynx_add_threads_after_attach instead.
4460
5b4e221c
MF
44612013-09-28 Mike Frysinger <vapier@gentoo.org>
4462
4463 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4464 * config.in, configure: Regenerated.
4465
ee47b2f8
YQ
44662013-09-18 Yao Qi <yao@codesourcery.com>
4467
4468 PR server/15959
4469 * server.c (start_inferior): Clear 'resume_info'.
4470
d6707650 44712013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4472
d6707650
JW
4473 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4474 for each register.
4475
9243dd0e 44762013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4477
9243dd0e
JW
4478 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4479 linux-tile-low.o to srv_tgtobj.
4480
c623a6ef
WN
44812013-09-16 Will Newton <will.newton@linaro.org>
4482
4483 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4484 out regs.
4485
fb71d39e
PA
44862013-09-06 Pedro Alves <palves@redhat.com>
4487
4488 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4489 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4490 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4491 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4492 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4493 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4494
8e7e9910
PA
44952013-09-06 Pedro Alves <palves@redhat.com>
4496
4497 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4498 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4499
7c3a12ca
PA
45002013-09-06 Pedro Alves <palves@redhat.com>
4501
4502 * linux-amd64-ipa.c: Include tracepoint.h.
4503 * linux-i386-ipa.c: Include tracepoint.h.
4504
8eb3d7b6
RW
45052013-09-06 Ricard Wanderlof <ricardw@axis.com>
4506
4507 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4508 (ps_get_thread_area): New function.
4509
eddddb9d
RW
45102013-09-06 Ricard Wanderlof <ricardw@axis.com>
4511
4512 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4513 (initialize_low_arch): Call init_registers_crisv32 rather than
4514 init_register_crisv32.
4515
533b0600
PA
45162013-09-05 Pedro Alves <palves@redhat.com>
4517
4518 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4519 to ...
4520 * hostio.h: ... this new file.
4521 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4522 win32-low.c: Include hostio.h.
4523
0ce3d3b5
PA
45242013-09-05 Pedro Alves <palves@redhat.com>
4525
4526 * server.h (gdb_client_data, handler_func, callback_handler_func)
4527 (delete_file_handler, add_file_handler, append_callback_event)
4528 (delete_callback_event, start_event_loop, initialize_event_loop):
4529 Move to event-loop.h and include it.
4530 * event-loop.h: New file.
4531
799cdc37
PA
45322013-09-05 Pedro Alves <palves@redhat.com>
4533
4534 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4535 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4536 (loaded_dll, unloaded_dll): Move to ...
4537 * dll.h: ... this new file.
4538 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4539
6a6bbd9d
PA
45402013-09-05 Pedro Alves <palves@redhat.com>
4541
4542 * server.h (current_process, get_thread_process, all_processes)
4543 (add_inferior_to_list, for_each_inferior, current_inferior)
4544 (remove_inferior, add_process, remove_process, find_process_pid)
4545 (have_started_inferiors_p, have_attached_inferiors_p)
4546 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4547 (clear_inferiors, find_inferior, find_inferior_id)
4548 (inferior_target_data, set_inferior_target_data)
4549 (inferior_regcache_data, set_inferior_regcache_data): Move to
4550 inferiors.h, and include it.
4551 * inferiors.h: New file.
4552
f699aaba
PA
45532013-09-05 Pedro Alves <palves@redhat.com>
4554
4555 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4556 Move ...
72f4393d 4557 * ax.h: ... here.
f699aaba 4558
c144c7a0
PA
45592013-09-05 Pedro Alves <palves@redhat.com>
4560
4561 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4562 tracepoint.h.
4563 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4564 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4565 (handle_tracepoint_general_set, handle_tracepoint_query)
4566 (tracepoint_finished_step, tracepoint_was_hit)
4567 (release_while_stepping_state_list, current_traceframe)
4568 (in_readonly_region, traceframe_read_mem)
4569 (fetch_traceframe_registers, traceframe_read_sdata)
4570 (traceframe_read_info, struct fast_tpoint_collect_status)
4571 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4572 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4573 (supply_fast_tracepoint_registers)
4574 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4575 (ipa_tdesc, claim_trampoline_space)
4576 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4577 (agent_mem_read, agent_get_trace_state_variable_value)
4578 (agent_set_trace_state_variable_value, agent_tsv_read)
4579 (agent_mem_read_string, get_raw_reg_func_addr)
4580 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4581 * tracepoint.h: ... this new file.
4582
ff42e6ab
PA
45832013-09-05 Pedro Alves <palves@redhat.com>
4584
4585 * server.h (perror_with_name, error, fatal, warning, paddress)
4586 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4587 include it.
4588 * utils.h: New file.
4589
541af0f4
PA
45902013-09-05 Pedro Alves <palves@redhat.com>
4591
4592 * server.h (remote_debug, noack_mode, transport_is_reliable)
4593 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4594 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4595 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4596 (write_enn, initialize_async_io, enable_async_io)
4597 (disable_async_io, check_remote_input_interrupt_request)
4598 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4599 (dead_thread_notify, prepare_resume_reply)
4600 (decode_address_to_semicolon, decode_address, decode_m_packet)
4601 (decode_M_packet, decode_X_packet, decode_xfer_write)
4602 (decode_search_memory_packet, unhexify, hexify)
4603 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4604 (look_up_one_symbol, relocate_instruction)
4605 (monitor_output): Move to remote-utils.h, and include it.
4606 * remote-utils.h: New file.
4607
eebdf26b
PA
46082013-09-05 Pedro Alves <palves@redhat.com>
4609
4610 * server.h (_): Delete.
4611
3aafd2ff
PA
46122013-09-02 Pedro Alves <palves@redhat.com>
4613
4614 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4615 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4616 allocated.
4617 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4618
cee83bcb
PM
46192013-09-02 Pierre Muller <muller@sourceware.org>
4620
4621 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4622 or WriteProcessMemory complete successfully and handle
4623 ERROR_PARTIAL_COPY error.
4624
9a13b2fa
PA
46252013-09-02 Pedro Alves <palves@redhat.com>
4626
4627 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4628 error instead of EIO.
4629
602e3198
JK
46302013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4631
4632 PR server/15604
4633 * linux-low.c: Include filestuff.h.
4634 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4635 * lynx-low.c: Include filestuff.h.
4636 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4637 * server.c: Include filestuff.h.
4638 (main): Call notice_open_fds.
4639 * spu-low.c: Include filestuff.h.
4640 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4641
96d7229d
LM
46422013-08-22 Luis Machado <lgustavo@codesourcery.com>
4643
4644 * Makefile.in: Explain why ../target and ../nat are not
4645 listed as include file search paths.
4646 (linux-waitpid.o): New object file rule.
4647 * configure.srv (srv_native_linux_obj): New variable.
4648 Replace all occurrences of linux native object files with
4649 $srv_native_linux_obj.
4650 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4651 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4652 (linux_enable_event_reporting): Remove declaration.
4653 (my_waitpid): Moved to common/linux-waitpid.c.
4654 (linux_wait_for_event): Pass ptid when calling
4655 linux_enable_event_reporting.
4656 (linux_supports_tracefork_flag): Remove.
4657 (linux_enable_event_reporting): Likewise.
4658 (linux_tracefork_grandchild): Remove.
4659 (STACK_SIZE): Moved to common/linux-ptrace.c.
4660 (linux_tracefork_child): Remove.
4661 (linux_test_for_tracefork): Remove.
4662 (linux_look_up_symbols): Call linux_supports_traceclone.
4663 (initialize_low): Remove call to linux_test_for_tracefork.
4664 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4665 common/linux-ptrace.h.
4666 (PTRACE_TYPE_ARG4): Likewise.
4667 Include linux-ptrace.h.
4668
32940073
PA
46692013-08-21 Pedro Alves <palves@redhat.com>
4670
4671 * config.in: Renegerate.
4672
33b60d58 46732013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4674
33b60d58
LM
4675 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4676 (SFILES): Remove $(srcdir)/common/target-common.c and
4677 add $(srcdir)/target/waitstatus.c.
4678 (OBS): Remove target-common.o and add waitstatus.o.
4679 (server_h): Remove $(srcdir)/../common/target-common.h and
4680 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4681 and $(srcdir)/../target/waitstatus.h.
4682 (target-common.o): Remove.
4683 (waitstatus.o): New target object file.
4684 * target.h: Do not include target-common.h and
4685 include target/resume.h, target/wait.h and
4686 target/waitstatus.h.
4687
b8e1b30e
LM
46882013-08-13 Luis Machado <lgustavo@codesourcery.com>
4689
4690 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4691 to PTRACE_TYPE_ARG3.
4692 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4693 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4694 PTRACE_TYPE_ARG4.
4695 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4696 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4697
7a60ad40
YQ
46982013-07-27 Jie Zhang <jie@codesourcery.com>
4699 Daniel Jacobowitz <dan@codesourcery.com>
4700 Yao Qi <yao@codesourcery.com>
4701
4702 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4703 (mips-linux-watch.o): New rule.
4704 (mips_linux_watch_h): New variable.
4705 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4706 srv_tgtobj.
4707 * linux-mips-low.c: Include mips-linux-watch.h.
4708 (struct arch_process_info, struct arch_lwp_info): New.
4709 (update_watch_registers_callback): New function.
4710 (mips_linux_new_process, mips_linux_new_thread) New functions.
4711 (mips_linux_prepare_to_resume, mips_insert_point): New
4712 functions.
4713 (mips_remove_point, mips_stopped_by_watchpoint): New
4714 functions.
4715 (rsp_bp_type_to_target_hw_bp_type): New function.
4716 (mips_stopped_data_address): New function.
4717 (the_low_target): Add watchpoint support functions.
4718
de6f69ad
YQ
47192013-07-27 Yao Qi <yao@codesourcery.com>
4720
4721 * i386-low.c: Include break-common.h.
4722 (enum target_hw_bp_type): Remove.
4723
3360c0bf
LM
47242013-07-24 Luis Machado <lgustavo@codesourcery.com>
4725
4726 * Makefile.in (SFILES): /common/target-common.c.
4727 (OBS): Add target-common.o.
4728 (server_h): Add $(srcdir)/../common/target-common.h.
4729 (target-common.o): New target.
4730 * server.c (queue_stop_reply_callback): Free
4731 status string after use.
4732 * target.c (target_waitstatus_to_string): Remove.
4733 * target.h: Include target-common.h.
4734 (resume_kind): Likewise.
4735 (target_waitkind): Likewise.
4736 (target_waitstatus): Likewise.
4737 (TARGET_WNOHANG): Likewise.
4738
bd885420
YQ
47392013-07-04 Yao Qi <yao@codesourcery.com>
4740
4741 * Makefile.in (host_alias): Use @host_noncanonical@.
4742 (target_alias): Use @target_noncanonical@.
4743 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4744 ACX_NONCANONICAL_HOST.
4745 * configure: Regenerated.
4746
4747 Revert:
4748 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4749
4750 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4751 * configure: Rebuild.
4752 * Makefile.in (version_host, version_target): Get from configure.
4753 (version.c): Use $(version_host) and $(version_target).
4754
17ef446e
PA
47552013-07-03 Pedro Alves <palves@redhat.com>
4756
4757 * Makefile.in (config.status): Depend on development.sh.
4758 * acinclude.m4: Include libmcheck.m4.
4759 * configure: Regenerate.
4760
7a9a7487
MG
47612013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4762
4763 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4764 attribute inside the parentheses.
4765 (winapi_DebugSetProcessKillOnExit): Ditto.
4766 (winapi_DebugBreakProcess): Ditto.
4767 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 4768
49b64de6
MG
47692013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4770
4771 * notif.h (notif_event): Add a dummy member to avoid compiler
4772 errors.
4773
d5749ee7
PA
47742013-07-01 Pedro Alves <palves@redhat.com>
4775
4776 * hostio.c (HOSTIO_PATH_MAX): Define.
4777 (require_filename, handle_open, handle_unlink, handle_readlink):
4778 Use it.
4779
d8d2a3ee
PA
47802013-07-01 Pedro Alves <palves@redhat.com>
4781
4782 * server.h: Include "pathmax.h".
4783 * linux-low.c: Don't include sys/param.h.
4784 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4785 MAXPATHLEN.
4786 * win32-low.c: Don't include sys/param.h.
4787 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4788
bc7dea8d
PA
47892013-07-01 Pedro Alves <palves@redhat.com>
4790
4791 * event-loop.c: Don't check HAVE_UNISTD_H before including
4792 <unistd.h>.
4793 * gdbreplay.c: Likewise.
4794 * remote-utils.c: Likewise.
4795 * server.c: Likewise.
4796 * configure.ac: Don't check for unistd.h.
4797 * configure: Regenerate.
4798
d6c2da54
TT
47992013-06-28 Tom Tromey <tromey@redhat.com>
4800
4801 * Makefile.in (version.c): Use version.in, not
4802 common/version.in.
4803
257b6bec
MG
48042013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4805
4806 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4807 * configure: Rebuild.
4808 * Makefile.in (version_host, version_target): Get from configure.
4809 (version.c): Use $(version_host) and $(version_target).
4810
86ebe149
DK
48112013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4812
4813 Fix trace-status to output user name without trailing colon.
4814 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4815
f30aa5af
DK
48162013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4817
4818 Fix trace-status to output proper start-time and stop-time.
4819 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4820 output start time and stop time in hex as gdb expects.
4821
28a93511
YQ
48222013-06-26 Pedro Alves <pedro@codesourcery.com>
4823
4824 * tracepoint.c (build_traceframe_info_xml): Output trace state
4825 variables present in the trace buffer.
4826
01208463
TT
48272013-06-24 Tom Tromey <tromey@redhat.com>
4828
4829 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4830 create-version.sh.
4831 (version.o): Remove.
4832 * gdbreplay.c: Include version.h.
4833 (version, host_name): Don't declare.
4834 * server.h: Include version.h.
4835 (version, host_name): Don't declare.
4836
760256f9
PA
48372013-06-12 Pedro Alves <palves@redhat.com>
4838
4839 * linux-x86-low.c (linux_is_elf64): Delete global.
4840 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4841 with local linux_pid_exe_is_elf_64_file use.
4842
030031ee
PA
48432013-06-11 Pedro Alves <palves@redhat.com>
4844
4845 * linux-low.c (regset_disabled, disable_regset): New functions.
4846 (regsets_fetch_inferior_registers)
4847 (regsets_store_inferior_registers): Use them.
4848 (initialize_regsets_info); Don't allocate the disabled_regsets
4849 array here.
4850 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4851 comment.
4852
5da6eb0a
PA
48532013-06-11 Pedro Alves <palves@redhat.com>
4854
4855 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4856 xmalloc.
4857
7e5aaa09
PA
48582013-06-11 Pedro Alves <palves@redhat.com>
4859
4860 * linux-x86-low.c (initialize_low_arch): Call
4861 init_registers_x32_avx_linux.
4862
d878444c
JK
48632013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4864
4865 Fix compatibility with Android Bionic.
4866 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4867 it is not empty.
4868
3aee8918
PA
48692013-06-07 Pedro Alves <palves@redhat.com>
4870
5f2b57b5 4871 PR server/14823
3aee8918
PA
4872 * Makefile.in (OBS): Add tdesc.o.
4873 (IPA_OBJS): Add tdesc-ipa.o.
4874 (tdesc-ipa.o): New rule.
4875 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4876 interface.
4877 * linux-low.c (new_inferior): Delete.
4878 (disabled_regsets, num_regsets): Delete.
4879 (linux_add_process): Adjust to set the new per-process
4880 new_inferior flag.
4881 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4882 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4883 was a stop. When calling arch_setup, switch the current inferior
4884 to the thread that got an event.
4885 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4886 (regsets_fetch_inferior_registers)
4887 (regsets_store_inferior_registers): New regsets_info parameter.
4888 Adjust to use it.
4889 (linux_register_in_regsets): New regs_info parameter. Adjust to
4890 use it.
4891 (register_addr, fetch_register, store_register): New usrregs_info
4892 parameter. Adjust to use it.
4893 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4894 parameter regs_info. Adjust to use it.
4895 (linux_fetch_registers): Get the current inferior's regs_info, and
4896 adjust to use it.
4897 (linux_store_registers): Ditto.
4898 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4899 (initialize_low): Don't initialize the target_regsets here. Call
4900 initialize_low_arch.
4901 * linux-low.h (target_regsets): Delete declaration.
4902 (struct regsets_info): New.
4903 (struct usrregs_info): New.
4904 (struct regs_info): New.
4905 (struct process_info_private) <new_inferior>: New field.
4906 (struct linux_target_ops): Delete the num_regs, regmap, and
4907 regset_bitmap fields. New field regs_info.
4908 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4909 * i387-fp.c (num_xmm_registers): Delete.
4910 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4911 calls to new interface.
4912 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4913 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4914 Infer the number of xmm registers from the regcache's target
4915 description.
4916 * i387-fp.h (num_xmm_registers): Delete.
4917 * inferiors.c (add_thread): Don't install the thread's regcache
4918 here.
4919 * proc-service.c (gregset_info): Fetch the current inferior's
4920 regs_info. Adjust to use it.
4921 * regcache.c: Include tdesc.h.
4922 (register_bytes, reg_defs, num_registers)
4923 (gdbserver_expedite_regs): Delete.
4924 (get_thread_regcache): If the thread doesn't have a regcache yet,
4925 create one, instead of aborting gdbserver.
4926 (regcache_invalidate_one): Rename to ...
4927 (regcache_invalidate_thread): ... this.
4928 (regcache_invalidate_one): New.
4929 (regcache_invalidate): Only invalidate registers of the current
4930 process.
4931 (init_register_cache): Add target_desc parameter, and use it.
4932 (new_register_cache): Ditto. Assert the target description has a
4933 non zero registers_size.
4934 (regcache_cpy): Add assertions. Adjust.
4935 (realloc_register_cache, set_register_cache): Delete.
4936 (registers_to_string, registers_from_string): Adjust.
4937 (find_register_by_name, find_regno, find_register_by_number)
4938 (register_cache_size): Add target_desc parameter, and use it.
4939 (free_register_cache_thread, free_register_cache_thread_one)
4940 (regcache_release, register_cache_size): New.
4941 (register_size): Add target_desc parameter, and use it.
4942 (register_data, supply_register, supply_register_zeroed)
4943 (supply_regblock, supply_register_by_name, collect_register)
4944 (collect_register_as_string, collect_register_by_name): Adjust.
4945 * regcache.h (struct target_desc): Forward declare.
4946 (struct regcache) <tdesc>: New field.
4947 (init_register_cache, new_register_cache): Add target_desc
4948 parameter.
4949 (regcache_invalidate_thread): Declare.
4950 (regcache_invalidate_one): Delete declaration.
4951 (regcache_release): Declare.
4952 (find_register_by_number, register_cache_size, register_size)
4953 (find_regno): Add target_desc parameter.
4954 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4955 declarations.
4956 * remote-utils.c: Include tdesc.h.
4957 (outreg, prepare_resume_reply): Adjust.
4958 * server.c: Include tdesc.h.
4959 (gdbserver_xmltarget): Delete declaration.
4960 (get_features_xml, process_serial_event): Adjust.
4961 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4962 declare.
4963 (struct process_info) <tdesc>: New field.
4964 (ipa_tdesc): Declare.
4965 * tdesc.c: New file.
4966 * tdesc.h: New file.
4967 * tracepoint.c: Include tdesc.h.
4968 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4969 (get_context_regcache): Adjust to pass ipa_tdesc down.
4970 (do_action_at_tracepoint): Adjust to get the register cache size
4971 from the context regcache's description.
4972 (traceframe_walk_blocks): Adjust to get the register cache size
4973 from the current trace frame's description.
4974 (traceframe_get_pc): Adjust to get current trace frame's
4975 description and pass it down.
4976 (gdb_collect): Adjust to get the register cache size from the
4977 IPA's description.
4978 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4979 (gdbserver_xmltarget): Delete.
4980 (initialize_low_tracepoint): Set the ipa's target description.
4981 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4982 (initialize_low_tracepoint): Set the ipa's target description.
4983 * linux-x86-low.c: Include tdesc.h.
4984 [__x86_64__] (is_64bit_tdesc): New.
4985 (ps_get_thread_area, x86_get_thread_area): Use it.
4986 (i386_cannot_store_register): Rename to ...
4987 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4988 (i386_cannot_fetch_register): Rename to ...
4989 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4990 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4991 to new interface.
4992 (target_regsets): Rename to ...
4993 (x86_regsets): ... this.
4994 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4995 interface.
4996 (x86_siginfo_fixup): Use is_64bit_tdesc.
4997 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4998 (tdesc_x32_avx_linux, tdesc_x32_linux)
4999 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5000 Declare.
5001 (x86_linux_update_xmltarget): Delete.
5002 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5003 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5004 (AMD64_LINUX_USER64_CS): New.
5005 (x86_linux_read_description): New, based on
5006 x86_linux_update_xmltarget.
5007 (same_process_callback): New.
5008 (x86_arch_setup_process_callback): New.
5009 (x86_linux_update_xmltarget): New.
5010 (x86_regsets_info): New.
5011 (amd64_linux_regs_info): New.
5012 (i386_linux_usrregs_info): New.
5013 (i386_linux_regs_info): New.
5014 (x86_linux_regs_info): New.
5015 (x86_arch_setup): Reimplement.
5016 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5017 (x86_emit_ops): Ditto.
5018 (the_low_target): Adjust. Install x86_linux_regs_info,
5019 x86_cannot_fetch_register, and x86_cannot_store_register.
5020 (initialize_low_arch): New.
5021 * linux-ia64-low.c (tdesc_ia64): Declare.
5022 (ia64_fetch_register): Adjust.
5023 (ia64_usrregs_info, regs_info): New globals.
5024 (ia64_regs_info): New function.
5025 (the_low_target): Adjust.
5026 (initialize_low_arch): New function.
5027 * linux-sparc-low.c (tdesc_sparc64): Declare.
5028 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5029 Adjust.
5030 (sparc_arch_setup): New function.
5031 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5032 (the_low_target): Adjust.
5033 (initialize_low_arch): New function.
5034 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5035 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5036 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5037 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5038 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5039 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5040 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5041 (tdesc_powerpc_isa205_vsx64l): Declare.
5042 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5043 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5044 (ppc_set_pc, ppc_get_hwcap): Adjust.
5045 (ppc_usrregs_info): Forward declare.
5046 (!__powerpc64__) ppc_regmap_adjusted: New global.
5047 (ppc_arch_setup): Adjust to the current process'es target
5048 description.
5049 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5050 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5051 (ppc_store_evrregset): Adjust.
5052 (target_regsets): Rename to ...
5053 (ppc_regsets): ... this, and make static.
5054 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5055 (ppc_regs_info): New function.
5056 (the_low_target): Adjust.
5057 (initialize_low_arch): New function.
5058 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5059 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5060 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5061 (tdesc_s390x_linux64v2): Declare.
5062 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5063 (s390_fill_gregset, s390_store_last_break): Adjust.
5064 (target_regsets): Rename to ...
5065 (s390_regsets): ... this, and make static.
5066 (s390_get_pc, s390_set_pc): Adjust.
5067 (s390_get_hwcap): New target_desc parameter, and use it.
5068 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5069 (s390_arch_setup): Adjust to set the current process'es target
5070 description. Don't adjust the regmap.
5071 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5072 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5073 (regs_info_3264): New globals.
5074 (s390_regs_info): New function.
5075 (the_low_target): Adjust.
5076 (initialize_low_arch): New function.
5077 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5078 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5079 [__mips64] (init_registers_mips_linux)
5080 (init_registers_mips_dsp_linux): Delete defines.
5081 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5082 (have_dsp): New global.
5083 (mips_read_description): New, based on mips_arch_setup.
5084 (mips_arch_setup): Reimplement.
5085 (get_usrregs_info): New function.
5086 (mips_cannot_fetch_register, mips_cannot_store_register)
5087 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5088 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5089 (target_regsets): Rename to ...
5090 (mips_regsets): ... this, and make static.
5091 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5092 (dsp_regs_info, regs_info): New globals.
5093 (mips_regs_info): New function.
5094 (the_low_target): Adjust.
5095 (initialize_low_arch): New function.
5096 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5097 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5098 Declare.
5099 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5100 (arm_read_description): New, with bits factored from
5101 arm_arch_setup.
5102 (arm_arch_setup): Reimplement.
5103 (target_regsets): Rename to ...
5104 (arm_regsets): ... this, and make static.
5105 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5106 (arm_regs_info): New function.
5107 (the_low_target): Adjust.
5108 (initialize_low_arch): New function.
5109 * linux-m68k-low.c (tdesc_m68k): Declare.
5110 (target_regsets): Rename to ...
5111 (m68k_regsets): ... this, and make static.
5112 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5113 (m68k_regs_info): New function.
5114 (m68k_arch_setup): New function.
5115 (the_low_target): Adjust.
5116 (initialize_low_arch): New function.
5117 * linux-sh-low.c (tdesc_sharch): Declare.
5118 (target_regsets): Rename to ...
5119 (sh_regsets): ... this, and make static.
5120 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5121 (sh_regs_info, sh_arch_setup): New functions.
5122 (the_low_target): Adjust.
5123 (initialize_low_arch): New function.
5124 * linux-bfin-low.c (tdesc_bfin): Declare.
5125 (bfin_arch_setup): New function.
5126 (bfin_usrregs_info, regs_info): New globals.
5127 (bfin_regs_info): New function.
5128 (the_low_target): Adjust.
5129 (initialize_low_arch): New function.
5130 * linux-cris-low.c (tdesc_cris): Declare.
5131 (cris_arch_setup): New function.
5132 (cris_usrregs_info, regs_info): New globals.
5133 (cris_regs_info): New function.
5134 (the_low_target): Adjust.
5135 (initialize_low_arch): New function.
5136 * linux-cris-low.c (tdesc_crisv32): Declare.
5137 (cris_arch_setup): New function.
5138 (cris_regsets_info, 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-m32r-low.c (tdesc_m32r): Declare.
5143 (m32r_arch_setup): New function.
5144 (m32r_usrregs_info, regs_info): New globals.
5145 (m32r_regs_info): Adjust.
5146 (initialize_low_arch): New function.
5147 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5148 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5149 (tic6x_usrregs_info): Forward declare.
5150 (tic6x_read_description): New function, based on ...
5151 (tic6x_arch_setup): ... this. Reimplement.
5152 (target_regsets): Rename to ...
5153 (tic6x_regsets): ... this, and make static.
5154 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5155 (tic6x_regs_info): New function.
5156 (the_low_target): Adjust.
5157 (initialize_low_arch): New function.
5158 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5159 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5160 (target_regsets): Rename to ...
5161 (xtensa_regsets): ... this, and make static.
5162 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5163 globals.
5164 (xtensa_arch_setup, xtensa_regs_info): New functions.
5165 (the_low_target): Adjust.
5166 (initialize_low_arch): New function.
5167 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5168 (nios2_arch_setup): Set the current process'es tdesc.
5169 (target_regsets): Rename to ...
5170 (nios2_regsets): ... this.
5171 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5172 (nios2_regs_info): New function.
5173 (the_low_target): Adjust.
5174 (initialize_low_arch): New function.
a261b8f5
PA
5175 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5176 (aarch64_arch_setup): Set the current process'es tdesc.
5177 (target_regsets): Rename to ...
5178 (aarch64_regsets): ... this.
5179 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5180 (aarch64_regs_info): New function.
5181 (the_low_target): Adjust.
5182 (initialize_low_arch): New function.
3aee8918
PA
5183 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5184 globals.
5185 (target_regsets): Rename to ...
5186 (tile_regsets): ... this.
5187 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5188 (tile_regs_info): New function.
5189 (tile_arch_setup): Set the current process'es tdesc.
5190 (the_low_target): Adjust.
5191 (initialize_low_arch): New function.
5192 * spu-low.c (tdesc_spu): Declare.
5193 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5194 * win32-arm-low.c (tdesc_arm): Declare.
5195 (arm_arch_setup): New function.
5196 (the_low_target): Install arm_arch_setup instead of
5197 init_registers_arm.
5198 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5199 (init_windows_x86): Rename to ...
5200 (i386_arch_setup): ... this. Set `win32_tdesc'.
5201 (the_low_target): Adjust.
5202 * win32-low.c (win32_tdesc): New global.
5203 (child_add_thread): Don't create the thread cache here.
5204 (do_initial_child_stuff): Set the new process'es tdesc.
5205 * win32-low.h (struct target_desc): Forward declare.
5206 (win32_tdesc): Declare.
5207 * lynx-i386-low.c (tdesc_i386): Declare global.
5208 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5209 * lynx-low.c (lynx_tdesc): New global.
5210 (lynx_add_process): Set the new process'es tdesc.
5211 * lynx-low.h (struct target_desc): Forward declare.
5212 (lynx_tdesc): Declare global.
5213 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5214 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5215 * nto-low.c (nto_tdesc): New global.
5216 (do_attach): Set the new process'es tdesc.
5217 * nto-low.h (struct target_desc): Forward declare.
5218 (nto_tdesc): Declare.
5219 * nto-x86-low.c (tdesc_i386): Declare.
5220 (nto_x86_arch_setup): Set `nto_tdesc'.
5221
b1fbec62
GB
52222013-06-04 Gary Benson <gbenson@redhat.com>
5223
5224 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5225 to qSupported response when appropriate.
5226 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5227 with nonzero-length annex.
5228 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5229 arguments supplied in annex.
5230
d1ec4ce7
DE
52312013-05-31 Doug Evans <dje@google.com>
5232
ac44adcb 5233 PR server/15594
d1ec4ce7
DE
5234 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5235 64 bits in 64-cross-32 environment.
5236
9b25f2d3
PA
52372013-05-28 Pedro Alves <palves@redhat.com>
5238
5239 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5240 (aarch64-without-fpu.c): Delete rule.
5241 * configure.srv (aarch64*-*-linux*): Remove references to
5242 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5243 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5244 declaration.
5245
6740dc9c
PA
52462013-05-24 Pedro Alves <palves@redhat.com>
5247
5248 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5249 instead of strchr/decode_address. Error if the range isn't split
5250 with a ','. Don't assume there's be a ':' in the action.
5251
c2d6af84
PA
52522013-05-23 Yao Qi <yao@codesourcery.com>
5253 Pedro Alves <palves@redhat.com>
5254
5255 * linux-low.c (lwp_in_step_range): New function.
5256 (linux_wait_1): If the thread was range stepping and stopped
5257 outside the stepping range, report the stop to GDB. Otherwise,
5258 continue stepping. Add range stepping debug output.
5259 (linux_set_resume_request): Copy the step range from the resume
5260 request to the lwp.
5261 (linux_supports_range_stepping): New.
5262 (linux_target_ops) <supports_range_stepping>: Set to
5263 linux_supports_range_stepping.
5264 * linux-low.h (struct linux_target_ops)
5265 <supports_range_stepping>: New field.
5266 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5267 * linux-x86-low.c (x86_supports_range_stepping): New.
5268 (the_low_target) <supports_range_stepping>: Set to
5269 x86_supports_range_stepping.
5270 * server.c (handle_v_cont): Handle 'r' action.
5271 (handle_v_requests): Append ";r" if the target supports range
5272 stepping.
5273 * target.h (struct thread_resume) <step_range_start,
5274 step_range_end>: New fields.
5275 (struct target_ops) <supports_range_stepping>:
5276 New field.
5277 (target_supports_range_stepping): New macro.
5278
58794e1a
JB
52792013-05-17 Joel Brobecker <brobecker@adacore.com>
5280
5281 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5282 confusion in comment.
5283
d631c5a7
JB
52842013-05-17 Joel Brobecker <brobecker@adacore.com>
5285
5286 * lynx-low.c (struct process_info_private): New type.
5287 (lynx_add_process): New function.
5288 (lynx_create_inferior, lynx_attach): Replace calls to
5289 add_process by calls to lynx_add_process.
5290 (lynx_resume): If PTID is null, then try using
5291 current_process()->private->last_wait_event_ptid.
5292 Add comments.
5293 (lynx_clear_inferiors): Delete. The contents of that function
5294 has been inlined in lynx_mourn;
5295 (lynx_wait_1): Save the ptid in the process's private data.
5296 (lynx_mourn): Free the process' private data. Replace call
5297 to lynx_clear_inferiors by call to clear_inferiors.
5298
96f7a20f
YQ
52992013-05-17 Yao Qi <yao@codesourcery.com>
5300
5301 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5302 the right place.
5303
db0dfaa0
LM
53042013-05-16 Luis Machado <lgustavo@codesourcery.com>
5305
5306 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5307 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5308 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5309 PT_TEXT_END_ADDR guards. Update comments.
5310 (linux_target_op) <read_offsets>: Conditionally define to
5311 linux_read_offsets if the target is UCLIBC and if it defines
5312 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5313
68f5f838
SL
53142013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5315 Andrew Jenner <andrew@codesourcery.com>
5316
5317 * Makefile.in (SFILES): Add linux-nios2-low.c.
5318 (clean): Add action to delete nios2-linux.c.
5319 (nios2-linux.c): New rule.
5320 * configure.srv: Add nios2*-*-linux*.
5321 * linux-nios2-low.c: New.
5322
1ebff1fd
HAQ
53232013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5324
5325 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5326
f6150862
HZ
53272013-04-25 Hui Zhu <hui@codesourcery.com>
5328
5329 PR gdb/15186
f6150862
HZ
5330 * ax.c (ax_printf): Add fflush.
5331
614c279d
TT
53322013-04-22 Tom Tromey <tromey@redhat.com>
5333
5334 * Makefile.in (SFILES): Add filestuff.c.
5335 (OBS): Add filestuff.o.
5336 (filestuff.o): New target.
5337 * config.in, configure: Rebuild.
5338 * configure.ac: Check for fdwalk, pipe2.
5339
7d4e5717
PA
53402013-04-17 Pedro Alves <palves@redhat.com>
5341
5342 * configure.ac (USE_THREAD_DB): Delete variable.
5343 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5344 Don't AC_SUBST USE_THREAD_DB.
5345 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5346 * config.in, configure: Regenerate.
5347
d5c93e41
PA
53482013-04-16 Pedro Alves <palves@redhat.com>
5349
5350 * linux-low.h (struct lwp_info) <thread_known>: Move under
5351 the USE_THREAD_DB #ifdef.
5352
04f5fe89
PA
53532013-04-16 Pedro Alves <palves@redhat.com>
5354
5355 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5356 (linux-low.o): Delete rule.
5357 * linux-low.h: Always include "gdb_thread_db.h" instead of
5358 conditionally including thread_db.h.
5359 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5360 HAVE_THREAD_DB_H.
5361
480b27bf
JK
53622013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5363
5364 * Makefile.in (install-only): Fix make install regression.
5365
43662968
JK
53662013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5367
5368 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5369 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5370 installation.
5371 * gdbserver.1: Remove.
5372
3e74e146
PA
53732013-03-22 Pedro Alves <palves@redhat.com>
5374
5375 * linux-low.c (handle_extended_wait): Don't call
5376 linux_enable_event_reporting.
5377
a8347a2a
TT
53782013-03-15 Tony Theodore <tonyt@logyst.com>
5379
5380 PR build/9098:
5381 * Makefile.in (SHELL): Use @SHELL@.
5382
eeb56fa7
SDJ
53832013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5384
5385 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5386 compiler warning.
5387
4fa7e2ff
JB
53882013-03-13 Joel Brobecker <brobecker@adacore.com>
5389
5390 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5391 Remove extraneous NULL element.
5392
8ddb1965
YQ
53932013-03-13 Yao Qi <yao@codesourcery.com>
5394
5395 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5396 'V' block in trace frame.
5397
9accd112
MM
53982013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5399
5400 * target.h (struct target_ops): Add btrace ops.
5401 (target_supports_btrace): New macro.
5402 (target_enable_btrace): New macro.
5403 (target_disable_btrace): New macro.
5404 (target_read_btrace): New macro.
5405 * gdbthread.h (struct thread_info): Add btrace field.
5406 * server.c: Include btrace-common.h.
5407 (handle_btrace_general_set): New function.
5408 (handle_btrace_enable): New function.
5409 (handle_btrace_disable): New function.
5410 (handle_general_set): Call handle_btrace_general_set.
5411 (handle_qxfer_btrace): New function.
5412 (struct qxfer qxfer_packets[]): Add btrace entry.
5413 * inferiors.c (remove_thread): Disable btrace.
5414 * linux-low: Include linux-btrace.h.
5415 (linux_low_enable_btrace): New function.
5416 (linux_low_read_btrace): New function.
5417 (linux_target_ops): Add btrace ops.
5418 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5419 Add srv_linux_btrace=yes.
5420 (x86_64-*-linux*): Add linux-btrace.o.
5421 Add srv_linux_btrace=yes.
5422 * configure.ac: Define HAVE_LINUX_BTRACE.
5423 * config.in: Regenerated.
5424 * configure: Regenerated.
5425
5cc22e4c
MM
54262013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5427
5428 * server.c (handle_qxfer): Preserve error message if -3 is
5429 returned.
5430 (qxfer): Document the -3 return value.
5431
7c97f91e
MM
54322013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5433
5434 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5435 (linux_btrace_h): New variable.
5436 (linux-btrace.o): New rule.
5437
be9a119c 54382013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
5439 Hafiz Abid Qadeer <abidh@codesourcery.com>
5440
5441 * tracepoint.c (trace_buffer_size): New global.
5442 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5443 (init_trace_buffer): Change to one-argument function. Allocate
5444 trace buffer memory.
5445 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5446 handle QTBuffer:size packet.
5447 (cmd_bigqtbuffer_size): New function.
5448 (initialize_tracepoint): Call init_trace_buffer with
5449 DEFAULT_TRACE_BUFFER_SIZE.
5450 * server.c (handle_query): Add QTBuffer:size in the
5451 supported packets.
5452
e64f7499
YQ
54532013-03-07 Yao Qi <yao@codesourcery.com>
5454
5455 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5456 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5457 of -1.
5458 (cmd_qtsp): Adjust condition. Do post increment.
5459 Set cur_action and cur_step_action back to 0.
5460
f0ae6fc3
PA
54612013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5462
5463 PR server/15236
5464 * linux-low.c (linux_write_memory): Return early success if LEN is
5465 zero.
5466
b5b0b0af
CV
54672013-03-05 Corinna Vinschen <vinschen@redhat.de>
5468
334ad4a8 5469 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 5470
589bc927
TT
54712013-02-28 Tom Tromey <tromey@redhat.com>
5472
5473 * configure.ac: Invoke AC_SYS_LARGEFILE.
5474 * configure, config.in: Rebuild.
5475
dfe07582
CV
54762013-02-28 Corinna Vinschen <vinschen@redhat.com>
5477
5478 * win32-low.c: Throughout, fix format strings and casts of
5479 printf-like functions to avoid type related warnings on all
5480 platforms.
5481 (get_child_debug_event): Print dwDebugEventCode as hex since
5482 that's how it's usually documented.
5483
736cd585
YQ
54842013-02-28 Yao Qi <yao@codesourcery.com>
5485
5486 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5487 pulongest.
5488
e1f58301
JW
54892013-02-27 Jiong Wang <jiwang@tilera.com>
5490
5491 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5492 (reg-tilegx32.c): New rule.
5493 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5494 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5495 different register info initializer according to elf class.
5496 (init_registers_tilgx32): New function. The tilegx32 register info
5497 initializer.
5498 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5499 (tile_store_gregset): Likewise.
5500
d171ca78
YQ
55012013-02-27 Yao Qi <yao@codesourcery.com>
5502
5503 * server.c (process_point_options): Print debug message when
5504 debug_threads is true.
5505
282bbdf3
YQ
55062013-02-26 Yao Qi <yao@codesourcery.com>
5507
5508 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5509
aca22551
PA
55102013-02-19 Pedro Alves <palves@redhat.com>
5511 Kai Tietz <ktietz@redhat.com>
5512
5513 PR gdb/15161
5514
5515 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5516 instead of strtoul to extract address from packet.
5517 (process_serial_event) <'z'>: Likewise.
5518
4f3cee1c
YQ
55192013-02-18 Yao Qi <yao@codesourcery.com>
5520
5521 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5522
8e1d55a3
PA
55232013-02-14 Pedro Alves <palves@redhat.com>
5524
5525 Plug memory leak.
5526
5527 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5528 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5529
458820da
PA
55302013-02-14 Pedro Alves <palves@redhat.com>
5531
5532 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5533
baea0dae
PA
55342013-02-14 Pedro Alves <palves@redhat.com>
5535
5536 * tracepoint.c (save_string): Delete.
5537 (add_tracepoint_action): Use savestring instead of save_string.
5538
0b1afbb3
PA
55392013-02-12 Pedro Alves <palves@redhat.com>
5540
5541 * linux-xtensa-low.c: Ditto.
5542 * xtensa-xtregs.c: Ditto.
5543
8a4ac37e
PA
55442013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5545
5546 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5547 thread_db.
5548
148de6bb
MS
55492013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5550
5551 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5552 aarch64_num_wp_regs and aarch64_num_bp_regs to
5553 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5554
55fac6e0
MS
55552013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5556
5557 * linux-aarch64-low.c (ps_get_thread_area): Replace
5558 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5559
176eb98c
MS
55602013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5561 Marcus Shawcroft <marcus.shawcroft@arm.com>
5562 Nigel Stephens <nigel.stephens@arm.com>
5563 Yufeng Zhang <yufeng.zhang@arm.com>
5564
5565 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5566 (aarch64.c, aarch64-without-fpu.c): New targets.
5567 * configure.srv (aarch64*-*-linux*): New.
5568 * linux-aarch64-low.c: New file.
5569
56f7af9c
MS
55702013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5571
43aaf8b6 5572 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5573 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5574 (dequeue_one_deferred_signal, linux_resume_one_thread)
5575 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5576 (linux_tracefork_grandchild, linux_test_for_tracefork)
5577 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5578 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5579 where the argument is 0.
5580
60f662b0
YQ
55812013-01-25 Yao Qi <yao@codesourcery.com>
5582
5583 * event-loop.c: Include "queue.h".
5584 (gdb_event_p): New typedef.
5585 (struct gdb_event) <next_event>: Remove.
5586 (event_queue): Change to QUEUE(gdb_event_p).
5587 (async_queue_event): Remove.
5588 (gdb_event_xfree): New.
5589 (initialize_event_loop): New.
5590 (process_event): Use API from QUEUE.
5591 (wait_for_event): Likewise.
5592 * server.c (main): Call initialize_event_loop.
5593 * server.h (initialize_event_loop): Declare.
5594
5ae4861a
YQ
55952013-01-18 Yao Qi <yao@codesourcery.com>
5596
5597 * ax.h (struct eval_agent_expr_context): New.
5598 (gdb_eval_agent_expr): Update declaration.
5599 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5600 TFRAME. Add new argument CTX.
5601 * server.h (struct eval_agent_expr_context): Declare.
5602 (agent_mem_read, agent_tsv_read): Update declaration.
5603 (agent_mem_read_string): Likewise.
5604 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5605 (add_traceframe_block): Add new argument TPOINT.
5606 Increase TPOINT->traceframe_usage.
5607 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5608 eval_tracepoint_agent_expr.
5609 (condition_true_at_tracepoint): Likewise.
5610 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5611 (agent_mem_read_string, agent_tsv_read): Likewise.
5612
85e00e85
YQ
56132013-01-16 Yao Qi <yao@codesourcery.com>
5614
5615 * linux-low.c (linux_resume_one_lwp): Don't check
5616 'lwp->bp_reinsert != 0'.
5617
4039cf45
JB
56182013-01-07 Joel Brobecker <brobecker@adacore.com>
5619 Pedro Alves <palves@redhat.com>
5620
5621 * lynx-low.c (ptrace_request_to_str): Define a temporary
5622 macro and use it to simplify this function's implementation.
5623
9044dee2
JB
56242013-01-07 Joel Brobecker <brobecker@adacore.com>
5625
5626 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5627 sets errno.
5628
e6352c8f
JB
56292013-01-07 Joel Brobecker <brobecker@adacore.com>
5630
5631 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5632
50681a27
JB
56332013-01-07 Joel Brobecker <brobecker@adacore.com>
5634
5635 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5636
3f6e77ef
JB
56372013-01-07 Joel Brobecker <brobecker@adacore.com>
5638
5639 * lynx-low.c (lynx_resume): Use the resume_info parameter
5640 to determine the ptid for the lynx_ptrace call, unless
5641 it is equal to minus_one_ptid, in which case we use the
5642 ptid of the current_inferior.
5643 (lynx_wait_1): After having received a thread create/exit
5644 event, resume the inferior's execution using the signaling
5645 thread's ptid, rather than the old ptid.
5646
7fda33ae
JB
56472013-01-07 Joel Brobecker <brobecker@adacore.com>
5648
5649 * lynx-low.c (lynx_resume): Delete variable ret.
5650
b9786c74
JB
56512013-01-01 Joel Brobecker <brobecker@adacore.com>
5652
5653 * gdbreplay.c (gdbreplay_version): Update copyright year.
5654 * server.c (gdbserver_version): Likewise.
5655
8b93d60f
JB
56562012-12-17 Joel Brobecker <brobecker@adacore.com>
5657
5658 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5659 new thread.
5660
037335a7
JB
56612012-12-17 Joel Brobecker <brobecker@adacore.com>
5662
5663 * lynx-low.c (ptrace_request_to_str): Add handling for
5664 PTRACE_GETTRACESIG.
5665
52d4cbd8
JB
56662012-12-17 Joel Brobecker <brobecker@adacore.com>
5667
5668 * lynx-low.c (lynx_attach): Delete variable new_process.
5669
ab8f6ca9
JB
56702012-12-17 Joel Brobecker <brobecker@adacore.com>
5671
5672 * lynx-low.c (lynx_create_inferior): Delete variable
5673 new_process.
5674
78cbc024
JB
56752012-12-17 Joel Brobecker <brobecker@adacore.com>
5676
5677 * lynx-low.c (ptrace_request_to_str): Do not handle
5678 PTRACE_GETTHREADLIST if this macro does not exist.
5679
14a00470
YQ
56802012-12-15 Yao Qi <yao@codesourcery.com>
5681
5682 * Makefile.in (OBS): Add notif.o.
5683 * notif.c, notif.h: New.
5684 * server.c: Include "notif.h".
5685 (struct vstop_notif) <next>: Remove.
5686 <base>: New field.
5687 (queue_stop_reply): Update.
5688 (push_event, send_next_stop_reply): Remove.
5689 (discard_queued_stop_replies): Update.
5690 (notif_stop): New variable.
5691 (handle_v_stopped): Remove.
5692 (handle_v_requests): Don't call handle_v_stopped. Call
5693 handle_ack_notif instead.
5694 (queue_stop_reply_callback): Call notif_event_enque instead
5695 of queue_stop_reply.
5696 (handle_status): Don't call send_next_stop_reply, call
5697 notif_write_event instead.
5698 (kill_inferior_callback): Likewise.
5699 (detach_or_kill_inferior_callback): Likewise.
5700 (main): Call initialize_notif.
5701 (process_serial_event): Call QUEUE_is_empty.
5702 (handle_target_event): Call notif_push instead of push event.
5703 * server.h (push_event): Remove declaration.
5704
61c125b9
TT
57052012-12-10 Tom Tromey <tromey@redhat.com>
5706
5707 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5708 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5709 macros.
5710 (.c.o): Rewrite.
5711 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5712 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5713 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5714 (amd64-linux-ipa.o, ax.o): Rewrite.
5715 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5716 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5717 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5718 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5719 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5720 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5721 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5722 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5723 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5724 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5725 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5726 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5727 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5728 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5729 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5730 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5731 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5732 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5733 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5734 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5735 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5736 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5737 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5738 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5739 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5740 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5741 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5742 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5743 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5744 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5745 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5746 (reg-tilegx.o): Remove.
5747 (all_object_files): New macro.
5748 Include .deps files.
5749 * aclocal.m4, configure: Rebuild.
5750 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5751 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5752 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5753
e90e9ad9
TT
57542012-12-05 Tom Tromey <tromey@redhat.com>
5755
5756 PR gdb/14917:
5757 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5758
02d403bf 57592012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
5760
5761 * configure.ac: Check for linux/perf_event.h.
5762 * config.in: Regenerated.
5763 * configure: Regenerated.
5764
0270a750
PA
57652012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5766
5767 * hostio.c (handle_readlink): Decrease buffer size
5768 parameter passed to readlink by one byte.
5769
8c29b58e
YQ
57702012-11-26 Yao Qi <yao@codesourcery.com>
5771
5772 * configure.ac (build_warnings): Append '-Wempty-body'.
5773 * configure: Regenerated.
5774 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5775 body.
5776
8bdce1ff
PM
57772012-11-15 Pierre Muller <muller@sourceware.org>
5778
5779 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5780 * config.in: Regenerate.
5781 * configure: Regenerate.
5782 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5783 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5784 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5785 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5786 header.
5787 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5788 instead of <sys/wait.h> header.
5789 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5790
02d403bf 57912012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
5792
5793 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5794 (various make rules): Remove -DGDBSERVER
5795
fbd5db48
YQ
57962012-11-09 Yao Qi <yao@codesourcery.com>
5797
5798 * spu-low.c (current_ptid): Move it to ..
5799 * gdbthread.h: ... here. New.
5800 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5801 * server.c (myresume, process_serial_event): Likewise.
5802 * thread-db.c (thread_db_find_new_threads): Likewise.
5803 * tracepoint.c (run_inferior_command): Likewise.
5804
b3dc46ff
AB
58052012-10-01 Andrew Burgess <aburgess@broadcom.com>
5806
5807 * server.c (handle_search_memory_1): Include access length in
5808 warning message.
5809
07c04788
HPN
58102012-09-05 Michael Brandt <michael.brandt@axis.com>
5811
5812 * linux-crisv32-low.c: Fix compile errors.
5813
918d227b
YQ
58142012-09-04 Yao Qi <yao@codesourcery.com>
5815
5816 * tracepoint.c (cmd_qtsv): Adjust debug message.
5817 Don't check CUR_TPOINT.
5818
18c1b81a
YQ
58192012-08-28 Yao Qi <yao@codesourcery.com>
5820
5821 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5822 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5823 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5824 Remove declarations of xmalloc, xreallloc, xstrdup and
5825 freeargv.
5826 * Makefile.in (libiberty_h): New.
5827 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5828 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5829
dc82f37b
YQ
58302012-08-23 Yao Qi <yao@codesourcery.com>
5831
5832 * server.h: Remove declaration of 'xsnprintf'.
5833
406b1477
KS
58342012-08-22 Keith Seitz <keiths@redhat.com>
5835
5836 * server.h: Include build-gnulib-gbserver/config.h.
5837 * gdbreplay.c: Likewise.
5838
e6712ff1
DE
58392012-08-08 Doug Evans <dje@google.com>
5840
5841 * Makefile.in (SFILES): Add gdb_vecs.c.
5842 (OBS): Add gdb_vecs.o.
5843 (gdb_vecs_h, host_defs_h): New variables.
5844 (thread-db.o): Add $(gdb_vecs_h) dependency.
5845 (gdb_vecs.o): New rule.
5846 * thread-db.c: #include "gdb_vecs.h".
5847 (thread_db_load_search): Use a vector to iterate over path elements.
5848 Handle text appearing after "$pdir".
5849
5850 * configure.ac: Add check for strstr.
5851 * config.in: Regenerate.
5852 * configure: Regenerate.
5853
7c3270ae
UW
58542012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5855
5856 * hostio.c (handle_pread): If pread fails, fall back to attempting
5857 lseek/read.
5858 (handle_pwrite): Likewise for pwrite.
5859
b62e2b27
UW
58602012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5861
5862 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5863 between unsupported TYPE and unimplementable ADDR/LEN combination.
5864 (arm_insert_point): Act on new return value.
5865
78a99e91
PA
58662012-07-31 Pedro Alves <palves@redhat.com>
5867
5868 * server.c (process_point_options): Only skip tokens if we find
5869 one that is unrecognized. Don't treat 'X' specially while
5870 skipping unrecognized tokens.
5871
fcf303ab
UW
58722012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5873
5874 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5875 to 4-byte-align HW breakpoint addresses for Thumb.
5876
7255706c
YQ
58772012-07-27 Yao Qi <yao@codesourcery.com>
5878
5879 PR remote/14161.
5880
5881 * server.h: Declare gdb_agent_about_to_close.
5882 * target.c (kill_inferior): Include "agent.h".
5883 New. Send command 'kill'.
5884 * target.h (kill_inferior): Removed macro.
5885 * tracepoint.c (gdb_agent_about_to_close): New.
5886 (gdb_agent_helper_thread): Handle command 'close'.
5887 Wait endlessly until the inferior stops.
5888 Install gdb_agent_remove_socket to atexit hook.
5889 (agent_socket_name): New static variable.
5890 (gdb_agent_socket_init): Replace local variable 'name' with
5891 'agent_socket_name'.
5892 (gdb_agent_remove_socket): New.
5893
5a3f286f
YQ
58942012-07-27 Yao Qi <yao@codesourcery.com>
5895
5896 * server.c (process_point_options): Stop at 'X' when parsing.
5897
961bd387
ME
58982012-07-19 Michael Eager <eager@eagercon.com>
5899
a261b8f5 5900 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
5901 to hw_execute.
5902 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5903 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5904 hardware breakpoint.
5905
aa7c7447
JK
59062012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5907
5908 * gdbserver/linux-low.c (initialize_low): Call
5909 linux_ptrace_init_warnings.
5910
7f216e7c
DE
59112012-07-02 Doug Evans <dje@google.com>
5912
5913 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5914 pointer to int.
5915
d3ce09f5
SS
59162012-07-02 Stan Shebs <stan@codesourcery.com>
5917
5918 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5919 (ax.o): Add it to build rule.
5920 (ax-ipa.o): Ditto.
5921 (OBS): Add format.o.
5922 (IPA_OBS): Add format.o.
5923 * server.c (handle_query): Claim support for breakpoint commands.
5924 (process_point_options): Add command case.
5925 (process_serial_event): Leave running if there are printfs in
5926 effect.
5927 * mem-break.h (any_persistent_commands): Declare.
5928 (add_breakpoint_commands): Declare.
5929 (gdb_no_commands_at_breakpoint): Declare.
5930 (run_breakpoint_commands): Declare.
5931 * mem-break.c (struct point_command_list): New struct.
5932 (struct breakpoint): New field command_list.
5933 (any_persistent_commands): New function.
5934 (add_commands_to_breakpoint): New function.
5935 (add_breakpoint_commands): New function.
5936 (gdb_no_commands_at_breakpoint): New function.
5937 (run_breakpoint_commands): New function.
5938 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5939 locally.
5940 * ax.c: Include format.h.
5941 (ax_printf): New function.
5942 (gdb_eval_agent_expr): Add printf opcode.
5943
2f8f6aed
YQ
59442012-06-13 Yao Qi <yao@codesourcery.com>
5945
5946 * server.c (start_inferior): Remove duplicated writes to fields
5947 'last_resume_kind' and 'last_status' of 'current_inferior'.
5948
0c9070b3
YQ
59492012-06-12 Yao Qi <yao@codesourcery.com>
5950 Pedro Alves <palves@redhat.com>
5951
5952 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5953 comment.
5954 * server.c (handle_v_cont): Extend comment.
5955
c52daf70
YQ
59562012-06-11 Yao Qi <yao@codesourcery.com>
5957
5958 * linux-low.c (linux_attach): Add 'static'.
5959
d38bbb0a
YQ
59602012-06-06 Yao Qi <yao@codesourcery.com>
5961
5962 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5963
89dc0afd
JK
59642012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5965
5966 Fix gcc -flto compilation warning.
5967 * server.c (main): Make variable multi_mode and attach volatile.
5968
75f62ce7
TJB
59692012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5970
5971 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5972 if the platform doesn't know about it.
5973
65f479b6
PA
59742012-05-30 Jeff Kenton <jkenton@tilera.com>
5975
5976 * Makefile.in (SFILES): Add linux-tile-low.c.
5977 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5978 * configure.srv: Handle tilegx-*-linux*.
5979 * linux-tile-low.c: New file.
5980
0c5bf5a9
JK
59812012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5982
5983 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5984
a493e3e2
PA
59852012-05-24 Pedro Alves <palves@redhat.com>
5986
5987 PR gdb/7205
5988
43aaf8b6 5989 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 5990
2ea28649
PA
59912012-05-24 Pedro Alves <palves@redhat.com>
5992
5993 PR gdb/7205
5994
5995 Replace target_signal with gdb_signal throughout.
5996
8d409d16
MR
59972012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5998
5999 * linux-low.c (linux_store_registers): Avoid the copying sequence
6000 when no data has been retrieved by ptrace.
6001
23512c01
MGD
60022012-05-22 Will Deacon <will.deacon@arm.com>
6003
6004 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6005 Include asm/ptrace.h.
6006 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6007 already defined.
6008
4934b29e
MR
60092012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6010
6011 * linux-low.c (linux_store_registers): Don't re-retrieve data
6012 with ptrace that has already been obtained from /proc. Always
6013 copy any data retrieved with ptrace to the buffer supplied.
6014
bde24c0a
PA
60152012-05-11 Yao Qi <yao@codesourcery.com>
6016 Pedro Alves <palves@redhat.com>
6017
6018 * linux-low.c (enum stopping_threads_kind): New.
6019 (stopping_threads): Change type to `enum stopping_threads_kind'.
6020 (handle_extended_wait): If stopping and suspending threads, leave
6021 the new_lwp suspended too.
6022 (linux_wait_for_event): Adjust.
6023 (stop_all_lwps): Set `stopping_threads' to
6024 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6025 whether we're suspending threads or just stopping them. Assert no
6026 recursion happens.
6027
623b6bdf
YQ
60282012-04-29 Yao Qi <yao@codesourcery.com>
6029
6030 * server.h: Move some code to ...
6031 * gdbthread.h: ... here. New.
6032 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6033 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6034 (nto-low.o, win32-low.o): Likewise.
6035 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6036 * regcache.c, remote-utils.c, server.c: Likewise.
6037 * target.c, tracepoint.c, win32-low.c: Likewise.
6038
f15f9948
TJB
60392012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6040
6041 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6042 (PTRACE_ARG4_TYPE): Likewise.
6043 (PTRACE_XFER_TYPE): Likewise.
6044 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6045 ptrace to PTRACE_ARG3_TYPE.
6046 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6047 (PTRACE_ARG4_TYPE): Likewise.
6048 (PTRACE_XFER_TYPE): Likewise.
6049 (linux_detach_one_lwp): Cast fourth argument of
6050 ptrace to long then PTRACE_ARG4_TYPE.
6051 (regsets_fetch_inferior_registers): Cast third argument of
6052 ptrace to long then PTRACE_ARG3_TYPE.
6053 (regsets_store_inferior_registers): Likewise.
6054
38ea300a
PA
60552012-04-20 Pedro Alves <palves@redhat.com>
6056
6057 * configure: Regenerate.
6058
c971b7fa
PA
60592012-04-19 Pedro Alves <palves@redhat.com>
6060
43aaf8b6 6061 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 6062 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
6063 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6064 (all, install-only, uninstall, clean-info, all-lib, clean): No
6065 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6066 (maintainer-clean realclean distclean): Use subdir_do.
6067 (subdir_do): New.
6068 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 6069 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
6070 * acinclude.m4: Include acx_configure_dir.m4.
6071 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6072 calls. Call AC_PROG_RANLIB. Configure gnulib using
6073 ACX_CONFIGURE_DIR.
6074 (GNULIB): New.
6075 (GNULIB_STDINT_H): Adjust.
6076 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6077 * gdbreplay.c: Include build-gnulib/config.h.
6078 * server.h: Likewise.
6079 * aclocal.m4: Regenerate.
6080 * config.in: Regenerate.
6081 * configure: Regenerate.
c971b7fa 6082
809277f8
PA
60832012-04-19 Pedro Alves <palves@redhat.com>
6084
6085 * Makefile.in (LIBGNU, INCGNU): Adjust.
6086 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6087 (all, install-only, uninstall, clean-info, all-lib, clean)
6088 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6089 * configure.ac: Adjust AC_OUTPUT output.
6090 * aclocal.m4: Regenerate.
6091 * configure: Regenerate.
6092
fd9bb8b8
PA
60932012-04-19 Pedro Alves <palves@redhat.com>
6094
6095 * Makefile.in (generated_files): New.
6096 (server_h): Remove the explicit dependency on config.h, and depend
6097 on $generated_files.
6098
1c298c66
PA
60992012-04-19 Pedro Alves <palves@redhat.com>
6100
6101 * Makefile.in (INCGNU): Add -Ignulib.
6102
57c4b50b
PA
61032012-04-19 Pedro Alves <palves@redhat.com>
6104
6105 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6106 (INCGNU): ... this, and spell out -I here.
6107 (GNULIB_LIB): Rename to ...
6108 (LIBGNU): ... this.
6109 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6110
1030e047
PA
61112012-04-19 Pedro Alves <palves@redhat.com>
6112
6113 * config.in: Regenerate.
6114
447d4319
PA
61152012-04-19 Pedro Alves <palves@redhat.com>
6116
6117 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6118 * server.h (memmem): Remove declaration.
6119 * config.in: Regenerate.
6120 * configure: Regenerate.
6121
aad9eab9
YQ
61222012-04-19 Yao Qi <yao@codesourcery.com>
6123
6124 * Makefile.in (SFILES): Add common/vec.c.
6125 (OBS): Add vec.o.
6126 (vec.o): New rule.
6127
3e10640f
YQ
61282012-04-19 Yao Qi <yao@codesourcery.com>
6129
6130 * remote-utils.c (prepare_resume_reply): Replace with macro
6131 target_core_of_thread.
6132 * server.c (handle_qxfer_threads_proper): Likewise.
6133 * target.h (traget_core_of_thread): New macro.
6134
71622373
PA
61352012-04-18 Pedro Alves <palves@redhat.com>
6136
6137 * aclocal.m4: Regenerate.
6138 * configure: Regenerate.
6139
80d26939
YQ
61402012-04-16 Yao Qi <yao@codesourcery.com>
6141
6142 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6143 duplicated on address.
6144
42476b70
YQ
61452012-04-16 Yao Qi <yao@codesourcery.com>
6146
6147 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6148 (struct tracepoint_action_ops) <send>: New field.
6149 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6150 (agent_expr_send, x_tracepoint_action_send): New.
6151 (l_tracepoint_action_send): New.
6152 (cmd_qtdp): Download and install tracepoint
6153 according to `use_agent'.
6154 (run_inferior_command): Add one more parameter `len'.
6155 Update callers.
6156 (tracepoint_send_agent): New.
6157 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6158
7bc83639
YQ
61592012-04-16 Yao Qi <yao@codesourcery.com>
6160
6161 * tracepoint.c (download_tracepoints): Moved to ...
6162 (cmd_qtstart): ... here.
6163
5f18041e
YQ
61642012-04-14 Yao Qi <yao@codesourcery.com>
6165
6166 * tracepoint.c: Include inttypes.h.
6167 (struct collect_memory_action): Use sized types.
6168 (struct tracepoint): Likewise.
6169 (cmd_qtdp, stop_tracing): Update print specifiers.
6170 (cmd_qtp, response_tracepoint): Likewise.
6171 (collect_data_at_tracepoint): Likewise.
6172 (collect_data_at_step): Likewise.
6173
55a8c076
YQ
61742012-04-14 Yao Qi <yao@codesourcery.com>
6175
6176 Import gnulib module inttypes.
6177 * aclocal.m4, config.in, configure: Regenerated.
6178
dc750257
YQ
61792012-04-14 Yao Qi <yao@codesourcery.com>
6180
6181 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6182 Makefile and config.status at last.
6183
0ab5faf9
YQ
61842012-04-13 Yao Qi <yao@codesourcery.com>
6185
6186 * tracepoint.c: Include stdint.h unconditionally.
6187
18f5fd81
TJB
61882012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6189
6190 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6191 on BFD_HAVE_SYS_PROCFS_TYPE.
6192 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6193 * configure: Regenerate.
6194 * config.in: Likewise.
6195
4d47af5c
L
61962012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6197
6198 * Makefile.in (clean): Also remove x32.c x32-linux.c
6199 x32-avx.c x32-avx-linux.c.
6200 (x32.o): New target.
6201 (x32.c): Likewise.
6202 (x32-linux.o): Likewise.
6203 (x32-linux.c): Likewise.
6204 (x32-avx.o): Likewise.
6205 (x32-avx.c): Likewise.
6206 (x32-avx-linux.o): Likewise.
6207 (x32-avx-linux.c): Likewise.
6208
6209 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6210 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6211 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6212 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6213 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6214 i386/x32-avx-linux.xml.
6215
6216 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6217 (init_registers_x32_avx_linux): Likwise.
6218 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6219 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6220
ecedbe58
PA
62212012-04-13 Pedro Alves <palves@redhat.com>
6222
6223 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6224 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6225 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6226 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6227 the sub-make.
6228
c92b5177
L
62292012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6230
6231 * linux-x86-low.c (compat_x32_clock_t): New.
6232 (compat_x32_siginfo_t): Likewise.
6233 (compat_x32_siginfo_from_siginfo): Likewise.
6234 (siginfo_from_compat_x32_siginfo): Likewise.
6235 (linux_is_elf64): Likewise.
6236 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6237 and siginfo_from_compat_x32_siginfo for x32.
6238 (x86_arch_setup): Set linux_is_elf64.
6239
214d508e
L
62402012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6241
6242 PR gdb/13969
6243 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6244 e_machine field.
6245 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6246 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6247 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6248 compatible with process.
6249
c9a1864a
YQ
62502012-04-12 Yao Qi <yao@codesourcery.com>
6251
6252 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6253 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6254 (install-only, install-info, clean): Handle sub dir gnulib.
6255 (all-lib, am--refresh): New targets.
6256 (memmem.o): Remove target.
6257 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6258 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6259 (AC_REPLACE_FUNCS): Remove memmem.
6260 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6261 (AC_OUTPUT): Generate Makefile in gnulib/.
6262 * aclocal.m4, config.in, configure: Regenerated.
6263
367ba2c2
MR
62642012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6265
6266 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6267
9d236627
PA
62682012-04-05 Pedro Alves <palves@redhat.com>
6269
6270 -Werror=strict-aliasing
6271
6272 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6273 pointer.
6274
111217b3
PA
62752012-04-04 Pedro Alves <palves@redhat.com>
6276
6277 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6278 (sparc_store_gregset_from_stack, sparc_store_gregset)
6279 (sparc_breakpoint_at): Fix formatting.
6280
8365dcf5
TJB
62812012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6282
6283 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6284 are available.
6285 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6286 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6287 * config.in: Regenerate.
6288 * configure: Likewise.
6289
689cc2ae
PA
62902012-03-29 Pedro Alves <palves@redhat.com>
6291
6292 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6293 Correct ptrace arguments.
6294
c14dfd32
PA
62952012-03-28 Pedro Alves <palves@redhat.com>
6296
6297 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6298 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6299 (IA64_FR1_REGNUM): New defines.
6300 (ia64_fetch_register): New.
6301 (the_low_target): Install it.
6302 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6303 field.
6304 * linux-low.c (linux_fetch_registers): Try the
6305 the_low_target.fetch_register hook first.
6306
6307 * linux-arm-low.c (the_low_target): Adjust.
6308 * linux-bfin-low.c (the_low_target): Adjust.
6309 * linux-cris-low.c (the_low_target): Adjust.
6310 * linux-crisv32-low.c (the_low_target): Adjust.
6311 * linux-m32r-low.c (the_low_target): Adjust.
6312 * linux-m68k-low.c (the_low_target): Adjust.
6313 * linux-mips-low.c (the_low_target): Adjust.
6314 * linux-ppc-low.c (the_low_target): Adjust.
6315 * linux-s390-low.c (the_low_target): Adjust.
6316 * linux-sh-low.c (the_low_target): Adjust.
6317 * linux-sparc-low.c (the_low_target): Adjust.
6318 * linux-tic6x-low.c (the_low_target): Adjust.
6319 * linux-x86-low.c (the_low_target): Adjust.
6320 * linux-xtensa-low.c (the_low_target): Adjust.
6321
63c88e13
PA
63222012-03-26 Pedro Alves <palves@redhat.com>
6323
6324 * server.c (handle_qxfer_libraries): Don't bail early if
6325 the_target->qxfer_libraries_svr4 is not NULL.
6326
fb723180
PA
63272012-03-26 Pedro Alves <palves@redhat.com>
6328
6329 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6330
0afae3cf
PA
63312012-03-23 Pedro Alves <palves@redhat.com>
6332
6333 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6334 "library-list-svr4" element's start tag when the the DSO list is
6335 empty.
6336
485f1ee4
PA
63372012-03-23 Pedro Alves <palves@redhat.com>
6338
6339 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6340 a variable whose type size is the same as the inferior's pointer
6341 size.
6342
a5362b9a
TS
63432012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6344
6345 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6346 struct siginfo.
6347 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6348 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6349 * linux-low.h: Include <signal.h>.
6350 (struct siginfo): Remove forward declaration.
6351 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6352 struct siginfo.
6353
d226c142
MF
63542012-03-21 Mike Frysinger <vapier@gentoo.org>
6355
6356 * .gitignore: Ignore more files.
6357
122f36ef
PA
63582012-03-19 Pedro Alves <palves@redhat.com>
6359 Jan Kratochvil <jan.kratochvil@redhat.com>
6360
6361 * server.c (cont_thread, general_thread): Add describing comments.
6362 (start_inferior): Clear `cont_thread'.
6363 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6364 of a process.
6365
fc3e5175
YQ
63662012-03-15 Yao Qi <yao@codesourcery.com>
6367
6368 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6369 handling to ...
6370 (cmd_qtdp): ... here.
6371
8d0d92cd
YQ
63722012-03-15 Yao Qi <yao@codesourcery.com>
6373
6374 * tracepoint.c (struct tracepoint_action_ops): New.
6375 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6376 (m_tracepoint_action_download): New.
6377 (r_tracepoint_action_download): New.
6378 (x_tracepoint_action_download): New.
6379 (l_tracepoint_action_download): New.
6380 (add_tracepoint_action): Install `action->ops' according type.
6381 (download_tracepoint_1): Move code `download' function pointer
6382 of various tracepoint_action_ops.
6383
87b0bb13
JK
63842012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6385
6386 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6387 linux_ptrace_attach_warnings.
6388
5f572dec
JK
63892012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6390
6391 * Makefile.in (linux-ptrace.o): New.
6392 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6393 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6394 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6395 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6396 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6397 of these targets.
6398 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6399
f4647387
YQ
64002012-03-08 Yao Qi <yao@codesourcery.com>
6401 Pedro Alves <palves@redhat.com>
6402
6403 Fix PR server/13392.
6404 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6405 offset of JMP insn.
6406 * tracepoint.c (remove_tracepoint): New.
6407 (cmd_qtdp): Call remove_tracepoint when failed to install.
6408
9b224c5e
PA
64092012-03-07 Pedro Alves <palves@redhat.com>
6410
6411 * linux-low.c (get_detach_signal): New.
6412 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6413 Pass on pending signals to PTRACE_DETACH. Check the result of the
6414 ptrace call.
6415 * server.c (program_signals, program_signals_p): New.
6416 (handle_general_set): Handle QProgramSignals.
6417 * server.h (program_signals, program_signals_p): Declare.
6418
e237a7e2
JK
64192012-03-05 Pedro Alves <palves@redhat.com>
6420 Jan Kratochvil <jan.kratochvil@redhat.com>
6421
6422 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6423 New comment why.
6424
5808517f
YQ
64252012-03-03 Yao Qi <yao@codesourcery.com>
6426
6427 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6428 agent_look_up_symbols.
6429
58b4daa5
YQ
64302012-03-03 Yao Qi <yao@codesourcery.com>
6431
6432 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6433 (linux-x86-low.o): Likewise.
6434 * server.h: Remove in_process_agent_loaded.
6435 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6436 common/agent.c.
6437 Update callers.
6438
8ffcbaaf
YQ
64392012-03-03 Yao Qi <yao@codesourcery.com>
6440
6441 * tracepoint.c (gdb_agent_capability): New global.
6442 (in_process_agent_loaded_ust): Renamed to
6443 `in_process_agent_supports_ust'.
6444 Update callers.
6445 (in_process_agent_supports_ust): Call agent_capability_check.
6446 (clear_installed_tracepoints): Assert that agent supports
6447 agent.
6448
d1feda86
YQ
64492012-03-03 Yao Qi <yao@codesourcery.com>
6450
6451 * linux-low.c (linux_supports_agent): New.
6452 (linux_target_ops): Initialize field `supports_agent' with
6453 linux_supports_agent.
6454 * target.h (struct target_ops) <supports_agent>: New.
6455 (target_supports_agent): New macro.
6456 * server.c (handle_general_set): Handle packet 'QAgent'.
6457 (handle_query): Send `QAgent+'.
6458 * Makefile.in (server.o): Depends on agent.h.
6459
2fa291ac
YQ
64602012-03-03 Yao Qi <yao@codesourcery.com>
6461
6462 * Makefile.in (OBS): Add agent.o.
6463 Add new rule for agent.o.
6464 Track dependence of tracepoint.c on agent.h.
6465 * tracepoint.c (run_inferior_command_1):
6466 (run_inferior_command): Call agent_run_command.
6467 (gdb_ust_connect_sync_socket): Deleted. Move it to
6468 common/agent.c.
6469 (resume_thread, stop_thread): Likewise.
6470 (gdb_ust_socket_init): Renamed to ...
6471 (gdb_agent_socket_init): ... New.
6472 (gdb_ust_thread): Renamed to ...
6473 (gdb_agent_helper_thread): ... New.
6474 (gdb_ust_init): Move some code to ...
6475 (gdb_agent_init): ... here. New.
6476 [HAVE_UST]: Call gdb_ust_init.
6477 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6478 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6479 * config.in, configure: Regenerated.
6480
05044653
PA
64812012-03-02 Pedro Alves <palves@redhat.com>
6482
6483 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6484 * linux-low.c (struct simple_pid_list): New.
6485 (stopped_pids): New a struct simple_pid_list pointer.
6486 (add_to_pid_list, pull_pid_from_list): New.
6487 (handle_extended_wait): Don't assume the first signal new children
6488 report is SIGSTOP. Adjust call to pull_pid_from_list.
6489 (linux_wait_for_lwp): Adjust.
6490
8d00225b
YQ
64912012-03-02 Yao Qi <yao@codesourcery.com>
6492
6493 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6494 debug log.
6495
19560ba5
YQ
64962012-03-02 Yao Qi <yao@codesourcery.com>
6497
6498 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6499 `stop_pc' and `tpoint'. Update caller.
6500
1faeff08
MR
65012012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6502
6503 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6504 * linux-low.c (use_linux_regsets): New macro.
6505 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6506 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6507 (linux_register_in_regsets): New function.
6508 (usr_fetch_inferior_registers): Skip registers covered by
6509 regsets.
6510 (usr_store_inferior_registers): Likewise.
6511 (usr_fetch_inferior_registers): New macro.
6512 (usr_store_inferior_registers): Likewise.
6513 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6514 (linux_store_registers): Likewise.
6515 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6516 prototype.
6517 (init_registers_mips64_dsp_linux): Likewise.
6518 (init_registers_mips_linux): New macro.
6519 (init_registers_mips_dsp_linux): Likewise.
6520 (mips_dsp_num_regs): Likewise.
6521 (DSP_BASE, DSP_CONTROL): New fallback macros.
6522 (mips_base_regs): New macro.
6523 (mips_regmap): Use it. Fix the size.
6524 (mips_dsp_regmap): New variable.
6525 (mips_dsp_regset_bitmap): Likewise.
6526 (mips_arch_setup): New function.
6527 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6528 than mips_regmap.
6529 (mips_cannot_store_register): Likewise.
6530 (the_low_target): Update .arch_setup, .num_regs and .regmap
6531 initializers. Add .regset_bitmap initializer.
6532 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6533 initializer.
6534 * linux-bfin-low.c (the_low_target): Likewise.
6535 * linux-cris-low.c (the_low_target): Likewise.
6536 * linux-crisv32-low.c (the_low_target): Likewise.
6537 * linux-ia64-low.c (the_low_target): Likewise.
6538 * linux-m32r-low.c (the_low_target): Likewise.
6539 * linux-m68k-low.c (the_low_target): Likewise.
6540 * linux-ppc-low.c (the_low_target): Likewise.
6541 * linux-s390-low.c (the_low_target): Likewise.
6542 * linux-sh-low.c (the_low_target): Likewise.
6543 * linux-sparc-low.c (the_low_target): Likewise.
6544 * linux-tic6x-low.c (the_low_target): Likewise.
6545 * linux-x86-low.c (the_low_target): Likewise.
6546 * linux-xtensa-low.c (the_low_target): Likewise.
6547 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6548 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6549 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6550 srv_xmlfiles.
6551 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6552 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6553
c03e6ccc
YQ
65542012-02-29 Yao Qi <yao@codesourcery.com>
6555 Pedro Alves <palves@redhat.com>
6556
6557 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6558 `step_over_finished' is true.
6559
644cebc9
PA
65602012-02-27 Pedro Alves <palves@redhat.com>
6561
6562 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6563 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6564
c14d7ab2
PA
65652012-02-27 Pedro Alves <palves@redhat.com>
6566
6567 PR server/9684
6568 * linux-low.c (pid_is_stopped): New.
6569 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6570
412c89dd
LM
65712012-02-25 Luis Machado <lgustavo@codesourcery.com>
6572
6573 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6574 of conditions.
6575
b745defe
MR
65762012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6577
6578 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6579
9f3a5c85
LM
65802012-02-24 Luis Machado <lgustavo@codesourcery>
6581
6582 * server.c (handle_query): Advertise support for target-side
6583 breakpoint condition evaluation.
6584 (process_point_options): New function.
6585 (process_serial_event): When inserting a breakpoint, check for
6586 a target-side condition that should be evaluated.
6587
6588 * mem-break.c: Include regcache.h and ax.h.
6589 (point_cond_list_t): New data structure.
6590 (breakpoint) <cond_list>: New field.
6591 (find_gdb_breakpoint_at): Make non-static.
6592 (delete_gdb_breakpoint_at): Clear any target-side
6593 conditions.
6594 (clear_gdb_breakpoint_conditions): New function.
6595 (add_condition_to_breakpoint): Likewise.
6596 (add_breakpoint_condition): Likewise.
6597 (gdb_condition_true_at_breakpoint): Likewise.
6598 (gdb_breakpoint_here): Return result directly instead
6599 of going through a local variable.
6600
6601 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6602 (clear_gdb_breakpoint_conditions): Likewise.
6603 (add_breakpoint_condition): Likewise.
6604 (gdb_condition_true_at_breakpoint): Likewise.
6605
6606 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6607 (need_step_over_p): Take target-side breakpoint condition into
6608 consideration.
6609
5e1dc496
LM
66102012-02-24 Luis Machado <lgustavo@codesourcery>
6611
6612 * server.h: Include tracepoint.h.
6613 (agent_mem_read, agent_get_trace_state_variable_value,
6614 agent_set_trace_state_variable_value,
6615 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6616 get_set_tsv_func_addr): New prototypes.
6617
6618 * ax.h: New include file.
6619 * ax.c: New source file.
6620
6621 * tracepoint.c: Include ax.h.
6622 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6623 agent_expr, eval_result_type): Move to ax.h.
6624 (parse_agent_expr): Rename to ...
6625 (gdb_parse_agent_expr): ... this, make it non-static and move
6626 to ax.h.
6627 (unparse_agent_expr) Rename to ...
6628 (gdb_unparse_agent_expr): ... this, make it non-static and move
6629 to ax.h.
6630 (eval_agent_expr): Rename to ...
6631 (eval_tracepoint_agent_expr): ... this.
6632 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6633 forward declarations.
6634 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6635 (agent_get_trace_state_variable_value): New function.
6636 (agent_set_trace_state_variable_value): New function.
6637 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6638 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6639 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6640 (condition_true_at_tracepoint): Likewise.
6641 (parse_agent_expr): Rename to ...
6642 (gdb_parse_agent_expr): ... this and move to ax.c.
6643 (unparse_agent_expr): Rename to ...
6644 (gdb_unparse_agent_expr): ... this and move to ax.c.
6645 (gdb_agent_op_name): Move to ax.c.
6646 (eval_agent_expr): Rename to ...
6647 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6648 and move to ax.c.
6649 (eval_tracepoint_agent_expr): New function.
6650 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 6651 non-static.
5e1dc496
LM
6652 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6653 ax.c.
6654 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6655 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6656 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6657 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6658 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6659 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6660 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6661 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6662 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6663 (compile_bytecodes): Remove forward declaration.
6664 (is_goto_target): Move to ax.c.
6665 (compile_bytecodes): Move to ax.c and call
6666 agent_get_trace_state_variable_value (...) and
6667 agent_set_trace_state_variable_value (...).
6668
6669 * Makefile.in: Update ax.c and IPA dependencies.
6670
277e4e52
PA
66712012-02-24 Pedro Alves <palves@redhat.com>
6672
6673 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6674 (cmd_bigqtbuffer_circular): ... this. Only handle
6675 'QTBuffer:circular:'.
6676 (handle_tracepoint_general_set): Adjust.
6677
bf4c19f7
YQ
66782012-02-16 Yao Qi <yao@codesourcery.com>
6679
6680 * inferiors.c: Move code to ...
6681 * dll.c: .... here. New.
6682 * server.h: Declare clear_dlls.
6683 * Makefile.in (SFILES): Add dll.c.
6684 (OBS): Add dll.o
6685 (dll.o): New rule.
6686
d73f2619
YQ
66872012-02-11 Yao Qi <yao@codesourcery.com>
6688
6689 * server.c: (handle_monitor_command): Add a new parameter
6690 `own_buf'.
6691 (handle_query): Update caller.
6692
f8255c2a
JB
66932012-02-09 Joel Brobecker <brobecker@adacore.com>
6694
6695 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6696 * configure, config.in: Regenerate.
6697 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6698 is not defined.
6699
da84f473
PA
67002012-02-02 Pedro Alves <palves@redhat.com>
6701
6702 Try SIGKILL first, then PTRACE_KILL.
6703 * linux-low.c (linux_kill_one_lwp): New.
6704 (linux_kill_one_lwp): Rename to ...
6705 (kill_one_lwp_callback): ... this. Use the new
6706 linux_kill_one_lwp.
6707
e886a173
PA
67082012-02-02 Pedro Alves <palves@redhat.com>
6709
6710 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6711 inferior.
6712
be07f1a2
PA
67132012-01-27 Pedro Alves <palves@redhat.com>
6714
6715 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6716 (elf_64_file_p): Make static.
6717 (linux_pid_exe_is_elf_64_file): New.
6718 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6719 Delete declarations.
6720 (linux_pid_exe_is_elf_64_file): Declare.
6721 * linux-x86-low.c (x86_arch_setup): Use
6722 linux_pid_exe_is_elf_64_file.
6723
d8301ad1
JK
67242012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6725
6726 * linux-low.c (linux_wait_for_event_1): Rename to ...
6727 (linux_wait_for_event): ... here and merge it with former
6728 linux_wait_for_event - new variable wait_ptid, use it.
6729 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6730
01b17894
PA
67312012-01-23 Pedro Alves <palves@redhat.com>
6732
6733 * server.c (main): Avoid yet another case of infinite loop while
6734 detaching/killing after a longjmp.
6735
e825046f
JK
67362012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6737
6738 Code cleanup.
6739 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6740
b9e7b9c3
UW
67412012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6742
6743 * hostio.c (handle_readlink): New function.
6744 (handle_vFile): Call it to handle "vFile:readlink" packets.
6745
901f9912
UW
67462012-01-20 Pedro Alves <palves@redhat.com>
6747 Ulrich Weigand <ulrich.weigand@linaro.org>
6748
6749 * server.c (handle_v_requests): Only support vAttach and vRun to
6750 start multiple processes when in extended protocol mode.
6751
fc1ab1a0
PA
67522012-01-17 Pedro Alves <palves@redhat.com>
6753
6754 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6755 memalign plus mprotect to allocate the scratch buffer.
6756
7d5d4e98
PA
67572012-01-13 Pedro Alves <palves@redhat.com>
6758
6759 * server.c (attach_inferior): Clear `cont_thread'.
6760
f128d5e9
PA
67612012-01-13 Pedro Alves <palves@redhat.com>
6762
6763 * server.c (main): Avoid infinite loop while detaching/killing
6764 after a longjmp.
6765
06db92f0
DE
67662012-01-09 Doug Evans <dje@google.com>
6767
6768 * server.c (start_inferior): Set last_ptid in --wrapper case.
6769
32d92999
YQ
67702012-01-06 Yao Qi <yao@codesourcery.com>
6771
6772 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6773 defined.
6774 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6775
5e0a92a9
YQ
67762012-01-04 Yao Qi <yao@codesourcery.com>
6777
6778 * tracepoint.c (cmd_qtdp): Print debug message
6779 for static tracepoint.
6780
ae639e8c
YQ
67812012-01-04 Yao Qi <yao@codesourcery.com>
6782
6783 * tracepoint.c (trace_vdebug): Differentiate debug message
6784 between gdbserver and IPA.
6785
f72429c5
YQ
67862012-01-03 Yao Qi <yao@codesourcery.com>
6787
6788 * tracepoint.c (tracepoint_was_hit): Don't collect for
6789 static tracepoint.
6790
12c3e59c
JB
67912012-01-02 Joel Brobecker <brobecker@adacore.com>
6792
6793 * terminal.h: Reformat copyright header.
6794
67827812
JB
67952012-01-02 Joel Brobecker <brobecker@adacore.com>
6796
6797 * server.c (gdbserver_version): Update copyright year.
6798 * gdbreplay.c (gdbreplay_version): Likewise.
6799
3e52c33d
JK
68002011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6801
6802 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6803
6804 Revert:
6805 2011-12-18 Hui Zhu <teawater@gmail.com>
6806 * linux-low.c (linux_create_inferior): Save return value to ret.
6807
66f1260e
HZ
68082011-12-18 Hui Zhu <teawater@gmail.com>
6809
6810 * linux-low.c (linux_create_inferior): Save return value to ret.
6811
e77616d7
DE
68122011-12-16 Doug Evans <dje@google.com>
6813
e7b06c57
DE
6814 * linux-low.c (linux_create_inferior): If stdio connection,
6815 redirect stdin from /dev/null, stdout to stderr.
6816 * remote-utils.c (remote_is_stdio): New static global.
6817 (remote_connection_is_stdio): New function.
6818 (remote_prepare): Handle stdio connection.
6819 (remote_open): Ditto.
6820 (remote_close): Don't close stdin for stdio connections.
6821 (read_prim,write_prim): New functions. Replace all calls to
6822 read/write to these.
6823 * server.c (main): Watch for "-" argument. Move call to
6824 remote_prepare before start_inferior.
6825 * server.h (STDIO_CONNECTION_NAME): New macro.
6826 (remote_connection_is_stdio): Declare.
6827
e77616d7
DE
6828 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6829 in debugging output.
6830
82067193
YQ
68312011-12-15 Yao Qi <yao@codesourcery.com>
6832
6833 * tracepoint.c: Include sys/syscall.h.
6834 (gdb_ust_thread): Remove preprocessor conditional.
6835
82bfbe7e
PA
68362011-12-14 Pedro Alves <pedro@codesourcery.com>
6837
6838 * linux-low.c (linux_detach_one_lwp): Call
6839 the_low_target.prepare_to_resume before detaching.
6840
712c6575
YQ
68412011-12-14 Yao Qi <yao@codesourcery.com>
6842
6843 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6844 of write.
6845
d54d1edf
YQ
68462011-12-14 Yao Qi <yao@codesourcery.com>
6847
6848 * i386-low.c (i386_low_stopped_data_address): Initialize local
6849 variable `control'.
6850
6210a125
PA
68512011-12-13 Pedro Alves <pedro@codesourcery.com>
6852
6853 PR remote/13492
6854
6855 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6856 DR_CONTROL unless necessary. Extend comments.
6857 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6858 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6859
2ece8244
YQ
68602011-12-13 Yao Qi <yao@codesourcery.com>
6861
6862 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6863 macros.
6864 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6865
784867a5
JK
68662011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6867
6868 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6869 Print new debug message for such case.
6870
6bf36717
JK
68712011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6872
6873 Fix overlapping memcpy.
6874 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6875 the read_inferior_memory transfer.
6876 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6877 write_inferior_memory transfer.
6878 (set_fast_tracepoint_jump): New variable buf. Use it for the
6879 read_inferior_memory and write_inferior_memory transfers.
6880 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6881 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6882 Use it for the write_inferior_memory transfer.
6883 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6884 buffers.
6885
50275556
MR
68862011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6887
6888 * linux-low.c (fetch_register, store_register): Make code
6889 consistent, fix formatting.
6890
7325beb4
MR
68912011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6892
6893 * linux-low.c (usr_store_inferior_registers): Factor out code
6894 to handle individual registers into...
6895 (store_register): ... this new function.
6896
c642a434
UW
68972011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6898
6899 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6900 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6901 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6902 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6903 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6904 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6905 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6906 (srv_xmlfiles): Add new XML files.
6907
6908 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6909 and <sys/uio.h>.
6910 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6911 (init_registers_s390_linux32v1): Add prototype.
6912 (init_registers_s390_linux32v2): Likewise.
6913 (init_registers_s390_linux64v1): Likewise.
6914 (init_registers_s390_linux64v2): Likewise.
6915 (init_registers_s390x_linux64v1): Likewise.
6916 (init_registers_s390x_linux64v2): Likewise.
6917 (s390_num_regs): Increment to 52.
6918 (s390_regmap): Add orig_r2 register.
6919 (s390_num_regs_3264): Increment to 68.
6920 (s390_regmap_3264): Add orig_r2 register.
6921 (s390_collect_ptrace_register): Handle orig_r2 register.
6922 (s390_supply_ptrace_register): Likewise.
6923 (s390_fill_last_break): New function.
6924 (s390_store_last_break): Likewise.
6925 (s390_fill_system_call): New function.
6926 (s390_store_system_call): Likewise.
6927 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6928 register sets.
6929 (s390_check_regset): New function.
6930 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6931 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6932 Update target_regsets for available register sets.
6933
2268b414
JK
69342011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6935 Jan Kratochvil <jan.kratochvil@redhat.com>
6936
6937 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6938 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6939 New.
6940 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6941 * linux-low.h (struct process_info_private): New member r_debug.
6942 * server.c (handle_qxfer_libraries): Call
6943 the_target->qxfer_libraries_svr4.
6944 (handle_qxfer_libraries_svr4): New function.
6945 (qxfer_packets): New entry "libraries-svr4".
6946 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6947 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6948 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6949 PACKET_qXfer_libraries_svr4.
6950
d6db1fab
UW
69512011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6952
6953 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6954 PSW address/mask between 8-byte and 16-byte formats.
6955 (s390_supply_ptrace_register): Likewise.
6956 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6957 basic addressing mode bit.
6958
242f5f1c
SS
69592011-11-24 Stan Shebs <stan@codesourcery.com>
6960
6961 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6962
f196051f
SS
69632011-11-17 Stan Shebs <stan@codesourcery.com>
6964
6965 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6966 (tracing_start_time): New global.
6967 (tracing_stop_time): New global.
6968 (tracing_user_name): New global.
6969 (tracing_notes): New global.
6970 (tracing_stop_note): New global.
6971 (cmd_qtstart): Set traceframe_usage, start_time.
6972 (stop_tracing): Set stop_time.
6973 (cmd_qtstatus): Report additional status.
6974 (cmd_qtp): New function.
6975 (handle_tracepoint_query): Call it.
6976 (cmd_qtnotes): New function.
6977 (handle_tracepoint_general_set): Call it.
6978 (get_timestamp): Rename from tsv_get_timestamp.
6979
405f8e94
SS
69802011-11-14 Stan Shebs <stan@codesourcery.com>
6981 Kwok Cheung Yeung <kcy@codesourcery.com>
6982
6983 * linux-x86-low.c (small_jump_insn): New.
6984 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6985 trampoline and error message, build a trampoline and issue a small
6986 jump instruction to it.
6987 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6988 trampoline and error message.
6989 (x86_get_min_fast_tracepoint_insn_len): New.
6990 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6991 * linux-low.h (struct linux_target_ops): Add arguments to
6992 install_fast_tracepoint_jump_pad operation, add new operation.
6993 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6994 arguments.
6995 (linux_get_min_fast_tracepoint_insn_len): New function.
6996 (linux_target_op): Add new operation.
6997 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6998 (gdb_trampoline_buffer_end): Ditto.
6999 (gdb_trampoline_buffer_error): Ditto.
7000 (struct ipa_sym_addresses): Add fields for new IPA variables.
7001 (symbol_list): Add entries for new IPA variables.
7002 (struct tracepoint): Add fields to hold the address range of the
7003 trampoline used by the tracepoint.
7004 (trampoline_buffer_head): New static variable.
7005 (trampoline_buffer_tail): Ditto.
7006 (claim_trampoline_space): New function.
7007 (have_fast_tracepoint_trampoline_buffer): New function.
7008 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7009 structure.
7010 (install_fast_tracepoint): Ditto, also add error buffer argument.
7011 (cmd_qtminftpilen): New function.
7012 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7013 (fast_tracepoint_from_trampoline_address): New function.
7014 (fast_tracepoint_collecting): Handle trampoline as part of jump
7015 pad space.
7016 (set_trampoline_buffer_space): New function.
7017 (initialize_tracepoint): Initialize new IPA variables.
7018 * target.h (struct target_ops): Add arguments to
7019 install_fast_tracepoint_jump_pad operation, add new
7020 get_min_fast_tracepoint_insn_len operation.
7021 (target_get_min_fast_tracepoint_insn_len): New.
7022 (install_fast_tracepoint_jump_pad): Add arguments.
7023 * server.h (IPA_BUFSIZ): Define.
7024 * linux-i386-ipa.c: Include extra header files.
7025 (initialize_fast_tracepoint_trampoline_buffer): New function.
7026 (initialize_low_tracepoint): Call it.
7027 * server.h (set_trampoline_buffer_space): Declare.
7028 (claim_trampoline_space): Ditto.
7029 (have_fast_tracepoint_trampoline_buffer): Ditto.
7030
1e4d1764
YQ
70312011-11-14 Yao Qi <yao@codesourcery.com>
7032
7033 * server.c (handle_query): Handle InstallInTrace for qSupported.
7034 * tracepoint.c (add_tracepoint): Sort list.
7035 (install_tracepoint, download_tracepoint): New.
7036 (cmd_qtdp): Call them to install and download tracepoints.
7037 (sort_tracepoints): Removed.
7038 (cmd_qtstart): Update.
7039
5c73ff4e
YQ
70402011-11-14 Yao Qi <yao@codesourcery.com>
7041
7042 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7043 * mem-break.h: Declare.
7044 * tracepoint.c (cmd_qtstart): Move some code to ...
7045 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7046 New.
7047 (download_tracepoints): Move some code to ...
7048 (download_tracepoint_1): ... here. New.
7049
86a30030
YQ
70502011-11-08 Yao Qi <yao@codesourcery.com>
7051
7052 * remote-utils.c (relocate_instruction): A comment fix.
7053
8d26e50c
JB
70542011-11-07 Joel Brobecker <brobecker@adacore.com>
7055
7056 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7057 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7058 dr_status_mirror and dr_control_mirror from debug_reg_state.
7059 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7060 (i386_initial_stuff): Remove use of deleted globals.
7061 (i386_get_thread_context, i386_set_thread_context,
7062 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7063 from debug_reg_state.
7064
a59306a3
YQ
70652011-11-05 Yao Qi <yao@codesourcery.com>
7066
7067 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7068 address as TPOINT's.
7069
3065dfb6
SS
70702011-11-02 Stan Shebs <stan@codesourcery.com>
7071
7072 * tracepoint.c (agent_mem_read_string): New function.
7073 (eval_agent_expr): Call it for tracenz.
7074 * server.c (handle_query): Report support for tracenz.
7075
fd0d8c7c
YQ
70762011-11-02 Yao Qi <yao@codesourcery.com>
7077
7078 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7079
609086b1
YQ
70802011-11-02 Yao Qi <yao@codesourcery.com>
7081
7082 * target.h: Fix a typo in comment.
7083
b9fd1791
PA
70842011-10-31 Pedro Alves <pedro@codesourcery.com>
7085
7086 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7087 clobber the breakpoints' shadows with fast tracepoint jumps.
7088 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7089 * target.c (write_inferior_memory): Also pass MYADDR down to
7090 check_mem_write.
7091
03583c20
UW
70922011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7093
7094 * configure.ac: Check support for personality routine.
7095 * configure: Regenerate.
7096 * config.in: Likewise.
7097 * linux-low.c: Include <sys/personality.h>.
7098 Define ADDR_NO_RANDOMIZE if necessary.
7099 (linux_create_inferior): Disable address space randomization when
7100 forking inferior, if requested.
7101 (linux_supports_disable_randomization): New function.
7102 (linux_target_ops): Install it.
7103 * server.h (disable_randomization): Declare.
7104 * server.c (disable_randomization): New global variable.
7105 (handle_general_set): Handle QDisableRandomization.
7106 (handle_query): Likewise for qSupported.
7107 (main): Support --disable-randomization and --no-disable-randomization
7108 command line arguments.
7109 * target.h (struct target_ops): Add supports_disable_randomization.
7110 (target_supports_disable_randomization): New macro.
7111
723b724b
MF
71122011-09-29 Mike Frysinger <vapier@gentoo.org>
7113
7114 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7115 ifdef check.
7116 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7117 [!PT_GETDSBT] (target_loadmap): New definition.
7118 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7119 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7120 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7121 and PT_GETDSBT to LINUX_LOADMAP.
7122 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7123 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7124
55329a5c 71252011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
7126
7127 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7128 (arm_linux_hwbp_cap): New static variable.
7129 (arm_linux_get_hwbp_cap): Replace by ...
7130 (arm_linux_init_hwbp_cap): ... this new function.
7131 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7132 (arm_linux_get_hw_watchpoint_count): Likewise.
7133 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7134 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7135 (arm_prepare_to_resume): Use perror_with_name instead of error.
7136
55329a5c 71372011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
7138
7139 * linux-arm-low.c: Include <signal.h>.
7140 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7141 (struct arm_linux_hwbp_cap): New data type.
7142 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7143 (struct arm_linux_hw_breakpoint): New data type.
7144 (MAX_BPTS, MAX_WPTS): Define.
7145 (struct arch_process_info, struct arch_lwp_info): New data types.
7146 (arm_linux_get_hwbp_cap): New function.
7147 (arm_linux_get_hw_breakpoint_count): Likewise.
7148 (arm_linux_get_hw_watchpoint_count): Likewise.
7149 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7150 (arm_hwbp_control_initialize): Likewise.
7151 (arm_hwbp_control_is_enabled): Likewise.
7152 (arm_hwbp_control_is_initialized): Likewise.
7153 (arm_hwbp_control_disable): Likewise.
7154 (arm_linux_hw_breakpoint_equal): Likewise.
7155 (arm_linux_hw_point_initialize): Likewise.
7156 (struct update_registers_data): New data structure.
7157 (update_registers_callback: New function.
7158 (arm_insert_point): Likewise.
7159 (arm_remove_point): Likewise.
7160 (arm_stopped_by_watchpoint): Likewise.
7161 (arm_stopped_data_address): Likewise.
7162 (arm_new_process): Likewise.
7163 (arm_new_thread): Likewise.
7164 (arm_prepare_to_resume): Likewise.
7165 (the_low_target): Register arm_insert_point, arm_remove_point,
7166 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7167 arm_new_thread, and arm_prepare_to_resume.
7168
6b9801d4
SS
71692011-09-15 Stan Shebs <stan@codesourcery.com>
7170
7171 * server.h (struct emit_ops): Add compare-goto fields.
7172 * tracepoint.c (gdb_agent_op_sizes): New table.
7173 (emit_eq_goto): New function.
7174 (emit_ne_goto): New function.
7175 (emit_lt_goto): New function.
7176 (emit_le_goto): New function.
7177 (emit_gt_goto): New function.
7178 (emit_ge_goto): New function.
7179 (is_goto_target): New function.
7180 (compile_bytecodes): Recognize special cases of compare-goto
7181 combinations and call specialized emitters for them.
7182 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7183 (amd64_emit_ne_goto): New function.
7184 (amd64_emit_lt_goto): New function.
7185 (amd64_emit_le_goto): New function.
7186 (amd64_emit_gt_goto): New function.
7187 (amd64_emit_ge_goto): New function.
7188 (amd64_emit_ops): Add the new functions.
7189 (i386_emit_eq_goto): New function.
7190 (i386_emit_ne_goto): New function.
7191 (i386_emit_lt_goto): New function.
7192 (i386_emit_le_goto): New function.
7193 (i386_emit_gt_goto): New function.
7194 (i386_emit_ge_goto): New function.
7195 (i386_emit_ops): Add the new functions.
7196
bf15cbda
SS
71972011-09-08 Stan Shebs <stan@codesourcery.com>
7198
7199 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7200 (i386_emit_epilogue): Restore %ebx.
7201
943ca1dd
JZ
72022011-08-31 Jie Zhang <jzhang918@gmail.com>
7203
7204 * server.c (step_thread): Remove definition.
7205 (process_serial_event): Don't handle Hs.
7206 * server.h (step_thread): Remove declaration.
7207 * target.c (set_desired_inferior): Remove use of step_thread.
7208
e3deef73
LM
72092011-08-24 Luis Machado <lgustavo@codesourcery.com>
7210
7211 * linux-low.c: Include linux-procfs.h.
7212 (linux_attach_lwp_1): Update comments.
7213 (linux_attach): Scan for existing threads when attaching to a
7214 process that is the tgid.
7215 * Makefile.in: Update dependencies.
7216
13da1c97
LM
72172011-08-24 Luis Machado <lgustavo@codesourcery.com>
7218
7219 * configure.srv: Add linux-procfs.o dependencies.
7220
881127c9
YQ
72212011-08-14 Yao Qi <yao@codesourcery.com>
7222
7223 * target.h (struct target_ops): Fix indent.
7224 * win32-low.c (win32_target_ops): Fix comment.
7225
58dbd541
YQ
72262011-08-14 Andrew Jenner <andrew@codesourcery.com>
7227 Yao Qi <yao@codesourcery.com>
7228
7229 * Makefile.in (clean): Remove tic6x-*.c files.
7230 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7231 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7232 (tic6x-c64xp-linux.c): Likewise.
7233 * configure.srv: Add support for tic6x-*-uclinux.
7234 * linux-tic6x-low.c: New.
7235 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7236
78d85199
YQ
72372011-08-14 Andrew Stubbs <ams@codesourcery.com>
7238 Yao Qi <yao@codesourcery.com>
7239
7240 * target.h (struct target_ops): Add read_loadmap.
7241 * linux-low.c (struct target_loadseg): New type.
7242 (struct target_loadmap): New type.
7243 (linux_read_loadmap): New function.
7244 (linux_target_ops): Add linux_read_loadmap.
7245 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
7246 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7247 to NULL.
78d85199 7248
a959a88d
EZ
72492011-08-05 Eli Zaretskii <eliz@gnu.org>
7250
7251 * win32-low.c: Include <stdint.h>.
7252
1ced966e
PA
72532011-07-22 Pedro Alves <pedro@codesourcery.com>
7254
7255 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7256 to the inferior here.
7257 (i386_remove_aligned_watchpoint): Ditto.
7258 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7259 fit part of the watchpoint in the debug registers.
7260 (i386_update_inferior_debug_regs): New.
7261 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7262 registers, and only update the inferior on success.
7263 (i386_low_remove_watchpoint): Ditto.
7264
d26e3629
KY
72652011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7266
7267 * linux-low.c (compare_ints, unique, list_threads, show_process,
7268 linux_core_of_thread): Delete.
7269 (linux_target_ops): Change linux_core_of_thread to
7270 linux_common_core_of_thread.
7271 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7272 * utils.c (malloc_failure): Change type of argument.
7273 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7274 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7275 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7276 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7277 (IPA_OBJS): Add common-utils-ipa.o.
7278 (ptid_h, linux_osdata_h): New macros.
7279 (server_h): Add common/common-utils.h, common/xml-utils.h,
7280 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7281 common/ptid.h.
7282 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7283 ptid.o, buffer.o): New rules.
7284 (linux-low.o): Add common/linux-osdata.h as a dependency.
7285 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7286 * configure.ac: Add AC_HEADER_DIRENT check.
7287 * config.in: Regenerate.
7288 * configure: Regenerate.
7289 * remote-utils.c (xml_escape_text): Delete.
7290 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7291 buffer_xml_printf): Move to common/buffer.c.
7292 * server.c (main): Remove call to initialize_inferiors.
7293 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7294 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7295 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7296 internal_error, gdb_assert, gdb_assert_fail): Delete.
7297 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7298 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7299 common/buffer.h.
7300 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7301 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7302 initialize_inferiors): Delete.
7303
2275a1a7
PA
73042011-07-20 Pedro Alves <pedro@codesourcery.com>
7305
7306 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7307 symbol error.
7308
0a5b1e09
PA
73092011-05-31 Pedro Alves <pedro@codesourcery.com>
7310
7311 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7312 assertion.
7313 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7314
6938fd34
YQ
73152011-05-26 Yao Qi <yao@codesourcery.com>
7316
7317 * Makefile.in (thread-db.o): Track dependence to
7318 common/gdb_thread_db.h.
7319 * thread-db.c: include gdb_thread_db.h from right place.
7320
b481f9e0
TT
73212011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7322
7323 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7324 __FILE__ and __LINE__ to internal_error.
7325
98a5dd13
DE
73262011-05-13 Doug Evans <dje@google.com>
7327
7328 * thread-db.c (try_thread_db_load_from_sdir): New function.
7329 (try_thread_db_load_from_dir): New function.
7330 (thread_db_load_search): Handle $sdir, ignore $pdir.
7331 Remove trying of system directories if search of
7332 libthread-db-search-path fails, that is now done via $sdir.
7333
d248b706
KY
73342011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7335
7336 * server.c (handle_query): Add EnableDisableTracepoints to the list
7337 of supported features.
43aaf8b6 7338 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 7339 tracepoints.
43aaf8b6
PA
7340 (cmd_qtenable_disable): New.
7341 (cmd_qtstart): Install tracepoints even if disabled.
7342 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7343 receiving a QTEnable or QTDisable packet.
7344 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7345 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7346 tracepoints.
7347 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 7348
84e578fb
DE
73492011-05-10 Doug Evans <dje@google.com>
7350
7351 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7352
71f55dd8
DE
73532011-05-04 Doug Evans <dje@google.com>
7354
7355 * linux-low.c (linux_join): Skip process lookup.
7356 * spu-low.c (spu_join): Ditto.
7357 * server.c (join_inferiors_callback): Delete.
7358 (process_serial_event): For 'D' packet (detach) call join_inferior
7359 directly.
7360
4d393d60
JM
73612011-05-04 Joseph Myers <joseph@codesourcery.com>
7362
7363 * README: Don't mention xscale*-*-linux*.
7364 * configure.srv (xscale*-*-linux*): Don't handle target.
7365
b00ad6ff
NF
73662011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7367
7368 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7369 casting pointers.
7370 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7371 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7372 (i386_emit_void_call_2): Likewise.
7373
af96c192
YQ
73742011-04-26 Yao Qi <yao@codesourcery.com>
7375
43aaf8b6
PA
7376 * linux-low.c: Move common macros to linux-ptrace.h.
7377 Include linux-ptrace.h.
af96c192
YQ
7378 * Makefile.in (linux_ptrace_h): New.
7379 (linux-low.o): Depends on linux-ptrace.h.
7380
03f2bd59
JK
73812011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7382
7383 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7384 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7385 (remote_prepare): New function with most of the TCP code from ...
7386 (remote_open): ... here. Detect PORT here unconditionally. Move also
7387 setting transport_is_reliable.
7388 * server.c (run_once): New variable.
7389 (gdbserver_usage): Document it.
7390 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7391 the first run if RUN_ONCE.
7392 * server.h (run_once, remote_prepare): New declarations.
7393
7a9dd1b2
TT
73942011-04-19 Tom Tromey <tromey@redhat.com>
7395
7396 * win32-low.c (handle_load_dll): Remove duplicate "the".
7397
81239425
PM
73982011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7399
7400 Remove support for old Cygwin 1.5 versions.
7401 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7402 function to avoid warning.
7403 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7404 warning.
7405
9e0627f1
PM
74062011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7407
7408 * gdbserver/server.h (Macro _): Define it if not available.
7409
588eebee
MS
74102011-03-14 Michael Snyder <msnyder@vmware.com>
7411
348af9f7 7412 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 7413
43f70d4c
JB
74142011-03-10 Joel Brobecker <brobecker@adacore.com>
7415
7416 * Makefile.in (maintainer-clean realclean distclean): Remove
7417 "make ... subdir_do" command.
7418
348af9f7
MS
74192011-03-10 Michael Snyder <msnyder@vmware.com>
7420
7421 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7422
7423 * server.c (handle_v_run): Free alloced buffer on early return.
7424
e637a4f5
YQ
74252011-03-09 Yao Qi <yao@codesourcery.com>
7426
7427 Revert:
7428 2011-03-04 Yao Qi <yao@codesourcery.com>
7429
7430 * Makefile.in: Remove GNU make feature --directory.
7431
7432 2011-03-05 Yao Qi <yao@codesourcery.com>
7433
7434 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7435 (subdir_do): New make target. Copied from gdb/Makefile.
7436 (maintainer-clean, realclean, distclean, clean): Call corresponding
7437 make targets in common/Makefile.
7438
7439 2011-02-11 Yao Qi <yao@codesourcery.com>
7440
7441 * configure.ac: Call AC_PROG_RANLIB.
7442 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7443 * configure: Regenerate.
7444
e6edda56
JK
74452011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7446
7447 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7448
e5141119
JB
74492011-03-06 Yao Qi <yao@codesourcery.com>
7450
7451 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7452
64794aa4
JB
74532011-03-05 Yao Qi <yao@codesourcery.com>
7454
7455 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7456 (subdir_do): New make target. Copied from gdb/Makefile.
7457 (maintainer-clean, realclean, distclean, clean): Call corresponding
7458 make targets in common/Makefile.
7459
7a762829
YQ
74602011-03-04 Yao Qi <yao@codesourcery.com>
7461
7462 * Makefile.in: Remove GNU make feature --directory.
7463
348af9f7
MS
74642011-03-04 Michael Snyder <msnyder@vmware.com>
7465
7466 * server.c (queue_stop_reply): Call xmalloc not malloc.
7467
74682011-03-02 Michael Snyder <msnyder@vmware.com>
7469
7470 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7471
9f72fee2
MS
74722011-02-28 Michael Snyder <msnyder@vmware.com>
7473
588eebee
MS
7474 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7475 (cmd_qtframe): Ditto.
7476 (cmd_qtbuffer): Ditto.
7477 (cmd_bigqtbuffer): Ditto.
7478
9f72fee2
MS
7479 * utils.c (decimal2str): Initialize 'width' to nine, then
7480 don't mess with it.
7481
8040bd49
UW
74822011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7483
7484 * hostio.c (require_data): Free *data, not data.
7485
7e52cbd0
JK
74862011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7487
7488 * hostio.c (require_data): Use free, not xfree.
7489
9130f83e
MS
74902011-02-27 Michael Snyder <msnyder@vmware.com>
7491
4b812f4e
MS
7492 * server.c (handle_query): Discard unused value.
7493
9130f83e
MS
7494 * hostio.c (require_data): Free malloc memory before returning
7495 error.
7496
69d37113
MS
74972011-02-26 Michael Snyder <msnyder@vmware.com>
7498
7499 * linux-low.c (list_threads): Call closedir for dirent.
7500
35f5825a
MS
75012011-02-27 Michael Snyder <msnyder@vmware.com>
7502
2a589cef
MS
7503 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7504 a case statement falls through.
7505
0adea5f7
MS
7506 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7507
35f5825a
MS
7508 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7509 in comparison.
7510
238f1c74
MS
75112011-02-26 Michael Snyder <msnyder@vmware.com>
7512
7513 * utils.c (decimal2str): Eliminate dead code and dead param.
7514 (pulongest): Drop dead param from call to decimal2str.
7515 (plongest): Ditto.
7516
633ff500
JB
75172011-02-24 Joel Brobecker <brobecker@adacore.com>
7518
7519 Revert the following patch (not approved yet):
7520 2011-02-21 Hui Zhu <teawater@gmail.com>
7521 * tracepoint.c (tp_printf): New function.
7522 (eval_agent_expr): Handle gdb_agent_op_printf.
7523
f9c6ff72
HZ
75242011-02-21 Hui Zhu <teawater@gmail.com>
7525
7526 * tracepoint.c (tp_printf): New function.
7527 (eval_agent_expr): Handle gdb_agent_op_printf.
7528
94d5e490
TT
75292011-02-18 Tom Tromey <tromey@redhat.com>
7530
7531 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7532 (tracepoint.o): Likewise.
7533 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7534 (gdb_agent_op_names): Likewise.
7535
c7f96d2b
TT
75362011-02-18 Tom Tromey <tromey@redhat.com>
7537
7538 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7539 gdb_agent_op_rot>: New constants.
7540 (gdb_agent_op_names): Add pick and roll.
7541 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7542 cases.
7543
0feedb2c
JK
75442011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7545
7546 * aclocal.m4: Regenerated with aclocal-1.11.1.
7547
b3b9301e
PA
75482011-02-14 Pedro Alves <pedro@codesourcery.com>
7549
7550 * server.c (handle_qxfer_traceframe_info): New.
7551 (qxfer_packets): Register "traceframe-info".
7552 (handle_query): Report support for qXfer:traceframe-info:read+.
7553 * tracepoint.c (match_blocktype): New.
7554 (traceframe_find_block_type): Rename to ...
7555 (traceframe_walk_blocks): ... this. Add callback filter argument,
7556 and use it.
7557 (traceframe_find_block_type): New, reimplemented on top of
7558 traceframe_walk_blocks.
7559 (build_traceframe_info_xml): New.
7560 (traceframe_read_info): New.
7561 * server.h (traceframe_read_info): Declare.
7562
4f3e6fb7
YQ
75632011-02-11 Yao Qi <yao@codesourcery.com>
7564
7565 * configure.ac: Call AC_PROG_RANLIB.
7566 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7567 * configure: Regenerate.
7568
764880b7
PA
75692011-02-07 Pedro Alves <pedro@codesourcery.com>
7570
7571 * server.c (gdb_read_memory): Change return semantics to allow
7572 partial transfers.
7573 (handle_search_memory_1): Adjust.
7574 (process_serial_event) <'m' packet>: Handle partial transfers.
7575 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7576
1c79eb8a
PA
75772011-01-28 Pedro Alves <pedro@codesourcery.com>
7578
7579 * regcache.c (init_register_cache): Initialize
7580 regcache->register_status.
7581 (free_register_cache): Release regcache->register_status.
7582 (regcache_cpy): Copy register_status.
7583 (registers_to_string): Print 'x's for unavailable registers.
7584 (supply_register): Mark the register's status valid or
7585 unavailable, depending on whether a buffer was passed in or not.
7586 (supply_register_zeroed): New.
7587 (supply_regblock): Mark the registers' status valid or
7588 unavailable, depending on whether a buffer was passed in or not.
7589 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7590 (struct regcache): New `register_status' field.
7591 (supply_register_zeroed): Declare.
7592 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7593 supply_register_zeroed, rather than passing a NULL buffer to
7594 supply_register.
7595 * tracepoint.c (fetch_traceframe_registers): Update comment.
7596
85724a0e
PA
75972011-01-28 Pedro Alves <pedro@codesourcery.com>
7598
7599 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7600 buffer explicit.
7601
d08aafef
PA
76022011-01-25 Pedro Alves <pedro@codesourcery.com>
7603
7604 * server.h (decode_xfer_write): Change prototype.
7605 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7606 and don't extract the annex here.
7607 * server.c (decode_xfer_read): Remove `annex' parameter,
7608 and don't extract the annex here.
7609 (decode_xfer): New.
7610 (struct qxfer): New.
7611 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7612 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7613 (handle_qxfer_statictrace): New functions, abstracted out from
7614 handle_query, and made to use the struct qxfer interface.
7615 (handle_threads_qxfer_proper): Rename to ...
7616 (handle_qxfer_threads_proper): ... this.
7617 (handle_threads_qxfer): Rename to ...
7618 (handle_qxfer_threads): ... this. Adjust.
7619 (qxfer_packets): New array.
7620 (handle_qxfer): New function.
7621 (handle_query): Use handle_qxfer.
7622
493e2a69
MS
76232011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7624
7625 * gdbreplay.c: Shorten lines of >= 80 columns.
7626 * linux-low.c: Ditto.
7627 * linux-ppc-low.c: Ditto.
7628 * linux-s390-low.c: Ditto.
7629 * linux-sparc-low.c: Ditto.
7630 * linux-x86-low.c: Ditto.
7631 * linux-xtensa-low.c: Ditto.
7632 * mem-break.c: Ditto.
7633 * nto-low.c: Ditto.
7634 * regcache.h: Ditto.
7635 * remote-utils.c: Ditto.
7636 * server.c: Ditto.
7637 * server.h: Ditto.
7638 * thread-db.c: Ditto.
7639 * tracepoint.c: Ditto.
7640 * utils.c: Ditto.
7641 * win32-low.h: Ditto.
7642
44944448
JB
76432011-01-05 Joel Brobecker <brobecker@adacore.com>
7644
7645 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7646 update.
7647
71ce852c
JB
76482011-01-01 Joel Brobecker <brobecker@adacore.com>
7649
7650 * server.c (gdbserver_version): Update copyright year in version
7651 output.
7652 * gdbreplay.c (gdbreplay_version): Ditto.
7653
eb826dc6
MF
76542010-12-29 Jie Zhang <jie.zhang@analog.com>
7655
7656 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7657 * linux-bfin-low.c: New file.
7658 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7659 PT_DATA_ADDR for BFIN targets.
7660 * Makefile.in (SFILES): Add linux-bfin-low.c.
7661 (clean): Remove reg-bfin.c.
7662 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7663 * README: Mention supported Blackfin targets.
7664
39ab222a
MF
76652010-12-23 Mike Frysinger <vapier@gentoo.org>
7666
7667 * .gitignore: New file.
7668
a1f2ce7d
MF
76692010-11-16 Mike Frysinger <vapier@gentoo.org>
7670
7671 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7672
f474844c
JZ
76732010-10-22 Jie Zhang <jie@codesourcery.com>
7674
7675 * Makefile.in: Add FLAGS_TO_PASS variable.
7676 (install): Remove dependency of install-only and recursively
7677 invoke make for install-only.
7678
f1048712
DE
76792010-10-04 Doug Evans <dje@google.com>
7680
7681 * Makefile.in (uninstall): Use $(DESTDIR).
7682
b53a1623
PA
76832010-09-24 Pedro Alves <pedro@codesourcery.com>
7684
e6ee044d
PA
7685 PR gdb/11842
7686
b53a1623
PA
7687 * linux-x86-low.c (compat_siginfo_from_siginfo)
7688 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7689 si_code is < 0. Check for si_code == SI_TIMER before checking for
7690 si_code < 0.
7691
fa1bd1e4
JB
76922010-09-13 Joel Brobecker <brobecker@adacore.com>
7693
7694 * lynx-i386-low.c: New file.
7695 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7696
47fac8f8
JB
76972010-09-13 Joel Brobecker <brobecker@adacore.com>
7698
7699 * lynx-low.c (ptrace_request_to_str): Remove handling for
7700 request values that have been removed in LynxOS 5.x.
7701
1adfc54d
JB
77022010-09-13 Joel Brobecker <brobecker@adacore.com>
7703
7704 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7705 <ptrace.h>
7706
c2a66c29
NS
77072010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7708
7709 * configure.ac: Add --enable-inprocess-agent option.
7710 * configure: Rebuilt.
7711
32fcada3
YQ
77122010-09-06 Yao Qi <yao@codesourcery.com>
7713
7714 * linux-low.c (linux_kill): Remove unused variable.
7715 (linux_stabilize_threads): Likewise.
7716 * server.c (start_inferior): Likewise.
7717 (queue_stop_reply_callback): Likewise.
7718 * tracepoint.c (do_action_at_tracepoint): Likewise.
7719
0cccb683
YQ
77202010-09-06 Yao Qi <yao@codesourcery.com>
7721
7722 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7723 on return.
7724
423ec54c
JK
77252010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7726
7727 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7728
12ac6819
PA
77292010-09-06 Pedro Alves <pedro@codesourcery.com>
7730
7731 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7732 "$(IPA_DEPFILES)".
7733
8ed54b31
JB
77342010-09-01 Joel Brobecker <brobecker@adacore.com>
7735
7736 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7737 gdbserver/lynx-ppc-low.c: New files.
7738 * Makefile.in (lynx_low_h): New variable.
7739 (lynx-low.o, lynx-ppc-low.o): New rules.
7740 * configure.ac: On LynxOS, link with -lnetinet.
7741 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7742 * configure: regenerate.
7743
bb0116a4
JB
77442010-09-01 Joel Brobecker <brobecker@adacore.com>
7745
7746 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7747 * configure.ac: Add check for vasprintf and vsnprintf.
7748 * configure, config.in: Regenerate.
7749 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7750
a778ab81 77512010-09-01 Joel Brobecker <brobecker@adacore.com>
7752
7753 * gdbreplay.c: Move include of alloca.h up, next to include of
7754 malloc.h.
7755 * server.h: Add include of malloc.h.
7756 * mem-break.c: Remove include of malloc.h.
7757 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7758
8b034a19 77592010-09-01 Joel Brobecker <brobecker@adacore.com>
7760
7761 * Makefile.in (memmem.o): Build with -Wno-error.
7762
77632010-09-01 Joel Brobecker <brobecker@adacore.com>
7764
7765 * utils.c (xsnprintf): Make non-static.
7766 * server.h: Add xsnprintf declaration.
7767 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7768 replace calls to snprintf by calls to xsnprintf throughout.
7769
77702010-09-01 Joel Brobecker <brobecker@adacore.com>
7771
7772 * configure.ac: Add configure check for alloca.
7773 * configure, config.in: Regenerate.
7774 * server.h: Include alloca.h if it exists.
7775 * gdbreplay.c: Include alloca.h if it exists.
7776
1a981360
PA
77772010-08-28 Pedro Alves <pedro@codesourcery.com>
7778
7779 * linux-low.c (__SIGRTMIN): Define if not already defined.
7780 (linux_create_inferior): Check for __ANDROID__ rather than
7781 __SIGRTMIN.
7782 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7783 are already deferred.
7784 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7785 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7786 stopped and already has a pending signal to report.
7787 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7788 a pending signal to report or is moving out of a jump pad.
7789 (linux_init_signals): Check for __ANDROID__ rather than
7790 __SIGRTMIN.
7791
b4d51a55
PA
77922010-08-28 Pedro Alves <pedro@codesourcery.com>
7793
7794 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7795 debug_threads check. Avoid a linear search when not doing debug
7796 output.
7797
ec48365d
PA
77982010-08-27 Pedro Alves <pedro@codesourcery.com>
7799
7800 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7801 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7802 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7803 (process_event): Change local fd's type to gdb_fildes_t.
7804 (create_file_handler): Adjust prototype.
7805 (delete_file_handler): Adjust prototype.
7806 (handle_file_event): Adjust prototype. Use pfildes.
7807 (create_file_event): Adjsut prototype.
7808 * remote-utils.c (remote_desc, listen_desc): Change type to
7809 gdb_fildes_t.
7810 * server.h: New gdb_fildes_t typedef.
7811 [USE_WIN32API]: Include winsock2.h.
7812 (delete_file_handler, add_file_handler): Adjust prototypes.
7813 (pfildes): Declare.
7814 * utils.c (pfildes): New.
7815
854d88f0
PA
78162010-08-27 Pedro Alves <pedro@codesourcery.com>
7817
7818 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7819 * configure: Regenerate.
7820
0146f85b
PA
78212010-08-27 Pedro Alves <pedro@codesourcery.com>
7822
7823 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7824 (linux_done_accessing_memory): ... this.
7825 (linux_target_ops): Adjust.
7826 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7827 * nto-low.c (nto_target_ops): Adjust comment.
7828 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7829 * spu-low.c (spu_target_ops): Adjust comment.
7830 * target.h (target_ops): Rename unprepare_to_access_memory field
7831 to done_accessing_memory.
7832 (unprepare_to_access_memory): Rename to ...
7833 (done_accessing_memory): ... this.
7834
90d74c30
PA
78352010-08-26 Pedro Alves <pedro@codesourcery.com>
7836
7837 * linux-low.c (linux_prepare_to_access_memory): New.
7838 (linux_unprepare_to_access_memory): New.
7839 (linux_target_ops): Install them.
7840 * server.c (read_memory): Rename to ...
7841 (gdb_read_memory): ... this. Use
7842 prepare_to_access_memory/prepare_to_access_memory.
7843 (write_memory): Rename to ...
7844 (gdb_write_memory): ... this. Use
7845 prepare_to_access_memory/prepare_to_access_memory.
7846 (handle_search_memory_1): Adjust.
7847 (process_serial_event): Adjust.
7848 * target.h (struct target_ops): New fields
7849 prepare_to_access_memory and unprepare_to_access_memory.
7850 (prepare_to_access_memory, unprepare_to_access_memory): New.
7851 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7852 prepare_to_access_memory/prepare_to_access_memory.
7853 * nto-low.c (nto_target_ops): Adjust.
7854 * spu-low.c (spu_target_ops): Adjust.
7855 * win32-low.c (win32_target_ops): Adjust.
7856
fd467969
PA
78572010-08-26 Pedro Alves <pedro@codesourcery.com>
7858
7859 * Makefile.in (WARN_CFLAGS): Get it from configure.
7860 (WERROR_CFLAGS): New.
7861 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7862 * configure.ac: Introduce --enable-werror, which adds -Werror to
7863 the compiler command line. Enabled by default. Disable with
7864 --disable-werror. Add -Wdeclaration-after-statement
7865 Wpointer-arith and -Wformat-nonliteral to warning flags.
7866 * configure: Regenerate.
7867
331e2f5f
PA
78682010-08-26 Pedro Alves <pedro@codesourcery.com>
7869
7870 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7871
e581f2b4
PA
78722010-08-26 Pedro Alves <pedro@codesourcery.com>
7873
7874 * gdbreplay.c (remote_error): New.
7875 (gdbchar): New.
7876 (expect): Use gdbchar. Check for error reading from GDB.
7877 Clarify sync error output.
7878 (play): Check for errors writing to GDB.
7879 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7880 * remote-utils.c (getpkt): Check for errors writing to the remote
7881 descriptor.
7882
3c11dd79
PA
78832010-08-25 Pedro Alves <pedro@codesourcery.com>
7884
7885 * linux-low.c (linux_wait_1): Move non-debugging code out of
7886 `debug_threads' control.
7887
d20a8ad9
PA
78882010-08-25 Pedro Alves <pedro@codesourcery.com>
7889
7890 * linux-low.c (linux_wait_1): Don't set last_status here.
7891 * server.c (push_event, queue_stop_reply_callback): Assert we're
7892 not pushing a TARGET_WAITKIND_IGNORE event.
7893 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7894 (myresume, handle_target_event): Set the thread's last_resume_kind
7895 and last_status from the target returned status.
7896
964e4306
PA
78972010-08-25 Pedro Alves <pedro@codesourcery.com>
7898
7899 PR threads/10729
7900
7901 * linux-x86-low.c (update_debug_registers_callback): New.
7902 (i386_dr_low_set_addr): Use it.
7903 (i386_dr_low_get_addr): New.
7904 (i386_dr_low_set_control): Use update_debug_registers_callback.
7905 (i386_dr_low_get_control): New.
7906 (i386_dr_low_get_status): Adjust.
7907 * linux-low.c (linux_stop_lwp): New.
7908 * linux-low.h (linux_stop_lwp): Declare.
7909
7910 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7911 argument instead of a i386_debug_reg_state.
7912 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7913 a i386_debug_reg_state.
7914 (i386_insert_aligned_watchpoint): Adjust.
7915 (i386_remove_aligned_watchpoint): Adjust.
7916 (i386_low_stopped_data_address): Read the debug registers from the
7917 inferior instead of from the mirrors.
7918 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7919 (i386_dr_low_get_addr): Declare.
7920 (i386_dr_low_get_control): Declare.
7921 (i386_dr_low_get_status): Change prototype.
7922
7923 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7924 (i386_dr_low_get_addr): New.
7925 (i386_dr_low_get_control): New.
7926 (i386_dr_low_get_status): Adjust prototype. Return
7927 dr_status_mirror.
7928 (i386_initial_stuff): Clear dr_status_mirror and
7929 dr_control_mirror.
7930 (i386_get_thread_context): Adjust.
7931 (i386_set_thread_context): Adjust.
7932 (i386_thread_added): Adjust.
7933
5f21a75b
PA
79342010-08-24 Pedro Alves <pedro@codesourcery.com>
7935
7936 * linux-low.h (linux_thread_area): Delete declaration.
7937
3e4c1235
TS
79382010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7939
7940 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7941 after its termination.
7942
1971b033
PA
79432010-08-09 Pedro Alves <pedro@codesourcery.com>
7944
7945 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7946 (gdb_wants_all_stopped): Delete.
7947 (linux_wait_1): Don't call them.
7948 * server.c (handle_v_cont): Tag all threads as want-stopped.
7949 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7950 stopped as "client-wants-stopped".
7951
310444ac
PA
79522010-07-31 Pedro Alves <pedro@codesourcery.com>
7953
7954 * Makefile.in (signals_h): New.
7955 (server_h): Depend on it.
7956 (server.o): Don't depend on $(signals_def).
7957 (signals.o): Depend on $(signals_def).
7958
a19cae16
JK
79592010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7960
7961 * Makefile.in (signals_def): New.
7962 (server_h): Append include/gdb/signals.h and signals_def.
7963 (server.o): Append signals_def.
7964
30d50328
JK
79652010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7966
7967 * server.c (handle_target_event): Use target_signal_to_host for
7968 resume_info.sig initialization.
7969 * target.h (struct thread_resume) <sig>: New comment.
7970
5c3216e2
OS
79712010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7972
c6f46ca0
OS
7973 * server.c (handle_query): strcpy() the returned string from paddress()
7974 instead of sprintf().
5c3216e2
OS
7975 * utils.c (paddress): Return phex_nz().
7976
6bd31874
JB
79772010-07-07 Joel Brobecker <brobecker@adacore.com>
7978
7979 * server.c (handle_v_cont): Call mourn_inferior if process
7980 just exited.
7981 (myresume): Likewise.
7982
0fb4aa4b
PA
79832010-07-01 Pedro Alves <pedro@codesourcery.com>
7984
7985 Static tracepoints, and integration with UST.
7986
7987 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7988 * mem-break.c (uninsert_all_breakpoints)
7989 (reinsert_all_breakpoints): New.
7990 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7991 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7992 (gdb_agent_ust_loaded, helper_thread_id)
7993 (gdb_agent_helper_thread_id): New macros.
7994 (struct ipa_sym_addresses): Add addr_ust_loaded,
7995 addr_helper_thread_id, addr_cmd_buf.
7996 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7997 (in_process_agent_loaded_ust): New.
7998 (write_e_ust_not_loaded): New.
7999 (maybe_write_ipa_ust_not_loaded): New.
8000 (struct collect_static_trace_data_action): New.
8001 (enum tracepoint_type) <static_tracepoint>: New.
8002 (struct tracepoint) <handle>: Mention static tracepoints.
8003 (struct static_tracepoint_ctx): New.
8004 (CMD_BUF_SIZE): New.
8005 (add_tracepoint_action): Handle static tracepoint actions.
8006 (unprobe_marker_at): New.
8007 (clear_installed_tracepoints): Handle static tracepoints.
8008 (cmd_qtdp): Handle static tracepoints.
8009 (probe_marker_at): New.
8010 (cmd_qtstart): Handle static tracepoints.
8011 (response_tracepoint): Handle static tracepoints.
8012 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8013 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8014 (get_context_regcache): Handle static tracepoints.
8015 (do_action_at_tracepoint): Handle static tracepoint actions.
8016 (traceframe_find_block_type): Handle static trace data blocks.
8017 (traceframe_read_sdata): New.
8018 (download_tracepoints): Download static tracepoint actions.
8019 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8020 (GDB_PROBE_NAME): New.
8021 (ust_ops): New.
8022 (GET_UST_SYM): New.
8023 (USTF): New.
8024 (dlsym_ust): New.
8025 (ust_marker_to_static_tracepoint): New.
8026 (gdb_probe): New.
8027 (collect_ust_data_at_tracepoint): New.
8028 (gdb_ust_probe): New.
8029 (UNIX_PATH_MAX, SOCK_DIR): New.
8030 (gdb_ust_connect_sync_socket): New.
8031 (resume_thread, stop_thread): New.
8032 (run_inferior_command): New.
8033 (init_named_socket): New.
8034 (gdb_ust_socket_init): New.
8035 (cstr_to_hexstr): New.
8036 (next_st): New.
8037 (first_marker, next_marker): New.
8038 (response_ust_marker): New.
8039 (cmd_qtfstm, cmd_qtsstm): New.
8040 (unprobe_marker_at, probe_marker_at): New.
8041 (cmd_qtstmat, gdb_ust_thread): New.
8042 (gdb_ust_init): New.
8043 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8044 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8045 (ST_REGENTRY): New.
8046 (x86_64_st_collect_regmap): New.
8047 (X86_64_NUM_ST_COLLECT_GREGS): New.
8048 (AMD64_RIP_REGNUM): New.
8049 (supply_static_tracepoint_registers): New.
8050 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8051 (ST_REGENTRY): New.
8052 (i386_st_collect_regmap): New.
8053 (i386_NUM_ST_COLLECT_GREGS): New.
8054 (supply_static_tracepoint_registers): New.
8055 * server.c (handle_query): Handle qXfer:statictrace:read.
8056 <qSupported>: Report support for StaticTracepoints, and
8057 qXfer:statictrace:read features.
8058 * server.h (traceframe_read_sdata)
8059 (supply_static_tracepoint_registers): Declare.
8060 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8061 (unpack_varlen_hex): Include in IPA build.
8062 * Makefile.in (ustlibs, ustinc): New.
8063 (IPA_OBJS): Add remote-utils-ipa.o.
8064 ($(IPA_LIB)): Link -ldl and -lpthread.
8065 (UST_CFLAGS): New.
8066 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8067 * config.in, configure: Regenerate.
8068
9e4344e5
PA
80692010-06-20 Ian Lance Taylor <iant@google.com>
8070 Pedro Alves <pedro@codesourcery.com>
8071
8072 * linux-x86-low.c (always_true): Delete.
8073 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8074 trying to fool the compiler with always_true.
8075
c6beb2cb
PA
80762010-06-20 Pedro Alves <pedro@codesourcery.com>
8077
8078 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8079 conditions in gdbserver.
8080
d2ed6730
UW
80812010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8082
8083 * spu-low.c (spu_read_memory): Wrap around local store limit.
8084 (spu_write_memory): Likewise.
8085
4e29fb54
PA
80862010-06-15 Pedro Alves <pedro@codesourcery.com>
8087
8088 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8089 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8090 LONGEST uses.
8091 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8092 uses.
8093 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8094 uses with LONGEST uses.
8095
6a271cae
PA
80962010-06-14 Stan Shebs <stan@codesourcery.com>
8097 Pedro Alves <pedro@codesourcery.com>
8098
8099 Bytecode compiler.
8100
8101 * linux-x86-low.c: Include limits.h.
8102 (add_insns): New.
8103 (always_true): New.
8104 (EMIT_ASM): New.
8105 (EMIT_ASM32): New.
8106 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8107 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8108 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8109 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8110 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8111 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8112 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8113 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8114 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8115 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8116 (amd64_emit_void_call_2): New.
8117 (amd64_emit_ops): New.
8118 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8119 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8120 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8121 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8122 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8123 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8124 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8125 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8126 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8127 (i386_emit_stack_adjust, i386_emit_int_call_1)
8128 (i386_emit_void_call_2): New.
8129 (i386_emit_ops): New.
8130 (x86_emit_ops): New.
8131 (the_low_target): Install x86_emit_ops.
8132 * server.h (struct emit_ops): New.
8133 (get_raw_reg_func_addr): Declare.
8134 (current_insn_ptr, emit_error): Declare.
8135 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8136 (set_trace_state_variable_value): New defines.
8137 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8138 addr_get_trace_state_variable_value and
8139 addr_set_trace_state_variable_value.
8140 (symbol_list): New fields for get_raw_reg,
8141 get_trace_state_variable_value and set_trace_state_variable_value.
8142 (condfn): New typedef.
8143 (struct tracepoint): New field `compiled_cond'.
8144 (do_action_at_tracepoint): Clear compiled_cond.
8145 (get_trace_state_variable_value, set_trace_state_variable_value):
8146 Export in the IPA.
8147 (condition_true_at_tracepoint): If there's a compiled condition,
8148 run that.
8149 (current_insn_ptr, emit_error): New globals.
8150 (struct bytecode_address): New.
8151 (get_raw_reg_func_addr): New.
8152 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8153 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8154 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8155 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8156 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8157 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8158 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8159 (compile_tracepoint_condition, compile_bytecodes): New.
8160 * target.h (emit_ops): Forward declare.
8161 (struct target_ops): New field emit_ops.
8162 (target_emit_ops): New.
8163 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8164 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8165 * linux-low.c (linux_emit_ops): New.
8166 (linux_target_ops): Install it.
8167 * linux-low.h (struct linux_target_ops): New field emit_ops.
8168
92b72907
UW
81692010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8170
8171 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8172 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8173
fa593d66
PA
81742010-06-01 Pedro Alves <pedro@codesourcery.com>
8175 Stan Shebs <stan@codesourcery.com>
8176
8177 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8178 (all): Depend on $(extra_libraries).
8179 (install-only): Install the IPA.
8180 (IPA_OBJS, IPA_LIB): New.
8181 (clean): Remove the IPA lib.
8182 (IPAGENT_CFLAGS): New.
8183 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8184 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8185 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8186 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8187 * configure.ac: Check for atomic builtins support in the compiler.
8188 (IPA_DEPFILES, extra_libraries): Define.
8189 * configure.srv (ipa_obj): Add description.
8190 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8191 (i[34567]86-*-linux*): Set ipa_obj.
8192 (x86_64-*-linux*): Set ipa_obj.
8193 * linux-low.c (stabilizing_threads): New.
8194 (supports_fast_tracepoints): New.
8195 (linux_detach): Stabilize threads before detaching.
8196 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8197 the lwp is either not stabilizing, or is moving out of a jump pad.
8198 (linux_fast_tracepoint_collecting): New.
8199 (maybe_move_out_of_jump_pad): New.
8200 (enqueue_one_deferred_signal): New.
8201 (dequeue_one_deferred_signal): New.
8202 (linux_wait_for_event_1): If moving out of a jump pad, defer
8203 pending signals to later.
8204 (linux_stabilize_threads): New.
8205 (linux_wait_1): Check if threads need moving out of jump pads, and
8206 do it if so.
8207 (stuck_in_jump_pad_callback): New.
8208 (move_out_of_jump_pad_callback): New.
8209 (lwp_running): New.
8210 (linux_resume_one_lwp): Handle moving out of jump pads.
8211 (linux_set_resume_request): Dequeue deferred signals.
8212 (need_step_over_p): Also step over fast tracepoint jumps.
8213 (start_step_over): Also uninsert fast tracepoint jumps.
8214 (finish_step_over): Also reinsert fast tracepoint jumps.
8215 (linux_install_fast_tracepoint_jump): New.
8216 (linux_target_ops): Install linux_stabilize_threads and
8217 linux_install_fast_tracepoint_jump_pad.
8218 * linux-low.h (linux_target_ops) <get_thread_area,
8219 install_fast_tracepoint_jump_pad>: New fields.
8220 (struct lwp_info) <collecting_fast_tracepoint,
8221 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8222 (linux_get_thread_area): Declare.
8223 * linux-x86-low.c (jump_insn): New.
8224 (x86_get_thread_area): New.
8225 (append_insns): New.
8226 (push_opcode): New.
8227 (amd64_install_fast_tracepoint_jump_pad): New.
8228 (i386_install_fast_tracepoint_jump_pad): New.
8229 (x86_install_fast_tracepoint_jump_pad): New.
8230 (the_low_target): Install x86_get_thread_area and
8231 x86_install_fast_tracepoint_jump_pad.
8232 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8233 (struct fast_tracepoint_jump): New.
8234 (fast_tracepoint_jump_insn): New.
8235 (fast_tracepoint_jump_shadow): New.
8236 (find_fast_tracepoint_jump_at): New.
8237 (fast_tracepoint_jump_here): New.
8238 (delete_fast_tracepoint_jump): New.
8239 (set_fast_tracepoint_jump): New.
8240 (uninsert_fast_tracepoint_jumps_at): New.
8241 (reinsert_fast_tracepoint_jumps_at): New.
8242 (set_breakpoint_at): Use write_inferior_memory.
8243 (uninsert_raw_breakpoint): Use write_inferior_memory.
8244 (check_mem_read): Mask out fast tracepoint jumps.
8245 (check_mem_write): Mask out fast tracepoint jumps.
8246 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8247 (set_fast_tracepoint_jump): Declare.
8248 (delete_fast_tracepoint_jump)
8249 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8250 (reinsert_fast_tracepoint_jumps_at): Declare.
8251 * regcache.c: Don't compile many functions when building the
8252 in-process agent library.
8253 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8254 the register buffer in the heap.
8255 (free_register_cache): If the register buffer isn't owned by the
8256 regcache, don't free it.
8257 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8258 pre-existing register caches.
8259 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8260 type.
8261 (convert_ascii_to_int): : Constify `from' parameter type.
8262 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8263 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8264 the needed buffer in-place.
8265 (relocate_instruction): New.
8266 * server.c (handle_query) <qSymbols>: If the target supports
8267 tracepoints, give it a chance of looking up symbols. Report
8268 support for fast tracepoints.
8269 (handle_status): Stabilize threads.
8270 (process_serial_event): Adjust.
8271 * server.h (struct fast_tracepoint_jump): Forward declare.
8272 (struct process_info) <fast_tracepoint_jumps>: New field.
8273 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8274 (decode_X_packet, decode_M_packet): Adjust.
8275 (relocate_instruction): Declare.
8276 (in_process_agent_loaded): Declare.
8277 (tracepoint_look_up_symbols): Declare.
8278 (struct fast_tpoint_collect_status): Declare.
8279 (fast_tracepoint_collecting): Declare.
8280 (force_unlock_trace_buffer): Declare.
8281 (handle_tracepoint_bkpts): Declare.
8282 (initialize_low_tracepoint)
8283 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8284 * target.h (struct target_ops) <stabilize_threads,
8285 install_fast_tracepoint_jump_pad>: New fields.
8286 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8287 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8288 [HAVE_STDINT_H]: Include stdint.h.
8289 (trace_debug_1): Rename to ...
8290 (trace_vdebug): ... this.
8291 (trace_debug): Rename to ...
8292 (trace_debug_1): ... this. Add `level' parameter.
8293 (trace_debug): New.
8294 (ATTR_USED, ATTR_NOINLINE): New.
8295 (IP_AGENT_EXPORT): New.
8296 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8297 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8298 (about_to_request_buffer_space, trace_buffer_is_full)
8299 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8300 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8301 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8302 (traceframe_write_count, traceframes_created)
8303 (trace_state_variables)
8304 New renaming defines.
8305 (struct ipa_sym_addresses): New.
8306 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8307 (symbol_list): New.
8308 (ipa_sym_addrs): New.
8309 (all_tracepoint_symbols_looked_up): New.
8310 (in_process_agent_loaded): New.
8311 (write_e_ipa_not_loaded): New.
8312 (maybe_write_ipa_not_loaded): New.
8313 (tracepoint_look_up_symbols): New.
8314 (debug_threads) [IN_PROCESS_AGENT]: New.
8315 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8316 (UNKNOWN_SIDE_EFFECTS): New.
8317 (stop_tracing): New.
8318 (flush_trace_buffer): New.
8319 (stop_tracing_bkpt): New.
8320 (flush_trace_buffer_bkpt): New.
8321 (read_inferior_integer): New.
8322 (read_inferior_uinteger): New.
8323 (read_inferior_data_pointer): New.
8324 (write_inferior_data_pointer): New.
8325 (write_inferior_integer): New.
8326 (write_inferior_uinteger): New.
8327 (struct collect_static_trace_data_action): Delete.
8328 (enum tracepoint_type): New.
8329 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
8330 <actions_str, step_actions, step_actions_str>: Only include in
8331 GDBserver.
fa593d66
PA
8332 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8333 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8334 (tracepoints): Use IP_AGENT_EXPORT.
8335 (last_tracepoint): Don't include in the IPA.
8336 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8337 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8338 (alloced_trace_state_variables): New.
8339 (trace_state_variables): Use IP_AGENT_EXPORT.
8340 (traceframe_t): Delete unused variable.
8341 (circular_trace_buffer): Don't include in the IPA.
8342 (trace_buffer_start): Delete.
8343 (struct trace_buffer_control): New.
8344 (trace_buffer_free): Delete.
8345 (struct ipa_trace_buffer_control): New.
8346 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8347 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8348 New.
8349 (trace_buffer_ctrl): New.
8350 (TRACE_BUFFER_CTRL_CURR): New.
8351 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8352 Reimplement as macros.
8353 (trace_buffer_wrap): Delete.
8354 (traceframe_write_count, traceframe_read_count)
8355 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8356 (struct tracepoint_hit_ctx) <type>: New field.
8357 (struct fast_tracepoint_ctx): New.
8358 (memory_barrier): New.
8359 (cmpxchg): New.
8360 (record_tracepoint_error): Update atomically in the IPA.
8361 (clear_inferior_trace_buffer): New.
8362 (about_to_request_buffer_space): New.
8363 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8364 updating the same buffer.
8365 (add_tracepoint): Default the tracepoint's type to trap
8366 tracepoint, and orig_size to -1.
8367 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8368 internal variables.
8369 (create_trace_state_variable): New parameter `gdb'. Handle it.
8370 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8371 (cmd_qtdp): Handle fast tracepoints.
8372 (cmd_qtdv): Adjust.
8373 (max_jump_pad_size): New.
8374 (gdb_jump_pad_head): New.
8375 (get_jump_space_head): New.
8376 (claim_jump_space): New.
8377 (sort_tracepoints): New.
8378 (MAX_JUMP_SIZE): New.
8379 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8380 IPA.
8381 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8382 support. Upload fast traceframes, and delete internal IPA
8383 breakpoints.
8384 (stop_tracing_handler): New.
8385 (flush_trace_buffer_handler): New.
8386 (cmd_qtstop): Upload fast tracepoints.
8387 (response_tracepoint): Handle fast tracepoints.
8388 (tracepoint_finished_step): Upload fast traceframes. Set the
8389 tracepoint hit context's tracepoint type.
8390 (handle_tracepoint_bkpts): New.
8391 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8392 type. Add comment about fast tracepoints.
8393 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8394 non-existing action_str field.
8395 (get_context_regcache): Handle fast tracepoints.
8396 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8397 to the regcache.
8398 (fast_tracepoint_from_jump_pad_address): New.
8399 (fast_tracepoint_from_ipa_tpoint_address): New.
8400 (collecting_t): New.
8401 (force_unlock_trace_buffer): New.
8402 (fast_tracepoint_collecting): New.
8403 (collecting): New.
8404 (gdb_collect): New.
8405 (write_inferior_data_ptr): New.
8406 (target_tp_heap): New.
8407 (target_malloc): New.
8408 (download_agent_expr): New.
8409 (UALIGN): New.
8410 (download_tracepoints): New.
8411 (download_trace_state_variables): New.
8412 (upload_fast_traceframes): New.
8413 (IPA_FIRST_TRACEFRAME): New.
8414 (IPA_NEXT_TRACEFRAME_1): New.
8415 (IPA_NEXT_TRACEFRAME): New.
8416 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8417 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8418 (gdb_jump_pad_buffer_end): New.
8419 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8420 (initialize_tracepoint): Adjust.
8421 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8422 buffer. Initialize the low module.
8423 * utils.c (PREFIX, TOOLNAME): New.
8424 (malloc_failure): Use PREFIX.
8425 (error): In the IPA, an error causes an exit.
8426 (fatal, warning): Use PREFIX.
8427 (internal_error): Use TOOLNAME.
8428 (NUMCELLS): Increase to 10.
8429 * configure, config.in: Regenerate.
8430
d149dd1d
PA
84312010-06-01 Pedro Alves <pedro@codesourcery.com>
8432
8433 * server.c (handle_query) <qSupported>: Do two passes over the
8434 qSupported string to avoid nesting strtok.
8435
f6528abd
JK
84362010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8437
8438 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8439 (CDEPS): New.
8440 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8441 -Wl,--dynamic-list.
8442 * configure: Regenerate.
8443 * proc-service.list: New.
8444
ca2a87a0
JK
84452010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8446
8447 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8448 New comment.
8449
363a6e9f
OS
84502010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8451
8452 * gdbreplay.c (remote_open): Check error return from socket() call by
8453 its equality to -1 not by it being negative.
8454 * remote-utils.c (remote_open): Likewise.
8455
d23b6cb1
PA
84562010-05-23 Pedro Alves <pedro@codesourcery.com>
8457
8458 * config.h: Regenerate.
8459
28d3cf85
MK
84602010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8461
8462 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8463 doesn't provide PTRACE_GET_THREAD_AREA.
8464
fea36a59
MK
84652010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8466
8467 * linux-m68k-low.c: Include <asm/ptrace.h>
8468 (ps_get_thread_area): Implement.
8469
24b066ba
DE
84702010-05-03 Doug Evans <dje@google.com>
8471
8472 * event-loop.c (struct callback_event): New struct.
8473 (callback_list): New global.
8474 (append_callback_event, delete_callback_event): New functions.
8475 (process_callback): New function.
8476 (start_event_loop): Call it.
8477 * remote-utils.c (NOT_SCHEDULED): Define.
8478 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8479 moved out of readchar.
8480 (readchar): Rewrite. Call reschedule before returning.
8481 (reset_readchar): New function.
8482 (remote_close): Call it.
8483 (process_remaining, reschedule): New functions.
8484 * server.h (callback_handler_func): New typedef.
8485 (append_callback_event, delete_callback_event): Declare.
8486
9836d6ea
PA
84872010-05-03 Pedro Alves <pedro@codesourcery.com>
8488
8489 * proc-service.c (ps_pglobal_lookup): Use
8490 thread_db_look_up_one_symbol.
8491 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8492 parameter. Use it instead of all_symbols_looked_up.
8493 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8494 field.
8495 (all_symbols_looked_up): Don't declare.
8496 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8497 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8498 field.
8499 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8500 Set all_symbols_looked_up here.
8501 (thread_db_look_up_one_symbol): New.
8502 (thread_db_get_tls_address): Adjust.
8503 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8504 thread_db object on the heap, and tentatively set it in the
8505 process structure.
8506 (thread_db_init): Don't set all_symbols_looked_up here.
8507 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8508
7984d532
PA
85092010-05-03 Pedro Alves <pedro@codesourcery.com>
8510
8511 * linux-low.c (linux_kill, linux_detach): Adjust.
8512 (status_pending_p_callback): Remove redundant statement. Check
8513 for !TARGET_WAITIKIND_IGNORE, instead of
8514 TARGET_WAITKIND_STOPPED.
8515 (handle_tracepoints): Make sure LWP is locked. Adjust.
8516 (linux_wait_for_event_1): Adjust.
8517 (linux_cancel_breakpoints): New.
8518 (unsuspend_one_lwp): New.
8519 (unsuspend_all_lwps): New.
8520 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8521 (send_sigstop_callback): Change return type to int, add new
8522 `except' parameter and handle it.
8523 (suspend_and_send_sigstop_callback): New.
8524 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8525 pass them down. If SUSPEND, also increment the lwp's suspend
8526 count.
8527 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8528 (need_step_over_p): Don't consider suspended LWPs.
8529 (start_step_over): Adjust.
8530 (proceed_one_lwp): Change return type to int, add new `except'
8531 parameter and handle it.
8532 (unsuspend_and_proceed_one_lwp): New.
8533 (proceed_all_lwps): Use find_inferior instead of
8534 for_each_inferior.
8535 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8536 also decrement the suspend count of LWPs. Pass `except' down,
8537 instead of hacking its suspend count.
8538 (linux_pause_all): Add `freeze' parameter. Adjust.
8539 (linux_unpause_all): New.
8540 (linux_target_ops): Install linux_unpause_all.
8541 * server.c (handle_status): Adjust.
8542 * target.h (struct target_ops): New fields `unpause_all' and
8543 `cancel_breakpoints'. Add new parameter to `pause_all'.
8544 (pause_all): Add new `freeze' parameter.
8545 (unpause_all): New.
8546 (cancel_breakpoints): New.
8547 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8548 cancel breakpoints.
8549 (cmd_qtstart): Pause threads.
8550 (stop_tracing): Pause threads, and cancel breakpoints.
8551 * win32-low.c (win32_target_ops): Adjust.
8552
e471f25b
PA
85532010-05-03 Pedro Alves <pedro@codesourcery.com>
8554
8555 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8556 the inferior right away from here...
8557 (linux_wait_1): ... to here, and adjust to check the thread's
8558 last_resume_kind instead of the lwp's step or stop_expected flags.
8559
1915ef4f
PA
85602010-05-02 Pedro Alves <pedro@codesourcery.com>
8561
8562 * README: Use consistent `GDB' and `GDBserver' spellings.
8563
f9e39928
PA
85642010-05-02 Pedro Alves <pedro@codesourcery.com>
8565
8566 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8567 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8568 (linux_detach_one_lwp): Assume the lwp is stopped.
8569 (any_thread_of): Delete.
8570 (linux_detach): Stop all lwps here. Don't blindly delete all
8571 breakpoints.
8572 (delete_lwp_callback): New.
8573 (linux_mourn): Delete all lwps of the process that is gone.
8574 (linux_wait_1): Don't delete the last lwp of the process here.
8575 * mem-break.h (mark_breakpoints_out): Declare.
8576 * mem-break.c (mark_breakpoints_out): New.
8577 (free_all_breakpoints): Use it.
8578 * server.c (handle_target_event): If the process is gone, mark
8579 breakpoints out.
8580 * thread-db.c (struct thread_db) <create_bp>: New field.
8581 (thread_db_enable_reporting): Fix prototype. Store a thread event
8582 breakpoint reference in the thread_db struct.
8583 (thread_db_load_search): Clear the thread_db object.
8584 (try_thread_db_load_1): Ditto.
8585 (switch_to_process): New.
8586 (disable_thread_event_reporting): Use it.
8587 (remove_thread_event_breakpoints): New.
8588 (thread_db_detach, thread_db_mourn): Use it.
8589
1e7fc18c
PA
85902010-05-01 Pedro Alves <pedro@codesourcery.com>
8591
8592 * linux-low.c (linux_enable_event_reporting): New.
8593 (linux_wait_for_event_1, handle_extended_wait): Use it.
8594
02fc4de7
PA
85952010-04-30 Pedro Alves <pedro@codesourcery.com>
8596
8597 * linux-low.c (linux_kill_one_lwp, linux_kill)
8598 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8599 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8600 SIGSTOP even if the LWP is stopped.
8601 (send_sigstop_callback): New.
8602 (stop_all_lwps): Use send_sigstop_callback instead.
8603 (linux_resume_one_thread): Adjust.
8604 (proceed_one_lwp): Still proceed an LWP that the client has
8605 requested to stop, if we haven't reported it as stopped yet. Make
8606 sure that LWPs the client want stopped, have a pending SIGSTOP.
8607
bc3b5632
DE
86082010-04-26 Doug Evans <dje@google.com>
8609
ae1ada35
DE
8610 * server.c (handle_general_set): Make static.
8611
bc3b5632
DE
8612 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8613 Print received char after testing for error/eof instead of before.
8614 (input_interrupt): Tweak comment.
8615
65730243
DE
86162010-04-23 Doug Evans <dje@google.com>
8617
8618 * server.c (start_inferior): Print inferior argv if --debug.
8619
a8ae7dc0
AR
86202010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8621
8622 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8623 * nto-x86-low.c: Include server.h
8624
1c07cc19
PM
86252010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8626
8627 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8628 be consistent with other sources of this directory.
8629 (init_registers_amd64): Correct name of source file of this function
8630 in the comment.
8631
e0a61e09
PM
86322010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8633
8634 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8635 64-bit executables.
8636
54709339
PM
86372010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8638
8639 * win32-i386-low.c: Add 64-bit support.
8640 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8641 (init_registers_amd64): Declare.
8642 (mappings): Add 64-bit version of array.
8643 (init_windows_x86): New function.
8644 (the_low_target): Change init_arch field to init_windows_x86.
8645
e8f0053d
PM
86462010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8647
8648 * win32-low.c: Adapt to support also 64-bit architecture.
8649 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8650 (get_image_name): Use SIZE_T type for local variable `done'.
8651 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8652 (toolhelp_get_dll_name): Idem.
8653 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8654 Use uintptr_t typecast to avoid warning.
8655 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8656 (handle_exception): Use phex_nz to avoid warning.
8657 (win32_wait): Remove unused local variable `process'.
8658
c481e77e
PM
86592010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8660
8661 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8662 `amd64-avx.o'.
8663
12ea4b69
PM
86642010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8665
8666 * configure.ac: Use `ws2_32' library for srv_mingw.
8667 * configure: Regenerate.
8668 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8669 * remote-utils.c: Likewise.
8670
f6d1620c
L
86712010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8672
8673 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8674 if __x86_64__ is defined.
8675
8e642873
PM
86762010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8677
8678 * configure: Regenerate.
8679
711e434b
PM
86802010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8681
8682 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8683 * target.h (target_ops): New get_tib_address field.
8684 * win32-low.h (win32_thread_info): Add thread_local_base field.
8685 * win32-low.c (child_add_thread): Add tlb argument.
8686 Set thread_local_base field to TLB.
8687 (get_child_debug_event): Adapt to child_add_thread change.
8688 (win32_get_tib_address): New function.
8689 (win32_target_ops): Set get_tib_address field to
8690 win32_get_tib_address.
8691 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8692
505106cd
PA
86932010-04-12 Pedro Alves <pedro@codesourcery.com>
8694
505106cd
PA
8695 * linux-low.c (linux_mourn): Also remove the process.
8696 * server.c (handle_target_event): Don't remove the process here.
8697 * nto-low.c (nto_mourn): New.
8698 (nto_target_ops): Install it.
8699 * spu-low.c (spu_mourn): New.
8700 (spu_target_ops): Install it.
8701 * win32-low.c (win32_mourn): New.
8702 (win32_target_ops): Install it.
8703
e8470a06
PA
87042010-04-12 Pedro Alves <pedro@codesourcery.com>
8705
8706 * server.h (buffer_xml_printf): Remove redundant `;'.
8707
45ba0d02
PA
87082010-04-12 Pedro Alves <pedro@codesourcery.com>
8709
8710 * regcache.c (set_register_cache): Invalidate regcaches before
8711 changing the register cache layout.
8712 (regcache_invalidate_one): Allow a NULL regcache.
8713 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8714 regcaches before changing the register cache layout or the target
8715 regsets.
8716
59e04013
L
87172010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8718
8719 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8720 variable warning on Linux/x86-64.
8721
8336d594
PA
87222010-04-11 Pedro Alves <pedro@codesourcery.com>
8723
8724 GDBserver disconnected tracing support.
8725
8726 * linux-low.c (linux_remove_process): Delete.
8727 (add_lwp): Don't set last_resume_kind here.
8728 (linux_kill): Use `mourn'.
8729 (linux_detach): Use `thread_db_detach', and `mourn'.
8730 (linux_mourn): New.
8731 (linux_attach_lwp_1): Adjust comment.
8732 (linux_attach): last_resume_kind moved the thread_info; adjust.
8733 (status_pending_p_callback): Adjust.
8734 (linux_wait_for_event_1): Adjust.
8735 (count_events_callback, select_singlestep_lwp_callback)
8736 (select_event_lwp_callback, cancel_breakpoints_callback)
8737 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8738 (proceed_one_lwp): Adjust.
8739 (linux_async): Add debug output.
8740 (linux_thread_stopped): New.
8741 (linux_pause_all): New.
8742 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8743 linux_pause_all.
8744 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8745 (thread_db_free): Delete declaration.
8746 (thread_db_detach, thread_db_mourn): Declare.
8747 * thread-db.c (thread_db_init): Use thread_db_mourn.
8748 (thread_db_free): Delete, split in two.
8749 (disable_thread_event_reporting): New.
8750 (thread_db_detach): New.
8751 (thread_db_mourn): New.
8752
8753 * server.h (struct thread_info) <last_resume_kind>: New field.
8754 <attached>: Add comment.
8755 <gdb_detached>: New field.
8756 (handler_func): Change return type to int.
8757 (handle_serial_event, handle_target_event): Ditto.
8758 (gdb_connected): Declare.
8759 (tracing): Delete.
8760 (disconnected_tracing): Declare.
8761 (stop_tracing): Declare.
8762
8763 * server.c (handle_query) <qSupported>: Report support for
8764 disconnected tracing.
8765 (queue_stop_reply_callback): Account for running threads.
8766 (gdb_wants_thread_stopped): New.
8767 (gdb_wants_all_threads_stopped): New.
8768 (gdb_reattached_process): New.
8769 (handle_status): Clear the `gdb_detached' flag of all processes.
8770 In all-stop, stop all threads.
8771 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8772 (process_serial_event): If the remote connection breaks, or if an
8773 exit was forced with "monitor exit", force an event loop exit.
8774 Handle disconnected tracing on detach.
8775 (handle_serial_event): Adjust.
8776 (handle_target_event): If GDB isn't connected, forward events back
8777 to the inferior, unless the last process exited, in which case,
8778 exit gdbserver. Adjust interface.
8779
8780 * remote-utils.c (remote_open): Don't block in accept. Instead
8781 register an event loop source on the listen socket file
8782 descriptor. Refactor bits into ...
8783 (listen_desc): ... this new global.
8784 (gdb_connected): ... this new function.
8785 (enable_async_notification): ... this new function.
8786 (handle_accept_event): ... this new function.
8787 (remote_close): Clear remote_desc.
8788
8789 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8790
8791 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8792 New fields.
8793 (mourn_inferior): Define.
8794 (target_process_qsupported): Avoid the dangling else problem.
8795 (thread_stopped): Define.
8796 (pause_all): Define.
8797 (target_waitstatus_to_string): Declare.
8798 * target.c (target_waitstatus_to_string): New.
8799
8800 * tracepoint.c (tracing): Make extern.
8801 (disconnected_tracing): New.
8802 (stop_tracing): Make extern. Handle tracing stops due to GDB
8803 disconnecting.
8804 (cmd_qtdisconnected): New.
8805 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8806 (handle_tracepoint_general_set): Handle QTDisconnected.
8807
8808 * event-loop.c (event_handler_func): Change return type to int.
8809 (process_event): Bail out if the event handler wants the event
8810 loop to stop.
8811 (handle_file_event): Ditto.
8812 (start_event_loop): Bail out if the event handler wants the event
8813 loop to stop.
8814
8815 * nto-low.c (nto_target_ops): Adjust.
8816 * spu-low.c (spu_wait): Don't remove the process here.
8817 (spu_target_ops): Adjust.
8818 * win32-low.c (win32_wait): Don't remove the process here.
8819 (win32_target_ops): Adjust.
8820
5d267c4c
PA
88212010-04-11 Pedro Alves <pedro@codesourcery.com>
8822
8823 * regcache.c (realloc_register_cache): Invalidate inferior's
8824 regcache before recreating it.
8825
623ccd72
PA
88262010-04-09 Pedro Alves <pedro@codesourcery.com>
8827
8828 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8829
219f2f23
PA
88302010-04-09 Stan Shebs <stan@codesourcery.com>
8831 Pedro Alves <pedro@codesourcery.com>
8832
8833 * server.h (LONGEST): New.
8834 (struct thread_info) <while_stepping>: New field.
8835 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8836 Declare.
8837 (initialize_tracepoint, handle_tracepoint_general_set)
8838 (handle_tracepoint_query, tracepoint_finished_step)
8839 (tracepoint_was_hit, release_while_stepping_state_list):
8840 (current_traceframe): Declare.
8841 * server.c (handle_general_set): Handle tracepoint packets.
8842 (read_memory): New.
8843 (write_memory): New.
8844 (handle_search_memory_1): Use read_memory.
8845 (handle_query): Report support for conditional tracepoints, trace
8846 state variables, and tracepoint sources. Handle tracepoint
8847 queries.
8848 (main): Initialize the tracepoints module.
8849 (process_serial_event): Handle traceframe reads/writes.
8850
8851 * linux-low.c (handle_tracepoints): New.
8852 (linux_wait_1): Call it.
8853 (linux_resume_one_lwp): Handle while-stepping.
8854 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8855 (linux_target_ops): Install them.
8856 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8857 New field.
8858 * linux-x86-low.c (x86_supports_tracepoints): New.
8859 (the_low_target). Install it.
8860
8861 * mem-break.h (delete_breakpoint): Declare.
8862 * mem-break.c (delete_breakpoint): Make external.
8863
8864 * target.h (struct target_ops): Add `supports_tracepoints',
8865 `read_pc', and `write_pc' fields.
8866 (target_supports_tracepoints): Define.
8867 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8868 (phex_nz): New.
8869
8870 * regcache.h (struct regcache) <registers_owned>: New field.
8871 (init_register_cache, regcache_cpy): Declare.
8872 (regcache_read_pc, regcache_write_pc): Declare.
8873 (register_cache_size): Declare.
8874 (supply_regblock): Declare.
8875 * regcache.c (init_register_cache): New.
8876 (new_register_cache): Use it.
8877 (regcache_cpy): New.
8878 (register_cache_size): New.
8879 (supply_regblock): New.
8880 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 8881
219f2f23
PA
8882 * tracepoint.c: New.
8883
8884 * Makefile.in (OBS): Add tracepoint.o.
8885 (tracepoint.o): New rule.
8886
3a13a53b
L
88872010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8888
8889 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8890 (i386-mmx.o): New.
8891 (i386-mmx.c): Likewise.
8892 (i386-mmx-linux.o): Likewise.
8893 (i386-mmx-linux.c): Likewise.
8894
8895 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8896 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8897 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8898 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8899
8900 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8901 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8902 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8903
1570b33e
L
89042010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8905
8906 * Makefile.in (clean): Updated.
8907 (i386-avx.o): New.
8908 (i386-avx.c): Likewise.
8909 (i386-avx-linux.o): Likewise.
8910 (i386-avx-linux.c): Likewise.
8911 (amd64-avx.o): Likewise.
8912 (amd64-avx.c): Likewise.
8913 (amd64-avx-linux.o): Likewise.
8914 (amd64-avx-linux.c): Likewise.
8915
8916 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8917 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8918 (srv_amd64_regobj): Add amd64-avx.o.
8919 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8920 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8921 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8922 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8923 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8924 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8925 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8926
8927 * i387-fp.c: Include "i386-xstate.h".
8928 (i387_xsave): New.
8929 (i387_cache_to_xsave): Likewise.
8930 (i387_xsave_to_cache): Likewise.
8931 (x86_xcr0): Likewise.
8932
8933 * i387-fp.h (i387_cache_to_xsave): Likewise.
8934 (i387_xsave_to_cache): Likewise.
8935 (x86_xcr0): Likewise.
8936
8937 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8938 * linux-crisv32-low.c (target_regsets): Likewise.
8939 * linux-m68k-low.c (target_regsets): Likewise.
8940 * linux-mips-low.c (target_regsets): Likewise.
8941 * linux-ppc-low.c (target_regsets): Likewise.
8942 * linux-s390-low.c (target_regsets): Likewise.
8943 * linux-sh-low.c (target_regsets): Likewise.
8944 * linux-sparc-low.c (target_regsets): Likewise.
8945 * linux-xtensa-low.c (target_regsets): Likewise.
8946
8947 * linux-low.c: Include <sys/uio.h>.
8948 (regsets_fetch_inferior_registers): Support nt_type.
8949 (regsets_store_inferior_registers): Likewise.
8950 (linux_process_qsupported): New.
8951 (linux_target_ops): Add linux_process_qsupported.
8952
8953 * linux-low.h (regset_info): Add nt_type.
8954 (linux_target_ops): Add process_qsupported.
8955
8956 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8957 and <sys/uio.h>.
8958 (init_registers_i386_avx_linux): New.
8959 (init_registers_amd64_avx_linux): Likewise.
8960 (xmltarget_i386_linux_no_xml): Likewise.
8961 (xmltarget_amd64_linux_no_xml): Likewise.
8962 (PTRACE_GETREGSET): Likewise.
8963 (PTRACE_SETREGSET): Likewise.
8964 (x86_fill_xstateregset): Likewise.
8965 (x86_store_xstateregset): Likewise.
8966 (use_xml): Likewise.
8967 (x86_linux_update_xmltarget): Likewise.
8968 (x86_linux_process_qsupported): Likewise.
8969 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8970 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8971 init_registers_i386_linux here. Call
8972 x86_linux_update_xmltarget.
8973 (the_low_target): Add x86_linux_process_qsupported.
8974
8975 * server.c (handle_query): Call target_process_qsupported.
8976
8977 * target.h (target_ops): Add process_qsupported.
8978 (target_process_qsupported): New.
8979
fc7238bb
PA
89802010-04-03 Pedro Alves <pedro@codesourcery.com>
8981
8982 * inferiors.c (add_thread): Set last_status kind to
8983 TARGET_WAITKIND_IGNORE.
8984 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8985 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8986 (linux_wait_1): Move `thread' local definition to block that uses
8987 it. Don't NULL initialize `event_child'.
8988 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8989 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8990 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8991
bdabb078
PA
89922010-04-01 Pedro Alves <pedro@codesourcery.com>
8993
8994 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8995 an extended waitstatus, or by a watchpoint.
8996 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8997 thread was stepping or has been stopped by a watchpoint.
8998
d3bbe7a0
PA
89992010-04-01 Pedro Alves <pedro@codesourcery.com>
9000
9001 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9002 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9003 of another, then delete the previous, and validate all
9004 breakpoints.
9005 (validate_inserted_breakpoint): New.
9006 (delete_disabled_breakpoints): New.
9007 (validate_breakpoints): New.
9008 (check_mem_read): Validate breakpoints before trusting their
9009 shadow. Delete disabled breakpoints.
9010 (check_mem_write): Validate breakpoints before trusting they
9011 should be inserted. Delete disabled breakpoints.
9012 * mem-break.h (validate_breakpoints):
9013 * server.c (handle_query): Validate breakpoints when we see a
9014 qSymbol query.
9015
8b07ae33
PA
90162010-04-01 Pedro Alves <pedro@codesourcery.com>
9017
9018 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9019 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9020 if we could tell there's a GDB breakpoint at stop_pc.
9021 (need_step_over_p): Don't do a step over if we find a GDB
9022 breakpoint at the resume PC.
9023
9024 * mem-break.c (struct raw_breakpoint): New.
9025 (enum bkpt_type): New type `gdb_breakpoint'.
9026 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9027 fields. New field `raw'.
9028 (find_raw_breakpoint_at): New.
9029 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9030 breakpoint instead.
9031 (set_breakpoint_at): Adjust.
9032 (delete_raw_breakpoint): New.
9033 (release_breakpoint): New.
9034 (delete_breakpoint): Rename to...
9035 (delete_breakpoint_1): ... this. Add proc parameter. Use
9036 release_breakpoint. Return ENOENT.
9037 (delete_breakpoint): Reimplement.
9038 (find_breakpoint_at): Delete.
9039 (find_gdb_breakpoint_at): New.
9040 (delete_breakpoint_at): Delete.
9041 (set_gdb_breakpoint_at): New.
9042 (delete_gdb_breakpoint_at): New.
9043 (gdb_breakpoint_here): New.
9044 (set_reinsert_breakpoint): Use release_breakpoint.
9045 (uninsert_breakpoint): Rename to ...
9046 (uninsert_raw_breakpoint): ... this.
9047 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9048 (reinsert_raw_breakpoint): Change parameter type to
9049 raw_breakpoint.
9050 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9051 instead.
9052 (check_breakpoints): Adjust. Use release_breakpoint.
9053 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9054 (breakpoint_inserted_here): Ditto.
9055 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9056 Don't trust the breakpoint's shadow if it is not inserted.
9057 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9058 (delete_all_breakpoints): Adjust.
9059 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9060 use delete_breakpoint_1.
9061
9062 * mem-break.h (breakpoints_supported): Delete declaration.
9063 (set_gdb_breakpoint_at): Declare.
9064 (gdb_breakpoint_here): Declare.
9065 (delete_breakpoint_at): Delete.
9066 (delete_gdb_breakpoint_at): Declare.
9067
9068 * server.h (struct raw_breakpoint): Forward declare.
9069 (struct process_info): New field `raw_breakpoints'.
9070
9071 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9072 breakpoints.
9073
6bf5e0ba
PA
90742010-03-24 Pedro Alves <pedro@codesourcery.com>
9075
9076 * linux-low.c (status_pending_p_callback): Fix comment.
9077 (linux_wait_for_event_1): Move most of the internal breakpoint
9078 handling from here...
9079 (linux_wait_1): ... to here.
9080 (count_events_callback): New.
9081 (select_singlestep_lwp_callback): New.
9082 (select_event_lwp_callback): New.
9083 (cancel_breakpoints_callback): New.
9084 (select_event_lwp): New.
9085 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9086 priority to all LWPs that have had events that should be reported
9087 to the client. Cancel breakpoints when about to reporting the
9088 event to the client, not while stopping lwps. No longer cancel
9089 finished single-steps here.
9090 (cancel_finished_single_step): Delete.
9091 (cancel_finished_single_steps): Delete.
9092
414a389f
PA
90932010-03-24 Pedro Alves <pedro@codesourcery.com>
9094
9095 * mem-break.c (enum bkpt_type): New.
9096 (struct breakpoint): New field `type'.
9097 (set_breakpoint_at): Change return type to struct breakpoint
9098 pointer. Set type to `other_breakpoint' by default.
9099 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9100 in the breakpoint list.
9101 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9102 (reinsert_breakpoint): Rename to ...
9103 (reinsert_raw_breakpoint): ... this.
9104 (reinsert_breakpoints_at): Adjust.
9105 * mem-break.h (struct breakpoint): Declare.
9106 (set_breakpoint_at): Change return type to struct breakpoint
9107 pointer.
9108
2280c721
PA
91092010-03-24 Pedro Alves <pedro@codesourcery.com>
9110
9111 * server.c (handle_query): Assign, not compare.
9112
d50171e4
PA
91132010-03-24 Pedro Alves <pedro@codesourcery.com>
9114
9115 Teach linux gdbserver to step-over-breakpoints.
9116
9117 * linux-low.c (can_hardware_single_step): New.
9118 (supports_breakpoints): New.
9119 (handle_extended_wait): If stopping threads, read the stop pc of
9120 the new cloned LWP.
9121 (get_pc): New.
9122 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9123 low target doesn't support retrieving the PC.
9124 (add_lwp): Set last_resume_kind to resume_continue.
9125 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9126 (linux_attach): Don't clear stop_expected. Set the lwp's
9127 last_resume_kind to resume_stop.
9128 (linux_detach_one_lwp): Don't check for removed breakpoints.
9129 (check_removed_breakpoint): Delete.
9130 (status_pending_p): Rename to ...
9131 (status_pending_p_callback): ... this. Don't check for removed
9132 breakpoints. Don't consider threads that are stopped from GDB's
9133 perspective.
9134 (linux_wait_for_lwp): Always read the stop_pc here.
9135 (cancel_breakpoint): New.
9136 (step_over_bkpt): New global.
9137 (linux_wait_for_event_1): Implement stepping over breakpoints.
9138 (gdb_wants_lwp_stopped): New.
9139 (gdb_wants_all_stopped): New.
9140 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9141 single-step traps here. Store the thread's last reported target
9142 wait status.
9143 (send_sigstop): Don't clear stop_expected. Always set it,
9144 instead.
9145 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9146 (cancel_finished_single_step): New.
9147 (cancel_finished_single_steps): New.
9148 (wait_for_sigstop): Don't cancel finished single-step traps here.
9149 (linux_resume_one_lwp): Don't check for removed breakpoints.
9150 Don't set `step' on non-hardware step archs.
9151 (linux_set_resume_request): Ignore resume_stop requests if already
9152 stopping or stopped. Set the lwp's last_resume_kind.
9153 (resume_status_pending_p): Don't check for removed breakpoints.
9154 (need_step_over_p): New.
9155 (start_step_over): New.
9156 (finish_step_over): New.
9157 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9158 requests. Clear the thread's last reported target waitstatus.
9159 Don't use the `suspended' flag. Don't consider pending breakpoints.
9160 (linux_resume): Start a step-over if necessary.
9161 (proceed_one_lwp): New.
9162 (proceed_all_lwps): New.
9163 (unstop_all_lwps): New.
9164 * linux-low.h (struct lwp_info): Rewrite comment for the
9165 `suspended' flag. Add the `stop_pc' field. Delete the
9166 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9167 Add `'last_resume_kind' and `need_step_over' fields.
9168 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9169 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9170 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9171 (set_raw_breakpoint_at): New.
9172 (set_breakpoint_at): Rewrite to use it.
9173 (reinsert_breakpoint_handler): Delete.
9174 (set_reinsert_breakpoint): New.
9175 (reinsert_breakpoint_by_bp): Delete.
9176 (delete_reinsert_breakpoints): New.
9177 (uninsert_breakpoint): Rewrite.
9178 (uninsert_breakpoints_at): New.
9179 (reinsert_breakpoint): Rewrite.
9180 (reinsert_breakpoints_at): New.
9181 (check_breakpoints): Rewrite.
9182 (breakpoint_here): New.
9183 (breakpoint_inserted_here): New.
9184 (check_mem_read): Adjust.
9185 * mem-break.h (breakpoints_supported, breakpoint_here)
9186 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9187 (reinsert_breakpoint_by_bp): Delete declaration.
9188 (delete_reinsert_breakpoints): Declare.
9189 (reinsert_breakpoint): Delete declaration.
9190 (reinsert_breakpoints_at): Declare.
9191 (uninsert_breakpoint): Delete declaration.
9192 (uninsert_breakpoints_at): Declare.
9193 (check_breakpoints): Adjust prototype.
9194 * server.h: Adjust include order.
9195 (struct thread_info): Declare here. Add a `last_status' field.
9196
30ba68cb
MS
91972010-03-23 Michael Snyder <msnyder@vmware.com>
9198
9199 * server.c (crc32): New function.
9200 (handle_query): Add handling for 'qCRC:' request.
9201
b9a881c2
PA
92022010-03-23 Pedro Alves <pedro@codesourcery.com>
9203
9204 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9205 lwp had been stopped by a watchpoint.
9206
e92d13d5
PA
92072010-03-16 Pedro Alves <pedro@codesourcery.com>
9208
9209 * server.h (internal_error): Declare.
9210 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9211 * utils.c (internal_error): New function.
9212
64daa791
AS
92132010-03-15 Andreas Schwab <schwab@redhat.com>
9214
9215 * configure.srv: Fix typo setting srv_regobj.
9216
f52cd8cd
PA
92172010-03-15 Pedro Alves <pedro@codesourcery.com>
9218
9219 * linux-low.c (fetch_register): Avoid passing a non string literal
9220 format to `error'.
9221 (usr_store_inferior_registers): Ditto.
9222
93ae6fdc
PA
92232010-03-14 Pedro Alves <pedro@codesourcery.com>
9224
9225 * linux-low.c (linux_write_memory): Bail out early if peeking
9226 memory failed.
9227
c3adc08c
PA
92282010-03-14 Pedro Alves <pedro@codesourcery.com>
9229
9230 * linux-low.h (struct lwp_info): New fields
9231 `stopped_by_watchpoint' and `stopped_data_address'.
9232 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9233 here, and cache them in the lwp object.
9234 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9235 directly.
9236 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9237 field.
9238 (linux_stopped_by_watchpoint): Rewrite.
9239 (linux_stopped_data_address): Rewrite.
9240
bce522a2
PA
92412010-03-06 Simo Melenius <simo.melenius@iki.fi>
9242
9243 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9244 switching the current inferior, not before.
9245
90884b2b
L
92462010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9247
9248 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9249 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9250 i386-linux.c and amd64-linux.c.
9251 (reg-i386.o): Removed.
9252 (reg-i386.c): Likewise.
9253 (reg-i386-linux.o): Likewise.
9254 (reg-i386-linux.c): Likewise.
9255 (reg-x86-64.o): Likewise.
9256 (reg-x86-64.c): Likewise.
9257 (reg-x86-64-linux.o): Likewise.
9258 (reg-x86-64-linux.c): Likewise.
9259 (i386.o): New.
9260 (i386.c): Likewise.
9261 (i386-linux.o): Likewise.
9262 (i386-linux.c): Likewise.
9263 (amd64.o): Likewise.
9264 (amd64.c): Likewise.
9265 (amd64-linux.o): Likewise.
9266 (amd64-linux.c): Likewise.
9267
9268 * configure.srv (srv_i386_regobj): New.
9269 (srv_i386_linux_regobj): Likewise.
9270 (srv_amd64_regobj): Likewise.
9271 (srv_amd64_linux_regobj): Likewise.
9272 (srv_i386_32bit_xmlfiles): Likewise.
9273 (srv_i386_64bit_xmlfiles): Likewise.
9274 (srv_i386_xmlfiles): Likewise.
9275 (srv_amd64_xmlfiles): Likewise.
9276 (srv_i386_linux_xmlfiles): Likewise.
9277 (srv_amd64_linux_xmlfiles): Likewise.
9278 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9279 srv_xmlfiles to $srv_i386_xmlfiles.
9280 (i[34567]86-*-mingw32ce*): Likewise.
9281 (i[34567]86-*-mingw*): Likewise.
9282 (i[34567]86-*-nto*): Likewise.
9283 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9284 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9285 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9286 (x86_64-*-linux*): Likewise.
9287
9288 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9289 (init_registers_amd64_linux): New.
9290 (x86_arch_setup): Replace init_registers_x86_64_linux with
9291 init_registers_amd64_linux.
9292
193f13e6
MK
92932010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9294
9295 * configure.ac: Check for libdl. If it is not available link against
9296 static libthread_db.
9297 * configure: Regenerate.
9298
85d721b8
PA
92992010-02-22 Pedro Alves <pedro@codesourcery.com>
9300
9301 PR9605
9302
9303 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9304 handing a read watchpoint.
9305 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9306
6076632b
DE
93072010-02-12 Doug Evans <dje@google.com>
9308
9309 * linux-low.c (linux_supports_tracefork_flag): Document.
9310 (linux_look_up_symbols): Add comment.
9311
3327ccf7
L
93122010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9313
9314 * regcache.c (supply_register): Clear regcache if buf is NULL.
9315
0718675c 93162010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 9317 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
9318
9319 * inferiors.c (find_inferior): Add function documentation.
9320 (unloaded_dll): Handle the case where the unloaded dll has not
9321 been previously registered in the dll list.
9322
177321bd
DJ
93232010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9324
9325 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9326 (thumb2_breakpoint): New.
9327 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9328
2b009048
DJ
93292010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9330
9331 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9332 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9333 breakpoints.
9334
3be029c7
PA
93352010-01-21 Pedro Alves <pedro@codesourcery.com>
9336
9337 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9338
18f5de3b
JK
93392010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9340
9341 * linux-s390-low.c (s390_collect_ptrace_register)
9342 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9343
3743bb4f
DE
93442010-01-21 Doug Evans <dje@google.com>
9345
14ce3065
DE
9346 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9347 (PTRACE_ARG4_TYPE): New macro.
9348 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9349 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9350 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9351 (usr_store_inferior_registers): Ditto.
9352 (linux_read_memory, linux_write_memory): Ditto.
9353 (linux_test_for_tracefork): Ditto.
9354
3743bb4f
DE
9355 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9356 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9357
8b315be5
PA
93582010-01-21 Pedro Alves <pedro@codesourcery.com>
9359
9360 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9361 target.
9362
85492558
PA
93632010-01-21 Pedro Alves <pedro@codesourcery.com>
9364
9365 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9366 prototype to take a regcache. Adjust.
9367
442ea881
PA
93682010-01-20 Pedro Alves <pedro@codesourcery.com>
9369
9370 * regcache.h (struct thread_info): Forward declare.
9371 (struct regcache): New.
9372 (new_register_cache): Adjust prototype.
9373 (get_thread_regcache): Declare.
9374 (free_register_cache): Adjust prototype.
9375 (registers_to_string, registers_from_string): Ditto.
9376 (supply_register, supply_register_by_name, collect_register)
9377 (collect_register_as_string, collect_register_by_name): Ditto.
9378 * regcache.c (struct inferior_regcache_data): Delete.
9379 (get_regcache): Rename to ...
9380 (get_thread_regcache): ... this. Adjust. Switch inferior before
9381 fetching registers.
9382 (regcache_invalidate_one): Adjust.
9383 (regcache_invalidate): Fix prototype.
9384 (new_register_cache): Return the new register cache.
9385 (free_register_cache): Change prototype.
9386 (realloc_register_cache): Adjust.
9387 (registers_to_string): Change prototype to take a regcache. Adjust.
9388 (registers_from_string): Ditto.
9389 (register_data): Ditto.
9390 (supply_register): Ditto.
9391 (supply_register_by_name): Ditto.
9392 (collect_register): Ditto.
9393 (collect_register_as_string): Ditto.
9394 (collect_register_by_name): Ditto.
9395 * server.c (process_serial_event): Adjust.
9396 * linux-low.h (regset_fill_func, regset_store_func): Change
9397 prototype.
9398 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9399 Change prototype.
9400 * linux-low.c (get_stop_pc): Adjust.
9401 (check_removed_breakpoint): Adjust.
9402 (linux_wait_for_event): Adjust.
9403 (linux_resume_one_lwp): Adjust.
9404 (fetch_register): Add regcache parameter. Adjust.
9405 (usr_store_inferior_registers): Ditto.
9406 (regsets_fetch_inferior_registers): Ditto.
9407 (regsets_store_inferior_registers): Ditto.
9408 (linux_fetch_registers, linux_store_registers): Ditto.
9409 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9410 regcache. Adjust.
43aaf8b6
PA
9411 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9412 Ditto.
442ea881
PA
9413 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9414 prototype to take a regcache.
9415 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9416 * remote-utils.c (convert_ascii_to_int, outreg)
9417 (prepare_resume_reply): Change prototype to take a regcache.
9418 Adjust.
9419 * target.h (struct target_ops) <fetch_registers, store_registers>:
9420 Change prototype to take a regcache.
9421 (fetch_inferior_registers, store_inferior_registers): Change
9422 prototype to take a regcache. Adjust.
9423 * proc-service.c (ps_lgetregs): Adjust.
9424 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9425 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9426 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9427 take a regcache. Adjust.
9428 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9429 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9430 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9431 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9432 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9433 (cris_cannot_fetch_register):
9434 (cris_breakpoint_at): Change prototype to take a regcache.
9435 Adjust.
9436 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9437 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9438 to take a regcache. Adjust.
9439 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9440 Adjust.
9441 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9442 take a regcache. Adjust.
9443 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9444 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9445 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9446 * linux-mips-low.c (mips_get_pc):
9447 (mips_set_pc): Change prototype to take a regcache. Adjust.
9448 (mips_reinsert_addr): Adjust.
9449 (mips_collect_register): Change prototype to take a regcache.
9450 Adjust.
9451 (mips_supply_register):
9452 (mips_collect_register_32bit, mips_supply_register_32bit)
9453 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9454 (mips_store_fpregset): Ditto.
43aaf8b6
PA
9455 * linux-ppc-low.c (ppc_supply_ptrace_register)
9456 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
9457 (parse_spufs_run): Adjust.
9458 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9459 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9460 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9461 take a regcache. Adjust.
9462 * linux-s390-low.c (s390_collect_ptrace_register)
9463 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9464 (s390_set_pc): Change prototype to take a regcache. Adjust.
9465 (s390_arch_setup): Adjust.
9466 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9467 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9468 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9469 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9470 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9471 regcache. Adjust.
9472 (sparc_breakpoint_at): Adjust.
9473 * linux-xtensa-low.c (xtensa_fill_gregset):
9474 (xtensa_store_gregset):
9475 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9476 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9477 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9478 prototype to take a regcache. Adjust.
9479 * win32-arm-low.c (arm_fetch_inferior_register)
9480 (arm_store_inferior_register): Change prototype to take a
9481 regcache. Adjust.
9482 * win32-i386-low.c (i386_fetch_inferior_register)
9483 (i386_store_inferior_register): Change prototype to take a
9484 regcache. Adjust.
9485 * win32-low.c (child_fetch_inferior_registers)
9486 (child_store_inferior_registers): Change prototype to take a
9487 regcache. Adjust.
9488 (win32_wait): Adjust.
9489 (win32_fetch_inferior_registers): Change prototype to take a
9490 regcache. Adjust.
9491 (win32_store_inferior_registers): Adjust.
9492 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9493 store_inferior_register>: Change prototype to take a regcache.
9494
60c3d7b0
DE
94952010-01-20 Doug Evans <dje@google.com>
9496
9497 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9498 #ifdef.
9499 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 9500 (W_STOPCODE): Provide definition if missing.
60c3d7b0 9501
dc146f7c
VP
95022010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9503
9504 * linux-low.c (linux_core_of_thread): New.
9505 (compare_ints, show_process, list_threads): New.
9506 (linux_qxfer_osdata): Report threads and cores.
9507 (linux_target_op): Register linux_core_of_thread.
9508 * remote-utils.c (prepare_resume_reply): Report the core.
9509 (buffer_xml_printf): Support %d specifier.
9510 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9511 New.
9512 (handle_query): Handle qXfer:threads. Announce availability
9513 thereof.
9514 * target.h (struct target_ops): New field core_of_thread.
9515
7803799a
UW
95162010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9517
9518 * Makefile.in (clean): Remove new generated files.
9519 (reg-s390.o, reg-s390.c): Remove rules.
9520 (reg-s390x.o, reg-s390x.c): Likewise.
9521 (s390-linux32.o, s390-linux32.c): Add rules.
9522 (s390-linux64.o, s390-linux64.c): Likewise.
9523 (s390x-linux64.o, s390x-linux64.c): Likewise.
9524 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9525 * linux-s390-low.c: Include <elf.h>.
9526 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9527 (init_registers_s390): Remove prototype.
9528 (init_registers_s390x): Likewise.
9529 (init_registers_s390_linux32): Add prototype.
9530 (init_registers_s390_linux64): Likewise.
9531 (init_registers_s390x_linux64): Likewise.
9532 (s390_num_regs_3264): New define.
9533 (s390_regmap_3264): New global variable.
9534 (s390_cannot_fetch_register): Remove obsolete check.
9535 (s390_cannot_store_register): Likewise.
9536 (s390_collect_ptrace_register): Handle upper/lower register halves.
9537 (s390_supply_ptrace_register): Likewise.
9538 (s390_fill_gregset): Update to register number changes.
9539 (s390_get_hwcap): New routine.
9540 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9541 Install appropriate regmap and register set.
9542
6e7ffa39
JB
95432010-01-01 Joel Brobecker <brobecker@adacore.com>
9544
9545 * server.c (gdbserver_version): Update copyright year to 2010.
9546 * gdbreplay.c (gdbreplay_version): Likewise.
9547
957f3f49
DE
95482009-12-28 Doug Evans <dje@google.com>
9549
9550 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9551 elf/external.h. Include <elf.h> instead but only if necessary.
9552
ca5c370d
PA
95532009-12-28 Pedro Alves <pedro@codesourcery.com>
9554
9555 * linux-low.c (linux_remove_process): Remove `detaching'
9556 parameter. Don't release/detach from thread_db here.
9557 (linux_kill): Release/detach from thread_db here, ...
9558 (linux_detach): ... and here, before actually detaching.
9559 (linux_wait_1): ... and here, when a process exits.
9560 * thread-db.c (any_thread_of): New.
9561 (thread_db_free): Switch the current inferior to a thread of the
9562 passed in process.
9563
4ee62156
DE
95642009-12-21 Doug Evans <dje@google.com>
9565
d90e6a88
DE
9566 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9567
c5f62d5f
DE
9568 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9569 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9570 warning ifndef __NR_tkill. Move setting of errno there too.
9571 Delete unnecessary resetting of errno after syscall.
9572 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9573
10e86dd7
DE
9574 * configure.ac: Check for dladdr.
9575 * config.in: Regenerate.
9576 * configure: Regenerate.
9577 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9578 (try_thread_db_load): Update.
9579
4ee62156
DE
9580 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9581
00f515da
DE
95822009-12-18 Doug Evans <dje@google.com>
9583
e9464885
DE
9584 * event-loop.c: Include unistd.h if it exists.
9585
07d4f67e
DE
9586 * linux-low.c (my_waitpid): Move definition away from being in
9587 between linux_tracefork_child/linux_test_for_tracefork.
9588
00f515da
DE
9589 * gdb_proc_service.h (psaddr_t): Fix type.
9590 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9591 signature to match glibc.
9592
1de1badb
DE
95932009-12-16 Doug Evans <dje@google.com>
9594
9595 * linux-low.c (linux_read_memory): Fix argument to read.
9596
aeeb81d1
PA
95972009-11-26 Pedro Alves <pedro@codesourcery.com>
9598
9599 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9600 events, don't leave current_inferior pointing at null.
9601
10357975
PA
96022009-11-26 Pedro Alves <pedro@codesourcery.com>
9603
9604 * win32-low.c (LOG): Delete.
9605 (OUTMSG): Output to stderr.
9606 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9607 on compile time LOG macro.
9608 (win32_wait): Fix debug output.
9609
cf6e3471
PA
96102009-11-26 Pedro Alves <pedro@codesourcery.com>
9611
9612 * win32-low.c (win32_add_one_solib): If the dll name is
9613 "ntdll.dll", prepend the system directory to the dll path.
9614
0c85e18e
MK
96152009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9616
9617 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9618
9ac544ce 96192009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9620 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9621
9622 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9623 * configure.ac: Check for __mcoldfire__ and set
9624 gdb_cv_m68k_is_coldfire.
9625 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9626 reg-cf.o and reg-m68k.o.
9627 * configure: Regenerated.
9628
fd7dd3e6
PA
96292009-11-16 Pedro Alves <pedro@codesourcery.com>
9630
9631 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9632 Pass it to thread_db_free.
9633 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9634 proper `detaching' argument to linux_remove_process.
9635 * linux-low.h (thread_db_free): Add `detaching' parameter.
9636 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9637 to thread_db_free.
9638 (thread_db_free): Add `detaching' parameter. Only
9639 call td_ta_clear_event if detaching from process.
9640
75aa492e
MK
96412009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9642
9643 * thread-db.c (thread_db_free): Fix typo.
9644
21e1bee4
PP
96452009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9646
9647 PR gdb/10838
9648 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9649
8838b45e
NS
96502009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9651
9652 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9653 with an i686 compiler.
9654 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9655 needed.
9656 * configure: Rebuilt.
9657
8a35fb51
SL
96582009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9659
9660 PR gdb/10783
9661
9662 * server.c (handle_search_memory_1): Correct read_addr initialization
9663 in loop for searching subsequent chunks.
9664
96f15937
PP
96652009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9666
9667 * configure.ac: New --with-libthread-db option.
9668 * thread-db.c: Allow direct dependence on libthread_db.
9669 (thread_db_free): Adjust.
9670 * config.in: Regenerate.
9671 * configure: Likewise.
889bf7c5 9672
5f7d1694
PP
96732009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9674
9675 PR gdb/10757
9676 * thread-db.c (attach_thread): New function.
9677 (maybe_attach_thread): Return success/failure.
9678 (find_new_threads_callback): Adjust.
889bf7c5
PA
9679 (thread_db_find_new_threads): Loop until no new threads.
9680
88e3b899
PA
96812009-10-13 Pedro Alves <pedro@codesourcery.com>
9682
9683 * proc-service.c (ps_lgetregs): Formatting.
9684
cdbfd419
PP
96852009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9686
9687 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9688 * configure.ac: Adjust.
9689 * linux-low.h (struct process_info_private): Move members to struct
9690 thread_db.
9691 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9692 * linux-low.c (linux_remove_process): Adjust.
9693 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9694 * server.c (handle_query): Move code ...
9695 (handle_monitor_command): ... here. New function.
9696 * target.h (struct target_ops): New member.
9697 * thread-db.c (struct thread_db): New.
9698 (libthread_db_search_path): New variable.
9699 (thread_db_create_event, thread_db_enable_reporting)
9700 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9701 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9702 (try_thread_db_load_1, dladdr_to_soname): New functions.
9703 (try_thread_db_load, thread_db_load_search): New functions.
9704 (thread_db_init): Search for libthread_db.
9705 (thread_db_free): New function.
9706 (thread_db_handle_monitor_command): Likewise.
9707 * config.in: Regenerate.
9708 * configure: Regenerate.
889bf7c5 9709
4168d2d6
UW
97102009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9711
9712 * spu-low.c (spu_kill): Wait for inferior to terminate.
9713 Call clear_inferiors.
9714 (spu_detach): Call clear_inferiors.
9715
81ecdfbb
RW
97162009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9717
9718 * aclocal.m4: Regenerate.
9719 * config.in: Likewise.
9720 * configure: Likewise.
9721
0b9ff2c0
UW
97222009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9723
9724 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9725 (parse_spufs_run): New function.
9726 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9727 (ppc_breakpoint_at): Handle SPU breakpoints.
9728
efcbbd14
UW
97292009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9730
9731 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9732 (SPUFS_MAGIC): Define.
9733 (spu_enumerate_spu_ids): New function.
9734 (linux_qxfer_spu): New function.
9735 (linux_target_ops): Install linux_qxfer_spu.
9736
f4d9bade
UW
97372009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9738
9739 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9740 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9741 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9742 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9743 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9744 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9745 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9746 (init_registers_powerpc_cell32l): Add prototype.
9747 (init_registers_powerpc_cell64l): Likewise.
9748 (ppc_arch_setup): Detect Cell/B.E. architecture.
9749
96e946ca
RW
97502009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9751
9752 * Makefile.in (datarootdir): New variable.
9753
58d6951d
DJ
97542009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9755
9756 * linux-low.c (linux_write_memory): Update debugging output.
9757 * Makefile.in (clean): Add new descriptions.
9758 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9759 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9760 * configure.srv: Add new files for arm*-*-linux*.
9761 * linux-arm-low.c: Add new declarations.
9762 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9763 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9764 (HWCAP_VFPv3D16): New.
9765 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9766 instead of __IWMMXT__.
9767 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9768 (arm_arch_setup): New.
9769 (target_regsets): Remove #ifdef. Add VFP regset.
9770 (the_low_target): Use arm_arch_setup.
9771
12b42a12
DJ
97722009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9773
9774 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9775 the main thread again.
9776
ac8c974e
AR
97772009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9778
9779 Adding Neutrino gdbserver.
9780 * configure: Regenerated.
9781 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9782 * configure.srv (i[34567]86-*-nto*): New target.
9783 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9784 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9785 (nto_comctrl) [__QNX__]: New function.
9786 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9787
4424e0c3 97882009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
9789
9790 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9791 srv_tgtobj.
9792
912cf4ba
PA
97932009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9794 Pedro Alves <pedro@codesourcery.com>
9795
9796 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9797 don't support CONTEXT_EXTENDED_REGISTERS.
9798 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9799 (the_low_target): Install them.
9800 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9801 failing with ERROR_PIPE_NOT_CONNECTED.
9802
aa5ca48f
DE
98032009-06-30 Doug Evans <dje@google.com>
9804 Pierre Muller <muller@ics.u-strasbg.fr>
9805
9806 Add h/w watchpoint support to x86-linux, win32-i386.
9807 * Makefile.in (SFILES): Add i386-low.c
9808 (i386_low_h): Define.
9809 (i386-low.o): Add dependencies.
9810 (linux-x86-low.o): Add i386-low.h dependency.
9811 (win32-i386-low.o): Ditto.
9812 * i386-low.c: New file.
9813 * i386-low.h: New file.
9814 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9815 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9816 * linux-low.c (linux_add_process): Initialize arch_private.
9817 (linux_remove_process): Free arch_private.
9818 (add_lwp): Initialize arch_private.
9819 (delete_lwp): Free arch_private.
9820 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9821 provided.
9822 * linux-low.h (process_info_private): New member arch_private.
9823 (lwp_info): New member arch_private.
9824 (linux_target_ops): New members new_process, new_thread,
9825 prepare_to_resume.
9826 (ptid_of): New macro.
9827 * linux-x86-low.c: Include stddef.h, i386-low.h.
9828 (arch_process_info): New struct.
9829 (arch_lwp_info): New struct.
9830 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9831 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9832 (i386_dr_low_get_status): New function.
9833 (x86_insert_point, x86_remove_point): New functions.
9834 (x86_stopped_by_watchpoint): New function.
9835 (x86_stopped_data_address): New function.
9836 (x86_linux_new_process, x86_linux_new_thread): New functions.
9837 (x86_linux_prepare_to_resume): New function.
9838 (the_low_target): Add entries for insert_point, remove_point,
9839 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9840 prepare_to_resume.
9841 * server.c (debug_hw_points): New global.
9842 (monitor_show_help): Document set debug-hw-points.
9843 (handle_query): Process "set debug-hw-points".
9844 * server.h (debug_hw_points): Declare.
9845 (paddress): Declare.
9846 * utils.c (NUMCELLS, CELLSIZE): New macros.
9847 (get_sell, xsnprintf, paddress): New functions.
9848 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9849 remove_point, stopped_by_watchpoint, stopped_data_address.
9850 * win32-i386-low.c: Include i386-low.h.
9851 (debug_reg_state): Replaces dr.
9852 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9853 (i386_dr_low_get_status): New function.
9854 (i386_insert_point, i386_remove_point): New functions.
9855 (i386_stopped_by_watchpoint): New function.
9856 (i386_stopped_data_address): New function.
9857 (i386_initial_stuff): Update.
9858 (get_thread_context,set_thread_context,i386_thread_added): Update.
9859 (the_low_target): Add entries for insert_point,
9860 remove_point, stopped_by_watchpoint, stopped_data_address.
9861 * win32-low.c (win32_insert_watchpoint): New function.
9862 (win32_remove_watchpoint): New function.
9863 (win32_stopped_by_watchpoint): New function.
9864 (win32_stopped_data_address): New function.
9865 (win32_target_ops): Add entries for insert_watchpoint,
9866 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9867 * win32-low.h (win32_target_ops): New members insert_point,
9868 remove_point, stopped_by_watchpoint, stopped_data_address.
9869
d993e290
PA
98702009-06-25 Pedro Alves <pedro@codesourcery.com>
9871
9872 * server.c (process_serial_event): Re-return unsupported, not
9873 error, if the type isn't recognized. Re-allow supporting only
9874 insert or remove packets. Also call require_running for
9875 breakpoints. Add missing break statement to default case. Tidy.
9876 * target.h (struct target_ops): Rename insert_watchpoint to
9877 insert_point, and remove_watchpoint to remove_point.
9878
9879 * linux-low.h (struct linux_target_ops): Likewise.
9880 * linux-low.c (linux_insert_watchpoint): Rename to ...
9881 (linux_insert_point): ... this. Adjust.
9882 (linux_remove_watchpoint): Rename to ...
9883 (linux_remove_point): ... this. Adjust.
9884 (linux_target_ops): Adjust.
9885 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9886 (cris_insert_point): ... this.
9887 (cris_remove_watchpoint): Rename to ...
9888 (cris_remove_point): ... this.
9889 (the_low_target): Adjust.
9890
0f54c268
PM
98912009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9892
9893 * server.c (handle_v_kill): Pass signal_pid to
9894 kill_inferior if multi_process is zero.
9895
c6314022
AR
98962009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9897
9898 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9899 * target.h (target_ops): Comment for *_watchpoint to make it clear
9900 the functions can get types '0' and '1'.
9901
4463ce24
AR
99022009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9903
9904 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9905 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9906 * regcache.c (get_regcache): Likewise.
9907 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9908 * win32-low.c (child_fetch_inferior_registers): Remove check for
9909 regno 0.
9910
cf8fd78b
PA
99112009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9912 Pedro Alves <pedro@codesourcery.com>
9913
9914 * target.h (struct target_ops) <supports_multi_process>: New
9915 callback.
9916 (target_supports_multi_process): New.
9917 * server.c (handle_query): Even if GDB reports support, only
9918 enable multi-process if the target also supports it. Report
9919 multi-process support only if the target backend supports it.
9920 * linux-low.c (linux_supports_multi_process): New function.
9921 (linux_target_ops): Install it as target_supports_multi_process
9922 callback.
9923
47c0c975
DE
99242009-05-24 Doug Evans <dje@google.com>
9925
e09875d4
DE
9926 Global renaming of find_thread_pid to find_thread_ptid.
9927 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9928 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9929 All callers updated.
9930
e27d73f6
DE
9931 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9932 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9933 directly.
9934
47c0c975
DE
9935 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9936 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9937 (linux_resume_one_lwp): Ditto.
9938
2acc282a
DE
99392009-05-23 Doug Evans <dje@google.com>
9940
9941 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9942 from struct inferior_list_entry * to struct lwp_info *.
9943 All callers updated.
9944
9f1036c1
DE
99452009-05-13 Doug Evans <dje@google.com>
9946
9947 * linux-x86-low.c: Don't include assert.h.
9948 (x86_siginfo_fixup): Use fatal, not assert.
9949 (x86_arch_setup): Fix comment.
9950
d0722149
DE
99512009-05-12 Doug Evans <dje@google.com>
9952
9953 Biarch support for i386/amd64 gdbserver.
9954 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9955 Add linux-x86-low.c.
9956 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9957 (linux-x86-low.o): Add.
9958 * linux-x86-64-low.c: Delete.
9959 * linux-i386-low.c: Delete.
9960 * linux-x86-low.c: New file.
9961 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9962 linux-x86-low.o.
9963 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9964 linux-x86-low.o.
9965 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9966 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9967 (linux_child_pid_to_exec_file): New function.
9968 (elf_64_header_p, elf_64_file_p): New functions.
9969 (siginfo_fixup): New function.
9970 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9971 give target a chance to convert layout.
9972 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9973 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9974
fdeb2a12
DE
99752009-05-07 Doug Evans <dje@google.com>
9976
9977 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9978 (regsets_store_inferior_registers): Ditto.
9979
a6dbe5df
PA
99802009-05-06 Pedro Alves <pedro@codesourcery.com>
9981
9982 PR server/10048
9983
9984 * linux-low.c (must_set_ptrace_flags): Delete.
9985 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9986 of the global.
9987 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9988 `lwp->must_set_ptrace_flags' instead.
ba42693b 9989 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
9990 (linux_wait_1): ... not here.
9991
5091eb23
DE
99922009-04-30 Doug Evans <dje@google.com>
9993
9f767825
DE
9994 * inferiors.c (started_inferior_callback): New function.
9995 (attached_inferior_callback): New function.
9996 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9997 * server.c (print_started_pid, print_attached_pid): New functions.
9998 (detach_or_kill_for_exit): New function.
9999 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10000 * server.h (have_started_inferiors_p): Declare.
10001 (have_attached_inferiors_p): Declare.
10002
5091eb23
DE
10003 * inferiors.c (remove_process): Fix memory leak, free process.
10004 * linux-low.c (linux_remove_process): New function.
10005 (linux_kill): Call it instead of remove_process.
10006 (linux_detach, linux_wait_1): Ditto.
10007
155c8968
PA
100082009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10009
10010 * configure.srv: Add x86 Windows CE target.
10011
7fe519cb
UW
100122009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10013
10014 * inferiors.c (get_thread_process): Make global.
10015 * server.h (get_thread_process): Add prototype.
10016 * thread-db.c (find_one_thread): Use get_thread_process
10017 instead of current_process.
10018 (thread_db_get_tls_address): Do not crash if called when
10019 thread layer is not yet initialized.
10020
5472f405
UW
100212009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10022
10023 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10024 * spu-low.c (current_tid): Rename to ...
10025 (current_ptid): ... this.
10026 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10027 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10028 ptid_get_lwp (current_ptid) instead of current_tid.
10029 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10030 instead of current_tid. Use find_process_pid to verify pid
10031 argument is valid. Pass proper argument to remove_process.
10032 (spu_thread_alive): Compare current_ptid instead of current_tid.
10033 (spu_resume): Likewise.
10034
55ac2b99
PA
100352009-04-02 Pedro Alves <pedro@codesourcery.com>
10036
10037 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10038 variable.
10039
95954743
PA
100402009-04-01 Pedro Alves <pedro@codesourcery.com>
10041
10042 Implement the multiprocess extensions, and add linux multiprocess
10043 support.
10044
10045 * server.h (ULONGEST): Declare.
10046 (struct ptid, ptid_t): New.
10047 (minus_one_ptid, null_ptid): Declare.
10048 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10049 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10050 (struct inferior_list_entry): Change `id' type from unsigned from
10051 to ptid_t.
10052 (struct sym_cache, struct breakpoint, struct
10053 process_info_private): Forward declare.
10054 (struct process_info): Declare.
10055 (current_process): Declare.
10056 (all_processes): Declare.
10057 (initialize_inferiors): Declare.
10058 (add_thread): Adjust to use ptid_t.
10059 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10060 (add_process, remove_process, find_thread_pid): Declare.
10061 (find_inferior_id): Adjust to use ptid_t.
10062 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10063 (multi_process): Declare.
10064 (push_event): Adjust to use ptid_t.
10065 (read_ptid, write_ptid): Declare.
10066 (prepare_resume_reply): Adjust to use ptid_t.
10067 (clear_symbol_cache): Declare.
10068 * inferiors.c (all_processes): New.
10069 (null_ptid, minus_one_ptid): New.
10070 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10071 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10072 (add_thread): Change unsigned long to ptid. Remove gdb_id
10073 parameter. Adjust.
10074 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10075 (gdb_id_to_thread): Rename to ...
10076 (find_thread_pid): ... this. Change unsigned long to ptid.
10077 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10078 (loaded_dll, pull_pid_from_list): Adjust.
10079 (add_process, remove_process, find_process_pid)
10080 (get_thread_process, current_process, initialize_inferiors): New.
10081 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10082 (struct target_waitstatus) <related_pid>: Ditto.
10083 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10084 return type to int.
10085 (struct target_ops) <join>: Add `pid' argument.
10086 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10087 (struct target_ops) <wait>: Add `ptid' field. Change return type
10088 to ptid.
10089 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10090 (mywait): Add `ptid' argument. Change return type to ptid_t.
10091 (target_pid_to_str): Declare.
10092 * target.c (set_desired_inferior): Adjust to use ptids.
10093 (mywait): Add new `ptid' argument. Adjust.
10094 (target_pid_to_str): New.
10095 * mem-break.h (free_all_breakpoints): Declare.
10096 * mem-break.c (breakpoints): Delelete.
10097 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10098 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10099 to use per-process breakpoint list.
10100 (free_all_breakpoints): New.
10101 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10102 (symbol_cache, all_symbols_looked_up): Delete.
10103 (hexchars): New.
10104 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10105 read_ptid): New.
10106 (prepare_resume_reply): Change ptid argument's type from unsigned
10107 long to ptid_t. Adjust. Implement W;process and X;process.
10108 (free_sym_cache, clear_symbol_cache): New.
10109 (look_up_one_symbol): Adjust to per-process symbol cache. *
10110 * server.c (cont_thread, general_thread, step_thread): Change type
10111 to ptid_t.
10112 (attached): Delete.
10113 (multi_process): New.
10114 (last_ptid): Change type to ptid_t.
10115 (struct vstop_notif) <ptid>: Change type to ptid_t.
10116 (queue_stop_reply, push_event): Change `ptid' argument's type to
10117 ptid_t.
10118 (discard_queued_stop_replies): Add `pid' argument.
10119 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10120 changes. Don't reference the `attached' global.
10121 (attach_inferior): Adjust to mywait interface changes.
10122 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10123 features. Handle and report "multiprocess+". Handle
10124 "qAttached:PID".
10125 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10126 changes.
10127 (handle_v_kill): New.
10128 (handle_v_stopped): Adjust to use target_pid_to_str.
10129 (handle_v_requests): Allow multiple attaches and runs when
10130 multiprocess extensions are in effect. Handle "vKill".
10131 (myresume): Adjust to use ptids.
10132 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10133 (handle_status): Adjust to discard_queued_stop_replies interface
10134 change.
10135 (first_thread_of, kill_inferior_callback)
10136 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10137 (main): Call initialize_inferiors. Adjust to use ptids, killing
10138 and detaching from all inferiors. Handle multiprocess packet
10139 variants.
10140 * linux-low.h: Include gdb_proc_service.h.
10141 (struct process_info_private): New.
10142 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10143 <lwpid_of>: Use ptid_get_lwp.
10144 (get_lwp_thread): Adjust.
10145 (struct lwp_info): Add `dead' member.
10146 (find_lwp_pid): Declare.
10147 * linux-low.c (thread_db_active): Delete.
10148 (new_inferior): Adjust comment.
10149 (inferior_pid): Delete.
10150 (linux_add_process): New.
10151 (handle_extended_wait): Adjust.
10152 (add_lwp): Change unsigned long to ptid.
10153 (linux_create_inferior): Add process to processes table. Adjust
10154 to use ptids. Don't set new_inferior here.
10155 (linux_attach_lwp): Rename to ...
10156 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10157 it. Adjust to use ptids.
10158 (linux_attach_lwp): New.
10159 (linux_attach): Add process to processes table. Don't set
10160 new_inferior here.
10161 (struct counter): New.
10162 (second_thread_of_pid_p, last_thread_of_process_p): New.
10163 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10164 multiple processes.
10165 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10166 processes. Remove process from process table.
10167 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10168 to multiple processes.
10169 (any_thread_of): New.
10170 (linux_detach): Add `pid' argument, and handle it. Remove process
10171 from processes table.
10172 (linux_join): Add `pid' argument. Handle it.
10173 (linux_thread_alive): Change unsighed long argument to ptid_t.
10174 Consider dead lwps as not being alive.
10175 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10176 threads we're not interested in.
10177 (same_lwp, find_lwp_pid): New.
10178 (linux_wait_for_lwp): Change `pid' argument's type from int to
10179 ptid_t. Adjust.
10180 (linux_wait_for_event): Rename to ...
10181 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10182 from int to ptid_t. Adjust.
10183 (linux_wait_for_event): New.
10184 (linux_wait_1): Add `ptid' argument. Change return type to
10185 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10186 that exit from the process table.
10187 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10188 Adjust.
10189 (mark_lwp_dead): New.
10190 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10191 stopping all threads, mark its main lwp as dead.
10192 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10193 ptids.
10194 (fetch_register, usr_store_inferior_registers)
10195 (regsets_fetch_inferior_registers)
10196 (regsets_store_inferior_registers, linux_read_memory)
10197 (linux_write_memory): Inline `inferior_pid'.
10198 (linux_look_up_symbols): Adjust to use per-process
10199 `thread_db_active'.
10200 (linux_request_interrupt): Adjust to use ptids.
10201 (linux_read_auxv): Inline `inferior_pid'.
10202 (initialize_low): Don't reference thread_db_active.
10203 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10204 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10205 (ps_getpid): Return the pid of the current inferior.
10206 * thread-db.c (proc_handle, thread_agent): Delete.
10207 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10208 per-process data.
10209 (find_one_thread): Change argument type to ptid_t. Adjust to
10210 per-process data.
10211 (maybe_attach_thread): Adjust to per-process data and ptids.
10212 (thread_db_find_new_threads): Ditto.
10213 (thread_db_init): Ditto.
10214 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10215 processes table. Adjust to use ptids.
10216 (spu_kill, spu_detach): Adjust interface. Remove process from
10217 processes table.
10218 (spu_join, spu_thread_alive): Adjust interface.
10219 (spu_wait): Adjust interface. Remove process from processes
10220 table. Adjust to use ptids.
10221 * win32-low.c (current_inferior_tid): Delete.
10222 (current_inferior_ptid): New.
10223 (debug_event_ptid): New.
10224 (thread_rec): Take a ptid. Adjust.
10225 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10226 (child_delete_thread): Ditto.
10227 (do_initial_child_stuff): Add `attached' argument. Add process to
10228 processes table.
10229 (child_fetch_inferior_registers, child_store_inferior_registers):
10230 Adjust.
10231 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10232 (win32_attach): Pass 1 to do_initial_child_stuff.
10233 (win32_kill): Adjust interface. Remove process from processes
10234 table.
10235 (win32_detach): Ditto.
10236 (win32_join): Adjust interface.
10237 (win32_thread_alive): Take a ptid.
10238 (win32_resume): Adjust to use ptids.
10239 (get_child_debug_event): Ditto.
10240 (win32_wait): Adjust interface. Remove exiting process from
10241 processes table.
10242
bd99dc85
PA
102432009-04-01 Pedro Alves <pedro@codesourcery.com>
10244
10245 Non-stop mode support.
10246
10247 * server.h (non_stop): Declare.
10248 (gdb_client_data, handler_func): Declare.
10249 (delete_file_handler, add_file_handler, start_event_loop):
10250 Declare.
10251 (handle_serial_event, handle_target_event, push_event)
10252 (putpkt_notif): Declare.
10253 * target.h (enum resume_kind): New.
10254 (struct thread_resume): Replace `step' field by `kind' field.
10255 (TARGET_WNOHANG): Define.
10256 (struct target_ops) <wait>: Add `options' argument.
10257 <supports_non_stop, async, start_non_stop>: New fields.
10258 (target_supports_non_stop, target_async): New.
10259 (start_non_stop): Declare.
10260 (mywait): Add `options' argument.
10261 * target.c (mywait): Add `options' argument. Print child exit
10262 notifications here.
10263 (start_non_stop): New.
10264 * server.c (non_stop, own_buf, mem_buf): New globals.
10265 (struct vstop_notif): New.
10266 (notif_queue): New global.
10267 (queue_stop_reply, push_event, discard_queued_stop_replies)
10268 (send_next_stop_reply): New.
10269 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10270 interface changes.
10271 (attach_inferior): In non-stop mode, don't wait for the target
10272 here.
10273 (handle_general_set): Handle QNonStop.
10274 (handle_query): When handling qC, return the current general
10275 thread, instead of the first thread of the list.
10276 (handle_query): If the backend supports non-stop mode, include
10277 QNonStop+ in the qSupported query response.
10278 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10279 and non-stop mode.
10280 (handle_v_attach, handle_v_run): Handle non-stop mode.
10281 (handle_v_stopped): New.
10282 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10283 (myresume): Adjust to use resume_kind. Handle non-stop.
10284 (queue_stop_reply_callback): New.
10285 (handle_status): Handle non-stop mode.
10286 (main): Clear non_stop flag on reconnection. Use the event-loop.
10287 Refactor serial protocol handling from here ...
10288 (process_serial_event): ... to this new function. When GDB
10289 selects any thread, select one here. In non-stop mode, wait until
10290 GDB acks all pending events before exiting.
10291 (handle_serial_event, handle_target_event): New.
10292 * remote-utils.c (remote_open): Install remote_desc in the event
10293 loop.
10294 (remote_close): Remove remote_desc from the event loop.
10295 (putpkt_binary): Rename to...
10296 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10297 (putpkt_binary): New as wrapper around putpkt_binary_1.
10298 (putpkt_notif): New.
10299 (prepare_resume_reply): In non-stop mode, don't change the
10300 general_thread.
10301 * event-loop.c: New.
10302 * Makefile.in (OBJ): Add event-loop.o.
10303 (event-loop.o): New rule.
10304
10305 * linux-low.h (pid_of): Moved here.
10306 (lwpid_of): New.
10307 (get_lwp_thread): Use lwpid_of.
10308 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10309 * linux-low.c (pid_of): Delete.
10310 (inferior_pid): Use lwpid_of.
10311 (linux_event_pipe): New.
10312 (target_is_async_p): New.
10313 (delete_lwp): New.
10314 (handle_extended_wait): Use lwpid_of.
10315 (add_lwp): Don't set lwpid field.
10316 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10317 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10318 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10319 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10320 first. Adjust to linux_wait_for_event interface changes. Use
10321 lwpid_of.
10322 (linux_detach): Don't delete the main lwp here.
10323 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10324 (status_pending_p): Don't consider explicitly suspended lwps.
10325 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10326 pointer. Add OPTIONS argument. Change return type to int. Use
10327 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10328 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10329 pointer. Add status pointer argument. Return a pid instead of a
10330 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10331 changes. In non-stop mode, don't switch to a random thread.
10332 (linux_wait): Rename to...
10333 (linux_wait_1): ... this. Add target_options argument, and handle
10334 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10335 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10336 clean exit and signal exit code. Don't stop all threads in
10337 non-stop mode. In all-stop mode, only stop all threads when
10338 reporting a stop to GDB. Handle explicit thread stop requests.
10339 (async_file_flush, async_file_mark): New.
10340 (linux_wait): New.
10341 (send_sigstop): Use lwpid_of.
10342 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10343 interface changes. In non-stop mode, don't switch to a random
10344 thread.
10345 (linux_resume_one_lwp): Use lwpid_of.
10346 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10347 (linux_resume_one_thread): ... this. Handle resume_stop. In
10348 non-stop mode, don't look for pending flag in all threads.
10349 (resume_status_pending_p): Don't consider explicitly suspended
10350 threads.
10351 (my_waitpid): Reimplement. Emulate __WALL.
10352 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10353 Use lwpid_of.
10354 (sigchld_handler, linux_supports_non_stop, linux_async)
10355 (linux_start_non_stop): New.
10356 (linux_target_ops): Register linux_supports_non_stop, linux_async
10357 and linux_start_non_stop.
10358 (initialize_low): Install SIGCHLD handler.
10359 * thread-db.c (thread_db_create_event, find_one_thread)
10360 (thread_db_get_tls_address): Use lwpid_of.
10361 * win32-low.c (win32_detach): Adjust to use resume_kind.
10362 (win32_wait): Add `options' argument.
10363 * spu-low.c (spu_resume): Adjust to use resume_kind.
10364 (spu_wait): Add `options' argument.
10365
5b1c542e
PA
103662009-04-01 Pedro Alves <pedro@codesourcery.com>
10367
10368 Decouple target code from remote protocol.
10369
10370 * target.h (enum target_waitkind): New.
10371 (struct target_waitstatus): New.
10372 (struct target_ops) <wait>: Return an unsigned long. Take a
10373 target_waitstatus pointer instead of a char pointer.
10374 (mywait): Likewise.
10375 * target.c (mywait): Change prototype to return an unsigned long.
10376 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10377 * server.h (thread_from_wait, old_thread_from_wait): Delete
10378 declarations.
10379 (prepare_resume_reply): Change prototype to take a
10380 target_waitstatus.
10381 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10382 (last_status, last_ptid): New.
10383 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10384 pid instead of a signal.
10385 (attach_inferior): Remove "status" and "signal" parameters.
10386 Adjust.
10387 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10388 not as an address.
10389 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10390 (handle_v_requests, myresume): Remove "status" and "signal"
10391 parameters. Adjust.
10392 (handle_status): New.
10393 (main): Delete local `status'. Adjust.
10394 * remote-utils.c: Include target.h.
10395 (prepare_resume_reply): Change prototype to take a
10396 target_waitstatus. Adjust.
10397
10398 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10399 interface.
10400 * spu-low.c (spu_wait): Adjust.
10401 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10402 Delete.
10403 (win32_wait): Adjust.
10404
2bd7c093
PA
104052009-04-01 Pedro Alves <pedro@codesourcery.com>
10406
10407 * target.h (struct thread_resume): Delete leave_stopped member.
10408 (struct target_ops): Add a `n' argument to the `resume' callback.
10409 * server.c (start_inferior): Adjust.
10410 (handle_v_cont, myresume): Adjust.
10411 * linux-low.c (check_removed_breakpoint): Adjust to resume
10412 interface change, and to removed leave_stopped field.
10413 (resume_ptr): Delete.
10414 (struct thread_resume_array): New.
10415 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10416 resume interface change.
10417 (linux_continue_one_thread, linux_queue_one_thread)
10418 (resume_status_pending_p): Check if the resume field is NULL
10419 instead of checking the leave_stopped member.
10420 (linux_resume): Adjust to the target resume interface change.
10421 * spu-low.c (spu_resume): Adjust to the target resume interface
10422 change.
10423 * win32-low.c (win32_detach, win32_resume): Ditto.
10424
c35fafde
PA
104252009-04-01 Pedro Alves <pedro@codesourcery.com>
10426
10427 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10428 flag.
10429 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10430 pending.
10431 (linux_continue_one_thread): Only preserve the stepping flag if
10432 there's a pending breakpoint.
10433
0a59d50b
PA
104342009-03-31 Pedro Alves <pedro@codesourcery.com>
10435
10436 * server.c (main): After the inferior having exited, call
10437 remote_close before exiting gdbserver.
10438
f04c6d38
TJB
104392009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10440
10441 Fix size of FPSCR in Power 7 processors.
10442 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10443 (PPC_FEATURE_HAS_DFP): New #define.
10444 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10445 size of the FPSCR.
10446
78e5cee6
PA
104472009-03-23 Pedro Alves <pedro@codesourcery.com>
10448
10449 * server.c (handle_query) Whitespace and formatting.
10450
1b3f6016
PA
104512009-03-22 Pedro Alves <pedro@codesourcery.com>
10452
10453 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10454 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10455 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10456 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10457 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10458 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10459 Makefile.in, configure.ac: Fix whitespace throughout.
10460 * configure: Regenerate.
10461
a07b2135
PA
104622009-03-22 Pedro Alves <pedro@codesourcery.com>
10463
10464 * inferiors.c (find_inferior): Make it safe for the callback
10465 function to delete the currently iterated inferior.
10466
67cc2626
PA
104672009-03-22 Pedro Alves <pedro@codesourcery.com>
10468
10469 * Makefile.in (linuw_low_h): Move higher.
10470 (thread-db.o): Depend on $(linux_low_h).
10471
54a0b537
PA
104722009-03-17 Pedro Alves <pedro@codesourcery.com>
10473
10474 Rename "process" to "lwp" throughout.
10475
10476 * linux-low.c (all_processes): Rename to...
10477 (all_lwps): ... this.
10478 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10479 (add_process): Rename to ...
10480 (add_lwp): ... this. Adjust.
10481 (linux_create_inferior): Adjust.
10482 (linux_attach_lwp): Adjust.
10483 (linux_attach): Adjust.
10484 (linux_kill_one_process): Rename to ...
10485 (linux_kill_one_lwp): ... this. Adjust.
10486 (linux_kill): Adjust.
10487 (linux_detach_one_process): Rename to ...
10488 (linux_detach_one_lwp): ... this. Adjust.
10489 (linux_detach): Adjust.
10490 (check_removed_breakpoint): Adjust.
10491 (status_pending_p): Adjust.
10492 (linux_wait_for_process): Rename to ...
10493 (linux_wait_for_lwp): ... this. Adjust.
10494 (linux_wait_for_event): Adjust.
10495 (send_sigstop): Adjust.
10496 (wait_for_sigstop): Adjust.
10497 (stop_all_processes): Rename to ...
10498 (stop_all_lwps): ... this.
10499 (linux_resume_one_process): Rename to ...
10500 (linux_resume_one_lwp): ... this. Adjust.
10501 (linux_set_resume_request, linux_continue_one_thread)
10502 (linux_queue_one_thread, resume_status_pending_p)
10503 (usr_store_inferior_registers, regsets_store_inferior_registers)
10504 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10505 Adjust.
10506 * linux-low.h (get_process): Rename to ...
10507 (get_lwp): ... this. Adjust.
10508 (get_thread_process): Rename to ...
10509 (get_thread_lwp): ... this. Adjust.
10510 (get_process_thread): Rename to ...
10511 (get_lwp_thread): ... this. Adjust.
10512 (struct process_info): Rename to ...
10513 (struct lwp_info): ... this.
10514 (all_processes): Rename to ...
10515 (all_lwps): ... this.
10516 * proc-service.c (ps_lgetregs): Adjust.
10517 * thread-db.c (thread_db_create_event, find_one_thread)
10518 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10519
0b16c5cf
PA
105202009-03-14 Pedro Alves <pedro@codesourcery.com>
10521
10522 * server.c (handle_query): Handle "qAttached".
10523
32de4b9d
NS
105242009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10525
10526 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10527 GPLv3, update license URL.
10528
2aecd87f
DE
105292009-03-01 Doug Evans <dje@google.com>
10530
93efd302 10531 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
10532 (server_h): Add gdb_signals.h.
10533 (signals.o): Update.
10534 * server.h (target_signal_from_host,target_signal_to_host_p)
10535 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10536
86b1f9c5
PM
105372009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10538
10539 * remote-utils.c (getpkt): Also generate remote-debug
10540 information if noack_mode is set.
10541
4aa995e1
PA
105422009-02-06 Pedro Alves <pedro@codesourcery.com>
10543
10544 * server.c (handle_query): Report qXfer:siginfo:read and
10545 qXfer:siginfo:write as supported and handle them.
10546 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10547 * linux-low.c (linux_xfer_siginfo): New.
10548 (linux_target_ops): Set it.
10549
62709adf
PA
105502009-01-26 Pedro Alves <pedro@codesourcery.com>
10551
10552 * server.c (gdbserver_usage): Mention --remote-debug.
10553 (main): Accept '--remote-debug' switch.
10554
aef93bd7
DE
105552009-01-18 Doug Evans <dje@google.com>
10556
10557 * regcache.c (new_register_cache): No need to check result of xcalloc.
10558 * server.c (handle_search_memory): Back out calls to xmalloc,
10559 result is checked and error is returned to user upon failure.
10560 (handle_query): Ditto. Add more checks for result of malloc.
10561 (handle_v_cont): Check result of malloc, report error back to
10562 user upon failure.
10563 (handle_v_run): Ditto. Call freeargv.
10564 * server.h (freeargv): Declare.
10565 * utils.c (freeargv): New fn.
10566
54363045
DE
105672009-01-15 Doug Evans <dje@google.com>
10568
f626972c
DE
10569 * gdbreplay.c (perror_with_name): Make arg const char *.
10570 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10571 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10572 * utils.c (perror_with_name): Make arg const char *.
54363045 10573
18aae699
PA
105742009-01-14 Pedro Alves <pedro@codesourcery.com>
10575
10576 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10577 when handling a EXIT_PROCESS_DEBUG_EVENT.
10578
ff703abe
JB
105792009-01-06 Joel Brobecker <brobecker@adacore.com>
10580
10581 * gdbreplay.c (gdbreplay_version): Update copyright year.
10582 * server.c (gdbserver_version): Likewise.
10583
f21cc1a2 105842009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10585
10586 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10587 (handle_extended_wait): Improve comment.
0e21c1ec 10588
bca929d3
DE
105892008-12-13 Doug Evans <dje@google.com>
10590
10591 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10592 * server.h (ATTR_MALLOC): New macro.
10593 (xmalloc,xcalloc,xstrdup): Declare.
10594 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10595 * inferiors.c: Ditto.
10596 * linux-low.c: Ditto.
10597 * mem-break.c: Ditto.
10598 * regcache.c: Ditto.
10599 * remote-utils.c: Ditto.
10600 * server.c: Ditto.
10601 * target.c: Ditto.
10602 * win32-low.c: Ditto.
10603
97438e3f
DE
106042008-12-12 Doug Evans <dje@google.com>
10605
896c7fbb
DE
10606 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10607 in debugging printf.
10608
97438e3f
DE
10609 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10610
e3b886f8
DE
106112008-12-09 Doug Evans <dje@google.com>
10612
10613 * linux-low.h (struct process_info): Delete member tid, unused.
10614 * thread-db.c (find_one_thread): Update.
10615 (maybe_attach_thread): Update.
10616
07e059b5
VP
106172008-12-02 Pedro Alves <pedro@codesourcery.com>
10618
889bf7c5
PA
10619 * target.h (struct target_ops): Add qxfer_osdata member.
10620 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10621 and dirent.h.
10622 (linux_qxfer_osdata): New functions.
10623 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10624 callback.
10625 * server.c (handle_query): Handle "qXfer:osdata:read:".
10626 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10627 (buffer_xml_printf): New functions.
10628 * server.h (struct buffer): New.
10629 (buffer_grow_str, buffer_grow_str0): New macros.
10630 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10631 (buffer_xml_printf): Declare.
07e059b5 10632
4cab47ab
DE
106332008-11-24 Doug Evans <dje@google.com>
10634
10635 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10636
f142445f
DJ
106372008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10638
10639 * server.c (handle_v_run): Always use the supplied argument list.
10640
d0107bb6 106412008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 10642
d0107bb6
BW
10643 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10644 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 10645
2c4ad781
TJB
106462008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10647
10648 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10649 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10650 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10651 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10652 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10653 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10654 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10655 XML target descriptions.
10656 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10657 when inferior is running on an ISA 2.05 or later processor. Add
10658 special case to return offset for full 64-bit slot of FPSCR when
10659 in 32-bits.
10660
dfb64f85
DJ
106612008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10662
10663 * Makefile.in (SFILES, clean): Added sparc64 files.
10664 (reg-sparc64.o, reg-sparc64.c): New.
10665 * configure.srv (sparc*-*-linux*): New configuration.
10666 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10667 syscall arguments for SPARC.
10668 (regsets_store_inferior_registers): Likewise.
10669 * linux-sparc-low.c: New file.
10670
66b6e1dd
DE
106712008-10-21 Doug Evans <dje@google.com>
10672
10673 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10674 (READLINE_DIR,READLINE_DEP): Delete.
10675 (INTERNAL_CFLAGS): Update.
10676 (LINTFLAGS): Update.
10677
9b710a42
PA
106782008-10-10 Pedro Alves <pedro@codesourcery.com>
10679
10680 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10681 whole argv from the last run, not just argv[0].
10682
5822d809
PA
106832008-09-08 Pedro Alves <pedro@codesourcery.com>
10684
10685 * regcache.c (new_register_cache): Return NULL if the register
10686 cache size isn't known yet.
10687 (free_register_cache): Avoid dereferencing a NULL regcache.
10688
74aac56f
DJ
106892008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10690
10691 * configure.srv: Merge MIPS and MIPS64.
10692
400b20f5
MR
106932008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10694
10695 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10696
677c5bb1
LM
106972008-08-18 Luis Machado <luisgpm@br.ibm.com>
10698
10699 * Makefile.in: Add required vsx dependencies.
10700
10701 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10702 Declare init_registers_powerpc_vsx32l.
10703 Declare init_registers_powerpc_vsx64l.
10704 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10705 (ppc_arch_setup): Check for VSX in hwcap.
10706 (ppc_fill_vsxregset): New function.
10707 (ppc_store_vsxregset): New function.
10708 Add new VSX entry in regset_info target_regsets.
10709
10710 * configure.srv: Add new VSX dependencies.
10711
a6f3e723
SL
107122008-08-12 Pedro Alves <pedro@codesourcery.com>
10713
10714 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10715 (remote_open): Set or clear transport_is_reliable.
10716 (putpkt_binary): Don't expect acks in noack mode.
10717 (getpkt): Don't send ack/nac in noack mode.
10718 * server.c (handle_general_set): Handle QStartNoAckMode.
10719 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10720 qSupported.
10721 (main): Reset noack_mode on every connection.
10722 * server.h (noack_mode): Declare.
10723
a417dc56
RW
107242008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10725
10726 * Makefile.in (GDBREPLAY_OBS): New variable.
10727 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10728
3221518c
UW
107292008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10730 Daniel Jacobowitz <dan@codesourcery.com>
10731
10732 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10733 (usr_store_inferior_registers): Likewise.
10734 (regsets_store_inferior_registers): Likewise.
10735
ec56be1b
PA
107362008-07-31 Rolf Jansen <rj@surtec.com>
10737 Pedro Alves <pedro@codesourcery.com>
10738
10739 * configure.ac: Check for memmem declaration.
10740 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10741 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10742 (disable_packet_qfThreadInfo): Unconditionally compile.
10743 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10744 * configure, config.in: Regenerate.
10745
2fe5e3ff
DE
107462008-07-28 Doug Kwan <dougkwan@google.com>
10747
10748 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10749 (linux_write_memory): Remove declaration of errno.
10750
836acd6d
UW
107512008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10752
10753 * linux-low.c (handle_extended_wait): Do not use "status"
10754 variable uninitialized.
10755
aeba519e
PA
107562008-07-07 Pedro Alves <pedro@codesourcery.com>
10757
10758 * server.c (handle_v_attach): Inhibit reporting dll changes.
10759
db42f210
PA
107602008-06-27 Pedro Alves <pedro@codesourcery.com>
10761
10762 * remote-utils.c (prepare_resume_reply): If requested, don't
10763 output "thread:TID" in the T stop reply.
10764
10765 * server.c (disable_packet_vCont, disable_packet_Tthread)
10766 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10767 (handle_query): If requested, disable support for qC, qfThreadInfo
10768 and qsThreadInfo.
10769 (handle_v_requests): If requested, disable support for vCont.
10770 (gdbserver_show_disableable): New.
10771 (main): Handle --disable-packet and --disable-packet=LIST.
10772
10773 * server.h (disable_packet_vCont, disable_packet_Tthread)
10774 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10775
8e4c5421
CD
107762008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10777
10778 * server.c (gdbserver_usage): Mention --version.
10779
6e23a804
DJ
107802008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10781
10782 * Makefile.in (gdbreplay.o): New rule.
10783
90aa6a40
JM
107842008-06-06 Joseph Myers <joseph@codesourcery.com>
10785
10786 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10787 message, not gdbserver.
10788
c16158bc 107892008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
10790 Nathan Sidwell <nathan@codesourcery.com>
10791 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
10792
10793 * acinclude.m4: Include ../../config/acx.m4.
10794 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10795 * configure, config.in: Regenerate.
10796 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10797 * server.c (gdbserver_version): Print PKGVERSION.
10798 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10799 (main): Adjust gdbserver_usage calls.
10800 * gdbreplay.c (version, host_name): Add declarations.
10801 (gdbreplay_version, gdbreplay_usage): New.
10802 (main): Accept --version and --help options.
10803
aeb75bf5
DJ
108042008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10805
10806 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10807 (arm_breakpoint_at): Handle Thumb.
10808 (the_low_target): Add comment.
10809
76b233dd
UW
108102008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10811
10812 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10813
08388c79
DE
108142008-05-09 Doug Evans <dje@google.com>
10815
a3c83fae
DE
10816 * server.h (decode_search_memory_packet): Declare.
10817 * remote-utils.c (decode_search_memory_packet): New fn.
10818 * server.c (handle_search_memory_1): New fn.
08388c79
DE
10819 (handle_search_memory): New fn.
10820 (handle_query): Process qSearch:memory packets.
10821
bb9c3d36
UW
108222008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10823
10824 * regcache.c (registers_length): Remove.
10825 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10826 full register packet.
10827 * regcache.h (registers_length): Remove prototype.
10828 * server.h (PBUFSIZ): Define to 16384.
10829
7284e1be
UW
108302008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10831
10832 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10833 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10834 powerpc-64l.o, and powerpc-altivec64l.o.
10835 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10836 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10837 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10838 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10839 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10840 to srv_xmlfiles.
10841
10842 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10843 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10844 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10845 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10846 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10847 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10848 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10849 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10850 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10851 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10852 (clean): Update.
10853
10854 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10855 (init_registers_powerpc_32l): ... this new prototype.
10856 (init_registers_powerpc_32): Remove, replace by ...
10857 (init_registers_powerpc_altivec32l): ... this new prototype.
10858 (init_registers_powerpc_e500): Remove, replace by ...
10859 (init_registers_powerpc_e500l): ... this new prototype.
10860 (init_registers_ppc64): Remove, replace by ...
10861 (init_registers_powerpc_64l): ... this new prototype.
10862 (init_registers_powerpc_64): Remove, replace by ...
10863 (init_registers_powerpc_altivec64l): ... this new prototype.
10864 (ppc_num_regs): Set to 73.
10865 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10866 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10867 (ppc_cannot_store_register): Handle orig_r3 and trap.
10868 (ppc_arch_setup): Update init_registers_... calls.
10869 (ppc_fill_gregset): Handle orig_r3 and trap.
10870
10871 * inferiors.c (clear_inferiors): Reset current_inferior.
10872
fdc59709
PB
108732008-04-23 Paolo Bonzini <bonzini@gnu.org>
10874
889bf7c5
PA
10875 * acinclude.m4: Add override.m4.
10876 * configure: Regenerate.
fdc59709 10877
c9b2f845
UW
108782008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10879
10880 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10881 initial call to init_register_ppc64.
10882
550512b8
UW
108832008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10884
43aaf8b6
PA
10885 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10886 single powerpc*-*-linux* case.
550512b8
UW
10887 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10888
b6430ec3
UW
108892008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10890
10891 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 10892 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
10893 from reg_xmlfiles.
10894 * linux-ppc-low.c: Include <elf.h>.
10895 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10896 (ppc_hwcap): New global variable.
10897 (ppc_regmap): Remove __SPE__ #ifdef sections.
10898 (ppc_regmap_e500): New global variable.
10899 (ppc_cannot_store_register): Update __SPE__ special case.
10900 (ppc_get_hwcap): New function.
10901 (ppc_arch_setup): Use it to determine whether inferior supports
10902 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10903 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10904 Do not access registers if target does not support AltiVec.
10905 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10906 Do not access registers if target does not support SPE.
10907 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10908
52fa2412
UW
109092008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10910
10911 * linux-low.c (disabled_regsets, num_regsets): New.
10912 (use_regsets_p): Delete.
10913 (linux_wait_for_process): Clear disabled_regsets.
10914 (regsets_fetch_inferior_registers): Check and set it.
10915 (regsets_store_inferior_registers): Likewise.
10916 (linux_fetch_registers, linux_store_registers): Do not use
10917 use_regsets_p.
10918 (initialize_low): Allocate disabled_regsets.
10919
e28b3332
DJ
109202008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10921
10922 * Makefile.in (LIBOBJS): New.
10923 (OBS): Use LIBOBJS.
10924 (memmem.o): New rule.
10925 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10926 * configure: Regenerated.
10927
4536995d
UW
109282008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10929
10930 * server.c (handle_query): Never return "unsupported" for
10931 qXfer:features:read queries.
10932
221c031f
UW
109332008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10934
10935 * server.c (get_features_xml): Fix inverted condition.
10936 (handle_query): Always support qXfer:feature:read.
10937
ccd213ac
DJ
109382008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10939
10940 * server.c (wrapper_argv): New.
10941 (start_inferior): Handle wrapper_argv. If set, expect an extra
10942 trap.
10943 (gdbserver_usage): Document --wrapper.
10944 (main): Parse --wrapper.
10945
6fe305f7
UW
109462008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10947
10948 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10949 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10950 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10951 (ppc_set_pc): Likewise.
10952 (ppc_arch_setup): New function.
10953 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10954 of collect_register.
889bf7c5 10955 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 10956
5b0a002e
UW
109572008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10958
10959 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10960 instead of linux-ppc64-low.o.
10961 * linux-ppc64-low.c: Remove file.
10962 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10963 (linux-ppc64-low.o): Remove rule.
10964
10965 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10966 (init_registers_powerpc_64): Likewise.
10967 (ppc_regmap): Conditionally define depending on __powerpc64__.
10968 (ppc_cannot_store_register): Do not special-case "fpscr" when
10969 compiled on __powerpc64__.
10970 (ppc_collect_ptrace_register): New function.
10971 (ppc_supply_ptrace_register): New function.
10972 (ppc_breakpoint): Change type to "unsigned int".
10973 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10974 (the_low_target): Conditionally provide initializers for the
889bf7c5 10975 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
10976 collect_ptrace_register and supply_ptrace_register members.
10977
9b4b61c8
UW
109782008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10979
10980 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10981 * server.c (gdbserver_xmltarget): Define.
10982 (get_features_xml): Use it to replace "target.xml" and arch_string.
10983
10984 * configure.srv: Remove srv_xmltarget. Add XML files that were
10985 mentioned there to srv_xmlfiles instead. Remove conditional tests
10986 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10987 srv_xmlfiles and srv_regobj to include all possible choices.
10988 * configure.ac (srv_xmltarget): Remove.
10989 (srv_xmlfiles): Do not add "target.xml".
10990 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10991 checks for supplementary target information.
10992 * configure: Regenerate.
10993 * Makefile.in (XML_TARGET): Remove.
10994 (target.xml): Remove rule.
10995 (clean): Do not clean up target.xml.
10996 (.PRECIOUS): Do not mention target.xml.
10997
10998 * target.h (struct target_ops): Remove arch_string member.
10999 * linux-low.c (linux_arch_string): Remove.
11000 (linux_target_ops): Remove arch_string initializer.
11001 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11002 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11003 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11004 * spu-low.c (spu_arch_string): Remove.
11005 (spu_target_ops): Remove arch_string initializer.
11006 * win32-low.c (win32_arch_string): Remove.
11007 (win32_target_ops): Remove arch_string initializer.
11008 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11009 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11010 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11011
ee1a7ae4
UW
110122008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11013
11014 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11015 by collect_ptrace_register and supply_ptrace_register hooks.
11016 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11017 instead of checking for the_low_target.left_pad_xfer.
11018 (usr_store_inferior_registers): Use collect_ptrace_register callback
11019 instead of checking for the_low_target.left_pad_xfer.
11020
11021 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11022 (s390_supply_ptrace_register): Likewise.
11023 (s390_fill_gregset): Call s390_collect_ptrace_register.
11024 (the_low_target): Update.
11025
11026 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11027 (ppc_supply_ptrace_register): Likewise.
11028 (the_low_target): Update.
11029
11030 * linux-i386-low.c (the_low_target): Update.
11031 * linux-x86-64-low.c (the_low_target): Update.
11032
d61ddec4
UW
110332008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11034
11035 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11036 reg-s390.o and reg-s390x.o.
11037
11038 * linux-low.c (new_inferior): New global variable.
11039 (linux_create_inferior, linux_attach): Set it.
11040 (linux_wait_for_process): Call the_low_target.arch_setup after the
11041 target has stopped for the first time.
11042 (initialize_low): Do not call the_low_target.arch_setup.
11043
11044 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11045 (s390_set_pc): Likewise.
11046 (s390_arch_setup): New function.
11047 (the_low_target): Use s390_arch_setup as arch_setup routine.
11048
11049 * regcache.c (realloc_register_cache): New function.
11050 (set_register_cache): Call it for each existing regcache.
11051
d05b4ac3
UW
110522008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11053
11054 * server.h (init_registers): Remove prototype.
11055
11056 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11057 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11058 instead of init_registers ().
11059 * linux-arm-low.c (init_registers_arm): Add prototype.
11060 (init_registers_arm_with_iwmmxt): Likewise.
11061 (the_low_target): Add initializer for arch_setup field.
11062 * linux-cris-low.c (init_registers_cris): Add prototype.
11063 (the_low_target): Add initializer for arch_setup field.
11064 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11065 (the_low_target): Add initializer for arch_setup field.
11066 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11067 (the_low_target): Add initializer for arch_setup field.
11068 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11069 (the_low_target): Add initializer for arch_setup field.
11070 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11071 (the_low_target): Add initializer for arch_setup field.
11072 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11073 (the_low_target): Add initializer for arch_setup field.
11074 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11075 (init_registers_mips64_linux): Likewise.
11076 (the_low_target): Add initializer for arch_setup field.
11077 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11078 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11079 (the_low_target): Add initializer for arch_setup field.
11080 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11081 (init_registers_powerpc_64): Likewise.
11082 (the_low_target): Add initializer for arch_setup field.
11083 * linux-s390-low.c (init_registers_s390): Add prototype.
11084 (init_registers_s390x): Likewise.
11085 (the_low_target): Add initializer for arch_setup field.
11086 * linux-sh-low.c (init_registers_sh): Add prototype.
11087 (the_low_target): Add initializer for arch_setup field.
11088 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11089 (the_low_target): Add initializer for arch_setup field.
11090 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11091 (the_low_target): Add initializer for arch_setup field.
11092
11093 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11094 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11095 instead of init_registers ().
11096 * win32-arm-low.c (init_registers_arm): Add prototype.
11097 (the_low_target): Add initializer for arch_setup field.
11098 * win32-i386-low.c (init_registers_i386): Add prototype.
11099 (the_low_target): Add initializer for arch_setup field.
11100
11101 * spu-low.c (init_registers_spu): Add prototype.
11102 (initialize_low): Call initialie_registers_spu () instead of
11103 initialize_registers ().
11104
fd96d250
PA
111052008-02-19 Pedro Alves <pedro@codesourcery.com>
11106
11107 * server.c (handle_v_requests): When handling the vRun and vAttach
11108 packets, if already debugging a process, don't kill it. Return an
11109 error instead.
11110
d41b6bb4
DJ
111112008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11112
11113 * server.c (handle_query): Correct length check.
11114
5ac588cf
PA
111152008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11116
11117 * win32-low.c (do_initial_child_stuff): Add process handle
11118 parameter. Set current_process_handle and current_process_id from the
11119 parameters. Clear globals.
11120 (win32_create_inferior): Don't set current_process_handle and
11121 current_process_id here. Instead pass them on the call to
11122 do_initial_child_stuff.
11123 (win32_attach): Likewise.
11124 (win32_clear_inferiors): New.
11125 (win32_kill): Don't close the current process handle or the
11126 current thread handle here. Instead call win32_clear_inferiors.
11127 (win32_detach): Don't open a new handle to the process. Call
11128 win32_clear_inferiors.
11129 (win32_join): Don't rely on current_process_handle; open a new
11130 handle using the process id.
11131 (win32_wait): Call win32_clear_inferiors when the inferior process
11132 has exited.
11133
ecd7ecbc
DJ
111342008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11135
11136 * server.c (monitor_show_help): Add "exit".
11137
1525d545
MG
111382008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11139
ecd7ecbc 11140 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
11141 (clean): Add reg-xtensa.c.
11142 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
11143 * configure.srv (xtensa*-*-linux*) New target.
11144 * linux-xtensa-low.c: New.
11145 * xtensa-xtregs.c: New.
1525d545 11146
59a016f0
PA
111472008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11148
11149 * hostio.c: Don't include errno.h.
11150 (errno_to_fileio_errno): Move to hostio-errno.
11151 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11152 error number outputting to the target->hostio_last_error callback.
11153 (hostio_packet_error): Use FILEIO_EINVAL directly.
11154 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11155 calls to hostio_error.
11156 * hostio-errno.c: New.
11157 * server.h (hostio_last_error_from_errno): Declare.
11158 * target.h (target_ops): Add hostio_last_error member.
11159 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11160 as hostio_last_error handler.
889bf7c5 11161 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
11162 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11163 (wince_hostio_last_error): New functions.
11164 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11165 as hostio_last_error handler.
11166 (win32_target_ops) [!_WIN32_WCE]: Register
11167 hostio_last_error_from_errno as hostio_last_error handler.
11168 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11169 (hostio-errno.o): New rule.
11170 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11171 * configure.srv (srv_hostio_err_objs): New variable. Default to
11172 hostio-errno.o.
11173 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11174 * configure: Regenerate.
11175
2d717e4f
DJ
111762008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11177
11178 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11179 (linux_kill, linux_detach): Clean up the process list.
11180 * remote-utils.c (remote_open): Improve port number parsing.
11181 (putpkt_binary, input_interrupt): Only send interrupts if the target
11182 is running.
11183 * server.c (extended_protocol): Make static.
11184 (attached): Define earlier.
11185 (exit_requested, response_needed, program_argv): New variables.
11186 (target_running): New.
11187 (start_inferior): Clear attached here.
11188 (attach_inferior): Set attached here.
11189 (require_running): Define.
11190 (handle_query): Use require_running and target_running. Implement
11191 "monitor exit".
11192 (handle_v_attach, handle_v_run): New.
11193 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11194 (gdbserver_usage): Update.
11195 (main): Redo argument parsing. Handle --debug and --multi. Handle
11196 --attach along with other options or after the port. Save
11197 program_argv. Support no initial program. Resynchronize
11198 communication with GDB after an error. Handle "monitor exit".
11199 Use require_running and target_running. Always allow the extended
11200 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11201 restart in extended mode.
11202 * README: Refer to the GDB manual. Update --attach usage.
11203
7407e2de
AS
112042007-12-20 Andreas Schwab <schwab@suse.de>
11205
11206 * linux-low.c (STACK_SIZE): Define.
11207 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11208 (linux_test_for_tracefork): Likewise.
11209
b65d95c5
DJ
112102007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11211
11212 * linux-low.c (linux_wait_for_event): Update messages. Do not
11213 reinsert auto-delete breakpoints.
11214 * mem-break.c (struct breakpoint): Change return type of handler to
11215 int.
11216 (set_breakpoint_at): Update handler type.
11217 (reinsert_breakpoint_handler): Return 1 instead of calling
11218 delete_breakpoint.
11219 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11220 setting a new one.
11221 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11222 * mem-break.h (set_breakpoint_at): Update handler type.
11223 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11224 * win32-low.c (auto_delete_breakpoint): New.
11225 (get_child_debug_event): Use it.
11226
4e799345
DJ
112272007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11228
11229 * configure.ac: Check for pread and pwrite.
11230 * hostio.c (handle_pread): Fall back to lseek and read.
11231 (handle_pwrite): Fall back to lseek and write.
11232 * config.in, configure: Regenerated.
11233
27524b67
DJ
112342007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11235
11236 * server.c (myresume): Add own_buf argument.
11237 (main): Update calls.
11238
a20d5e98
DJ
112392007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11240
11241 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11242 * remote-utils.c (remote_open): Do not call disable_async_io.
11243 (block_async_io): Delete.
11244 (unblock_async_io): Make static.
11245 (initialize_async_io): New.
11246 * server.c (handle_v_cont): Handle async I/O here.
11247 (myresume): Likewise. Move other common resume tasks here...
11248 (main): ... from here. Call initialize_async_io. Disable async
11249 I/O before the main loop.
11250 * server.h (initialize_async_io): Declare.
11251 (block_async_io, unblock_async_io): Delete prototypes.
11252 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11253
b79d787e
DJ
112542007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11255
11256 * remote-utils.c (readchar): Allow binary data in received messages.
11257
d97903b2
PA
112582007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11259
11260 * win32-low.c (attaching): New global.
11261 (win32_create_inferior): Clear the `attaching' global.
11262 (win32_attach): Set the `attaching' global.
11263 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11264 attaching. Only set a breakpoint at the entry point if not
11265 attaching.
11266
311de423
PA
112672007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11268
11269 * server.c (main): Don't report dll events on the initial
11270 connection on attaches.
11271
6c2d16d2
PA
112722007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11273
11274 * server.c (main): Relax numerical bases supported for the pid of
11275 the --attach command line argument.
11276
5ca906e6
PA
112772007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11278
11279 * win32-low.c (win32_attach): Call OpenProcess before
11280 DebugActiveProcess, not after. Add last error output to error
11281 call.
11282
9c6c8194
PA
112832007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11284
11285 * win32-low.c (win32_get_thread_context)
11286 (win32_set_thread_context): New functions.
11287 (thread_rec): Use win32_get_thread_context.
11288 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11289 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11290 field.
11291
4d5d1aaa
PA
112922007-12-03 Leo Zayas
11293 Pedro Alves <pedro_alves@portugalmail.pt>
11294
11295 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11296 global variables.
11297 (child_add_thread): Minor cleanup.
11298 (child_continue): Resume artificially suspended threads before
11299 calling ContinueDebugEvent.
11300 (suspend_one_thread): New.
11301 (fake_breakpoint_event): New.
11302 (get_child_debug_event): Change return type to int. Check here if
11303 gdb sent an interrupt request. If a soft interrupt was requested,
11304 fake a breakpoint event. Return 0 if there is no event to handle,
11305 and 1 otherwise.
11306 (win32_wait): Don't check here if gdb sent an interrupt request.
11307 Ensure there is a valid event to handle.
11308 (win32_request_interrupt): Add soft interruption method as last
11309 resort.
11310
c436e841
PA
113112007-12-03 Leo Zayas
11312 Pedro Alves <pedro_alves@portugalmail.pt>
11313
11314 * win32-low.h (win32_thread_info): Add descriptions to the
11315 structure members. Replace `suspend_count' counter by a
11316 `suspended' flag.
11317 * win32-low.c (thread_rec): Update condition of when to get the
11318 context from the inferior. Rely on ContextFlags being set if it
11319 has already been retrieved. Only suspend the inferior thread if
11320 we haven't already. Warn if that fails.
11321 (continue_one_thread): s/suspend_count/suspended/. Only call
11322 ResumeThread once. Warn if that fails.
11323
e7b5fa67
PA
113242007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11325
11326 * win32-low.c (win32_wait): Don't read from the inferior when it
11327 has already exited.
11328
a385171d
PA
113292007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11330
11331 * Makefile.in (win32_low_h): New variable.
11332 (win32-low.o): Add dependency on $(win32_low_h).
11333 (win32-arm-low.o, win32-i386-low.o): New rules.
11334
f80c84b3
DJ
113352007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11336
11337 * hostio.c: Correct copyright year.
11338
a6b151f1
DJ
113392007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11340
11341 * Makefile.in (OBS): Add hostio.o.
11342 (hostio.o): New rule.
11343 * server.h (handle_vFile): Declare.
11344 * hostio.c: New file.
11345 * server.c (handle_v_requests): Take packet_len and new_packet_len
11346 for binary packets. Call handle_vFile.
11347 (main): Update call to handle_v_requests.
11348
f9387fc3
DJ
113492007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11350
11351 * linux-low.c: Include <sched.h>.
11352
51c2684e
DJ
113532007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11354
11355 * linux-low.c (linux_tracefork_grandchild): New.
11356 (linux_tracefork_child): Use clone.
11357 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11358
75f83163
JB
113592007-10-31 Joel Brobecker <brobecker@adacore.com>
11360
11361 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11362
da5898ce
DJ
113632007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11364
11365 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11366
24a09b5f
DJ
113672007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11368
11369 * inferiors.c (change_inferior_id): Delete.
11370 (add_pid_to_list, pull_pid_from_list): New.
11371 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11372 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11373 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11374 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11375 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11376 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11377 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11378 (using_threads): Always set to 1.
11379 (handle_extended_wait): New.
11380 (add_process): Do not set TID.
11381 (linux_create_inferior): Set must_set_ptrace_flags.
11382 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11383 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11384 (linux_thread_alive): Rename TID argument to LWPID.
11385 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11386 (linux_wait_for_event): Do not use TID or check using_threads. Update
11387 call to dead_thread_notify. Call handle_extended_wait.
11388 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11389 (send_sigstop): Delete sigstop_sent.
11390 (wait_for_sigstop): Avoid TID.
11391 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11392 (linux_test_for_tracefork): New.
11393 (linux_lookup_signals): Use thread_db_active and
11394 linux_supports_tracefork_flag.
11395 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11396 * linux-low.h (get_process_thread): Avoid TID.
11397 (struct process_ifo): Move thread_known and tid to the end. Remove
11398 sigstop_sent.
11399 (linux_attach_lwp, thread_db_init): Update prototypes.
11400 * server.h (change_inferior_id): Delete prototype.
11401 (add_pid_to_list, pull_pid_from_list): New prototypes.
11402 * thread-db.c (thread_db_use_events): New.
11403 (find_first_thread): Rename to...
11404 (find_one_thread): ...this. Update callers and messages. Do not
11405 call fatal. Check thread_db_use_events. Do not call
11406 change_inferior_id or new_thread_notify.
11407 (maybe_attach_thread): Update. Do not call new_thread_notify.
11408 (thread_db_init): Set thread_db_use_events. Check use_events.
11409 * utils.c (fatal, warning): Correct message prefix.
11410
30ed0a8f
DJ
114112007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11412
11413 * Makefile.in (clean): Remove new files.
11414 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11415 (powerpc-64.o, powerpc-64.c): New rules.
11416 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11417 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11418 with SPE.
11419 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11420 SPE targets.
11421 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11422 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11423 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11424 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11425 (target_regsets): Add AltiVec and SPE register sets.
11426 * configure.ac: Check for AltiVec and SPE.
11427 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11428 (ppc_fill_vrregset, ppc_store_vrregset): New.
11429 (target_regsets): Add AltiVec register set.
11430 * configure: Regenerated.
11431
fd462a61
DJ
114322007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11433
11434 * linux-low.c (O_LARGEFILE): Define.
11435 (linux_read_memory): Use /proc/PID/mem.
11436 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11437 * configure, config.in: Regenerated.
11438
69f223ed
DJ
114392007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11440
11441 * linux-low.c (linux_wait_for_event): Do not pass signals while
11442 single-stepping.
11443
aec18585
PA
114442007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11445
11446 * win32-low.c (create_process): New.
11447 (win32_create_inferior): Use create_process instead of
11448 CreateProcess. If create_process failed retry appending an ".exe"
11449 suffix. Store the GetLastError result immediatelly after
11450 create_process calls and use it on the call to error.
11451
34d86ddd
PA
114522007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11453
11454 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11455
5a0e3bd0
JB
114562007-08-23 Joel Brobecker <brobecker@adacore.com>
11457
11458 * configure.ac: Switch license to GPLv3.
11459
f88c79e6
MS
114602007-08-01 Michael Snyder <msnyder@access-company.com>
11461
11462 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11463
6b3d9b83
PA
114642007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11465
11466 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11467 typedef.
11468 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11469 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11470 CloseToolhelp32Snapshot.
11471 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11472 CloseToolhelp32Snapshot.
11473
c588c53c
MS
114742007-07-27 Michael Snyder <michael.snyder@access-company.com>
11475
11476 * server.c (main): Check for inferior exit before main loop.
11477
aa0403d9
PA
114782007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11479
11480 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11481 instead of on tmp_desc.
11482
255e7678
DJ
114832007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11484 Daniel Jacobowitz <dan@codesourcery.com>
11485
11486 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11487 (add_thread): Minor cleanups.
11488 (clear_inferiors): Move lower in the file. Clear the DLL
11489 list.
11490 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11491 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11492 (xml_escape_text): New.
11493 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11494 for qSupported.
11495 (handle_v_cont): Report errors.
11496 (gdbserver_version): Update.
11497 (main): Correct size of own_buf. Do not report initial DLL events.
11498 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11499 (unloaded_dll, xml_escape_text): New.
11500 * win32-low.c (enum target_waitkind): Update comments.
11501 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11502 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11503 (win32_EnumProcessModules, win32_GetModuleInformation)
11504 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11505 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11506 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11507 (win32_Module32First, win32_Module32Next, load_toolhelp)
11508 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11509 (get_child_debug_event): Handle DLL events.
11510 (win32_wait): Likewise.
11511
0d37add9
DJ
115122007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11513
11514 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11515 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11516
45e2715e
PA
115172007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11518
11519 * win32-low.c (handle_output_debug_string): Ignore event if not
11520 waiting.
11521
c5674cf1
PA
115222007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11523
11524 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11525
2bbe3cc1
DJ
115262007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11527
11528 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11529
ae13219e
DJ
115302007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11531
11532 * inferiors.c (change_inferior_id): Add comment.
11533 * linux-low.c (check_removed_breakpoint): Add an early
11534 prototype. Improve debug output.
11535 (linux_attach): Doc update.
11536 (linux_detach_one_process, linux_detach): Clean up before releasing
11537 each process.
11538 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11539 * linux-low.h (struct process_info): Doc improvement.
11540 * mem-break.c (delete_all_breakpoints): New.
11541 * mem-break.h (delete_all_breakpoints): New prototype.
11542 * thread-db.c (find_first_thread): New.
11543 (thread_db_create_event): Call it instead of
11544 thread_db_find_new_threads. Clean up unused variables.
11545 (maybe_attach_thread): Remove first thread handling.
11546 (thread_db_find_new_threads): Use find_first_thread.
11547 (thread_db_get_tls_address): Likewise.
11548
4105de34
DJ
115492007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11550
11551 * thread-db.c (thread_db_find_new_threads): Add prototype.
11552 (thread_db_create_event): Check for the main thread before adding
11553 a new thread.
11554 (maybe_attach_thread): Only enable event reporting if TID == 0.
11555 (thread_db_get_tls_address): Check for new threads.
11556
2b876972
DJ
115572007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11558
11559 * linux-low.c (linux_create_inferior): Try execv before execvp.
11560 * spu-low.c (spu_create_inferior): Likewise.
11561
7a245884
DJ
115622007-06-13 Mike Frysinger <vapier@gentoo.org>
11563
11564 * linux-low.c (linux_create_inferior): Change execv to execvp.
11565 * spu-low.c (spu_create_inferior): Likewies.
11566
117ce543
DJ
115672007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11568
11569 * Makefile.in (clean): Clean new files instead of deleted ones.
11570 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11571 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11572 rules.
11573 * configure.srv: Specify XML files and new regformats for MIPS and
11574 MIPS64 GNU/Linux.
11575 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11576 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11577 an entry for the restart register.
11578 (mips_cannot_fetch_register, mips_cannot_store_register)
11579 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11580 register names to match the XML descriptions.
11581 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11582 restart register instead of $0.
11583
0e7f50da
UW
115842007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11585 Markus Deuling <deuling@de.ibm.com>
11586
11587 * remote-utils.c (decode_xfer_write): New function.
11588 * server.h (decode_xfer_write): Add prototype.
11589 * server.c (handle_query): Add PACKET_LEN argument. Support
11590 qXfer:spu:read and qXfer:spu:write packets.
11591 (main): Pass packet_len to handle_query.
11592 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11593 * target.h (target_ops): Add qxfer_spu.
11594
374c1d38
UW
115952007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11596
11597 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11598 accessing non-seekable spufs files.
11599
bb63802a
UW
116002007-05-16 Markus Deuling <deuling@de.ibm.com>
11601
889bf7c5 11602 * server.c (handle_query): Add reply for qC packet.
bb63802a 11603
7390519e
PA
116042007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11605 Leo Zayas <lerele@champenstudios@com>
11606
11607 * server.h (check_remote_input_interrupt_request): New function.
11608 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11609 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11610 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11611 (check_remote_input_interrupt_request): New function.
11612 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11613 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11614 winapi_GenerateConsoleCtrlEvent): New typedefs.
11615 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11616 to 250 ms.
11617 (win32_wait): Check for remote interrupt request
11618 with check_remote_input_interrupt_request.
11619 (win32_request_interrupt): New function.
11620 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11621
34b34921
PA
116222007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11623
11624 * win32-low.c (debug_registers_changed,
11625 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11626 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11627 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11628 (thread_rec): Get context using the low target.
11629 (child_add_thread): Call thread_added on the low target,
11630 which does the same thing.
11631 (regptr): Delete.
11632 (do_initial_child_stuff): Remove debug registers references.
11633 Set context using the low target. Resume threads after
11634 setting the contexts.
11635 (child_continue): Remove dead variable. Remove debug
11636 registers references.
11637 (child_fetch_inferior_registers): Go through the low target.
11638 (do_child_store_inferior_registers): Remove.
11639 (child_store_inferior_registers): Go through the low target.
11640 (win32_resume): Remove debug registers references.
11641 Set context using the low target.
11642 (handle_exception): Change return type to void. Don't record
11643 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11644 first chance exception.
889bf7c5 11645 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
11646 goto loop. Always return after waiting for debug event.
11647 (win32_wait): Convert to switch statement. Handle spurious
11648 events.
11649
11650 * win32-i386-low.c (debug_registers_changed,
11651 debug_registers_used): New.
11652 (initial_stuff): Rename to ...
11653 (i386_initial_stuff): ... this. Clear debug registers
11654 state variables.
11655 (store_debug_registers): Delete.
11656 (i386_get_thread_context): New.
11657 (load_debug_registers): Delete.
11658 (i386_set_thread_context): New.
11659 (i386_thread_added): New.
11660 (single_step): Rename to ...
11661 (i386_single_step): ... this.
11662 (do_fetch_inferior_registers): Rename to ...
11663 (i386_fetch_inferior_register): ... this.
11664 (i386_store_inferior_register): New.
11665 (the_low_target): Adapt to new interface.
11666
11667 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11668 (arm_get_thread_context): New.
11669 (arm_set_thread_context): New.
11670 (regptr): New.
11671 (do_fetch_inferior_registers): Rename to ...
11672 (arm_fetch_inferior_register): ... this.
11673 (arm_store_inferior_register): New.
11674 (arm_wince_breakpoint): Reimplement as unsigned long.
11675 (arm_wince_breakpoint_len): Define.
11676 (the_low_target): Adapt to new interface.
11677
11678 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11679 load_debug_registers. Add get_thread_context, set_thread_context,
11680 thread_added and store_inferior_register. Rename
11681 fetch_inferior_registers to fetch_inferior_register.
11682 (regptr): Remove declaration.
11683
dd6953e1
PA
116842007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11685
11686 * linux-low.c (linux_detach): Change return type to int. Return 0.
11687 * spu-low.c (spu_detach): Likewise.
11688
444d6139
PA
116892007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11690
11691 * target.h (target_ops): Change return type of detach to int.
11692 Add join.
11693 (join_inferior): New.
11694 * server.c (main): Don't skip detach support on mingw32.
11695 If the inferior doesn't support detaching return error.
11696 Call join_inferior instead of using waitpid.
11697 * linux-low.c (linux_join): New.
11698 (linux_target_op): Add linux_join.
11699 * spu-low.c (spu_join): New.
11700 (spu_target_ops): Add spu_join.
11701 * win32-low.c (win32_detach): Adapt to new interface.
11702 Reopen current_process_handle before detaching. Issue a child
11703 resume before detaching.
11704 (win32_join): New.
11705 (win32_target_op): Add win32_join.
11706
1d5315fe
PA
117072007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11708
11709 * win32-low.c (win32-attach): Fix return value.
11710 * target.h (target_ops): Describe ATTACH return values.
11711
bf914831
PA
117122007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11713
11714 * win32-low.c (GETPROCADDRESS): Define.
11715 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11716 (winapi_DebugSetProcessKillOnExit): Likewise.
11717 (win32_create_inferior): Force usage of ansi CreateProcessA.
11718 (win32_attach): Use GETPROCADDRESS.
11719 (win32_detach): Likewise.
11720
f72f3e60
PA
117212007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11722
11723 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11724
ed50f18f
PA
117252007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11726
11727 * win32-low.c: Commit leftover changes from 2007-03-29.
11728
0c2ead7e
DJ
117292007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11730
11731 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11732 fields short instead of int. Add explicit padding.
11733 (i387_cache_to_fsave): Remove unnecessary casts.
11734 (i387_fsave_to_cache): Doc fix.
11735 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11736
73725ff3
DJ
117372007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11738
11739 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11740 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11741
d99f33d8
PA
117422007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11743
11744 * configure.srv (arm*-*-mingw32ce*): Move near the other
11745 arm targets.
11746
68070c10
PA
117472007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11748
2482afc6 11749 * configure.ac: Add errno checking.
68070c10
PA
11750 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11751 sys/file.h and malloc.h.
11752 (AC_CHECK_DECLS): Add perror.
11753 (srv_mingwce): Handle.
2482afc6 11754 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
11755 win32-i386-low.o to srv_tgtobj.
11756 (i[34567]86-*-mingw*): Likewise.
11757 (arm*-*-mingw32ce*): Add case.
11758 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11759 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11760 [__MINGW32CE__] (strerror): New function.
11761 [__MINGW32CE__] (errno): Define to GetLastError.
11762 [__MINGW32CE__] (COUNTOF): New macro.
11763 (remote_open): Remove extra close call.
11764 * mem-break.c (delete_breakpoint_at): New function.
11765 * mem-break.h (delete_breakpoint_at): Declare.
11766 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11767 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11768 [USE_WIN32API] (read, write): Add char* casts.
11769 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11770 * server.h: Include wincecompat.h on Windows CE.
11771 [HAVE_ERRNO_H]: Check.
11772 (perror): Declare if not declared.
11773 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11774 (perror_with_name): Remove errno declaration.
11775 * wincecompat.h: New.
11776 * wincecompat.c: New.
11777 * win32-low.h: New.
11778 * win32-arm-low.c: New.
11779 * win32-i386-low.c: New.
11780 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11781 (OUTMSG2): Make it safe.
11782 (_T): New macro.
11783 (COUNTOF): New macro.
11784 (NUM_REGS): Get it from the low target.
11785 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11786 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11787 (thread_rec): Let low target handle debug registers.
11788 (child_add_thread): Likewise.
11789 (child_init_thread_list): Likewise.
11790 (continue_one_thread): Likewise.
11791 (regptr): New.
11792 (do_child_fetch_inferior_registers): Move to ...
11793 * win32-i386-low.c: ... here, and rename to ...
11794 (do_fetch_inferior_registers): ... this.
889bf7c5 11795 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
11796 Go through the low target.
11797 (do_child_store_inferior_registers): Use regptr.
11798 (strwinerror): New function.
11799 (win32_create_inferior): Handle Windows CE.
11800 Use strwinerror instead of strerror on Windows error
11801 codes. Add program to the error output.
11802 Don't close the main thread handle on Windows CE.
11803 (win32_attach): Use coredll.dll on Windows CE.
11804 (win32_kill): Close current process and current
11805 thread handles.
11806 (win32_detach): Use coredll.dll on Windows CE.
11807 (win32_resume): Let low target handle debug registers, and
11808 step request.
11809 (handle_exception): Add/Remove initial breakpoint. Avoid
11810 non-existant WSTOPSIG on Windows CE.
11811 (win32_read_inferior_memory): Cast to remove warning.
11812 (win32_arch_string): Go through the low target.
11813 (initialize_low): Call set_breakpoint_data with the low
11814 target's breakpoint.
11815 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11816 FOP_REGNUM, mappings): Move to ...
11817 * win32-i386-low.c: ... here.
11818 * win32-low.c (win32_thread_info): Move to ...
11819 * win32-low.h: ... here.
11820 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11821 win32-arm-low.c and wincecompat.c.
11822 (all:): Add $EXEEXT.
11823 (install-only:): Likewise.
11824 (gdbserver:): Likewise.
11825 (gdbreplay:): Likewise.
11826 * config.in: Regenerate.
11827 * configure: Regenerate.
11828
41093d81
PA
118292007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11830
11831 * win32-low.c: Rename typedef thread_info to
11832 win32_thread_info throughout.
11833
544afa54
PA
118342007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11835
11836 * win32-i386-low.c: Rename to ...
11837 * win32-low.c: ... this.
11838 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11839 * Makefile.in: Likewise.
11840
bce7165d
PA
118412007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11842
11843 * remote-utils.c (monitor_output): Constify msg parameter.
11844 * server.h (monitor_output): Likewise.
11845 * win32-i386-low.c (handle_output_debug_string): New.
11846 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11847 handle_output_debug_string.
11848 (get_child_debug_event): Likewise.
11849
506c7aa0
DJ
118502007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11851
11852 * server.c (main): Correct strtoul check.
11853
42c81e2a
DJ
118542007-03-27 Jon Ringle <jon@ringle.org>
11855
11856 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11857
9453113a
DJ
118582007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11859
11860 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11861
64a69107
DJ
118622007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11863
11864 * terminal.h: Check HAVE_SGTTY_H.
11865
118662007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
11867
11868 * remote-utils.c (remote_open): Print out the assigned port number.
11869
c74d0ad8
DJ
118702007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11871
11872 * remote-utils.c (monitor_output): New function.
11873 * server.c (debug_threads): Define here.
11874 (monitor_show_help): New function.
11875 (handle_query): Handle qRcmd.
11876 (main): Do not handle 'd' packet.
11877 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11878 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11879 of debug_threads.
11880
de7c3b4a
PA
118812007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11882
11883 * Makefile.in (EXEEXT): New.
11884 (clean): Use $(EXEEXT).
11885
ef57601b
PA
118862007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11887
11888 * target.h (target_ops): Rename send_signal to request_interrupt,
11889 and remove enum target_signal parameter.
11890 * linux-low.c (linux_request_interrupt): Rename from
11891 linux_send_signal, and always send SIGINT.
11892 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11893 and always send SIGINT.
11894 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11895 of send_signal.
11896 (input_interrupt): Likewise.
11897
820f2bda
PA
118982007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11899
11900 * server.c (get_features_xml): Check if target implemented
11901 arch_string.
11902 * win32-i386-low.c (win32_arch_string): New.
11903 (win32_target_ops): Add win32_arch_string as arch_string member.
11904
ab39bf24
UW
119052007-02-22 Markus Deuling <deuling@de.ibm.com>
11906
11907 * spu-low.c (spu_arch_string): New.
11908 (spu_target_ops): Add spu_arch_string.
11909
61ff6e04
DJ
119102007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11911
11912 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11913 * configure.ac: Do not check for terminal.h.
11914 * configure, config.in: Regenerated.
11915
fb1e4ffc
DJ
119162007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11917
11918 * Makefile.in (OBS): Add $(XML_BUILTIN).
11919 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11920 (clean): Update.
11921 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11922 (arm-with-iwmmxt.c): New.
11923 * config.in, configure: Regenerate.
11924 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11925 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11926 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11927 (arm*-*-linux*): Add iWMMXt and regset support.
11928 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11929 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11930 (arm_store_wmmxregset, target_regsets): New.
11931 * server.c (get_features_xml): Take annex argument. Check builtin
11932 XML documents.
11933 (handle_query): Handle multiple annexes.
11934
0f48aa01
DJ
119352007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11936
11937 * remote-utils.c [USE_WIN32API] (read, write): Define.
11938 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11939 write.
11940
23181151
DJ
119412007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11942
11943 * linux-i386-low.c (the_low_target): Set arch_string.
11944 * linux-x86-64-low.c (the_low_target): Likewise.
11945 * linux-low.c (linux_arch_string): New.
11946 (linux_target_ops): Add it.
11947 * linux-low.h (struct linux_target_ops): Add arch_string.
11948 * server.c (write_qxfer_response): Use const void * for DATA.
11949 (get_features_xml): New.
11950 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11951 * target.h (struct target_ops): Add arch_string method.
11952
9d606399
DJ
119532007-01-03 Denis Pilat <denis.pilat@st.com>
11954 Daniel Jacobowitz <dan@codesourcery.com>
11955
11956 * linux-low.c (linux_kill): Handle being called with no threads.
11957 * win32-i386-low.c (win32_kill): Likewise.
11958 (get_child_debug_event): Clear current_process_handle.
11959
119602006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
11961 Daniel Jacobowitz <dan@codesourcery.com>
11962
11963 * remote-utils.c (remote_open): Check the type of specified
11964 serial port devices before opening them.
11965 * server.c (main): Kill the inferior if an error occurs during
11966 the first remote_open.
11967
a5e13d24
DJ
119682006-12-05 Markus Deuling <deuling@de.ibm.com>
11969
11970 * README: Update supported targets.
11971
186947f7
DJ
119722006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11973
11974 * Makefile.in (clean): Remove reg-mips64.c.
11975 (reg-mips64.c, reg-mips64.o): New rules.
11976 * configure.srv: Handle mips64. Include regset support for mips.
11977 * linux-mips-low.c (union mips_register): New.
11978 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11979 (mips_breakpoint, mips_breakpoint_at): Use int.
11980 (mips_collect_register, mips_supply_register)
11981 (mips_collect_register_32bit, mips_supply_register_32bit)
11982 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11983 (mips_store_fpregset, target_regsets): New.
11984 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11985
a13e2c95
UW
119862006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11987
11988 * configure.srv: Add target "spu*-*-*".
11989 * Makefile.in (clean): Remove reg-spu.c.
11990 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11991 * spu-low.c: New file.
11992
cb7283db
DJ
119932006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11994
11995 * configure.ac: Correct td_thr_tls_get_addr test.
11996 * configure: Regenerated.
11997
89be2091
DJ
119982006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11999
12000 * linux-low.c (linux_wait_for_event): Reformat. Use the
12001 pass_signals array.
12002 * remote-utils.c (decode_address_to_semicolon): New.
12003 * server.c (pass_signals, handle_general_set): New.
12004 (handle_query): Mention QPassSignals for qSupported.
12005 (main): Call handle_general_set.
12006 * server.h (pass_signals, decode_address_to_semicolon): New.
12007
000ef4f0
DJ
120082006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12009
12010 * server.c (handle_query): Correct error handling for read_auxv.
12011
b7149293
UW
120122005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12013
12014 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12015 and srv_linux_thread_db to yes.
12016 * linux-s390-low.c (s390_fill_gregset): New function.
12017 (target_regsets): Define data structure.
12018
dae5f5cf
DJ
120192006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12020
12021 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12022 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12023 * config.in, configure: Regenerated.
12024 * inferiors.c (gdb_id_to_thread): New function.
12025 (gdb_id_to_thread_id): Use it.
12026 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12027 * linux-low.h (struct process_info): Add th member.
12028 (thread_db_get_tls_address): New prototype.
12029 * remote-utils.c (decode_address): Make non-static.
12030 * server.c (handle_query): Handle qGetTLSAddr.
12031 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12032 * target.h (struct target_ops): Add get_tls_address.
12033 * thread-db.c (maybe_attach_thread): Save the thread handle.
12034 (thread_db_get_tls_address): New.
12035
32ca6d61
DJ
120362006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12037
12038 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12039 (linux_resume_one_process): Take a siginfo_t *. Update all
12040 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12041 (struct pending_signals): Add a siginfo_t.
12042 (linux_wait_for_process): Always set last_status.
12043 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12044 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12045 * linux-low.h (struct process_info): Add last_status.
12046
5ffff7c1
DJ
120472006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12048
12049 * remote-utils.c (try_rle): New function.
12050 (putpkt_binary): Use it.
12051
8695c747
DJ
120522006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12053
12054 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12055 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12056 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12057 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12058 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12059 point registers.
12060
290fadea
RS
120612006-08-08 Richard Sandiford <richard@codesourcery.com>
12062
12063 * server.c (terminal_fd): New variable.
12064 (old_foreground_pgrp): Likewise.
12065 (restore_old_foreground_pgrp): New function.
12066 (start_inferior): Record the terminal file descriptor in terminal_fd
12067 and its original foreground group in old_foreground_pgrp. Register
12068 restore_old_foreground_pgrp with atexit().
12069
9f2e1e63
DJ
120702006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12071
12072 * server.c (handle_query): Correct qPart to qXfer.
12073
b80864fb
DJ
120742006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12075
12076 * configure.ac: Check for more headers which are missing on
12077 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12078 * configure.srv: Add Cygwin and mingw32.
12079 * remote-utils.c: Don't include headers unconditionally which
12080 are missing on mingw32. Include <winsock.h> for mingw32.
12081 (remote_open): Adjust for mingw32 support. Flush
12082 standard error after writing to it.
12083 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12084 (unblock_async_io, enable_async_io, disable_async_io)
12085 (readchar, getpkt): Update for Winsock support.
12086 (prepare_resume_reply): Expect a protocol signal number.
12087 * server.c: Disable <sys/wait.h> on mingw32.
12088 (start_inferior): Adjust for mingw32 support. Flush
12089 standard error after writing to it.
12090 (attach_inferior): Likewise. Use protocol signal
12091 numbers.
12092 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12093 and names.
12094 * win32-i386-low.c: New file.
12095 * Makefile.in (XM_CLIBS): Set.
12096 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12097 (win32-i386-low.o): New dependency rule.
12098 * linux-low.c (linux_wait): Use target signal numbers.
12099 * target.h (struct target_ops): Doc fix.
12100 * server.h (target_signal_to_name): New prototype.
12101 * gdbreplay.c: Don't include headers unconditionally which
12102 are missing on mingw32. Include <winsock.h> for mingw32.
12103 (remote_close, remote_open): Adjust for Winsock support.
12104 * configure, config.in: Regenerated.
12105
0876f84a
DJ
121062006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12107
12108 * server.c (decode_xfer_read, write_qxfer_response): New.
12109 (handle_query): Take a packet length argument. Handle
12110 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12111 the qSupported response.
12112 (main): Update call to handle_query.
12113
01f9e8fa
DJ
121142006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12115
12116 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12117 (putpkt_binary): Renamed from putpkt and adjusted for binary
12118 data.
12119 (putpkt): New wrapper for putpkt_binary.
12120 (readchar): Don't mask off the high bit.
12121 (decode_X_packet): New function.
12122 * server.c (main): Call putpkt_binary if a handler sets the packet
12123 length. Save the length of the incoming packet. Handle 'X'.
12124 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12125
be2a5f71
DJ
121262006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12127
12128 * server.c (handle_query): Handle qSupported.
12129
ea025f5f
DJ
121302006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12131
12132 * remote-utils.c (all_symbols_looked_up): New variable.
12133 (look_up_one_symbol): Check it.
12134 * server.h (look_up_one_symbol): New declaration.
12135 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12136
9308fc88
DJ
121372006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12138
12139 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 12140 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
12141 (PTRACE_GET_THREAD_AREA): Define.
12142 (ps_get_thread_area): New function.
12143
52fb6437
NS
121442006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12145
12146 * configure.srv (m68k*-*-uclinux*): New target.
12147 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12148 (linux_resume_one_process): Remove extraneous cast.
12149 (linux_read_offsets): New.
12150 (linux_target_op): Add linux_read_offsets on mmuless systems.
12151 * server.c (handle_query): Add qOffsets logic.
12152 * target.h (struct target_ops): Add read_offsets.
12153
21b0f40c
DJ
121542006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12155
12156 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12157 (PTRACE_GET_THREAD_AREA): Define.
12158 (ps_get_thread_area): New function.
12159 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12160 (linux-x86-64-low.o): Update.
12161
0050a760
DJ
121622006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12163
12164 * configure.ac: Remove checks for prfpregset_t.
12165 * gdb_proc_service.h: New file.
12166 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12167 new "gdb_proc_service.h".
12168 * proc-service.c: Likewise.
12169 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12170 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12171 * Makefile.in (gdb_proc_service_h): Updated.
12172 * configure, config.in: Regenerated.
12173
b92a518e
DJ
121742006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12175
12176 * remote-utils.c (prepare_resume_reply): Move declaration
12177 of gdb_id_from_wait to the top of the block.
12178
545587ee
DJ
121792006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12180
12181 * linux-low.c (regsets_store_inferior_registers): Read the regset
12182 from the target before filling it.
12183
9db87ebd
DJ
121842006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12185
12186 * server.c (attach_inferior): Return SIGTRAP for a successful
12187 attach.
12188
dd24457d
DJ
121892006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12190
12191 * Makefile.in (OBS): Add version.o.
12192 (STAGESTUFF): Delete.
12193 (version.o): Add dependencies.
12194 (version.c): Replace rule.
12195 (clean): Remove version.c.
12196 * server.c (gdbserver_version): New.
12197 (gdbserver_usage): Use printf.
12198 (main): Handle --version and --help.
12199 * server.h (version, host_name): Add declarations.
12200
6f0f660e
EZ
122012005-12-23 Eli Zaretskii <eliz@gnu.org>
12202
889bf7c5
PA
12203 * linux-arm-low.c:
12204 * linux-arm-low.c:
12205 * inferiors.c:
12206 * i387-fp.h:
12207 * i387-fp.c:
12208 * gdbreplay.c:
12209 * regcache.c:
12210 * proc-service.c:
12211 * mem-break.h:
12212 * mem-break.c:
12213 * linux-x86-64-low.c:
12214 * linux-sh-low.c:
12215 * linux-s390-low.c:
12216 * linux-ppc64-low.c:
12217 * linux-ppc-low.c:
12218 * linux-mips-low.c:
12219 * linux-m68k-low.c:
12220 * linux-m32r-low.c:
12221 * linux-low.h:
12222 * linux-low.c:
12223 * linux-ia64-low.c:
12224 * linux-i386-low.c:
12225 * linux-crisv32-low.c:
12226 * thread-db.c:
12227 * terminal.h:
12228 * target.h:
12229 * target.c:
12230 * server.h:
12231 * server.c:
12232 * remote-utils.c:
12233 * regcache.h:
12234 * utils.c:
12235 * Makefile.in:
12236 * configure.ac:
6f0f660e
EZ
12237 * gdbserver.1: Add (C) after Copyright. Update the FSF
12238 address.
12239
9d1fb177
DJ
122402005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12241
12242 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12243 (arm_breakpoint_at): Recognize both breakpoints.
12244 (the_low_target): Use the correct breakpoint instruction.
12245
011a70c2
DJ
122462005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12247
12248 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12249 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12250 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12251 (the_low_target): Update.
12252
7fb85e41
AS
122532005-10-25 Andreas Schwab <schwab@suse.de>
12254
12255 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12256
12257 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12258 (ia64_num_regs): Reduce to 462.
12259
3db0444b
DJ
122602005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12261
12262 * acinclude.m4: Correct quoting.
12263 * aclocal.m4: Regenerated.
12264
12265 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12266 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12267 (thread_db_init): Call thread_db_err_str.
12268 * configure.ac: Check for TD_VERSION.
12269 * config.in, configure: Regenerated.
12270
bee0189a
DJ
122712005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12272
12273 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12274
e9d25b98
DJ
122752005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12276
12277 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12278 is not available. Define HAVE_PTRACE_GETREGS if it is.
12279 * config.in, configure: Regenerated.
12280 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12281 * linux-i386-low.c, linux-m68k-low.c: Update to use
12282 HAVE_PTRACE_GETREGS.
12283 * linux-low.c (regsets_fetch_inferior_registers)
12284 (regsets_store_inferior_registers): Only return 0 if we processed
12285 GENERAL_REGS.
12286 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12287 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12288
a06660f7
DJ
122892005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12290
12291 * inferiors.c (struct thread_info): Add gdb_id.
12292 (add_thread): Add gdb_id argument.
12293 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12294 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12295 calls to add_thread.
12296 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12297 * server.c (handle_query): Use thread_to_gdb_id.
12298 (handle_v_cont, main): Use gdb_id_to_thread_id.
12299 * server.h (add_thread): Update prototype.
12300 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12301 prototypes.
12302
5a1f5858
DJ
123032005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12304
12305 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12306 left-padded registers.
12307 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12308 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12309
e122f1f5
SE
123102005-07-01 Steve Ellcey <sje@cup.hp.com>
12311
12312 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12313 * configure: Regenerate.
12314 * config.in: Regenerate.
12315 * server.h (NEED_DECLARATION_STRERROR):
12316 Replace with !HAVE_DECL_STRERROR.
12317
d592fa2f
DJ
123182005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12319
12320 * linux-low.c (linux_wait, linux_send_signal): Don't test
12321 an unsigned long variable for > 0 if it could be MAX_ULONG.
12322 * server.c (myresume): Likewise.
12323 * target.c (set_desired_inferior): Likewise.
12324
ccbd4912
MK
123252005-06-13 Mark Kettenis <kettenis@gnu.org>
12326
12327 * configure.ac: Simplify and improve check for socklen_t.
12328 * configure, config.in: Regenerate.
12329
f450004a
DJ
123302005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12331
12332 * acconfig.h: Remove.
12333 * configure.ac: Add a test for socklen_t. Use three-argument
12334 AC_DEFINE throughout.
12335 * config.in: Regenerated using autoheader 2.59.
12336 * configure: Regenerated.
12337
12338 * gdbreplay.c (socklen_t): Provide a default.
12339 (remote_open): Use socklen_t.
12340 * remote-utils.c (socklen_t): Provide a default.
12341 (remote_open): Use socklen_t.
12342 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12343 unsigned char.
12344
12345 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12346 char for buffers.
12347 * linux-low.c (linux_read_memory, linux_write_memory)
12348 (linux_read_auxv): Likewise.
12349 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12350 (check_mem_write): Likewise.
12351 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12352 Likewise.
12353 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12354 (registers_from_string, register_data): Likewise.
12355 * server.c (handle_query, main): Likewise.
12356 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12357 (decode_M_packet): Likewise.
12358 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12359 * target.h (struct target_ops): Update read_memory, write_memory,
12360 and read_auxv.
12361 (read_inferior_memory, write_inferior_memory): Update.
12362 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12363 to unsigned char *.
12364 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12365 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12366 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12367 linux-s390-low.c, linux-sh-low.c: Update for changes in
12368 read_inferior_memory and the_low_target->breakpoint.
12369
eee84df1
DJ
123702005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12371
12372 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12373 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12374 * configure.srv: Add powerpc64-*-linux*.
12375 * linux-ppc64-low.c: New file.
12376
45b134e5
OF
123772005-05-23 Orjan Friberg <orjanf@axis.com>
12378
12379 * linux-cris-low.c: New file with support for CRIS.
12380 * linux-crisv32-low.c: Ditto for CRISv32.
12381 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12382 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 12383 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
12384 reg-crisv32.o, and reg-crisv32.c to make rules.
12385 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12386 recognized targets.
12387
48d93c75
UW
123882005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12389
12390 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12391 of sizeof (PTRACE_XFER_TYPE).
12392 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12393
e013ee27
OF
123942005-05-12 Orjan Friberg <orjanf@axis.com>
12395
889bf7c5 12396 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
12397 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12398 pointers for hardware watchpoint support.
12399 * linux-low.h (struct linux_target_ops): Ditto.
12400 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12401 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12402 to linux_target_ops.
12403 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12404 reply packet.
12405 * server.c (main): Recognize 'Z' and 'z' packets.
12406
b0ded00b
UW
124072005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12408
12409 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12410 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12411 (the_low_target): Add new members.
12412
8643e2ad
DJ
124132005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12414
12415 * proc-service.c (ps_lgetregs): Search all_processes instead of
12416 all_threads.
12417
fc620387
DJ
124182005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12419
12420 * server.c (start_inferior): Change return type to int.
12421 (attach_inferior): Change sigptr to int *.
12422 (handle_v_cont, handle_v_requests): Change signal to int *.
12423 (main): Change signal to int.
12424
124252005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
12426
12427 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12428 * configure.srv: Add m32r*-*-linux*.
12429 * linux-m32r-low.c: New file.
12430
e0e76420
DJ
124312005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12432
12433 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12434
a1928bad
DJ
124352005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12436
12437 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12438 Take unsigned long arguments for PIDs.
12439 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12440 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12441 (wait_for_sigstop, linux_resume_one_process)
12442 (regsets_fetch_inferior_registers, linux_send_signal)
12443 (linux_read_auxv): Likewise. Update the types of variables holding
12444 PIDs. Update format string specifiers.
12445 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12446 * remote-utils.c (prepare_resume_reply): Likewise.
12447 * server.c (cont_thread, general_thread, step_thread)
12448 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12449 unsigned long.
12450 (handle_query): Update format specifiers.
12451 (handle_v_cont, main): Use strtoul for thread IDs.
12452 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12453 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12454 (general_thread, step_thread, thread_from_wait)
12455 (old_thread_from_wait): Update.
12456 * target.h (struct thread_resume): Use unsigned long for THREAD.
12457 (struct target_ops): Use unsigned long for arguments to attach and
12458 thread_alive.
12459
dcdb98d2
DJ
124602005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12461
12462 * acinclude.m4: Include bfd/bfd.m4 directly.
12463 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12464 <agriffis@toolchain.org>.
12465 * aclocal.m4, configure: Regenerated.
12466
bec39cab
AC
124672005-01-07 Andrew Cagney <cagney@gnu.org>
12468
12469 * configure.ac: Rename configure.in, require autoconf 2.59.
12470 * configure: Re-generate.
12471
434c4c77
DJ
124722004-12-08 Daniel Jacobowitz <dan@debian.org>
12473
12474 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12475 LIBS when finished.
12476 * aclocal.m4: Regenerated.
12477 * configure: Regenerated.
12478
db1d3e1b
AS
124792004-11-21 Andreas Schwab <schwab@suse.de>
12480
12481 * linux-m68k-low.c (m68k_num_gregs): Define.
12482 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12483 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12484 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12485 (m68k_breakpoint_at): New. Add to the_low_target.
12486
12487 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12488 srv_linux_thread_db to yes.
12489
43360365
JB
124902004-10-20 Joel Brobecker <brobecker@gnat.com>
12491
12492 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12493 (ARCH_SET_FS): Likewise.
12494 (ARCH_GET_FS): Likewise.
12495 (ARCH_GET_GS): Likewise.
12496
fd500816
DJ
124972004-10-16 Daniel Jacobowitz <dan@debian.org>
12498
12499 * linux-i386-low.c (ps_get_thread_area): New.
12500 * linux-x86-64-low.c (ps_get_thread_area): New.
12501 * linux-low.c: Include <sys/syscall.h>.
12502 (linux_kill_one_process): Don't kill the first thread here.
12503 (linux_kill): Kill the first thread here.
12504 (kill_lwp): New function.
12505 (send_sigstop, linux_send_signal): Use it.
12506 * proc-service.c: Clean up #ifdefs.
12507 (fpregset_info): Delete.
12508 (ps_lgetregs): Update and enable implementation.
12509 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12510 implementations.
12511 * remote-utils.c (struct sym_cache, symbol_cache): New.
12512 (input_interrupt): Print a clearer message.
12513 (async_io_enabled): New variable.
12514 (enable_async_io, disable_async_io): Use it. Update comments.
12515 (look_up_one_symbol): Use the symbol cache.
12516 * thread-db.c (thread_db_look_up_symbols): New function.
12517 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12518
f6de3c42
DJ
125192004-10-16 Daniel Jacobowitz <dan@debian.org>
12520
12521 * configure.in: Test for -rdynamic.
12522 * configure: Regenerated.
12523 * Makefile (INTERNAL_LDFLAGS): New.
12524 (gdbserver, gdbreplay): Use it.
12525
2c0fc042
AC
125262004-09-02 Andrew Cagney <cagney@gnu.org>
12527
12528 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12529
075b3282
DJ
125302004-03-23 Daniel Jacobowitz <drow@mvista.com>
12531
12532 * linux-low.c (linux_wait): Clear all_processes list also.
12533
fa6a77dc
DJ
125342004-03-12 Daniel Jacobowitz <drow@mvista.com>
12535
12536 * linux-low.c: Include <errno.h>. Remove extern declaration of
12537 errno.
12538
6d782a97
DJ
125392004-03-12 Daniel Jacobowitz <drow@mvista.com>
12540
12541 * gdbreplay.c, server.h, utils.c: Update copyright years.
12542
3a7fb99b
DJ
125432004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12544
12545 * server.c (main): Print child status or termination signal from
12546 variable 'signal', not 'sig'.
12547
c3e735a6
DJ
125482004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12549
12550 * linux-low.c (linux_read_memory): Change return type to
12551 int. Check for and return error from ptrace().
12552 * target.c (read_inferior_memory): Change return type to int. Pass
12553 back return status from the_target->read_memory().
12554 * target.h (struct target_ops): Adapt *read_memory() prototype.
12555 Update comment.
12556 (read_inferior_memory): Adapt prototype.
12557 * server.c (main): Return an error packet if
12558 read_inferior_memory() returns an error.
12559
a59d1c82
DJ
125602004-03-04 Daniel Jacobowitz <drow@mvista.com>
12561
12562 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12563 Unify with other clean targets.
12564
dc3f8883
DJ
125652004-02-29 Daniel Jacobowitz <drow@mvista.com>
12566
12567 * server.c (handle_v_cont): Call set_desired_inferior.
12568
89a208da
DJ
125692004-02-29 Daniel Jacobowitz <drow@mvista.com>
12570
12571 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12572
62ea82f5
DJ
125732004-02-29 Daniel Jacobowitz <drow@mvista.com>
12574
12575 * linux-low.c (linux_wait): Unblock async I/O.
12576 (linux_resume): Block and enable async I/O.
12577 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12578 * server.h (block_async_io, unblock_async_io): Add prototypes.
12579
6910d122
DJ
125802004-02-29 Daniel Jacobowitz <drow@mvista.com>
12581
12582 * remote-utils.c (remote_open): Print a status notice after
12583 opening a TCP port.
12584 * server.c (attach_inferior): Print a status notice after
12585 attaching.
12586
125872004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12588
12589 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12590
c89dc5d4
DJ
125912004-02-26 Daniel Jacobowitz <drow@mvista.com>
12592
12593 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12594 error packet.
12595 * server.c, target.h: Update copyright years.
12596
4b8dad4a
RM
125972004-02-25 Roland McGrath <roland@redhat.com>
12598
12599 * target.h (struct target_ops): New member `read_auxv'.
12600 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12601 * linux-low.c (linux_read_auxv): New function.
12602 (linux_target_ops): Initialize `read_auxv' member to that.
12603
d7446758
JB
126042004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12605
12606 Committed by Jim Blandy <jimb@redhat.com>.
12607
12608 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12609 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12610 instead of GPR_SIZE to distiguish s390 and s390x targets.
12611
5544ad89
DJ
126122004-01-31 Daniel Jacobowitz <drow@mvista.com>
12613
12614 * linux-low.c: Update copyright year.
12615 (check_removed_breakpoint): Clear pending_is_breakpoint.
12616 (linux_set_resume_request, linux_queue_one_thread)
12617 (resume_status_pending_p): New functions.
12618 (linux_continue_one_thread): Use process->resume.
12619 (linux_resume): Only resume threads if there are no pending events.
12620 * linux-low.h (struct process_info): Add resume request
12621 pointer.
12622
2a68b70e
DJ
126232004-01-30 Daniel Jacobowitz <drow@mvista.com>
12624
12625 * regcache.c (new_register_cache): Clear the allocated register
12626 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12627
64386c31
DJ
126282003-10-13 Daniel Jacobowitz <drow@mvista.com>
12629
12630 * linux-low.c (linux_resume): Take a struct thread_resume *
12631 argument.
12632 (linux_wait): Update call.
12633 (resume_ptr): New static variable.
12634 (linux_continue_one_thread): Renamed from
12635 linux_continue_one_process. Use resume_ptr.
12636 (linux_resume): Use linux_continue_one_thread.
12637 * server.c (handle_v_cont, handle_v_requests): New functions.
12638 (myresume): New function.
12639 (main): Handle 'v' case.
12640 * target.h (struct thread_resume): New type.
12641 (struct target_ops): Change argument of "resume" to struct
12642 thread_resume *.
12643 (myresume): Delete macro.
12644
c938e9b0
L
126452003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12646
12647 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12648 (uninstall): Support DESTDIR.
12649
7f313d07
BC
12650Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12651
12652 * configure.srv: Add xscale*linux copy of arm*linux entry.
12653
3b2fc2ea
DJ
126542003-07-24 Daniel Jacobowitz <drow@mvista.com>
12655
12656 * linux-arm-low.c (arm_reinsert_addr): New function.
12657 (the_low_target): Add arm_reinsert_addr.
12658
1c0a559e
MK
126592003-07-08 Mark Kettenis <kettenis@gnu.org>
12660
12661 * mem-break.c: Remove whitespace at end of file.
12662
43d5792c
DJ
126632003-06-28 Daniel Jacobowitz <drow@mvista.com>
12664
12665 * configure.in: Check whether we need to prototype strerror.
12666 * server.h: Optionally prototype strerror.
12667 * gdbreplay.c (perror_with_name): Use strerror.
12668 * linux-low.c (linux_attach_lwp): Use strerror.
12669 * utils.c (perror_with_name): Use strerror.
12670 * config.in, configure: Regenerated.
12671
c8a86edf
DJ
126722003-06-28 Daniel Jacobowitz <drow@mvista.com>
12673
12674 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12675 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12676
73d37363
DJ
126772003-06-20 Daniel Jacobowitz <drow@mvista.com>
12678
12679 * Makefile.in (SFILES): Update.
12680 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12681 low-sun3.c: Remove files.
12682
6ad8ae5c
DJ
126832003-06-17 Daniel Jacobowitz <drow@mvista.com>
12684
12685 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12686 (linux_detach_one_process, linux_detach): New functions.
12687 (linux_target_ops): Add linux_detach.
12688 * server.c (main): Handle 'D' packet.
12689 * target.h (struct target_ops): Add "detach" member.
12690 (detach_inferior): Define.
12691
1581182a
MK
126922003-06-13 Mark Kettenis <kettenis@gnu.org>
12693
12694 From Kelley Cook <kelleycook@wideopenwest.com>:
12695 * configure.srv: Accept i[34567]86 variants.
12696
e5379b03
DJ
126972003-06-05 Daniel Jacobowitz <drow@mvista.com>
12698
12699 * linux-low.c (linux_wait_for_event): Correct comment typos.
12700 (linux_resume_one_process): Call check_removed_breakpoint.
12701 (linux_send_signal): New function.
12702 (linux_target_ops): Add linux_send_signal.
12703 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12704 of kill.
12705 * target.h (struct target_ops): Add send_signal.
12706
2ff29de4
JB
127072003-05-29 Jim Blandy <jimb@redhat.com>
12708
12709 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12710 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12711 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12712 away part of the register's value.
12713
254787d4
DJ
127142003-03-26 Daniel Jacobowitz <drow@mvista.com>
12715
12716 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12717 (linux_wait_for_event, linux_init_signals): Likewise.
12718
94e10508
DJ
127192003-03-17 Daniel Jacobowitz <drow@mvista.com>
12720
12721 * configure.in: Check for stdlib.h.
12722 * configure: Regenerated.
12723 * config.in: Regenerated.
12724
4c0711e0
DJ
127252003-01-04 Andreas Schwab <schwab@suse.de>
12726
12727 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12728
ef66e766
AC
127292003-01-02 Andrew Cagney <ac131313@redhat.com>
12730
12731 * Makefile.in: Remove obsolete code.
12732
a1358604
DJ
127332002-11-20 Daniel Jacobowitz <drow@mvista.com>
12734
12735 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12736 defined(PT_FPR0_HI).
12737
23ce3b1c
DJ
127382002-11-17 Stuart Hughes <seh@zee2.com>
12739
12740 * linux-arm-low.c (arm_num_regs): Increase.
12741 (arm_regmap): Include status register.
12742
127432002-11-17 Daniel Jacobowitz <drow@mvista.com>
12744
12745 * linux-low.c (register_addr): Remove incorrect -1 check.
12746
a9fa9f7d
DJ
127472002-08-29 Daniel Jacobowitz <drow@mvista.com>
12748
12749 * linux-low.c (linux_create_inferior): Call setpgid. Return
12750 the new PID.
12751 (unstopped_p, linux_signal_pid): Remove.
12752 (linux_target_ops): Remove linux_signal_pid.
12753 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12754 global instead of target method.
12755 * target.h (struct target_ops): Remove signal_pid. Update comment
12756 for create_inferior.
12757 * server.c (signal_pid): New variable.
12758 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 12759 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
12760 (attach_inferior): Set signal_pid.
12761
17574093
DJ
127622002-08-23 Daniel Jacobowitz <drow@mvista.com>
12763
12764 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12765
127662002-08-20 Jim Blandy <jimb@redhat.com>
12767
12768 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12769 default for this.
12770
127712002-08-01 Andrew Cagney <cagney@redhat.com>
12772
12773 * Makefile.in: Make chill references obsolete.
12774
127752002-07-24 Kevin Buettner <kevinb@redhat.com>
12776
12777 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12778 * configure: Regenerate.
12779 * config.in: Regenerate.
12780
127812002-07-09 David O'Brien <obrien@FreeBSD.org>
12782
12783 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12784 (perror_with_name, remote_close, remote_open, expect, play): Static.
12785
127862002-07-04 Michal Ludvig <mludvig@suse.cz>
12787
4b8dad4a 12788 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
12789 byte offsets instead of an array of indexes.
12790 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12791
127922002-06-13 Daniel Jacobowitz <drow@mvista.com>
12793
12794 * regcache.c: Add comment.
12795
127962002-06-11 Daniel Jacobowitz <drow@mvista.com>
12797
12798 * thread-db.c: New file.
12799 * proc-service.c: New file.
12800 * acinclude.m4: New file.
12801 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12802 proc-service.o, and thread-db.o.
12803 (linux-low.o): Add USE_THREAD_DB.
12804 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12805 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12806 * aclocal.m4: Regenerated.
12807 * config.in: Regenerated.
12808 * configure: Regenerated.
12809 * configure.in: Check for proc_service.h, sys/procfs.h,
12810 thread_db.h, and linux/elf.h headrs.
12811 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12812 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12813 Check for -lthread_db and thread support.
12814 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12815 PowerPC, and SuperH.
12816 * i387-fp.c: Constify arguments.
12817 * i387-fp.h: Likewise.
12818 * inferiors.c: (struct thread_info): Renamed from
12819 `struct inferior_info'. Remove PID member. Use generic inferior
12820 list header. All uses updated.
12821 (inferiors, signal_pid): Removed.
12822 (all_threads): New variable.
12823 (get_thread): Define.
12824 (add_inferior_to_list): New function.
12825 (for_each_inferior): New function.
12826 (change_inferior_id): New function.
12827 (add_inferior): Removed.
12828 (remove_inferior): New function.
12829 (add_thread): New function.
12830 (free_one_thread): New function.
12831 (remove_thread): New function.
12832 (clear_inferiors): Use for_each_inferior and free_one_thread.
12833 (find_inferior): New function.
12834 (find_inferior_id): New function.
12835 (inferior_target_data): Update argument type.
12836 (set_inferior_target_data): Likewise.
12837 (inferior_regcache_data): Likewise.
12838 (set_inferior_regcache_data): Likewise.
12839 * linux-low.c (linux_bp_reinsert): Remove.
12840 (all_processes, stopping_threads, using_thrads)
12841 (struct pending_signals, debug_threads, pid_of): New.
12842 (inferior_pid): Replace with macro.
12843 (struct inferior_linux_data): Remove.
12844 (get_stop_pc, add_process): New functions.
12845 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12846 Use add_process and add_thread.
12847 (linux_attach_lwp): New function, based on old linux_attach. Use
12848 add_process and add_thread. Set stop_expected for new threads.
12849 (linux_attach): New function.
12850 (linux_kill_one_process): New function.
12851 (linux_kill): Kill all LWPs.
12852 (linux_thread_alive): Use find_inferior_id.
12853 (check_removed_breakpoints, status_pending_p): New functions.
12854 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12855 Update. Use WNOHANG. Wait for cloned processes also. Update process
12856 struct for the found process.
12857 (linux_wait_for_event): New function.
12858 (linux_wait): Use it. Support LWPs.
12859 (send_sigstop, wait_for_sigstop, stop_all_processes)
12860 (linux_resume_one_process, linux_continue_one_process): New functions.
12861 (linux_resume): Support LWPs.
12862 (REGISTER_RAW_SIZE): Remove.
12863 (fetch_register): Use register_size instead. Call supply_register.
12864 (usr_store_inferior_registers): Likewise. Call collect_register.
12865 Fix recursive case.
12866 (regsets_fetch_inferior_registers): Improve error message.
12867 (regsets_store_inferior_registers): Add debugging.
12868 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12869 (unstopped_p, linux_signal_pid): New functions.
12870 (linux_target_ops): Add linux_signal_pid.
12871 (linux_init_signals): New function.
12872 (initialize_low): Call it. Initialize using_threads.
12873 * regcache.c (inferior_regcache_data): Add valid
12874 flag.
12875 (get_regcache): Fetch registers lazily. Add fetch argument
12876 and update all callers.
12877 (regcache_invalidate_one, regcache_invalidate): New
12878 functions.
12879 (new_register_cache): Renamed from create_register_cache.
12880 Return the new regcache.
12881 (free_register_cache): Change argument to a void *.
12882 (registers_to_string, registers_from_string): Call get_regcache
12883 with fetch flag set.
12884 (register_data): Make static. Pass fetch flag to get_regcache.
12885 (supply_register): Call get_regcache with fetch flag clear.
12886 (collect_register): Call get_regcache with fetch flag set.
12887 (collect_register_as_string): New function.
12888 * regcache.h: Update.
12889 * remote-utils.c (putpkt): Flush after debug output and use
12890 stderr.
12891 Handle input interrupts while waiting for an ACK.
12892 (input_interrupt): Use signal_pid method.
12893 (getpkt): Flush after debug output and use stderr.
12894 (outreg): Use collect_register_as_string.
12895 (new_thread_notify, dead_thread_notify): New functions.
12896 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12897 and general_thread.
12898 (look_up_one_symbol): Flush after debug output.
12899 * server.c (step_thread, server_waiting): New variables.
12900 (start_inferior): Don't use signal_pid. Update call to mywait.
12901 (attach_inferior): Update call to mywait.
12902 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12903 (main): Don't fetch/store registers explicitly. Use
12904 set_desired_inferior. Support proposed ``Hs'' packet. Update
12905 calls to mywait.
12906 * server.h: Update.
12907 (struct inferior_list, struct_inferior_list_entry): New.
12908 * target.c (set_desired_inferior): New.
12909 (write_inferior_memory): Constify.
12910 (mywait): New function.
12911 * target.h: Update.
12912 (struct target_ops): New signal_pid method.
12913 (mywait): Removed macro, added prototype.
12914
12915 * linux-low.h (regset_func): Removed.
12916 (regset_fill_func, regset_store_func): New.
12917 (enum regset_type): New.
12918 (struct regset_info): Add type field. Use new operation types.
12919 (struct linux_target_ops): stop_pc renamed to get_pc.
12920 Add decr_pc_after_break and breakpoint_at.
12921 (get_process, get_thread_proess, get_process_thread)
12922 (strut process_info, all_processes, linux_attach_lwp)
12923 (thread_db_init): New.
12924
12925 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12926 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12927 (the_low_target): Add new members.
12928 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12929 (i386_store_fpxregset): Constify.
12930 (target_regsets): Add new kind identifier.
12931 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12932 (i386_set_pc): Add debugging.
12933 (i386_breakpoint_at): New function.
12934 (the_low_target): Add new members.
12935 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12936 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12937 (mips_breakpoint_at): New.
12938 (the_low_target): Add new members.
12939 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12940 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12941 (the_low_target): Add new members.
12942 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12943 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12944 (the_low_target): Add new members.
12945 * linux-x86-64-low.c (target_regsets): Add new kind
12946 identifier.
12947
129482002-05-15 Daniel Jacobowitz <drow@mvista.com>
12949
12950 From Martin Pool <mbp@samba.org>:
12951 * server.c (gdbserver_usage): New function.
12952 (main): Call it.
12953
129542002-05-14 Daniel Jacobowitz <drow@mvista.com>
12955
12956 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12957 stop_at -> stop_pc.
12958
129592002-05-04 Andrew Cagney <ac131313@redhat.com>
12960
12961 * Makefile.in: Remove obsolete code.
12962
129632002-04-24 Michal Ludvig <mludvig@suse.cz>
12964
12965 * linux-low.c (regsets_fetch_inferior_registers),
12966 (regsets_store_inferior_registers): Removed cast to int from
12967 ptrace() calls.
12968 * regcache.h: Added declaration of struct inferior_info.
12969
129702002-04-20 Daniel Jacobowitz <drow@mvista.com>
12971
12972 * inferiors.c (struct inferior_info): Add regcache_data.
12973 (add_inferior): Call create_register_cache.
12974 (clear_inferiors): Call free_register_cache.
12975 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12976 * regcache.c (struct inferior_regcache_data): New.
12977 (registers): Remove.
12978 (get_regcache): New function.
12979 (create_register_cache, free_register_cache): New functions.
12980 (set_register_cache): Don't initialize the register cache here.
12981 (registers_to_string, registers_from_string, register_data): Call
12982 get_regcache.
12983 * regcache.h: Add prototypes.
12984 * server.h: Likewise.
12985
129862002-04-20 Daniel Jacobowitz <drow@mvista.com>
12987
12988 * mem-break.c: New file.
12989 * mem-break.h: New file.
12990 * Makefile.in: Add mem-break.o rule; update server.h
12991 dependencies.
12992 * inferiors.c (struct inferior_info): Add target_data
12993 member.
12994 (clear_inferiors): Free target_data member if set.
12995 (inferior_target_data, set_inferior_target_data): New functions.
12996 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12997 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12998 * linux-low.c (linux_bp_reinsert): New variable.
12999 (struct inferior_linux_data): New.
13000 (linux_create_inferior): Use set_inferior_target_data.
13001 (linux_attach): Likewise. Call add_inferior.
13002 (linux_wait_for_one_inferior): New function.
13003 (linux_wait): Call it.
13004 (linux_write_memory): Add const.
13005 (initialize_low): Call set_breakpoint_data.
13006 * linux-low.h (struct linux_target_ops): Add breakpoint
13007 handling members.
13008 * server.c (attach_inferior): Remove extra add_inferior
13009 call.
13010 * server.h: Include mem-break.h. Update inferior.c
13011 prototypes.
13012 * target.c (read_inferior_memory)
13013 (write_inferior_memory): New functions.
13014 * target.h (read_inferior_memory)
13015 (write_inferior_memory): Change macros to prototypes.
13016 (struct target_ops): Update comments. Add const to write_memory
13017 definition.
13018
130192002-04-11 Daniel Jacobowitz <drow@mvista.com>
13020
13021 * linux-low.c (usr_store_inferior_registers): Support
13022 registers which are allowed to fail to store.
13023 * linux-low.h (linux_target_ops): Likewise.
13024 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13025 (ppc_cannot_store_register): FPSCR may not be storable.
13026
130272002-04-09 Daniel Jacobowitz <drow@mvista.com>
13028
13029 * server.h: Include <string.h> if HAVE_STRING_H.
13030 * ChangeLog: Correct paths in last ChangeLog entry.
13031
130322002-04-09 Daniel Jacobowitz <drow@mvista.com>
13033
13034 * linux-low.h: Remove obsolete prototypes.
13035 (struct linux_target_ops): New.
13036 (extern the_low_target): New.
13037 * linux-low.c (num_regs, regmap): Remove declarations.
13038 (register_addr): Use the_low_target explicitly.
13039 (fetch_register): Likewise.
13040 (usr_fetch_inferior_registers): Likewise.
13041 (usr_store_inferior_registers): Likewise.
13042 * linux-arm-low.c (num_regs): Remove.
13043 (arm_num_regs): Define.
13044 (arm_regmap): Renamed from regmap, made static.
13045 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13046 made static.
13047 (arm_cannot_store_register): Renamed from cannot_store_register,
13048 made static.
13049 (the_low_target): New.
13050 * linux-i386-low.c (num_regs): Remove.
13051 (i386_num_regs): Define.
13052 (i386_regmap): Renamed from regmap, made static.
13053 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13054 made static.
13055 (i386_cannot_store_register): Renamed from cannot_store_register,
13056 made static.
13057 (the_low_target): New.
13058 * linux-ia64-low.c (num_regs): Remove.
13059 (ia64_num_regs): Define.
13060 (ia64_regmap): Renamed from regmap, made static.
13061 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13062 made static.
13063 (ia64_cannot_store_register): Renamed from cannot_store_register,
13064 made static.
13065 (the_low_target): New.
13066 * linux-m68k-low.c (num_regs): Remove.
13067 (m68k_num_regs): Define.
13068 (m68k_regmap): Renamed from regmap, made static.
13069 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13070 made static.
13071 (m68k_cannot_store_register): Renamed from cannot_store_register,
13072 made static.
13073 (the_low_target): New.
13074 * linux-mips-low.c (num_regs): Remove.
13075 (mips_num_regs): Define.
13076 (mips_regmap): Renamed from regmap, made static.
13077 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13078 made static.
13079 (mips_cannot_store_register): Renamed from cannot_store_register,
13080 made static.
13081 (the_low_target): New.
13082 * linux-ppc-low.c (num_regs): Remove.
13083 (ppc_num_regs): Define.
13084 (ppc_regmap): Renamed from regmap, made static.
13085 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13086 made static.
13087 (ppc_cannot_store_register): Renamed from cannot_store_register,
13088 made static.
13089 (the_low_target): New.
13090 * linux-s390-low.c (num_regs): Remove.
13091 (s390_num_regs): Define.
13092 (s390_regmap): Renamed from regmap, made static.
13093 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13094 made static.
13095 (s390_cannot_store_register): Renamed from cannot_store_register,
13096 made static.
13097 (the_low_target): New.
13098 * linux-sh-low.c (num_regs): Remove.
13099 (sh_num_regs): Define.
13100 (sh_regmap): Renamed from regmap, made static.
13101 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13102 made static.
13103 (sh_cannot_store_register): Renamed from cannot_store_register,
13104 made static.
13105 (the_low_target): New.
13106 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13107 (the_low_target): New.
13108
131092002-04-09 Daniel Jacobowitz <drow@mvista.com>
13110
13111 * Makefile.in: Add stamp-h target.
13112 * configure.in: Create stamp-h.
13113 * configure: Regenerated.
13114
131152002-04-09 Daniel Jacobowitz <drow@mvista.com>
13116
13117 * inferiors.c: New file.
13118 * target.c: New file.
13119 * target.h: New file.
13120 * Makefile.in: Add target.o and inferiors.o. Update
13121 dependencies.
13122 * linux-low.c (inferior_pid): New static variable,
13123 moved from server.c.
13124 (linux_create_inferior): Renamed from create_inferior.
13125 Call add_inferior. Return 0 on success instead of a PID.
13126 (linux_attach): Renamed from myattach.
13127 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13128 (linux_thread_alive): Renamed from mythread_alive.
13129 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13130 child dies.
13131 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13132 (regsets_store_inferior_registers): Correct error message.
13133 Add missing ``return 0''.
13134 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13135 (linux_store_registers): Renamed from store_inferior_registers.
13136 (linux_read_memory): Renamed from read_inferior_memory.
13137 (linux_write_memory): Renamed from write_inferior_memory.
13138 (linux_target_ops): New structure.
13139 (initialize_low): Call set_target_ops ().
13140 * remote-utils.c (unhexify): New function.
13141 (hexify): New function.
13142 (input_interrupt): Send signals to ``signal_pid''.
13143 * server.c (inferior_pid): Remove.
13144 (start_inferior): Update create_inferior call.
13145 (attach_inferior): Call add_inferior.
13146 (handle_query): New function.
13147 (main): Call handle_query for `q' packets.
13148 * server.h: Include "target.h". Remove obsolete prototypes.
13149 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13150
131512002-04-09 Daniel Jacobowitz <drow@mvista.com>
13152
13153 * Makefile.in: Add WARN_CFLAGS. Update configury
13154 dependencies.
13155 * configure.in: Check for <string.h>
13156 * configure: Regenerate.
13157 * config.in: Regenerate.
13158 * gdbreplay.c: Include needed system headers.
13159 (remote_open): Remove strchr prototype.
13160 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13161 * regcache.c (supply_register): Change buf argument to const void *.
13162 (supply_register_by_name): Likewise.
13163 (collect_register): Change buf argument to void *.
13164 (collect_register_by_name): Likewise.
13165 * regcache.h: Add missing prototypes.
13166 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13167 * server.c (handle_query): New function.
13168 (attached): New static variable, moved out of main.
13169 (main): Quiet longjmp clobber warnings.
13170 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13171 * utils.c (error): Remove NORETURN.
13172 (fatal): Likewise.