]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/gdbserver/ChangeLog
eebc12e251fbe857685da124bc0c5385a36f9b11
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2
3 * linux-aarch64-low.c (the_low_targets): Rename
4 breakpoint_reinsert_addr to get_next_pcs.
5 * linux-arm-low.c (the_low_targets): Likewise.
6 * linux-bfin-low.c (the_low_targets): Likewise.
7 * linux-cris-low.c (the_low_targets): Likewise.
8 * linux-crisv32-low.c (the_low_targets): Likewise.
9 * linux-low.c (can_software_single_step): Likewise.
10 (install_software_single_step_breakpoints): New function.
11 (start_step_over): Use install_software_single_step_breakpoints.
12 * linux-low.h: New CORE_ADDR vector.
13 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
14 get_next_pcs.
15 * linux-mips-low.c (the_low_targets): Likewise.
16 * linux-nios2-low.c (the_low_targets): Likewise.
17 * linux-sparc-low.c (the_low_targets): Likewise.
18
19 2015-12-17 Pedro Alves <palves@redhat.com>
20
21 * linux-low.c (linux_kill_one_lwp): Remove references to
22 LinuxThreads.
23 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
24 to 'kill'.
25 (linux_init_signals): Delete.
26 (initialize_low): Adjust.
27 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
28
29 2015-12-16 Pedro Alves <palves@redhat.com>
30
31 * configure.ac (compiler warning flags): When testing a
32 -Wno-foo option, check whether -Wfoo works instead.
33 * configure: Regenerate.
34
35 2015-12-11 Don Breazeal <donb@codesourcery.com>
36
37 * server.c (process_serial_event): Don't exit from gdbserver
38 in remote mode if there are still active inferiors.
39
40 2015-12-11 Yao Qi <yao.qi@linaro.org>
41
42 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
43 arm_breakpoint_at if the process is 32-bit.
44
45 2015-12-11 Yao Qi <yao.qi@linaro.org>
46
47 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
48 arm breakpoint.
49
50 2015-12-07 Yao Qi <yao.qi@linaro.org>
51
52 * configure.srv: Append arm.o to srv_tgtobj for
53 aarch64*-*-linux* target.
54 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
55 from linux-arm-low.c.
56 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
57 (arm_breakpoint_len, thumb_breakpoint): Likewise.
58 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
59 (thumb2_breakpoint_len): Likewise.
60 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
61 (arm_breakpoint_kinds): Likewise.
62 (arm_breakpoint_kind_from_pc): Likewise.
63 (arm_sw_breakpoint_from_kind): Likewise.
64 (arm_breakpoint_kind_from_current_state): Likewise.
65 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
66 (arm_sw_breakpoint_from_kind): Declare.
67 (arm_breakpoint_kind_from_current_state): Declare.
68 (arm_breakpoint_at): Declare.
69 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
70 arm_sw_breakpoint_from_kind if process is 32-bit.
71 (aarch64_breakpoint_kind_from_pc): New function.
72 (aarch64_breakpoint_kind_from_current_state): New function.
73 (the_low_target): Initialize fields breakpoint_kind_from_pc
74 and breakpoint_kind_from_current_state.
75 * linux-arm-low.c (arm_breakpoint_kinds): Move to
76 linux-aarch32-low.c.
77 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
78 (arm_breakpoint, arm_breakpoint_len): Likewise.
79 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
80 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
81 (arm_is_thumb_mode): Likewise.
82 (arm_breakpoint_at): Likewise.
83 (arm_breakpoint_kind_from_pc): Likewise.
84 (arm_sw_breakpoint_from_kind): Likewise.
85 (arm_breakpoint_kind_from_current_state): Likewise.
86
87 Revert:
88 2015-08-04 Yao Qi <yao.qi@linaro.org>
89
90 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
91 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
92 * server.c (extended_protocol): Remove "static".
93 * server.h (extended_protocol): Declare it.
94
95 2015-12-04 Josh Stone <jistone@redhat.com>
96
97 * target.h (struct target_ops) <arch_setup>: Rename to ...
98 (struct target_ops) <post_create_inferior>: ... this.
99 (target_arch_setup): Rename to ...
100 (target_post_create_inferior): ... this, calling post_create_inferior.
101 * server.c (start_inferior): Update target_arch_setup calls to
102 target_post_create_inferior.
103 * linux-low.c (linux_low_ptrace_options): Forward declare.
104 (linux_arch_setup): Update its comment for general use.
105 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
106 (struct linux_target_ops): Use linux_post_create_inferior.
107 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
108 to post_create_inferior.
109 * nto-low.c (struct nto_target_ops): Likewise.
110 * spu-low.c (struct spu_target_ops): Likewise.
111 * win32-low.c (struct win32_target_ops): Likewise.
112
113 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
114
115 * linux-arm-low.c: Remove duplicate arch/arm.h include.
116
117 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
118
119 * linux-arm-low.c (arm_reinsert_addr): Remove function.
120 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
121 * linux-cris-low.c (cris_reinsert_addr> Remove function.
122 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
123 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
124 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
125 * linux-mips-low.c (mips_reinsert_addr): Remove function.
126 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
127 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
128 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
129 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
130 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
131
132 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
133
134 * linux-low.c (linux_look_up_symbols): Don't call
135 linux_supports_traceclone.
136 * linux-low.h (thread_db_init): Remove use_events argument.
137 * thread-db.c (thread_db_use_event): Remove global variable.
138 (struct thread_db) <td_thr_event_enable_p>: Remove field.
139 (struct thread_db) <td_create_bp>: Remove field.
140 (thread_db_create_event): Remove function.
141 (thread_db_enable_reporting): Likewise.
142 (find_one_thread): Don't check for thread_db_use_events.
143 (attach_thread): Likewise.
144 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
145 (try_thread_db_load_1): Don't check for thread_db_use_events.
146 (thread_db_init): Remove use_events argument and thread events
147 handling.
148 (remove_thread_event_breakpoints): Remove function.
149 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
150
151 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
152
153 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
154 New function.
155 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
156 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
157 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
158 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
159 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
160 Initialize.
161 * linux-crisv32-low.c (cris_supports_hardware_single_step):
162 New function.
163 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
164 * linux-low.c (can_hardware_single_step): Use
165 supports_hardware_single_step.
166 (can_software_single_step): New function.
167 (start_step_over): Call can_software_single_step.
168 (linux_supports_hardware_single_step): New function.
169 (struct target_ops) <supports_software_single_step>: Initialize.
170 * linux-low.h (struct linux_target_ops)
171 <supports_hardware_single_step>: Initialize.
172 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
173 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
174 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
175 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
176 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
177 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
178 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
179 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
180 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
181 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
182 Initialize.
183 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
184 (struct linux_target_ops) <tile_supports_hardware_single_step>:
185 Initialize.
186 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
187 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
188 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
189 New function.
190 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
191 * target.h (struct target_ops): <supports_software_single_step>:
192 New field.
193 (target_supports_software_single_step): New macro.
194
195 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
196
197 * linux-low.c (linux_wait_1): Fix pc advance condition.
198 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
199 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
200
201 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
202
203 * linux-arm-low.c (arm_is_thumb_mode): New function.
204 (arm_breakpoint_at): Use arm_is_thumb_mode.
205 (arm_breakpoint_kind_from_current_state): New function.
206 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
207 Initialize.
208 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
209 (linux_breakpoint_kind_from_current_state): New function.
210 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
211 * linux-low.h (struct linux_target_ops)
212 <breakpoint_kind_from_current_state>: New field.
213 * target.h (struct target_ops): Likewise.
214 (target_breakpoint_kind_from_current_state): New macro.
215
216 2015-11-30 Pedro Alves <palves@redhat.com>
217
218 * linux-low.c (linux_resume): Wake up the event loop before
219 returning.
220
221 2015-11-30 Pedro Alves <palves@redhat.com>
222
223 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
224 check.
225 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
226 to -1.
227 * target.c (struct thread_search): New structure.
228 (thread_search_callback): New function.
229 (prev_general_thread): New global.
230 (prepare_to_access_memory, done_accessing_memory): New functions.
231 * target.h (prepare_to_access_memory, done_accessing_memory):
232 Replace macros with function declarations.
233
234 2015-11-30 Pedro Alves <palves@redhat.com>
235
236 PR 14618
237 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
238 report TARGET_WAITKIND_NO_RESUMED.
239 * remote-utils.c (prepare_resume_reply): Handle
240 TARGET_WAITKIND_NO_RESUMED.
241 * server.c (report_no_resumed): New global.
242 (handle_query) <qSupported>: Handle "no-resumed+". Report
243 "no-resumed+" support.
244 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
245 return error if the client doesn't support no-resumed events.
246 (push_stop_notification): New function.
247 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
248 events if the client supports them.
249
250 2015-11-30 Pedro Alves <palves@redhat.com>
251
252 * linux-low.c (thread_still_has_status_pending_p): Don't check
253 vCont;t here.
254 (lwp_resumed): New function.
255 (status_pending_p_callback): Return early if the LWP is not
256 supposed to be resumed.
257
258 2015-11-30 Pedro Alves <palves@redhat.com>
259
260 * linux-low.c (handle_extended_wait): Assert that the LWP's
261 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
262 thread create events, leave the new child's status pending.
263 (linux_low_filter_event): If GDB wants to hear about thread exit
264 events, leave the LWP marked dead and don't delete it.
265 (linux_wait_for_event_filtered): Don't check for thread exit.
266 (filter_exit_event): New function.
267 (linux_wait_1): Use it, when returning an exit event.
268 (linux_resume_one_lwp_throw): Assert that the LWP's
269 waitstatus is TARGET_WAITKIND_IGNORE.
270 * remote-utils.c (prepare_resume_reply): Handle
271 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
272 * server.c (report_thread_events): New global.
273 (handle_general_set): Handle QThreadEvents.
274 (handle_query) <qSupported>: Handle and report QThreadEvents+;
275 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
276 TARGET_WAITKIND_THREAD_EXITED.
277 * server.h (report_thread_events): Declare.
278
279 2015-11-30 Pedro Alves <palves@redhat.com>
280
281 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
282 the thread's last_resume_kind was resume_stop.
283
284 2015-11-30 Pedro Alves <palves@redhat.com>
285
286 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
287 before returning.
288
289 2015-11-30 Pedro Alves <palves@redhat.com>
290
291 * server.c (handle_v_requests): Handle vCtrlC.
292
293 2015-11-30 Pedro Alves <palves@redhat.com>
294
295 * gdbthread.h (find_any_thread_of_pid): Declare.
296 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
297 functions.
298 * server.c (handle_query): If current_thread is NULL, look for
299 another thread of the selected process.
300
301 2015-11-26 Daniel Colascione <dancol@dancol.org>
302 Simon Marchi <simon.marchi@ericsson.com>
303
304 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
305 * server.c (handle_qxfer_threads_worker): Refactor to include thread
306 name in reply.
307 * target.h (struct target_ops) <thread_name>: New field.
308 (target_thread_name): New macro.
309
310 2015-11-23 Joel Brobecker <brobecker@adacore.com>
311
312 * regcache.h (regcache_invalidate_pid): Add declaration.
313 * regcache.c (regcache_invalidate_pid): New function, extracted
314 from regcache_invalidate.
315 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
316 Add trivial documentation comment.
317 * lynx-low.c: Use regcache_invalidate_pid instead of
318 regcache_invalidate.
319
320 2015-11-23 Joel Brobecker <brobecker@adacore.com>
321
322 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
323 and Elf64_auxv_t if the target is Android.
324
325 2015-11-22 Doug Evans <xdje42@gmail.com>
326
327 * target.h: #include <sys/types.h>.
328
329 2015-11-19 Pedro Alves <palves@redhat.com>
330
331 * linux-low.c (linux_process_qsupported): Change prototype.
332 Adjust.
333 * linux-low.h (struct linux_target_ops) <process_qsupported>:
334 Change prototype.
335 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
336 and adjust to loop over all features.
337 * server.c (handle_query) <qSupported>: Adjust to call
338 target_process_qsupported once, passing it a vector of unprocessed
339 features.
340 * target.h (struct target_ops) <process_qsupported>: Change
341 prototype.
342 (target_process_qsupported): Adjust.
343
344 2015-11-19 Pedro Alves <palves@redhat.com>
345
346 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
347 mode.
348 * configure: Regenerate.
349
350 2015-11-19 Pedro Alves <palves@redhat.com>
351
352 * configure: Regenerate.
353
354 2015-11-19 Yao Qi <yao.qi@linaro.org>
355
356 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
357 type to uint32_t.
358
359 2015-11-19 Yao Qi <yao.qi@linaro.org>
360
361 * linux-aarch64-low.c (enum aarch64_operand_type): New.
362 (struct aarch64_operand): Move enum out.
363
364 2015-11-19 Yao Qi <yao.qi@linaro.org>
365
366 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
367 struct user_fpsimd_state *.
368 (aarch64_store_fpregset): Likewise.
369
370 2015-11-19 Yao Qi <yao.qi@linaro.org>
371
372 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
373 struct user_pt_regs *.
374 (aarch64_store_gregset): Likewise.
375
376 2015-11-18 Pedro Alves <palves@redhat.com>
377
378 * Makefile.in (all_object_files): Add $IPA_OBJS.
379
380 2015-11-17 Pedro Alves <palves@redhat.com>
381
382 * win32-low.c (win32_resume): Use gdb_signal_from_host,
383 GDB_SIGNAL_0 and gdb_signal_to_string.
384
385 2015-11-17 Pedro Alves <palves@redhat.com>
386
387 * win32-low.c (handle_output_debug_string): Remove parameter.
388 (win32_kill): Remove our_status local and adjust call to
389 handle_output_debug_string.
390 (get_child_debug_event): Adjust call to
391 handle_output_debug_string.
392
393 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
394
395 * linux-mips-low.c (mips_fill_gregset): Add cast.
396 (mips_store_gregset): Likewise.
397 (mips_fill_fpregset): Likewise.
398 (mips_store_fpregset): Likewise.
399
400 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
401
402 * linux-mips-low.c (mips_add_watchpoint): Rename private to
403 priv.
404
405 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
406
407 * linux-mips-low.c (mips_linux_new_thread): Change type of
408 watch_type to enum target_hw_bp_type.
409
410 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
411
412 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
413 Change return type to arm_hwbp_type.
414
415 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
416
417 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
418 (arm_store_gregset): Likewise.
419 * linux-arm-low.c (arm_get_hwcap): Likewise.
420 (arm_read_description): Likewise.
421
422 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
423
424 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
425
426 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
427
428 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
429 (ppc_fill_vsxregset): Likewise.
430 (ppc_store_vsxregset): Likewise.
431 (ppc_fill_vrregset): Likewise.
432 (ppc_store_vrregset): Likewise.
433 (ppc_fill_evrregset): Likewise.
434 (ppc_store_evrregset): Likewise.
435
436 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
437
438 * linux-ppc-low.c (ppc_usrregs_info): Remove
439 forward-declaration.
440 (ppc_arch_setup): Move lower in file.
441
442 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
443
444 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
445 (ps_pdwrite): Likewise.
446
447 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
448
449 * linux-arm-low.c (arm_new_thread): Move pointer dereference
450 to after assert checks.
451
452 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
453
454 * proc-service.c (ps_pdread): Add/adjust casts.
455 (ps_pdwrite): Add/adjust casts.
456
457 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
458
459 * server.c (handle_search_memory_1): Cast return value of
460 memmem.
461
462 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
463
464 * server.c (write_qxfer_response): Change type of data to
465 gdb_byte *.
466
467 2015-10-29 Pedro Alves <palves@redhat.com>
468
469 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
470
471 2015-10-29 Pedro Alves <palves@redhat.com>
472
473 * tracepoint.c (clear_installed_tracepoints): Add casts.
474
475 2015-10-29 Pedro Alves <palves@redhat.com>
476
477 * server.c (handle_v_cont, process_serial_event): Add enum
478 gdb_signal casts to signal parsing code.
479
480 2015-10-29 Pedro Alves <palves@redhat.com>
481
482 * linux-low.h (NULL_REGSET): Define.
483 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
484 * linux-arm-low.c (arm_regsets): Likewise.
485 * linux-crisv32-low.c (cris_regsets): Likewise.
486 * linux-m68k-low.c (m68k_regsets): Likewise.
487 * linux-mips-low.c (mips_regsets): Likewise.
488 * linux-nios2-low.c (nios2_regsets): Likewise.
489 * linux-ppc-low.c (ppc_regsets): Likewise.
490 * linux-s390-low.c (s390_regsets): Likewise.
491 * linux-sh-low.c (sh_regsets): Likewise.
492 * linux-sparc-low.c (sparc_regsets): Likewise.
493 * linux-tic6x-low.c (tic6x_regsets): Likewise.
494 * linux-tile-low.c (tile_regsets): Likewise.
495 * linux-x86-low.c (x86_regsets): Likewise.
496 * linux-xtensa-low.c (xtensa_regsets): Likewise.
497
498 2015-10-29 Pedro Alves <palves@redhat.com>
499
500 * linux-low.h (NULL_REGSET): Define.
501 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
502 * linux-arm-low.c (arm_regsets): Likewise.
503 * linux-crisv32-low.c (cris_regsets): Likewise.
504 * linux-m68k-low.c (m68k_regsets): Likewise.
505 * linux-mips-low.c (mips_regsets): Likewise.
506 * linux-nios2-low.c (nios2_regsets): Likewise.
507 * linux-ppc-low.c (ppc_regsets): Likewise.
508 * linux-s390-low.c (s390_regsets): Likewise.
509 * linux-sh-low.c (sh_regsets): Likewise.
510 * linux-sparc-low.c (sparc_regsets): Likewise.
511 * linux-tic6x-low.c (tic6x_regsets): Likewise.
512 * linux-tile-low.c (tile_regsets): Likewise.
513 * linux-x86-low.c (x86_regsets): Likewise.
514 * linux-xtensa-low.c (xtensa_regsets): Likewise.
515
516 2015-10-26 Doug Evans <dje@google.com>
517
518 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
519
520 2015-10-26 Doug Evans <dje@google.com>
521
522 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
523
524 2015-10-26 Doug Evans <dje@google.com>
525
526 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
527 for debug_printf.
528 (attach_thread, find_new_threads_callback): Ditto.
529
530 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
531
532 * mem-break.h (set_breakpoint_data): Remove.
533
534 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
535
536 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
537 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
538 (initialize_low): Remove set_breakpoint_data call.
539 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
540 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
541 (initialize_low): Remove set_breakpoint_data call.
542 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
543 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
544 (initialize_low): Remove set_breakpoint_data call.
545
546 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
547
548 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
549 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
550 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
551 * target.h (target_breakpoint_kind_from_pc): New macro.
552
553 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
554
555 * linux-low.c (default_breakpoint_kind_from_pc): New function.
556 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
557 the default breakpoint kind.
558
559 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
560
561 * linux-arm-low.c (arm_supports_z_point_type): Add software
562 breakpoint support.
563
564 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
565
566 * linux-arm-low.c: Refactor breakpoint definitions.
567 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
568 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
569
570 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
571
572 * Makefile.in: Add arm.c/o.
573 * configure.srv: Likewise.
574 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
575 (arm_breakpoint_kind_from_pc): New function.
576 (arm_sw_breakpoint_from_kind): Return proper kind.
577 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
578
579 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
580
581 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
582 removal.
583 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
584 (struct raw_breakpoint) <size>: Remove.
585 (struct raw_breakpoint) <kind>: Add.
586 (bp_size): New function.
587 (bp_opcode): Likewise.
588 (find_raw_breakpoint_at): Adjust for kind.
589 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
590 (remove_memory_breakpoint): Adjust for kind call bp_size.
591 (set_raw_breakpoint_at): Adjust for kind.
592 (set_breakpoint): Likewise.
593 (set_breakpoint_at): Call breakpoint_kind_from_pc.
594 (delete_raw_breakpoint): Adjust for kind.
595 (delete_breakpoint): Likewise.
596 (find_gdb_breakpoint): Likewise.
597 (set_gdb_breakpoint_1): Likewise.
598 (set_gdb_breakpoint): Likewise.
599 (delete_gdb_breakpoint_1): Likewise.
600 (delete_gdb_breakpoint): Likewise.
601 (uninsert_raw_breakpoint): Likewise.
602 (reinsert_raw_breakpoint): Likewise.
603 (set_breakpoint_data): Remove.
604 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
605 (check_mem_read): Adjust for kind call bp_size.
606 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
607 (clone_one_breakpoint): Adjust for kind.
608 * mem-break.h (set_gdb_breakpoint): Likewise.
609 (delete_gdb_breakpoint): Likewise.
610 * server.c (process_serial_event): Likewise.
611
612 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
613
614 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
615 (struct linux_target_ops) <breakpoint>: Remove.
616 (struct linux_target_ops) <breakpoint_len>: Remove.
617 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
618 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
619 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
620 (arm_sw_breakpoint_from_kind): New function.
621 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
622 (struct linux_target_ops) <breakpoint>: Remove.
623 (struct linux_target_ops) <breakpoint_len>: Remove.
624 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
625 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
626 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
627 (struct linux_target_ops) <breakpoint>: Remove.
628 (struct linux_target_ops) <breakpoint_len>: Remove.
629 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
630 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
631 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
632 (struct linux_target_ops) <breakpoint>: Remove.
633 (struct linux_target_ops) <breakpoint_len>: Remove.
634 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
635 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
636 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
637 and sw_breakpoint_from_kind to increment the pc.
638 (linux_breakpoint_kind_from_pc): New function.
639 (linux_sw_breakpoint_from_kind): New function.
640 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
641 (initialize_low): Call breakpoint_kind_from_pc and
642 sw_breakpoint_from_kind to replace breakpoint_data/len.
643 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
644 New field.
645 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
646 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
647 (struct linux_target_ops) <breakpoint>: Remove.
648 (struct linux_target_ops) <breakpoint_len>: Remove.
649 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
650 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
651 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
652 (struct linux_target_ops) <breakpoint>: Remove.
653 (struct linux_target_ops) <breakpoint_len>: Remove.
654 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
655 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
656 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
657 (struct linux_target_ops) <breakpoint>: Remove.
658 (struct linux_target_ops) <breakpoint_len>: Remove.
659 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
660 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
661 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
662 (struct linux_target_ops) <breakpoint>: Remove.
663 (struct linux_target_ops) <breakpoint_len>: Remove.
664 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
665 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
666 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
667 (struct linux_target_ops) <breakpoint>: Remove.
668 (struct linux_target_ops) <breakpoint_len>: Remove.
669 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
670 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
671 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
672 (struct linux_target_ops) <breakpoint>: Remove.
673 (struct linux_target_ops) <breakpoint_len>: Remove.
674 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
675 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
676 * linux-sh-low.c (sh_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-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
682 (struct linux_target_ops) <breakpoint>: Remove.
683 (struct linux_target_ops) <breakpoint_len>: Remove.
684 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
685 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
686 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
687 (struct linux_target_ops) <breakpoint>: Remove.
688 (struct linux_target_ops) <breakpoint_len>: Remove.
689 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
690 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
691 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
692 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
693 (struct linux_target_ops) <breakpoint>: Remove.
694 (struct linux_target_ops) <breakpoint_len>: Remove.
695 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
696 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
697 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
698 (struct linux_target_ops) <breakpoint>: Remove.
699 (struct linux_target_ops) <breakpoint_len>: Remove.
700 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
701 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
702
703 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
704
705 * linux-cris-low.c (cris_get_pc): Remove void arg.
706
707 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
708
709 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
710 variable name.
711
712 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
713
714 * inferiors.c (thread_pid_matches_callback): New function.
715 (find_thread_process): New function.
716 (remove_thread): Reset current_thread.
717 (remove_process): Assert threads have been removed first.
718
719 2015-10-15 Yao Qi <yao.qi@linaro.org>
720
721 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
722 if it is 3.
723 (aarch64_remove_point): Likewise.
724 * regcache.c (regcache_register_size): New function.
725
726 2015-10-12 Yao Qi <yao.qi@linaro.org>
727
728 * linux-aarch64-low.c: Update all callers as emit_load_store
729 is renamed to aarch64_emit_load_store.
730
731 2015-10-12 Yao Qi <yao.qi@linaro.org>
732
733 * linux-aarch64-low.c: Update all callers of function renaming
734 from emit_insn to aarch64_emit_insn.
735
736 2015-10-12 Yao Qi <yao.qi@linaro.org>
737
738 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
739 arch/aarch64-insn.h.
740 (struct aarch64_memory_operand): Likewise.
741 (ENCODE): Likewise.
742 (emit_insn): Move to arch/aarch64-insn.c.
743 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
744 (emit_load_store): Move to arch/aarch64-insn.c.
745 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
746 (can_encode_int32): Remove.
747
748 2015-10-12 Yao Qi <yao.qi@linaro.org>
749
750 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
751 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
752 (aarch64_relocate_instruction): Likewise.
753 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
754 (struct aarch64_insn_visitor): Likewise.
755
756 2015-10-12 Yao Qi <yao.qi@linaro.org>
757
758 * linux-aarch64-low.c (struct aarch64_insn_data): New.
759 (struct aarch64_insn_visitor): New.
760 (struct aarch64_insn_relocation_data): New.
761 (aarch64_ftrace_insn_reloc_b): New function.
762 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
763 (aarch64_ftrace_insn_reloc_cb): Likewise.
764 (aarch64_ftrace_insn_reloc_tb): Likewise.
765 (aarch64_ftrace_insn_reloc_adr): Likewise.
766 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
767 (aarch64_ftrace_insn_reloc_others): Likewise.
768 (visitor): New.
769 (aarch64_relocate_instruction): Use visitor.
770
771 2015-10-12 Yao Qi <yao.qi@linaro.org>
772
773 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
774 int. Add argument buf.
775 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
776 aarch64_relocate_instruction.
777
778 2015-10-12 Yao Qi <yao.qi@linaro.org>
779
780 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
781 argument insn. Remove local variable insn. Don't call
782 target_read_uint32.
783 (aarch64_install_fast_tracepoint_jump_pad): Call
784 target_read_uint32.
785
786 2015-09-30 Yao Qi <yao.qi@linaro.org>
787
788 * linux-aarch64-low.c (emit_movk): Shorten a long line.
789 (emit_load_store_pair): Likewise.
790
791 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
792
793 * dll.c (match_dll): Add cast(s).
794 (unloaded_dll): Likewise.
795 * linux-low.c (second_thread_of_pid_p): Likewise.
796 (delete_lwp_callback): Likewise.
797 (count_events_callback): Likewise.
798 (select_event_lwp_callback): Likewise.
799 (linux_set_resume_request): Likewise.
800 * server.c (accumulate_file_name_length): Likewise.
801 (emit_dll_description): Likewise.
802 (handle_qxfer_threads_worker): Likewise.
803 (visit_actioned_threads): Likewise.
804 * thread-db.c (any_thread_of): Likewise.
805 * tracepoint.c (same_process_p): Likewise.
806 (match_blocktype): Likewise.
807 (build_traceframe_info_xml): Likewise.
808
809 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
810
811 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
812 assignment.
813 (gdb_unparse_agent_expr): Likewise.
814 * hostio.c (require_data): Likewise.
815 (handle_pread): Likewise.
816 * linux-low.c (disable_regset): Likewise.
817 (fetch_register): Likewise.
818 (store_register): Likewise.
819 (get_dynamic): Likewise.
820 (linux_qxfer_libraries_svr4): Likewise.
821 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
822 (set_fast_tracepoint_jump): Likewise.
823 (uninsert_fast_tracepoint_jumps_at): Likewise.
824 (reinsert_fast_tracepoint_jumps_at): Likewise.
825 (validate_inserted_breakpoint): Likewise.
826 (clone_agent_expr): Likewise.
827 * regcache.c (init_register_cache): Likewise.
828 * remote-utils.c (putpkt_binary_1): Likewise.
829 (decode_M_packet): Likewise.
830 (decode_X_packet): Likewise.
831 (look_up_one_symbol): Likewise.
832 (relocate_instruction): Likewise.
833 (monitor_output): Likewise.
834 * server.c (handle_search_memory): Likewise.
835 (handle_qxfer_exec_file): Likewise.
836 (handle_qxfer_libraries): Likewise.
837 (handle_qxfer): Likewise.
838 (handle_query): Likewise.
839 (handle_v_cont): Likewise.
840 (handle_v_run): Likewise.
841 (captured_main): Likewise.
842 * target.c (write_inferior_memory): Likewise.
843 * thread-db.c (try_thread_db_load_from_dir): Likewise.
844 * tracepoint.c (init_trace_buffer): Likewise.
845 (add_tracepoint_action): Likewise.
846 (add_traceframe): Likewise.
847 (add_traceframe_block): Likewise.
848 (cmd_qtdpsrc): Likewise.
849 (cmd_qtdv): Likewise.
850 (cmd_qtstatus): Likewise.
851 (response_source): Likewise.
852 (response_tsv): Likewise.
853 (cmd_qtnotes): Likewise.
854 (gdb_collect): Likewise.
855 (initialize_tracepoint): Likewise.
856
857 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
858
859 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
860 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
861 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
862 <NOP>: New.
863 (enum aarch64_condition_codes): New enum.
864 (w0): New static global.
865 (fp): Likewise.
866 (lr): Likewise.
867 (struct aarch64_memory_operand) <type>: New
868 MEMORY_OPERAND_POSTINDEX type.
869 (postindex_memory_operand): New helper function.
870 (emit_ret): New function.
871 (emit_load_store_pair): New function, factored out of emit_stp
872 with support for MEMORY_OPERAND_POSTINDEX.
873 (emit_stp): Rewrite using emit_load_store_pair.
874 (emit_ldp): New function.
875 (emit_load_store): Likewise.
876 (emit_ldr): Mention post-index instruction in comment.
877 (emit_ldrh): New function.
878 (emit_ldrb): New function.
879 (emit_ldrsw): Mention post-index instruction in comment.
880 (emit_str): Likewise.
881 (emit_subs): New function.
882 (emit_cmp): Likewise.
883 (emit_and): Likewise.
884 (emit_orr): Likewise.
885 (emit_orn): Likewise.
886 (emit_eor): Likewise.
887 (emit_mvn): Likewise.
888 (emit_lslv): Likewise.
889 (emit_lsrv): Likewise.
890 (emit_asrv): Likewise.
891 (emit_mul): Likewise.
892 (emit_sbfm): Likewise.
893 (emit_sbfx): Likewise.
894 (emit_ubfm): Likewise.
895 (emit_ubfx): Likewise.
896 (emit_csinc): Likewise.
897 (emit_cset): Likewise.
898 (emit_nop): Likewise.
899 (emit_ops_insns): New helper function.
900 (emit_pop): Likewise.
901 (emit_push): Likewise.
902 (aarch64_emit_prologue): New function.
903 (aarch64_emit_epilogue): Likewise.
904 (aarch64_emit_add): Likewise.
905 (aarch64_emit_sub): Likewise.
906 (aarch64_emit_mul): Likewise.
907 (aarch64_emit_lsh): Likewise.
908 (aarch64_emit_rsh_signed): Likewise.
909 (aarch64_emit_rsh_unsigned): Likewise.
910 (aarch64_emit_ext): Likewise.
911 (aarch64_emit_log_not): Likewise.
912 (aarch64_emit_bit_and): Likewise.
913 (aarch64_emit_bit_or): Likewise.
914 (aarch64_emit_bit_xor): Likewise.
915 (aarch64_emit_bit_not): Likewise.
916 (aarch64_emit_equal): Likewise.
917 (aarch64_emit_less_signed): Likewise.
918 (aarch64_emit_less_unsigned): Likewise.
919 (aarch64_emit_ref): Likewise.
920 (aarch64_emit_if_goto): Likewise.
921 (aarch64_emit_goto): Likewise.
922 (aarch64_write_goto_address): Likewise.
923 (aarch64_emit_const): Likewise.
924 (aarch64_emit_call): Likewise.
925 (aarch64_emit_reg): Likewise.
926 (aarch64_emit_pop): Likewise.
927 (aarch64_emit_stack_flush): Likewise.
928 (aarch64_emit_zero_ext): Likewise.
929 (aarch64_emit_swap): Likewise.
930 (aarch64_emit_stack_adjust): Likewise.
931 (aarch64_emit_int_call_1): Likewise.
932 (aarch64_emit_void_call_2): Likewise.
933 (aarch64_emit_eq_goto): Likewise.
934 (aarch64_emit_ne_goto): Likewise.
935 (aarch64_emit_lt_goto): Likewise.
936 (aarch64_emit_le_goto): Likewise.
937 (aarch64_emit_gt_goto): Likewise.
938 (aarch64_emit_ge_got): Likewise.
939 (aarch64_emit_ops_impl): New static global variable.
940 (aarch64_emit_ops): New target function, return
941 &aarch64_emit_ops_impl.
942 (struct linux_target_ops): Install it.
943
944 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
945
946 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
947 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
948 aarch64-ipa.o.
949 * linux-aarch64-ipa.c: New file.
950 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
951 and endian.h.
952 (aarch64_get_thread_area): New target method.
953 (extract_signed_bitfield): New helper function.
954 (aarch64_decode_ldr_literal): New function.
955 (enum aarch64_opcodes): New enum.
956 (struct aarch64_register): New struct.
957 (struct aarch64_operand): New struct.
958 (x0): New static global.
959 (x1): Likewise.
960 (x2): Likewise.
961 (x3): Likewise.
962 (x4): Likewise.
963 (w2): Likewise.
964 (ip0): Likewise.
965 (sp): Likewise.
966 (xzr): Likewise.
967 (aarch64_register): New helper function.
968 (register_operand): Likewise.
969 (immediate_operand): Likewise.
970 (struct aarch64_memory_operand): New struct.
971 (offset_memory_operand): New helper function.
972 (preindex_memory_operand): Likewise.
973 (enum aarch64_system_control_registers): New enum.
974 (ENCODE): New macro.
975 (emit_insn): New helper function.
976 (emit_b): New function.
977 (emit_bcond): Likewise.
978 (emit_cb): Likewise.
979 (emit_tb): Likewise.
980 (emit_blr): Likewise.
981 (emit_stp): Likewise.
982 (emit_ldp_q_offset): Likewise.
983 (emit_stp_q_offset): Likewise.
984 (emit_load_store): Likewise.
985 (emit_ldr): Likewise.
986 (emit_ldrsw): Likewise.
987 (emit_str): Likewise.
988 (emit_ldaxr): Likewise.
989 (emit_stxr): Likewise.
990 (emit_stlr): Likewise.
991 (emit_data_processing_reg): Likewise.
992 (emit_data_processing): Likewise.
993 (emit_add): Likewise.
994 (emit_sub): Likewise.
995 (emit_mov): Likewise.
996 (emit_movk): Likewise.
997 (emit_mov_addr): Likewise.
998 (emit_mrs): Likewise.
999 (emit_msr): Likewise.
1000 (emit_sevl): Likewise.
1001 (emit_wfe): Likewise.
1002 (append_insns): Likewise.
1003 (can_encode_int32_in): New helper function.
1004 (aarch64_relocate_instruction): New function.
1005 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1006 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1007 (struct linux_target_ops): Install aarch64_get_thread_area,
1008 aarch64_install_fast_tracepoint_jump_pad and
1009 aarch64_get_min_fast_tracepoint_insn_len.
1010
1011 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1012
1013 * Makefile.in (aarch64-insn.o): New rule.
1014 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1015
1016 2015-09-21 Yao Qi <yao.qi@linaro.org>
1017
1018 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1019
1020 2015-09-21 Yao Qi <yao.qi@linaro.org>
1021
1022 * tracepoint.c (max_jump_pad_size): Remove.
1023
1024 2015-09-18 Yao Qi <yao.qi@linaro.org>
1025
1026 * linux-aarch64-low.c: Don't include sys/uio.h.
1027 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1028
1029 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
1030
1031 * tracepoint.c (eval_result_type): Change prototype.
1032 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1033
1034 2015-09-15 Pedro Alves <palves@redhat.com>
1035
1036 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1037 Check whether to report exec events instead of checking whether
1038 multiprocess is enabled.
1039
1040 2015-09-15 Pedro Alves <palves@redhat.com>
1041
1042 PR remote/18965
1043 * remote-utils.c (prepare_resume_reply): Merge
1044 TARGET_WAITKIND_VFORK_DONE switch case with the
1045 TARGET_WAITKIND_FORKED case.
1046
1047 2015-09-15 Yao Qi <yao.qi@linaro.org>
1048
1049 * server.c (handle_query): Check string comparison using
1050 "else if" instead of "if".
1051
1052 2015-09-15 Yao Qi <yao.qi@linaro.org>
1053
1054 * server.c (vCont_supported): New global variable.
1055 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1056 matches. Append ";vContSupported+" to own_buf.
1057 (handle_v_requests): Append ";s;S" to own_buf if target supports
1058 hardware single step or vCont_supported is false.
1059 (capture_main): Set vCont_supported to zero.
1060
1061 2015-09-15 Yao Qi <yao.qi@linaro.org>
1062
1063 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1064 it to ...
1065 (linux_supports_hardware_single_step): ... New function.
1066 (linux_target_ops): Update.
1067 * lynx-low.c (lynx_target_ops): Set field
1068 supports_hardware_single_step to target_can_do_hardware_single_step.
1069 * nto-low.c (nto_target_ops): Likewise.
1070 * spu-low.c (spu_target_ops): Likewise.
1071 * win32-low.c (win32_target_ops): Likewise.
1072 * target.c (target_can_do_hardware_single_step): New function.
1073 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1074 Remove. <supports_hardware_single_step>: New field.
1075 (target_supports_conditional_breakpoints): Remove.
1076 (target_supports_hardware_single_step): New macro.
1077 (target_can_do_hardware_single_step): Declare.
1078 * server.c (handle_query): Use target_supports_hardware_single_step
1079 instead of target_supports_conditional_breakpoints.
1080
1081 2015-09-15 Yao Qi <yao.qi@linaro.org>
1082
1083 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1084 function.
1085 (struct linux_target_ops the_low_target): Install
1086 aarch64_linux_siginfo_fixup.
1087
1088 2015-09-11 Don Breazeal <donb@codesourcery.com>
1089 Luis Machado <lgustavo@codesourcery.com>
1090
1091 * linux-low.c (linux_mourn): Static declaration.
1092 (linux_arch_setup): Move in front of
1093 handle_extended_wait.
1094 (linux_arch_setup_thread): New function.
1095 (handle_extended_wait): Handle exec events. Call
1096 linux_arch_setup_thread. Make event_lwp argument a
1097 pointer-to-a-pointer.
1098 (check_zombie_leaders): Do not check stopped threads.
1099 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1100 (linux_low_filter_event): Add lwp and thread for exec'ing
1101 non-leader thread if leader thread has been deleted.
1102 Refactor code into linux_arch_setup_thread and call it.
1103 Pass child lwp pointer by reference to handle_extended_wait.
1104 (linux_wait_for_event_filtered): Update comment.
1105 (linux_wait_1): Prevent clobbering exec event status.
1106 (linux_supports_exec_events): New function.
1107 (linux_target_ops) <supports_exec_events>: Initialize new member.
1108 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1109 new member.
1110 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1111 * server.c (report_exec_events): New global variable.
1112 (handle_query): Handle qSupported query for exec-events feature.
1113 (captured_main): Initialize report_exec_events.
1114 * server.h (report_exec_events): Declare new global variable.
1115 * target.h (struct target_ops) <supports_exec_events>: New
1116 member.
1117 (target_supports_exec_events): New macro.
1118 * win32-low.c (win32_target_ops) <supports_exec_events>:
1119 Initialize new member.
1120
1121 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1122
1123 * linux-low.c (linux_low_enable_btrace): Remove.
1124 (linux_target_ops): Replace linux_low_enable_btrace with
1125 linux_enable_btrace.
1126
1127 2015-09-03 Yao Qi <yao.qi@linaro.org>
1128
1129 * linux-aarch64-low.c (aarch64_insert_point): Call
1130 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1131 returns true.
1132
1133 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1134
1135 * linux-low.c (check_stopped_by_breakpoint): Use
1136 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1137
1138 2015-08-27 Pedro Alves <palves@redhat.com>
1139
1140 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1141
1142 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1143
1144 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1145 the XNEW-family equivalent.
1146 (compile_bytecodes): Likewise.
1147 * dll.c (loaded_dll): Likewise.
1148 * event-loop.c (append_callback_event): Likewise.
1149 (create_file_handler): Likewise.
1150 (create_file_event): Likewise.
1151 * hostio.c (handle_open): Likewise.
1152 * inferiors.c (add_thread): Likewise.
1153 (add_process): Likewise.
1154 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1155 * linux-arm-low.c (arm_new_process): Likewise.
1156 (arm_new_thread): Likewise.
1157 * linux-low.c (add_to_pid_list): Likewise.
1158 (linux_add_process): Likewise.
1159 (handle_extended_wait): Likewise.
1160 (add_lwp): Likewise.
1161 (enqueue_one_deferred_signal): Likewise.
1162 (enqueue_pending_signal): Likewise.
1163 (linux_resume_one_lwp_throw): Likewise.
1164 (linux_resume_one_thread): Likewise.
1165 (linux_read_memory): Likewise.
1166 (linux_write_memory): Likewise.
1167 * linux-mips-low.c (mips_linux_new_process): Likewise.
1168 (mips_linux_new_thread): Likewise.
1169 (mips_add_watchpoint): Likewise.
1170 * linux-x86-low.c (initialize_low_arch): Likewise.
1171 * lynx-low.c (lynx_add_process): Likewise.
1172 * mem-break.c (set_raw_breakpoint_at): Likewise.
1173 (set_breakpoint): Likewise.
1174 (add_condition_to_breakpoint): Likewise.
1175 (add_commands_to_breakpoint): Likewise.
1176 (clone_agent_expr): Likewise.
1177 (clone_one_breakpoint): Likewise.
1178 * regcache.c (new_register_cache): Likewise.
1179 * remote-utils.c (look_up_one_symbol): Likewise.
1180 * server.c (queue_stop_reply): Likewise.
1181 (start_inferior): Likewise.
1182 (queue_stop_reply_callback): Likewise.
1183 (handle_target_event): Likewise.
1184 * spu-low.c (fetch_ppc_memory): Likewise.
1185 (store_ppc_memory): Likewise.
1186 * target.c (set_target_ops): Likewise.
1187 * thread-db.c (thread_db_load_search): Likewise.
1188 (try_thread_db_load_1): Likewise.
1189 * tracepoint.c (add_tracepoint): Likewise.
1190 (add_tracepoint_action): Likewise.
1191 (create_trace_state_variable): Likewise.
1192 (cmd_qtdpsrc): Likewise.
1193 (cmd_qtro): Likewise.
1194 (add_while_stepping_state): Likewise.
1195 * win32-low.c (child_add_thread): Likewise.
1196 (get_image_name): Likewise.
1197
1198 2015-08-25 Yao Qi <yao.qi@linaro.org>
1199
1200 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1201
1202 2015-08-25 Yao Qi <yao.qi@linaro.org>
1203
1204 * Makefile.in (aarch64-linux.o): New rule.
1205 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1206 srv_tgtobj.
1207 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1208 (aarch64_init_debug_reg_state): Make it extern.
1209 (aarch64_linux_prepare_to_resume): Remove.
1210
1211 2015-08-25 Yao Qi <yao.qi@linaro.org>
1212
1213 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1214 lwp_arch_private_info and ptid_of_lwp.
1215
1216 2015-08-25 Yao Qi <yao.qi@linaro.org>
1217
1218 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1219 Find proc_info by find_process_pid. All callers updated.
1220
1221 2015-08-25 Yao Qi <yao.qi@linaro.org>
1222
1223 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1224 Remove.
1225 (debug_reg_change_callback): Remove.
1226 (aarch64_notify_debug_reg_change): Remove.
1227
1228 2015-08-25 Yao Qi <yao.qi@linaro.org>
1229
1230 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1231 Call current_lwp_ptid.
1232
1233 2015-08-25 Yao Qi <yao.qi@linaro.org>
1234
1235 * linux-aarch64-low.c (debug_reg_change_callback): Use
1236 debug_printf.
1237
1238 2015-08-25 Yao Qi <yao.qi@linaro.org>
1239
1240 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1241
1242 2015-08-25 Yao Qi <yao.qi@linaro.org>
1243
1244 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1245
1246 2015-08-25 Yao Qi <yao.qi@linaro.org>
1247
1248 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1249 the code.
1250
1251 2015-08-25 Yao Qi <yao.qi@linaro.org>
1252
1253 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1254 Remove.
1255 (debug_reg_change_callback): Remove argument entry and add argument
1256 lwp. Remove local variable thread. Don't print thread id in the
1257 debugging output. Don't check whether pid of thread equals to pid.
1258 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1259 iterate_over_lwps instead find_inferior.
1260
1261 2015-08-24 Pedro Alves <palves@redhat.com>
1262
1263 * inferiors.c (get_first_process): New function.
1264 * inferiors.h (get_first_process): New declaration.
1265 * remote-utils.c (read_ptid): Default to the first process in the
1266 list, instead of to the current thread's process.
1267
1268 2015-08-24 Pedro Alves <palves@redhat.com>
1269
1270 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1271 * event-loop.c: Likewise.
1272 * remote-utils.c: Likewise.
1273 * tracepoint.c: Likewise.
1274
1275 2015-08-24 Pedro Alves <palves@redhat.com>
1276
1277 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1278 ptid_get_lwp.
1279
1280 2015-08-21 Pedro Alves <palves@redhat.com>
1281
1282 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1283 instead of literal 1.
1284
1285 2015-08-21 Pedro Alves <palves@redhat.com>
1286
1287 * tdesc.c (default_description): Explicitly zero-initialize.
1288
1289 2015-08-21 Pedro Alves <palves@redhat.com>
1290
1291 PR gdb/18749
1292 * inferiors.c (remove_thread): Discard any pending stop reply for
1293 this thread.
1294 * server.c (remove_all_on_match_pid): Rename to ...
1295 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1296 instead of a pid.
1297 (discard_queued_stop_replies): Change parameter to a ptid. Now
1298 extern.
1299 (handle_v_kill, kill_inferior_callback, captured_main)
1300 (process_serial_event): Adjust.
1301 * server.h (discard_queued_stop_replies): Declare.
1302
1303 2015-08-21 Pedro Alves <palves@redhat.com>
1304
1305 * linux-low.c (wait_for_sigstop): Always switch to no thread
1306 selected if the previously current thread dies.
1307 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1308 process instead of the current thread's.
1309 * remote-utils.c (input_interrupt): Don't check if there's no
1310 current thread.
1311 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1312 current thread to the general thread fails, error out.
1313 (handle_qxfer_auxv, handle_qxfer_libraries)
1314 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1315 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1316 (handle_query): Check if there's a thread selected instead of
1317 checking whether there's any thread in the thread list.
1318 (handle_qxfer_threads, handle_qxfer_btrace)
1319 (handle_qxfer_btrace_conf): Don't error out early if there's no
1320 thread in the thread list.
1321 (handle_v_cont, myresume): Don't set the current thread to the
1322 continue thread.
1323 (process_serial_event) <Hg handling>: Also set thread_id if the
1324 previous general thread is still alive.
1325 (process_serial_event) <g/G handling>: If setting the current
1326 thread to the general thread fails, error out.
1327 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1328 thread's lwp instead of the current thread's.
1329 * target.c (set_desired_thread): If the desired thread was not
1330 found, leave the current thread pointing to NULL. Return an int
1331 (boolean) indicating success.
1332 * target.h (set_desired_thread): Change return type to int.
1333
1334 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1335
1336 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1337 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1338 #includes.
1339 (ps_get_thread_area): New function.
1340
1341 2015-08-19 Gary Benson <gbenson@redhat.com>
1342
1343 * hostio.c (handle_pread): Do not attempt to read more data
1344 than hostio_reply_with_data can fit in a packet.
1345
1346 2015-08-18 Joel Brobecker <brobecker@adacore.com>
1347
1348 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1349
1350 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1351
1352 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1353
1354 2015-08-06 Pedro Alves <palves@redhat.com>
1355
1356 * tracepoint.c (expr_eval_result): Now an int.
1357
1358 2015-08-06 Pedro Alves <palves@redhat.com>
1359
1360 * gdbthread.h (struct regcache): Forward declare.
1361 (struct thread_info) <regcache_data>: Now a struct regcache
1362 pointer.
1363 * inferiors.c (inferior_regcache_data)
1364 (set_inferior_regcache_data): Now work with struct regcache
1365 pointers.
1366 * inferiors.h (struct regcache): Forward declare.
1367 (inferior_regcache_data, set_inferior_regcache_data): Now work
1368 with struct regcache pointers.
1369 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1370 (free_register_cache_thread): Remove struct regcache pointer
1371 casts.
1372
1373 2015-08-06 Pedro Alves <palves@redhat.com>
1374
1375 * server.c (captured_main): On error, print the exception message
1376 to stderr, and if run_once is set, throw a quit.
1377
1378 2015-08-06 Pedro Alves <palves@redhat.com>
1379
1380 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1381 the current thread.
1382
1383 2015-08-06 Pedro Alves <palves@redhat.com>
1384
1385 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1386 reading beyond the passed in buffer length.
1387
1388 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1389
1390 * tracepoint.c (symbol_list) <required>: Remove.
1391
1392 2015-08-06 Pedro Alves <palves@redhat.com>
1393
1394 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1395 count if stopping and suspending threads.
1396 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1397 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1398 (linux_detach): Complete an ongoing step-over.
1399 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1400 throughout.
1401 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1402 (linux_wait_1): If passing a signal to the inferior after
1403 finishing a step-over, unsuspend and re-resume all lwps. If we
1404 see a single-step event but the thread should be continuing, don't
1405 pass the trap to gdb.
1406 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1407 internal_error instead of gdb_assert.
1408 (enqueue_pending_signal): New function.
1409 (check_ptrace_stopped_lwp_gone): Add debug output.
1410 (start_step_over): Use internal_error instead of gdb_assert.
1411 (complete_ongoing_step_over): New function.
1412 (linux_resume_one_thread): Don't resume a suspended thread.
1413 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1414 it stepping.
1415
1416 2015-08-06 Pedro Alves <palves@redhat.com>
1417
1418 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1419 (linux_thread_alive): Use lwp_is_marked_dead.
1420 (extended_event_reported): Delete.
1421 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1422 instead of extended_event_reported.
1423 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1424 as well.
1425 (lwp_is_marked_dead): New function.
1426 (lwp_running): Use lwp_is_marked_dead.
1427 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1428 comment.
1429
1430 2015-08-06 Pedro Alves <palves@redhat.com>
1431
1432 * linux-low.c (linux_wait_1): Move fork event output out of the
1433 !report_to_gdb check. Pass event_child->waitstatus to
1434 target_waitstatus_to_string instead of ourstatus.
1435
1436 2015-08-04 Yao Qi <yao.qi@linaro.org>
1437
1438 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1439 if current_thread is 32 bit.
1440
1441 2015-08-04 Yao Qi <yao.qi@linaro.org>
1442
1443 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1444 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1445 * server.c (extended_protocol): Remove "static".
1446 * server.h (extended_protocol): Declare it.
1447
1448 2015-08-04 Yao Qi <yao.qi@linaro.org>
1449
1450 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1451 both aarch64 and aarch32.
1452 (aarch64_set_pc): Likewise.
1453
1454 2015-08-04 Yao Qi <yao.qi@linaro.org>
1455
1456 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1457 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1458 arm-with-neon.xml to srv_xmlfiles.
1459 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1460 (is_64bit_tdesc): New function.
1461 (aarch64_linux_read_description): New function.
1462 (aarch64_arch_setup): Call aarch64_linux_read_description.
1463 (regs_info): Rename to regs_info_aarch64.
1464 (aarch64_regs_info): Return right regs_info.
1465 (initialize_low_arch): Call initialize_low_arch_aarch32.
1466
1467 2015-08-04 Yao Qi <yao.qi@linaro.org>
1468
1469 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1470 * linux-aarch32-low.c: New file.
1471 * linux-aarch32-low.h: New file.
1472 * linux-arm-low.c (arm_fill_gregset): Move it to
1473 linux-aarch32-low.c.
1474 (arm_store_gregset): Likewise.
1475 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1476 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1477 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1478 (regs_info): Rename to regs_info_arm.
1479 (arm_regs_info): Return regs_info_aarch32 if
1480 have_ptrace_getregset is 1 and target description is
1481 arm_with_neon or arm_with_vfpv3.
1482 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1483 Call initialize_low_arch_aarch32 instead.
1484
1485 2015-08-04 Yao Qi <yao.qi@linaro.org>
1486
1487 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1488 * linux-low.c: ... here.
1489 * linux-low.h (have_ptrace_getregset): Declare it.
1490
1491 2015-08-04 Pedro Alves <palves@redhat.com>
1492
1493 * thread-db.c (struct thread_db): Use new typedefs.
1494 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1495 CHK calls.
1496 (disable_thread_event_reporting): Cast result of dlsym to
1497 destination function pointer type.
1498 (thread_db_mourn): Use td_ta_delete_ftype.
1499
1500 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1501
1502 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1503 arch variant.
1504 (CDX_BREAKPOINT): Define for R2.
1505 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1506 (the_low_target): Add comments.
1507
1508 2015-07-30 Yao Qi <yao.qi@linaro.org>
1509
1510 * linux-arm-low.c (arm_hwcap): Remove it.
1511 (arm_read_description): New local variable arm_hwcap. Don't
1512 set arm_hwcap to zero.
1513
1514 2015-07-30 Yao Qi <yao.qi@linaro.org>
1515
1516 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1517 Use regcache->tdesc instead.
1518 (arm_store_wmmxregset): Likewise.
1519 (arm_fill_vfpregset): Likewise.
1520 (arm_store_vfpregset): Likewise.
1521
1522 2015-07-30 Yao Qi <yao.qi@linaro.org>
1523
1524 * linux-arm-low.c: Include arch/arm.h.
1525 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1526 (arm_store_gregset): Likewise.
1527
1528 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1529
1530 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1531 ptrace's 4th parameter.
1532
1533 2015-07-27 Yao Qi <yao.qi@linaro.org>
1534
1535 * configure.srv (case aarch64*-*-linux*): Don't set
1536 srv_linux_usrregs.
1537
1538 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1539
1540 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1541 sys/ptrace.h.
1542 * linux-arm-low.c: Likewise.
1543 * linux-cris-low.c: Likewise.
1544 * linux-crisv32-low.c: Likewise.
1545 * linux-low.c: Likewise.
1546 * linux-m68k-low.c: Likewise.
1547 * linux-mips-low.c: Likewise.
1548 * linux-nios2-low.c: Likewise.
1549 * linux-s390-low.c: Likewise.
1550 * linux-sparc-low.c: Likewise.
1551 * linux-tic6x-low.c: Likewise.
1552 * linux-tile-low.c: Likewise.
1553 * linux-x86-low.c: Likewise.
1554
1555 2015-07-24 Pedro Alves <palves@redhat.com>
1556
1557 * config.in: Regenerate.
1558 * configure: Regenerate.
1559
1560 2015-07-24 Pedro Alves <palves@redhat.com>
1561
1562 * acinclude.m4: Include ../ptrace.m4.
1563 * configure.ac: Call GDB_AC_PTRACE.
1564 * config.in, configure: Regenerate.
1565
1566 2015-07-24 Yao Qi <yao.qi@linaro.org>
1567
1568 * linux-low.c (linux_create_inferior): Remove setting to
1569 proc->priv->new_inferior.
1570 (linux_attach): Likewise.
1571 (linux_low_filter_event): Likewise.
1572 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1573
1574 2015-07-24 Yao Qi <yao.qi@linaro.org>
1575
1576 * linux-low.c (linux_arch_setup): New function.
1577 (linux_low_filter_event): If proc->tdesc is NULL and
1578 proc->attached is true, call the_low_target.arch_setup.
1579 Otherwise, keep status pending, and return.
1580 (linux_resume_one_lwp_throw): Don't call get_pc if
1581 thread->while_stepping isn't NULL. Don't call
1582 get_thread_regcache if proc->tdesc is NULL.
1583 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1584 (linux_target_ops): Install arch_setup.
1585 * server.c (start_inferior): Call the_target->arch_setup.
1586 * target.h (struct target_ops) <arch_setup>: New field.
1587 (target_arch_setup): New marco.
1588 * lynx-low.c (lynx_target_ops): Update.
1589 * nto-low.c (nto_target_ops): Update.
1590 * spu-low.c (spu_target_ops): Update.
1591 * win32-low.c (win32_target_ops): Update.
1592
1593 2015-07-24 Yao Qi <yao.qi@linaro.org>
1594
1595 * linux-low.c (linux_add_process): Don't set
1596 proc->priv->new_inferior.
1597 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1598 (linux_attach): Likewise.
1599
1600 2015-07-24 Yao Qi <yao.qi@linaro.org>
1601
1602 * server.c (start_inferior): Code refactor.
1603
1604 2015-07-24 Yao Qi <yao.qi@linaro.org>
1605
1606 * server.c (process_serial_event): Set general_thread.
1607
1608 2015-07-21 Yao Qi <yao.qi@linaro.org>
1609
1610 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1611 aarch64_linux_get_debug_reg_capacity.
1612
1613 2015-07-17 Yao Qi <yao.qi@linaro.org>
1614
1615 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1616 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1617 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1618 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1619 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1620 (AARCH64_HWP_ALIGNMENT): Likewise.
1621 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1622 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1623 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1624 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1625 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1626 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1627 (struct aarch64_debug_reg_state): Likewise.
1628 (struct arch_lwp_info): Likewise.
1629 (aarch64_align_watchpoint): Likewise.
1630 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1631 (aarch64_watchpoint_length): Likewise.
1632 (aarch64_point_encode_ctrl_reg): Likewise
1633 (aarch64_point_is_aligned): Likewise.
1634 (aarch64_align_watchpoint): Likewise.
1635 (aarch64_linux_set_debug_regs):
1636 (aarch64_dr_state_insert_one_point): Likewise.
1637 (aarch64_dr_state_remove_one_point): Likewise.
1638 (aarch64_handle_breakpoint): Likewise.
1639 (aarch64_handle_aligned_watchpoint): Likewise.
1640 (aarch64_handle_unaligned_watchpoint): Likewise.
1641 (aarch64_handle_watchpoint): Likewise.
1642
1643 2015-07-17 Yao Qi <yao.qi@linaro.org>
1644
1645 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1646 and don't aarch64_get_debug_reg_state. All callers update.
1647 (aarch64_handle_aligned_watchpoint): Likewise.
1648 (aarch64_handle_unaligned_watchpoint): Likewise.
1649 (aarch64_handle_watchpoint): Likewise.
1650 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1651 (aarch64_remove_point): Likewise.
1652
1653 2015-07-17 Yao Qi <yao.qi@linaro.org>
1654
1655 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1656 debug_printf.
1657 (aarch64_handle_unaligned_watchpoint): Likewise.
1658
1659 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1660
1661 Revert the previous 3 commits:
1662 Move gdb_regex* to common/
1663 Move linux_find_memory_regions_full & co.
1664 gdbserver build-id attribute generator
1665
1666 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1667 Jan Kratochvil <jan.kratochvil@redhat.com>
1668
1669 gdbserver build-id attribute generator.
1670 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1671 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1672 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1673 (find_phdr): New.
1674 (get_dynamic): Use find_pdhr to traverse program headers.
1675 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1676 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1677 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1678 (get_hex_build_id): New.
1679 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1680 to reply XML document.
1681
1682 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1683 Jan Kratochvil <jan.kratochvil@redhat.com>
1684
1685 * target.c: Include target/target-utils.h and fcntl.h.
1686 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1687 (target_fileio_read_stralloc): New functions.
1688
1689 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1690
1691 * Makefile.in (OBS): Add gdb_regex.o.
1692 (gdb_regex.o): New.
1693 * config.in: Rebuilt.
1694 * configure: Rebuilt.
1695
1696 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1697 Jan Kratochvil <jan.kratochvil@redhat.com>
1698
1699 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1700 * Makefile.in (OBS): Add target-utils.o.
1701 (linux-maps.o, target-utils.o): New.
1702 * configure.srv (srv_linux_obj): Add linux-maps.o.
1703
1704 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1705
1706 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1707 function, return 1.
1708 (the_low_target): Install it.
1709
1710 2015-07-14 Pedro Alves <palves@redhat.com>
1711
1712 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1713 Instead, ignore ECHILD, and throw an error for other errnos.
1714
1715 2015-07-10 Pedro Alves <palves@redhat.com>
1716
1717 * event-loop.c (struct callback_event) <data>: Change type to
1718 gdb_client_data instance instead of gdb_client_data pointer.
1719 (append_callback_event): Adjust.
1720
1721 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1722
1723 * linux-aarch64-low.c: Add comments for each linux_target_ops
1724 method. Remove comments already covered in target_ops and
1725 linux_target_ops definitions.
1726 (the_low_target): Add comments for each unimplemented method.
1727
1728 2015-07-09 Yao Qi <yao.qi@linaro.org>
1729
1730 * linux-aarch64-low.c (aarch64_regmap): Remove.
1731 (aarch64_usrregs_info): Remove.
1732 (regs_info): Set field usrregs to NULL.
1733
1734 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1735
1736 * linux-low.c: Include "rsp-low.h"
1737 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1738 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1739 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1740 (handle_btrace_enable_pt): New.
1741 (handle_btrace_general_set): Support "pt".
1742 (handle_btrace_conf_general_set): Support "pt:size".
1743
1744 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1745
1746 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1747 Z_PACKET_SW_BP.
1748
1749 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1750
1751 * linux-aarch64-low.c: Remove comment about endianness.
1752 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1753 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1754 memcmp.
1755
1756 2015-06-24 Gary Benson <gbenson@redhat.com>
1757
1758 * linux-i386-ipa.c (stdint.h): Do not include.
1759 * lynx-i386-low.c (stdint.h): Likewise.
1760 * lynx-ppc-low.c (stdint.h): Likewise.
1761 * mem-break.c (stdint.h): Likewise.
1762 * thread-db.c (stdint.h): Likewise.
1763 * tracepoint.c (stdint.h): Likewise.
1764 * win32-low.c (stdint.h): Likewise.
1765
1766 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1767
1768 * server.c (write_qxfer_response): Update call to
1769 remote_escape_output.
1770
1771 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1772 Jan Kratochvil <jan.kratochvil@redhat.com>
1773
1774 Merge multiple hex conversions.
1775 * gdbreplay.c (tohex): Rename to 'fromhex'.
1776 (logchar): Use fromhex.
1777
1778 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1779
1780 * server.c (handle_qxfer_libraries): Set `version' attribute for
1781 <library-list>.
1782
1783 2015-06-10 Gary Benson <gbenson@redhat.com>
1784
1785 * target.h (struct target_ops) <multifs_open>: New field.
1786 <multifs_unlink>: Likewise.
1787 <multifs_readlink>: Likewise.
1788 * linux-low.c (nat/linux-namespaces.h): New include.
1789 (linux_target_ops): Initialize the_target->multifs_open,
1790 the_target->multifs_unlink and the_target->multifs_readlink.
1791 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1792 * hostio.c (hostio_fs_pid): New static variable.
1793 (hostio_handle_new_gdb_connection): New function.
1794 (handle_setfs): Likewise.
1795 (handle_open): Use the_target->multifs_open as appropriate.
1796 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1797 (handle_readlink): Use the_target->multifs_readlink as
1798 appropriate.
1799 (handle_vFile): Handle vFile:setfs packets.
1800 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1801 after target_handle_new_gdb_connection.
1802
1803 2015-06-10 Gary Benson <gbenson@redhat.com>
1804
1805 * configure.ac (AC_CHECK_FUNCS): Add setns.
1806 * config.in: Regenerate.
1807 * configure: Likewise.
1808 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1809 (linux-namespaces.o): New rule.
1810 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1811
1812 2015-06-09 Gary Benson <gbenson@redhat.com>
1813
1814 * hostio.c (handle_open): Process mode argument with
1815 fileio_to_host_mode.
1816
1817 2015-06-01 Yao Qi <yao.qi@linaro.org>
1818
1819 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1820 * linux-x86-low.c: Likewise.
1821
1822 2015-05-28 Don Breazeal <donb@codesourcery.com>
1823
1824 * linux-low.c (handle_extended_wait): Initialize
1825 thread_info.last_resume_kind for new fork children.
1826
1827 2015-05-15 Pedro Alves <palves@redhat.com>
1828
1829 * target.h (target_handle_new_gdb_connection): Rewrite using if
1830 wrapped in do/while.
1831
1832 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1833
1834 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1835 * configure, config.in: Regenerate.
1836 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1837 Declare typedef.
1838
1839 2015-05-12 Don Breazeal <donb@codesourcery.com>
1840
1841 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1842 PTRACE_EVENT_VFORK_DONE.
1843 (linux_low_ptrace_options, extended_event_reported): Add vfork
1844 events.
1845 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1846 and "vforkdone" for RSP 'T' Stop Reply Packet.
1847 * server.h (report_vfork_events): Declare
1848 global variable.
1849
1850 2015-05-12 Don Breazeal <donb@codesourcery.com>
1851
1852 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1853 (the_low_target) <new_fork>: Initialize new member.
1854 * linux-arm-low.c (arm_new_fork): New function.
1855 (the_low_target) <new_fork>: Initialize new member.
1856 * linux-low.c (handle_extended_wait): Call new target function
1857 new_fork.
1858 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1859 * linux-mips-low.c (mips_add_watchpoint): New function
1860 extracted from mips_insert_point.
1861 (the_low_target) <new_fork>: Initialize new member.
1862 (mips_linux_new_fork): New function.
1863 (mips_insert_point): Call mips_add_watchpoint.
1864 * linux-x86-low.c (x86_linux_new_fork): New function.
1865 (the_low_target) <new_fork>: Initialize new member.
1866
1867 2015-05-12 Don Breazeal <donb@codesourcery.com>
1868
1869 * linux-low.c (handle_extended_wait): Implement return value,
1870 rename argument 'event_child' to 'event_lwp', handle
1871 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1872 (linux_low_ptrace_options): New function.
1873 (linux_low_filter_event): Call linux_low_ptrace_options,
1874 use different argument fo linux_enable_event_reporting,
1875 use return value from handle_extended_wait.
1876 (extended_event_reported): New function.
1877 (linux_wait_1): Call extended_event_reported and set
1878 status to report fork events.
1879 (linux_write_memory): Add pid to debug message.
1880 (reset_lwp_ptrace_options_callback): New function.
1881 (linux_handle_new_gdb_connection): New function.
1882 (linux_target_ops): Initialize new structure member.
1883 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1884 * lynx-low.c: Initialize new structure member.
1885 * remote-utils.c (prepare_resume_reply): Implement stop reason
1886 "fork" for "T" stop message.
1887 * server.c (handle_query): Call handle_new_gdb_connection.
1888 * server.h (report_fork_events): Declare global flag.
1889 * target.h (struct target_ops) <handle_new_gdb_connection>:
1890 New member.
1891 (target_handle_new_gdb_connection): New macro.
1892 * win32-low.c: Initialize new structure member.
1893
1894 2015-05-12 Don Breazeal <donb@codesourcery.com>
1895
1896 * mem-break.c (APPEND_TO_LIST): Define macro.
1897 (clone_agent_expr): New function.
1898 (clone_one_breakpoint): New function.
1899 (clone_all_breakpoints): New function.
1900 * mem-break.h: Declare new functions.
1901
1902 2015-05-12 Don Breazeal <donb@codesourcery.com>
1903
1904 * linux-low.c (linux_supports_fork_events): New function.
1905 (linux_supports_vfork_events): New function.
1906 (linux_target_ops): Initialize new structure members.
1907 (initialize_low): Call linux_check_ptrace_features.
1908 * lynx-low.c (lynx_target_ops): Initialize new structure
1909 members.
1910 * server.c (report_fork_events, report_vfork_events):
1911 New global flags.
1912 (handle_query): Add new features to qSupported packet and
1913 response.
1914 (captured_main): Initialize new global variables.
1915 * target.h (struct target_ops) <supports_fork_events>:
1916 New member.
1917 <supports_vfork_events>: New member.
1918 (target_supports_fork_events): New macro.
1919 (target_supports_vfork_events): New macro.
1920 * win32-low.c (win32_target_ops): Initialize new structure
1921 members.
1922
1923 2015-05-12 Gary Benson <gbenson@redhat.com>
1924
1925 * server.c (handle_qxfer_exec_file): Use current process
1926 if annex is empty.
1927
1928 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1929
1930 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1931 Remove HAVE_PTRACE_GETREGS conditionals.
1932 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1933 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1934
1935 2015-05-08 Yao Qi <yao.qi@linaro.org>
1936
1937 * linux-low.c (linux_supports_conditional_breakpoints): New
1938 function.
1939 (linux_target_ops): Install new target method.
1940 * lynx-low.c (lynx_target_ops): Install NULL hook for
1941 supports_conditional_breakpoints.
1942 * nto-low.c (nto_target_ops): Likewise.
1943 * spu-low.c (spu_target_ops): Likewise.
1944 * win32-low.c (win32_target_ops): Likewise.
1945 * server.c (handle_query): Check
1946 target_supports_conditional_breakpoints.
1947 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1948 New field.
1949 (target_supports_conditional_breakpoints): New macro.
1950
1951 2015-05-06 Pedro Alves <palves@redhat.com>
1952
1953 PR server/18081
1954 * server.c (start_inferior): If the process exits, mourn it.
1955
1956 2015-04-21 Gary Benson <gbenson@redhat.com>
1957
1958 * hostio.c (fileio_open_flags_to_host): Factored out to
1959 fileio_to_host_openflags in common/fileio.c. Single use
1960 updated.
1961
1962 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1963
1964 * linux-xtensa-low.c (xtensa_fill_gregset)
1965 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1966 XCHAL_HAVE_LOOP.
1967
1968 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1969
1970 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1971 (regs_info): Replace usrregs pointer with NULL.
1972
1973 2015-04-17 Gary Benson <gbenson@redhat.com>
1974
1975 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1976 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1977 * server.c (handle_qxfer_exec_file): New function.
1978 (qxfer_packets): Add exec-file entry.
1979 (handle_query): Report qXfer:exec-file:read as supported packet.
1980
1981 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1982
1983 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1984
1985 2015-04-09 Gary Benson <gbenson@redhat.com>
1986
1987 * hostio-errno.c (errno_to_fileio_error): Remove function.
1988 Update caller to use remote_fileio_to_fio_error.
1989
1990 2015-04-09 Yao Qi <yao.qi@linaro.org>
1991
1992 * linux-low.c (linux_insert_point): Call
1993 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1994 (linux_remove_point): Call remove_memory_breakpoint if type is
1995 raw_bkpt_type_sw.
1996 * linux-x86-low.c (x86_insert_point): Don't call
1997 insert_memory_breakpoint.
1998 (x86_remove_point): Don't call remove_memory_breakpoint.
1999
2000 2015-04-01 Pedro Alves <palves@redhat.com>
2001 Cleber Rosa <crosa@redhat.com>
2002
2003 * server.c (gdbserver_usage): Reorganize and extend the usage
2004 message.
2005
2006 2015-03-24 Pedro Alves <palves@redhat.com>
2007
2008 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2009 output. Also dump TRAP_TRACE.
2010 (linux_low_filter_event): In debug output, distinguish a
2011 resume_stop SIGSTOP from a delayed SIGSTOP.
2012
2013 2015-03-24 Gary Benson <gbenson@redhat.com>
2014
2015 * linux-x86-low.c (x86_linux_new_thread): Moved to
2016 nat/x86-linux.c.
2017 (x86_linux_prepare_to_resume): Likewise.
2018
2019 2015-03-24 Gary Benson <gbenson@redhat.com>
2020
2021 * Makefile.in (x86-linux-dregs.o): New rule.
2022 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2023 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2024 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2025 (x86_linux_dr_get): Likewise.
2026 (x86_linux_dr_set): Likewise.
2027 (update_debug_registers_callback): Likewise.
2028 (x86_linux_dr_set_addr): Likewise.
2029 (x86_linux_dr_get_addr): Likewise.
2030 (x86_linux_dr_set_control): Likewise.
2031 (x86_linux_dr_get_control): Likewise.
2032 (x86_linux_dr_get_status): Likewise.
2033 (x86_linux_update_debug_registers): Likewise.
2034
2035 2015-03-24 Gary Benson <gbenson@redhat.com>
2036
2037 * linux-x86-low.c (x86_linux_update_debug_registers):
2038 New function, factored out from...
2039 (x86_linux_prepare_to_resume): ...this.
2040
2041 2015-03-24 Gary Benson <gbenson@redhat.com>
2042
2043 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2044 (x86_linux_dr_set): Likewise.
2045 (update_debug_registers_callback): Likewise.
2046 (x86_linux_dr_set_addr): Likewise.
2047 (x86_linux_dr_get_addr): Likewise.
2048 (x86_linux_dr_set_control): Likewise.
2049 (x86_linux_dr_get_control): Likewise.
2050 (x86_linux_dr_get_status): Likewise.
2051 (x86_linux_prepare_to_resume): Likewise.
2052
2053 2015-03-24 Gary Benson <gbenson@redhat.com>
2054
2055 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2056 Use perror_with_name. Pass string through gettext.
2057 (x86_linux_dr_set): Likewise.
2058
2059 2015-03-24 Gary Benson <gbenson@redhat.com>
2060
2061 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2062 (x86_linux_dr_set_addr): ...this.
2063 (x86_dr_low_get_addr): Rename to...
2064 (x86_linux_dr_get_addr): ...this.
2065 (x86_dr_low_set_control): Rename to...
2066 (x86_linux_dr_set_control): ...this.
2067 (x86_dr_low_get_control): Rename to...
2068 (x86_linux_dr_get_control): ...this.
2069 (x86_dr_low_get_status): Rename to...
2070 (x86_linux_dr_get_status): ...this.
2071 (x86_dr_low): Update with new function names.
2072
2073 2015-03-24 Gary Benson <gbenson@redhat.com>
2074
2075 * Makefile.in (x86-linux.o): New rule.
2076 * configure.srv: Add x86-linux.o to relevant targets.
2077 * linux-low.c (lwp_set_arch_private_info): New function.
2078 (lwp_arch_private_info): Likewise.
2079 * linux-x86-low.c: Include nat/x86-linux.h.
2080 (arch_lwp_info): Removed structure.
2081 (update_debug_registers_callback):
2082 Use lwp_set_debug_registers_changed.
2083 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2084 and lwp_set_debug_registers_changed.
2085 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2086
2087 2015-03-24 Gary Benson <gbenson@redhat.com>
2088
2089 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2090 * linux-arm-low.c (arm_new_thread): Likewise.
2091 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2092 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2093 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2094 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2095
2096 2015-03-24 Gary Benson <gbenson@redhat.com>
2097
2098 * linux-low.c (ptid_of_lwp): New function.
2099 (lwp_is_stopped): Likewise.
2100 (lwp_stop_reason): Likewise.
2101 * linux-x86-low.c (update_debug_registers_callback):
2102 Use lwp_is_stopped.
2103 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2104 lwp_stop_reason.
2105
2106 2015-03-24 Gary Benson <gbenson@redhat.com>
2107
2108 * linux-low.h (linux_stop_lwp): Remove declaration.
2109
2110 2015-03-24 Gary Benson <gbenson@redhat.com>
2111
2112 * linux-low.h: Include nat/linux-nat.h.
2113 * linux-low.c (iterate_over_lwps_args): New structure.
2114 (iterate_over_lwps_filter): New function.
2115 (iterate_over_lwps): Likewise.
2116 * linux-x86-low.c (update_debug_registers_callback):
2117 Update signature to what iterate_over_lwps expects.
2118 Remove PID check that iterate_over_lwps now performs.
2119 (x86_dr_low_set_addr): Use iterate_over_lwps.
2120 (x86_dr_low_set_control): Likewise.
2121
2122 2015-03-24 Gary Benson <gbenson@redhat.com>
2123
2124 * linux-x86-low.c (x86_debug_reg_state): New function.
2125 (x86_linux_prepare_to_resume): Use the above.
2126
2127 2015-03-24 Gary Benson <gbenson@redhat.com>
2128
2129 * linux-low.c (current_lwp_ptid): New function.
2130 * linux-x86-low.c: Include nat/linux-nat.h.
2131 (x86_dr_low_get_addr): Use current_lwp_ptid.
2132 (x86_dr_low_get_control): Likewise.
2133 (x86_dr_low_get_status): Likewise.
2134
2135 2015-03-20 Pedro Alves <palves@redhat.com>
2136
2137 * tracepoint.c (cmd_qtstatus): Make "str" const.
2138
2139 2015-03-20 Pedro Alves <palves@redhat.com>
2140
2141 * server.c (handle_general_set): Make "req_str" const.
2142
2143 2015-03-19 Pedro Alves <palves@redhat.com>
2144
2145 * linux-low.c (linux_resume_one_lwp): Rename to ...
2146 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2147 instead call perror_with_name.
2148 (check_ptrace_stopped_lwp_gone): New function.
2149 (linux_resume_one_lwp): Reimplement as wrapper around
2150 linux_resume_one_lwp_throw that swallows errors if the LWP is
2151 gone.
2152
2153 2015-03-19 Pedro Alves <palves@redhat.com>
2154
2155 * linux-low.c (count_events_callback, select_event_lwp_callback):
2156 No longer check whether the thread has resume_stop as last resume
2157 kind.
2158
2159 2015-03-19 Pedro Alves <palves@redhat.com>
2160
2161 * linux-low.c (count_events_callback, select_event_lwp_callback):
2162 Use the lwp's status_pending_p field, not the thread's.
2163
2164 2015-03-19 Pedro Alves <palves@redhat.com>
2165
2166 * linux-low.c (select_event_lwp_callback): Update comments to
2167 no longer mention SIGTRAP.
2168
2169 2015-03-18 Gary Benson <gbenson@redhat.com>
2170
2171 * server.c (handle_query): Do not report vFile:fstat as supported.
2172
2173 2015-03-11 Gary Benson <gbenson@redhat.com>
2174
2175 * hostio.c (sys/types.h): New include.
2176 (sys/stat.h): Likewise.
2177 (common-remote-fileio.h): Likewise.
2178 (handle_fstat): New function.
2179 (handle_vFile): Handle vFile:fstat packets.
2180
2181 2015-03-11 Gary Benson <gbenson@redhat.com>
2182
2183 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2184 struct stat.st_blocks and struct stat.st_blksize.
2185 * configure: Regenerate.
2186 * config.in: Likewise.
2187 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2188 (OBS): Add common-remote-fileio.o.
2189 (common-remote-fileio.o): New rule.
2190
2191 2015-03-09 Pedro Alves <palves@redhat.com>
2192
2193 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2194 'struct sockaddr' pointer in 'accept' call.
2195
2196 2015-03-09 Pedro Alves <palves@redhat.com>
2197
2198 Revert:
2199 2015-03-07 Pedro Alves <palves@redhat.com>
2200 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2201 or <winsock2.h> here. Instead include "gdb_socket.h".
2202 (remote_open): Use union gdb_sockaddr_u.
2203 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2204 or <winsock2.h> here. Instead include "gdb_socket.h".
2205 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2206 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2207 or <sys/un.h>.
2208 (init_named_socket, gdb_agent_helper_thread): Use union
2209 gdb_sockaddr_u.
2210
2211 2015-03-07 Pedro Alves <palves@redhat.com>
2212
2213 * configure.ac (build_warnings): Move
2214 -Wdeclaration-after-statement to the C-specific set.
2215 * configure: Regenerate.
2216
2217 2015-03-07 Pedro Alves <palves@redhat.com>
2218
2219 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2220 or <winsock2.h> here. Instead include "gdb_socket.h".
2221 (remote_open): Use union gdb_sockaddr_u.
2222 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2223 or <winsock2.h> here. Instead include "gdb_socket.h".
2224 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2225 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2226 or <sys/un.h>.
2227 (init_named_socket, gdb_agent_helper_thread): Use union
2228 gdb_sockaddr_u.
2229
2230 2015-03-07 Pedro Alves <palves@redhat.com>
2231
2232 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2233 instead.
2234
2235 2015-03-06 Yao Qi <yao.qi@linaro.org>
2236
2237 * linux-aarch64-low.c (aarch64_insert_point): Use
2238 show_debug_regs as a boolean.
2239 (aarch64_remove_point): Likewise.
2240
2241 2015-03-05 Pedro Alves <palves@redhat.com>
2242
2243 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2244 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2245 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2246 * nto-low.c (nto_target_ops): Likewise.
2247 * spu-low.c (spu_target_ops): Likewise.
2248 * win32-low.c (win32_target_ops): Likewise.
2249
2250 2015-03-04 Pedro Alves <palves@redhat.com>
2251
2252 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2253 Decide whether a breakpoint triggered based on the SIGTRAP's
2254 siginfo.si_code.
2255 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2256 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2257 (linux_low_filter_event): Check for breakpoints before checking
2258 watchpoints.
2259 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2260 siginfo.si_code.
2261 (linux_stopped_by_sw_breakpoint)
2262 (linux_supports_stopped_by_sw_breakpoint)
2263 (linux_stopped_by_hw_breakpoint)
2264 (linux_supports_stopped_by_hw_breakpoint): New functions.
2265 (linux_target_ops): Install new target methods.
2266
2267 2015-03-04 Pedro Alves <palves@redhat.com>
2268
2269 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2270 * server.c (swbreak_feature, hwbreak_feature): New globals.
2271 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2272 (captured_main): Clear swbreak_feature and hwbreak_feature.
2273 * server.h (swbreak_feature, hwbreak_feature): Declare.
2274 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2275 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2276 supports_stopped_by_hw_breakpoint>: New fields.
2277 (target_supports_stopped_by_sw_breakpoint)
2278 (target_stopped_by_sw_breakpoint)
2279 (target_supports_stopped_by_hw_breakpoint)
2280 (target_stopped_by_hw_breakpoint): Declare.
2281
2282 2015-03-04 Pedro Alves <palves@redhat.com>
2283
2284 enum lwp_stop_reason -> enum target_stop_reason
2285 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2286 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2287 (linux_wait_1, stuck_in_jump_pad_callback)
2288 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2289 (linux_stopped_by_watchpoint):
2290 * linux-low.h (enum lwp_stop_reason): Delete.
2291 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2292 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2293
2294 2015-03-04 Yao Qi <yao.qi@linaro.org>
2295
2296 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2297
2298 2015-03-03 Gary Benson <gbenson@redhat.com>
2299
2300 * hostio.c (handle_vFile): Fix prefix lengths.
2301
2302 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2303
2304 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2305 ptr_bits.
2306
2307 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2308
2309 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2310 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2311 (clean): Add "rm -f" for above C files.
2312 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2313 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2314 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2315 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2316 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2317 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2318 (init_registers_s390x_vx_linux64)
2319 (init_registers_s390x_tevx_linux64)
2320 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2321 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2322 declarations.
2323 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2324 (s390_store_vxrs_high): New functions.
2325 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2326 NT_S390_VXRS_HIGH.
2327 (s390_arch_setup): Add logic for selecting one of the new target
2328 descriptions. Activate the new vector regsets if applicable.
2329 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2330 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2331 and init_registers_s390x_tevx_linux64.
2332
2333 2015-03-01 Pedro Alves <palves@redhat.com>
2334
2335 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2336 parameter.
2337
2338 2015-02-27 Pedro Alves <palves@redhat.com>
2339
2340 * linux-x86-low.c (u_debugreg_offset): New function.
2341 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2342
2343 2015-02-27 Pedro Alves <palves@redhat.com>
2344
2345 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2346 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2347 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2348 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2349 (ps_lsetfpregs, ps_getpid)
2350 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2351 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2352 (ps_lsetxregs, ps_plog): Declare.
2353
2354 2015-02-27 Pedro Alves <palves@redhat.com>
2355
2356 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2357 IP_AGENT_EXPORT_FUNC.
2358 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2359 IP_AGENT_EXPORT_FUNC.
2360 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2361 (IP_AGENT_EXPORT): Delete.
2362 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2363 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2364 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2365 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2366 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2367 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2368 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2369 (traceframe_read_count, traceframe_write_count)
2370 (traceframes_created, trace_state_variables, get_raw_reg)
2371 (get_trace_state_variable_value, set_trace_state_variable_value)
2372 (ust_loaded, helper_thread_id, cmd_buf): Use
2373 IPA_SYM_EXPORTED_NAME.
2374 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2375 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2376 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2377 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2378 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2379 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2380 EXTERN_C_PUSH/EXTERN_C_POP.
2381 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2382 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2383 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2384 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2385 (traceframe_write_count, traceframe_read_count)
2386 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2387 (about_to_request_buffer_space, get_trace_state_variable_value)
2388 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2389 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2390 EXTERN_C_PUSH/EXTERN_C_POP.
2391 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2392 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2393 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2394 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2395 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2396 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2397 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2398 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2399 Define.
2400 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2401 (IP_AGENT_EXPORT_VAR_DECL): Define.
2402 (tracing): Declare.
2403 (gdb_agent_get_raw_reg): Declare.
2404
2405 2015-02-27 Tom Tromey <tromey@redhat.com>
2406 Pedro Alves <palves@redhat.com>
2407
2408 Rename symbols whose names are reserved C++ keywords throughout.
2409
2410 2015-02-27 Pedro Alves <palves@redhat.com>
2411
2412 * Makefile.in (COMPILER): New, get it from autoconf.
2413 (CXX): Get from autoconf instead.
2414 (COMPILE.pre): Use COMPILER.
2415 (CC-LD): Rename to ...
2416 (CC_LD): ... this. Use COMPILER.
2417 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2418 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2419 * acinclude.m4: Include build-with-cxx.m4.
2420 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2421 Disable -Werror by default if building in C++ mode.
2422 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2423 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2424 the C++ compiler. Save/restore CXXFLAGS too.
2425 * configure: Regenerate.
2426
2427 2015-02-27 Pedro Alves <palves@redhat.com>
2428
2429 * acinclude.m4: Include libiberty.m4.
2430 * configure.ac: Call libiberty_INIT.
2431 * config.in, configure: Regenerate.
2432
2433 2015-02-26 Pedro Alves <palves@redhat.com>
2434
2435 * linux-low.c (linux_wait_1): When incrementing the PC past a
2436 program breakpoint always use the_low_target.breakpoint_len as
2437 increment, rather than the maximum between that and
2438 the_low_target.decr_pc_after_break.
2439
2440 2015-02-23 Pedro Alves <palves@redhat.com>
2441
2442 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2443 thread was doing a step-over; always adjust the PC if
2444 we stepped over a permanent breakpoint.
2445 (linux_wait_1): If we stepped over breakpoint that was on top of a
2446 permanent breakpoint, manually advance the PC past it.
2447
2448 2015-02-23 Pedro Alves <palves@redhat.com>
2449
2450 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2451 modes.
2452 (x86_fill_gregset, x86_store_gregset): Use it when handling
2453 $orig_eax.
2454
2455 2015-02-20 Pedro Alves <palves@redhat.com>
2456
2457 * thread-db.c: Include "nat/linux-procfs.h".
2458 (thread_db_init): Skip listing new threads if the kernel supports
2459 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2460
2461 2015-02-20 Pedro Alves <palves@redhat.com>
2462
2463 * linux-low.c (status_pending_p_callback): Use ptid_match.
2464
2465 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2466
2467 PR breakpoints/16812
2468 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2469 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2470 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2471
2472 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2473
2474 PR breakpoints/15956
2475 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2476
2477 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2478
2479 * linux-low.c (linux_low_btrace_conf): Print size.
2480 * server.c (handle_btrace_conf_general_set): New.
2481 (hanle_general_set): Call handle_btrace_conf_general_set.
2482 (handle_query): Report Qbtrace-conf:bts:size as supported.
2483
2484 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2485
2486 * linux-low.c (linux_low_enable_btrace): Update parameters.
2487 (linux_low_btrace_conf): New.
2488 (linux_target_ops)<to_btrace_conf>: Initialize.
2489 * server.c (current_btrace_conf): New.
2490 (handle_btrace_enable): Rename to ...
2491 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2492 to target_enable_btrace. Update comment. Update users.
2493 (handle_qxfer_btrace_conf): New.
2494 (qxfer_packets): Add btrace-conf entry.
2495 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2496 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2497 (target_ops)<read_btrace_conf>: New.
2498 (target_enable_btrace): Update parameters.
2499 (target_read_btrace_conf): New.
2500
2501 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2502
2503 * server.c (handle_btrace_general_set): Remove call to
2504 target_supports_btrace.
2505 (supported_btrace_packets): New.
2506 (handle_query): Call supported_btrace_packets.
2507 * target.h: include btrace-common.h.
2508 (btrace_target_info): Removed.
2509 (supports_btrace, target_supports_btrace): Update parameters.
2510
2511 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2512
2513 * Makefile.in (SFILES): Add common/btrace-common.c.
2514 (OBS): Add common/btrace-common.o.
2515 (btrace-common.o): Add build rules.
2516 * linux-low: Include btrace-common.h.
2517 (linux_low_read_btrace): Use struct btrace_data. Call
2518 btrace_data_init and btrace_data_fini.
2519
2520 2015-02-06 Pedro Alves <palves@redhat.com>
2521
2522 * thread-db.c (find_new_threads_callback): Add debug output.
2523
2524 2015-02-04 Pedro Alves <palves@redhat.com>
2525
2526 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2527 (resume_stopped_resumed_lwps): New function.
2528 (linux_wait_for_event_filtered): Use it.
2529
2530 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2531
2532 * Makefile.in (SFILES): Add linux-personality.c.
2533 (linux-personality.o): New rule.
2534 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2535 list of objects to be built.
2536 * linux-low.c: Include nat/linux-personality.h.
2537 (linux_create_inferior): Remove code to disable address space
2538 randomization (moved to ../nat/linux-personality.c). Create
2539 cleanup to disable address space randomization.
2540
2541 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2542
2543 * Makefile.in (posix-strerror.o): New rule.
2544 (mingw-strerror.o): Likewise.
2545 * configure: Regenerated.
2546 * configure.ac: Source file ../common/common.host. Initialize new
2547 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2548
2549 2015-01-14 Yao Qi <yao@codesourcery.com>
2550
2551 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2552 (ppc-linux.o): New rule.
2553 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2554 * configure.ac: AC_CHECK_FUNCS(getauxval).
2555 * config.in: Re-generated.
2556 * configure: Re-generated.
2557 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2558 ppc64_64bit_inferior_p
2559
2560 2015-01-14 Yao Qi <yao@codesourcery.com>
2561
2562 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2563 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2564 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2565 (PT_ORIG_R3, PT_TRAP): Likewise.
2566 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2567 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2568 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2569
2570 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2571
2572 * i387-fp.c (i387_cache_to_xsave): In look over
2573 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2574 zmmh_low_space field by use of zmmh_high_space.
2575
2576 2015-01-09 Pedro Alves <palves@redhat.com>
2577
2578 * linux-low.c (step_over_bkpt): Move higher up in the file.
2579 (handle_extended_wait): Don't store the stop_pc here.
2580 (get_stop_pc): Adjust comments and rename to ...
2581 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2582 stopped for a software breakpoint or hardware breakpoint.
2583 (thread_still_has_status_pending_p): New function.
2584 (status_pending_p_callback): Use
2585 thread_still_has_status_pending_p. If the event is no longer
2586 interesting, resume the LWP.
2587 (handle_tracepoints): Add assert.
2588 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2589 (wstatus_maybe_breakpoint): New function.
2590 (cancel_breakpoint): Delete function.
2591 (check_stopped_by_watchpoint): New function, factored out from
2592 linux_low_filter_event.
2593 (lp_status_maybe_breakpoint): Delete function.
2594 (linux_low_filter_event): Remove filter_ptid argument.
2595 Leave thread group exits pending here. Store the LWP's stop PC.
2596 Always leave events pending.
2597 (linux_wait_for_event_filtered): Pull all events out of the
2598 kernel, and leave them all pending.
2599 (count_events_callback, select_event_lwp_callback): Consider all
2600 events.
2601 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2602 (select_event_lwp): Only give preference to the stepping LWP in
2603 all-stop mode. Adjust comments.
2604 (ignore_event): New function.
2605 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2606 references to cancel_breakpoints. Adjust to renames. Also give
2607 equal priority to all LWPs that have had events in non-stop mode.
2608 If reporting a software breakpoint event, unadjust the LWP's PC.
2609 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2610 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2611 Adjust.
2612 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2613 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2614 (linux_stopped_by_watchpoint): Adjust.
2615 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2616 * linux-low.h (enum lwp_stop_reason): New.
2617 (struct lwp_info) <stop_pc>: Adjust comment.
2618 <stopped_by_watchpoint>: Delete field.
2619 <stop_reason>: New field.
2620 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2621 * mem-break.c (software_breakpoint_inserted_here)
2622 (hardware_breakpoint_inserted_here): New function.
2623 * mem-break.h (software_breakpoint_inserted_here)
2624 (hardware_breakpoint_inserted_here): Declare.
2625 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2626 (cancel_breakpoints): Delete.
2627 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2628 (upload_fast_traceframes): Remove references to
2629 cancel_breakpoints.
2630
2631 2015-01-09 Pedro Alves <palves@redhat.com>
2632
2633 * thread-db.c (find_new_threads_callback): Ignore thread if the
2634 kernel thread ID is -1.
2635
2636 2015-01-09 Pedro Alves <palves@redhat.com>
2637
2638 * linux-low.c (linux_attach_fail_reason_string): Move to
2639 nat/linux-ptrace.c, and rename.
2640 (linux_attach_lwp): Update comment.
2641 (attach_proc_task_lwp_callback): New function.
2642 (linux_attach): Adjust to rename and use
2643 linux_proc_attach_tgid_threads.
2644 (linux_attach_fail_reason_string): Delete declaration.
2645
2646 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2647
2648 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2649 * server.c (gdbserver_version): Likewise.
2650
2651 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2652
2653 * remote-utils.c: Include ctype.h.
2654 (input_interrupt): Explicitly handle the case when the char
2655 received is the NUL byte. Improve the printing of non-ASCII
2656 characters.
2657
2658 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2659
2660 * linux-low.c (linux_low_filter_event): Update call to
2661 linux_enable_event_reporting following the addition of
2662 a new parameter to that function.
2663
2664 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2665
2666 PR server/17457
2667 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2668 (AARCH64_FPCR_REGNO): Likewise.
2669 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2670 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2671 (aarch64_store_fpregset): Likewise.
2672
2673 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2674
2675 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2676 Remove FIXME comment about assumption about N.
2677
2678 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2679
2680 * configure.ac: If large-file support is disabled in GDBserver,
2681 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2682 * configure: Regenerate.
2683
2684 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2685
2686 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2687 warning upon ENODATA from ptrace.
2688 * linux-s390-low.c (s390_store_tdb): New.
2689 (s390_regsets): Add regset for NT_S390_TDB.
2690
2691 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2692
2693 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2694 without a fill_function.
2695 * linux-s390-low.c (s390_fill_last_break): Remove.
2696 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2697 (s390_arch_setup): Use regset's size instead of fill_function for
2698 loop end condition.
2699
2700 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2701
2702 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2703 the regset's store function when ptrace returned an error.
2704 * regcache.c (get_thread_regcache): Invalidate register cache
2705 before fetching inferior's registers.
2706
2707 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2708
2709 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2710 while-loop as for-loop.
2711 (regsets_store_inferior_registers): Likewise.
2712
2713 2014-11-28 Yao Qi <yao@codesourcery.com>
2714
2715 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2716 * config.in, configure: Re-generate.
2717 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2718 is defined.
2719
2720 2014-11-21 Yao Qi <yao@codesourcery.com>
2721
2722 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2723 (AC_CHECK_HEADERS): Remove malloc.h.
2724 * configure: Re-generated.
2725 * config.in: Re-generated.
2726 * server.h: Don't include alloca.h and malloc.h.
2727 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2728 Don't include malloc.h.
2729
2730 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2731
2732 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2733 corresponding ERRNO check in same block.
2734
2735 2014-11-12 Pedro Alves <palves@redhat.com>
2736
2737 * server.c (cont_thread): Update comment.
2738 (start_inferior, attach_inferior): No longer clear cont_thread.
2739 (handle_v_cont): No longer set cont_thread.
2740 (captured_main): Clear cont_thread each time a GDB connects.
2741
2742 2014-11-12 Pedro Alves <palves@redhat.com>
2743
2744 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2745 thread, and don't resume all threads if the Hc thread has exited.
2746
2747 2014-11-12 Pedro Alves <palves@redhat.com>
2748
2749 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2750 the process group instead of to a specific LWP.
2751
2752 2014-10-15 Pedro Alves <palves@redhat.com>
2753
2754 PR server/17487
2755 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2756 parameter.
2757 (arm_set_thread_context): Delete.
2758 (the_low_target): Adjust.
2759 * win32-i386-low.c (debug_registers_changed)
2760 (debug_registers_used): Delete.
2761 (update_debug_registers_callback): New function.
2762 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2763 needing to update their debug registers.
2764 (win32_get_current_dr): New function.
2765 (x86_dr_low_get_addr, x86_dr_low_get_control)
2766 (x86_dr_low_get_status): Fetch the debug register from the thread
2767 record's context.
2768 (i386_initial_stuff): Adjust.
2769 (i386_get_thread_context): Remove current_event parameter. Don't
2770 clear debug_registers_changed nor copy DR values to
2771 debug_reg_state.
2772 (i386_set_thread_context): Delete.
2773 (i386_prepare_to_resume): New function.
2774 (i386_thread_added): Mark the thread as needing to update irs
2775 debug registers.
2776 (the_low_target): Remove i386_set_thread_context and install
2777 i386_prepare_to_resume.
2778 * win32-low.c (win32_get_thread_context): Adjust.
2779 (win32_set_thread_context): Use SetThreadContext
2780 directly.
2781 (win32_prepare_to_resume): New function.
2782 (win32_require_context): New function, factored out from ...
2783 (thread_rec): ... this.
2784 (continue_one_thread): Call win32_prepare_to_resume on each thread
2785 we're about to continue.
2786 (win32_resume): Call win32_prepare_to_resume on the event thread.
2787 * win32-low.h (struct win32_thread_info)
2788 <debug_registers_changed>: New field.
2789 (struct win32_target_ops): Change prototype of set_thread_context,
2790 delete set_thread_context and add prepare_to_resume.
2791 (win32_require_context): New declaration.
2792
2793 2014-10-08 Gary Benson <gbenson@redhat.com>
2794
2795 * server.h: Do not include common-exceptions.h.
2796
2797 2014-10-08 Gary Benson <gbenson@redhat.com>
2798
2799 * server.h: Do not include cleanups.h.
2800
2801 2014-09-30 James Hogan <james.hogan@imgtec.com>
2802
2803 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2804 mips64-dsp-linux.c.
2805
2806 2014-09-23 Yao Qi <yao@codesourcery.com>
2807
2808 * linux-low.c (lp_status_maybe_breakpoint): New function.
2809 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2810 (count_events_callback): Likewise.
2811 (select_event_lwp_callback): Likewise.
2812 (cancel_breakpoints_callback): Likewise.
2813
2814 2014-09-19 Don Breazeal <donb@codesourcery.com>
2815
2816 * linux-low.c (handle_extended_wait): Call
2817 linux_ptrace_get_extended_event.
2818 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2819 linux_is_extended_waitstatus.
2820
2821 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2822
2823 * Makefile.in (CPPFLAGS): Define.
2824 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2825 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2826
2827 2014-09-16 Gary Benson <gbenson@redhat.com>
2828
2829 * inferiors.h (current_inferior): Renamed as...
2830 (current_thread): New variable. All uses updated.
2831 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2832 (maybe_move_out_of_jump_pad): Likewise.
2833 (cancel_breakpoint): Likewise.
2834 (linux_low_filter_event): Likewise.
2835 (wait_for_sigstop): Likewise.
2836 (linux_resume_one_lwp): Likewise.
2837 (need_step_over_p): Likewise.
2838 (start_step_over): Likewise.
2839 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2840 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2841 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2842 and save_inferior as saved_thread.
2843 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2844 saved_thread.
2845 (regcache_invalidate_thread): Likewise.
2846 * remote-utils.c (prepare_resume_reply): Likewise.
2847 * thread-db.c (thread_db_get_tls_address): Likewise.
2848 (disable_thread_event_reporting): Likewise.
2849 (remove_thread_event_breakpoints): Likewise.
2850 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2851 as saved_thread.
2852 * target.h (set_desired_inferior): Renamed as...
2853 (set_desired_thread): New declaration. All uses updated.
2854 * server.c (myresume): Updated comment to reference thread instead
2855 of inferior.
2856 (handle_serial_event): Likewise.
2857 (handle_target_event): Likewise.
2858
2859 2014-09-12 Tom Tromey <tromey@redhat.com>
2860 Gary Benson <gbenson@redhat.com>
2861
2862 * regcache.h: Include common-regcache.h.
2863 (regcache_read_pc): Don't declare.
2864 * regcache.c (get_thread_regcache_for_ptid): New function.
2865
2866 2014-09-11 Tom Tromey <tromey@redhat.com>
2867 Gary Benson <gbenson@redhat.com>
2868
2869 * symbol.c: New file.
2870 * Makefile.in (SFILES): Add symbol.c.
2871 (OBS): Add symbol.o.
2872
2873 2014-09-11 Gary Benson <gbenson@redhat.com>
2874
2875 * target.c (target_stop_ptid, target_continue_ptid): New
2876 functions.
2877
2878 2014-09-11 Tom Tromey <tromey@redhat.com>
2879 Gary Benson <gbenson@redhat.com>
2880
2881 * target.h: Include target/target.h.
2882 * target.c (target_read_memory, target_read_uint32)
2883 (target_write_memory): New functions.
2884
2885 2014-09-11 Gary Benson <gbenson@redhat.com>
2886
2887 * server.h (debug_hw_points): Don't declare.
2888 * server.c (debug_hw_points): Don't define. Replace all uses
2889 with show_debug_regs.
2890 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2891 all uses with show_debug_regs.
2892
2893 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2894
2895 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2896 endianness into account.
2897 (ppc_supply_ptrace_register): Likewise.
2898
2899 2014-09-03 James Hogan <james.hogan@imgtec.com>
2900
2901 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2902 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2903
2904 2014-09-03 Gary Benson <gbenson@redhat.com>
2905
2906 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2907 ALL_DEBUG_ADDRESS_REGISTERS.
2908
2909 2014-09-02 Gary Benson <gbenson@redhat.com>
2910
2911 * i386-low.h: Renamed as...
2912 * x86-low.h: New file. All type, function and variable name
2913 prefixes changed from "i386_" to "x86_". All references updated.
2914 * i386-low.c: Renamed as...
2915 * x86-low.c: New file. All type, function and variable name
2916 prefixes changed from "i386_" to "x86_". All references updated.
2917
2918 2014-09-02 Gary Benson <gbenson@redhat.com>
2919
2920 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2921 (x86_linux_new_thread): Likewise.
2922
2923 2014-08-29 Gary Benson <gbenson@redhat.com>
2924
2925 * server.h (setjmp.h): Do not include.
2926 (toplevel): Do not declare.
2927 (common-exceptions.h): Include.
2928 (cleanups.h): Likewise.
2929 * server.c (toplevel): Do not define.
2930 (exit_code): New static global.
2931 (detach_or_kill_for_exit_cleanup): New function.
2932 (main): New function. Original main renamed to...
2933 (captured_main): New function.
2934 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2935
2936 2014-08-29 Gary Benson <gbenson@redhat.com>
2937
2938 * Makefile.in (SFILES): Add common/common-exceptions.c.
2939 (OBS): Add common-exceptions.o.
2940 (common-exceptions.o): New rule.
2941 * utils.c (prepare_to_throw_exception): New function.
2942
2943 2014-08-29 Gary Benson <gbenson@redhat.com>
2944
2945 * config.in: Regenerate.
2946 * configure: Likewise.
2947
2948 2014-08-29 Gary Benson <gbenson@redhat.com>
2949
2950 * Makefile.in (SFILES): Add common/cleanups.c.
2951 (OBS): cleanups.o.
2952 (cleanups.o): New rule.
2953
2954 2014-08-29 Gary Benson <gbenson@redhat.com>
2955
2956 * utils.c (internal_vwarning): New function.
2957
2958 2014-08-28 Gary Benson <gbenson@redhat.com>
2959
2960 * utils.h (fatal): Remove declaration.
2961 * utils.c (fatal): Remove function.
2962
2963 2014-08-28 Gary Benson <gbenson@redhat.com>
2964
2965 * tracepoint.c (gdb_agent_init): Replace fatal with
2966 perror_with_name.
2967 (initialize_tracepoint): Likewise.
2968
2969 2014-08-28 Gary Benson <gbenson@redhat.com>
2970
2971 * remote-utils.c (remote_prepare): Replace fatal with error.
2972
2973 2014-08-28 Gary Benson <gbenson@redhat.com>
2974
2975 * linux-low.c (linux_async): Replace fatal with warning.
2976 Tidy up and return.
2977 (linux_start_non_stop): Return -1 if linux_async failed.
2978
2979 2014-08-28 Gary Benson <gbenson@redhat.com>
2980
2981 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2982 gdb_assert.
2983 (i386_dr_low_get_addr): Remove vague comment.
2984 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2985 gdb_assert.
2986
2987 2014-08-28 Gary Benson <gbenson@redhat.com>
2988
2989 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2990 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2991 internal_error.
2992 (linux_resume_one_lwp): Likewise.
2993 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2994 gdb_assert.
2995 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2996 with internal_error.
2997 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2998 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2999 (find_register_by_name): Replace fatal with internal_error.
3000 (find_regno): Likewise.
3001 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3002 * thread-db.c (thread_db_create_event): Likewise.
3003 (thread_db_load_search): Likewise.
3004 (try_thread_db_load_1): Likewise.
3005 * tracepoint.c (get_jump_space_head): Replace fatal with
3006 internal_error.
3007 (claim_trampoline_space): Likewise.
3008 (have_fast_tracepoint_trampoline_buffer): Likewise.
3009 (cmd_qtstart): Likewise.
3010 (stop_tracing): Likewise.
3011 (fast_tracepoint_collecting): Likewise.
3012 (target_malloc): Likewise.
3013 (download_tracepoint): Likewise.
3014 (download_trace_state_variables): Replace check with gdb_assert.
3015 (upload_fast_traceframes): Replace fatal with internal_error.
3016
3017 2014-08-19 Tom Tromey <tromey@redhat.com>
3018 Gary Benson <gbenson@redhat.com>
3019
3020 * Makefile.in (SFILES): Add common/common-debug.c.
3021 (OBS): Add common-debug.o.
3022 (common-debug.o): New rule.
3023 * debug.h (debug_printf): Don't declare.
3024 * debug.c (debug_printf): Renamed and rewritten as...
3025 (debug_vprintf): New function.
3026
3027 2014-08-19 Gary Benson <gbenson@redhat.com>
3028
3029 * utils.h: Do not include print-utils.h.
3030
3031 2014-08-19 Tom Tromey <tromey@redhat.com>
3032 Gary Benson <gbenson@redhat.com>
3033
3034 * server.h: Add static assertion.
3035 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3036
3037 2014-08-19 Tom Tromey <tromey@redhat.com>
3038 Gary Benson <gbenson@redhat.com>
3039
3040 * Makefile.in (SFILES): Add common/errors.c.
3041 (OBS): Add errors.o.
3042 (IPA_OBS): Add errors-ipa.o.
3043 (errors.o): New rule.
3044 (errors-ipa.o): Likewise.
3045 * utils.h (perror_with_name, error, warning): Don't declare.
3046 * utils.c (warning): Renamed and rewritten as...
3047 (vwarning): New function.
3048 (error): Renamed and rewritten as...
3049 (verror): New function.
3050 (internal_error): Renamed and rewritten as...
3051 (internal_verror): New function.
3052
3053 2014-08-07 Gary Benson <gbenson@redhat.com>
3054
3055 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3056 * configure: Regenerate.
3057 * config.in: Likewise.
3058 * server.h: Do not include errno.h.
3059 * event-loop.c: Likewise.
3060 * hostio-errno.c: Likewise.
3061 * linux-low.c: Likewise.
3062 * remote-utils.c: Likewise.
3063 * spu-low.c: Likewise.
3064 * utils.c: Likewise.
3065 * gdbreplay.c: Unconditionally include errno.h.
3066
3067 2014-08-07 Gary Benson <gbenson@redhat.com>
3068
3069 * server.h: Do not include string.h.
3070 * event-loop.c: Likewise.
3071 * linux-low.c: Likewise.
3072 * regcache.c: Likewise.
3073 * remote-utils.c: Likewise.
3074 * spu-low.c: Likewise.
3075 * utils.c: Likewise.
3076
3077 2014-08-07 Gary Benson <gbenson@redhat.com>
3078
3079 * server.h: Do not include gdb_assert.h.
3080
3081 2014-08-07 Gary Benson <gbenson@redhat.com>
3082
3083 * server.h: Do not include common-utils.h.
3084
3085 2014-08-07 Gary Benson <gbenson@redhat.com>
3086
3087 * server.h: Do not include ptid.h.
3088 * notif.h: Likewise.
3089
3090 2014-08-07 Gary Benson <gbenson@redhat.com>
3091
3092 * server.h: Do not include gdb_locale.h.
3093
3094 2014-08-07 Gary Benson <gbenson@redhat.com>
3095
3096 * server.h: Do not include gdb/signals.h.
3097 * win32-low.c: Likewise.
3098
3099 2014-08-07 Gary Benson <gbenson@redhat.com>
3100
3101 * server.h: Do not include pathmax.h.
3102
3103 2014-08-07 Gary Benson <gbenson@redhat.com>
3104
3105 * server.h: Do not include libiberty.h.
3106 * linux-bfin-low.c: Likewise.
3107
3108 2014-08-07 Gary Benson <gbenson@redhat.com>
3109
3110 * server.h: Do not include ansidecl.h.
3111
3112 2014-08-07 Gary Benson <gbenson@redhat.com>
3113
3114 * linux-x86-low.c: Do not include stddef.h.
3115 * lynx-ppc-low.c: Likewise.
3116 * tracepoint.c: Likewise.
3117
3118 2014-08-07 Gary Benson <gbenson@redhat.com>
3119
3120 * server.h: Do not include stdarg.h.
3121 * nto-low.c: Likewise.
3122
3123 2014-08-07 Gary Benson <gbenson@redhat.com>
3124
3125 * server.h: Do not include stdlib.h.
3126 * inferiors.c: Likewise.
3127 * linux-low.c: Likewise.
3128 * regcache.c: Likewise.
3129 * spu-low.c: Likewise.
3130 * tracepoint.c: Likewise.
3131 * utils.c: Likewise.
3132
3133 2014-08-07 Gary Benson <gbenson@redhat.com>
3134
3135 * server.h: Do not include stdio.h.
3136 * linux-low.c: Likewise.
3137 * remote-utils.c: Likewise.
3138 * spu-low.c: Likewise.
3139 * utils.c: Likewise.
3140 * wincecompat.c: Likewise.
3141
3142 2014-08-06 Gary Benson <gbenson@redhat.com>
3143
3144 * regcache.c (init_register_cache): Move conditionals inside if.
3145
3146 2014-08-06 Gary Benson <gbenson@redhat.com>
3147
3148 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3149
3150 2014-07-31 Gary Benson <gbenson@redhat.com>
3151
3152 * ax.h: Do not include server.h.
3153 * gdbthread.h: Likewise.
3154 * lynx-low.h: Likewise.
3155 * notif.h: Likewise.
3156
3157 2014-07-30 Gary Benson <gbenson@redhat.com>
3158
3159 * server.h: Include common-defs.h.
3160 Do not include config.h or build-gnulib-gdbserver/config.h.
3161
3162 2014-07-30 Gary Benson <gbenson@redhat.com>
3163
3164 * hostio-errno.c: Move server.h to top of includes list.
3165 * inferiors.c: Likewise.
3166 * linux-x86-low.c: Likewise.
3167 * notif.c: Include server.h.
3168
3169 2014-07-24 Tom Tromey <tromey@redhat.com>
3170 Gary Benson <gbenson@redhat.com>
3171
3172 * server.h (CORE_ADDR): Now unsigned.
3173
3174 2014-07-16 Pedro Alves <palves@redhat.com>
3175
3176 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3177
3178 2014-07-15 Pedro Alves <palves@redhat.com>
3179
3180 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3181 copy.
3182
3183 2014-07-11 Pedro Alves <palves@redhat.com>
3184
3185 * linux-low.c (kill_wait_lwp): New function, based on
3186 kill_one_lwp_callback, but use my_waitpid directly.
3187 (kill_one_lwp_callback, linux_kill): Use it.
3188
3189 2014-06-23 Pedro Alves <palves@redhat.com>
3190
3191 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3192 before setting DR0..DR3.
3193
3194 2014-06-20 Gary Benson <gbenson@redhat.com>
3195
3196 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3197 * configure: Regenerated.
3198 * config.in: Likewise.
3199
3200 2014-06-20 Gary Benson <gbenson@redhat.com>
3201
3202 * Makefile.in (SFILES): Update locations for files moved
3203 from common to nat.
3204 (object file files): Reordered.
3205
3206 2014-06-20 Gary Benson <gbenson@redhat.com>
3207
3208 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3209 (i386_dr_low_set_addr): Likewise.
3210 (i386_dr_low_get_addr): Likewise.
3211 (i386_dr_low_can_set_control): Likewise.
3212 (i386_dr_low_set_control): Likewise.
3213 (i386_dr_low_get_control): Likewise.
3214 (i386_dr_low_get_status): Likewise.
3215 (i386_get_debug_register_length): Likewise.
3216 * linux-x86-low.c (i386_dr_low_set_addr):
3217 Changed signature. Made static.
3218 (i386_dr_low_get_addr): Likewise.
3219 (i386_dr_low_set_control): Likewise.
3220 (i386_dr_low_get_control): Likewise.
3221 (i386_dr_low_get_status): Likewise.
3222 (i386_dr_low): New global variable.
3223 * win32-i386-low.c (i386_dr_low_set_addr):
3224 Changed signature. Made static.
3225 (i386_dr_low_get_addr): Likewise.
3226 (i386_dr_low_set_control): Likewise.
3227 (i386_dr_low_get_control): Likewise.
3228 (i386_dr_low_get_status): Likewise.
3229 (i386_dr_low): New global variable.
3230
3231 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3232
3233 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3234 * Makefile.in (AR, AR_FLAGS): Define.
3235 * configure: Regenerate.
3236
3237 2014-06-19 Gary Benson <gbenson@redhat.com>
3238
3239 * Makefile.in (i386-dregs.o): New rule.
3240 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3241 * i386-low.c (target.h): Remove include.
3242 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3243 (DR_CONTROL_SHIFT): Likewise.
3244 (DR_CONTROL_SIZE): Likewise.
3245 (DR_RW_EXECUTE): Likewise.
3246 (DR_RW_WRITE): Likewise.
3247 (DR_RW_READ): Likewise.
3248 (DR_RW_IORW): Likewise.
3249 (DR_LEN_1): Likewise.
3250 (DR_LEN_2): Likewise.
3251 (DR_LEN_4): Likewise.
3252 (DR_LEN_8): Likewise.
3253 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3254 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3255 (DR_ENABLE_SIZE): Likewise.
3256 (DR_LOCAL_SLOWDOWN): Likewise.
3257 (DR_GLOBAL_SLOWDOWN): Likewise.
3258 (DR_CONTROL_RESERVED): Likewise.
3259 (I386_DR_CONTROL_MASK): Likewise.
3260 (I386_DR_VACANT): Likewise.
3261 (I386_DR_LOCAL_ENABLE): Likewise.
3262 (I386_DR_GLOBAL_ENABLE): Likewise.
3263 (I386_DR_DISABLE): Likewise.
3264 (I386_DR_SET_RW_LEN): Likewise.
3265 (I386_DR_GET_RW_LEN): Likewise.
3266 (I386_DR_WATCH_HIT): Likewise.
3267 (i386_wp_op_t): Likewise.
3268 (i386_show_dr): Likewise.
3269 (i386_length_and_rw_bits): Likewise.
3270 (i386_insert_aligned_watchpoint): Likewise.
3271 (i386_remove_aligned_watchpoint): Likewise.
3272 (i386_handle_nonaligned_watchpoint): Likewise.
3273 i386_update_inferior_debug_regs(): Likewise.
3274 (i386_dr_insert_watchpoint): Likewise.
3275 (i386_dr_remove_watchpoint): Likewise.
3276 (i386_dr_region_ok_for_watchpoint): Likewise.
3277 (i386_dr_stopped_data_address): Likewise.
3278 (i386_dr_stopped_by_watchpoint): Likewise.
3279
3280 2014-06-19 Gary Benson <gbenson@redhat.com>
3281
3282 * i386-low.c (i386_dr_show): Renamed to
3283 i386_show_dr and made static. All uses updated.
3284 (i386_dr_length_and_rw_bits): Renamed to
3285 i386_length_and_rw_bits and made static.
3286 All uses updated.
3287 (i386_dr_insert_aligned_watchpoint): Renamed to
3288 i386_insert_aligned_watchpoint and made static.
3289 All uses updated.
3290 (i386_dr_remove_aligned_watchpoint): Renamed to
3291 i386_remove_aligned_watchpoint and made static.
3292 All uses updated.
3293 (i386_dr_update_inferior_debug_regs): Renamed to
3294 i386_update_inferior_debug_regs and made static.
3295 All uses updated.
3296
3297 2014-06-18 Gary Benson <gbenson@redhat.com>
3298
3299 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3300 (i386_dr_low_can_set_control): Likewise.
3301 (i386_get_debug_register_length): Likewise.
3302 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3303 (i386_dr_low_can_set_control): Likewise.
3304 (i386_get_debug_register_length): Likewise.
3305
3306 2014-06-17 Gary Benson <gbenson@redhat.com>
3307
3308 * i386-low.h (i386-dregs.h): New include.
3309 (DR_FIRSTADDR): Now in i386-dregs.h.
3310 (DR_LASTADDR): Likewise.
3311 (DR_NADDR): Likewise.
3312 (DR_STATUS): Likewise.
3313 (DR_CONTROL): Likewise.
3314 (i386_debug_reg_state): Likewise.
3315 (i386_dr_insert_watchpoint): Likewise.
3316 (i386_dr_remove_watchpoint): Likewise.
3317 (i386_dr_region_ok_for_watchpoint): Likewise.
3318 (i386_dr_stopped_data_address): Likewise.
3319 (i386_dr_stopped_by_watchpoint): Likewise.
3320 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3321
3322 2014-06-18 Gary Benson <gbenson@redhat.com>
3323
3324 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3325 i386_dr_insert_watchpoint.
3326 (i386_low_remove_watchpoint): Renamed to
3327 i386_dr_remove_watchpoint.
3328 (i386_low_region_ok_for_watchpoint): Renamed to
3329 i386_dr_region_ok_for_watchpoint.
3330 (i386_low_stopped_data_address): Renamed to
3331 i386_dr_stopped_data_address.
3332 (i386_low_stopped_by_watchpoint): Renamed to
3333 i386_dr_stopped_by_watchpoint.
3334 * i386-low.c (i386_show_dr): Renamed to
3335 i386_dr_show and made nonstatic. All uses updated.
3336 (i386_length_and_rw_bits): Renamed to
3337 i386_dr_length_and_rw_bits and made nonstatic.
3338 All uses updated.
3339 (i386_insert_aligned_watchpoint): Renamed to
3340 i386_dr_insert_aligned_watchpoint and made nonstatic.
3341 All uses updated.
3342 (i386_remove_aligned_watchpoint): Renamed to
3343 i386_dr_remove_aligned_watchpoint and made nonstatic.
3344 All uses updated.
3345 (i386_update_inferior_debug_regs): Renamed to
3346 i386_dr_update_inferior_debug_regs and made nonstatic.
3347 All uses updated.
3348 (i386_low_insert_watchpoint): Renamed to
3349 i386_dr_insert_watchpoint. All uses updated.
3350 (i386_low_remove_watchpoint): Renamed to
3351 i386_dr_remove_watchpoint. All uses updated.
3352 (i386_low_region_ok_for_watchpoint): Renamed to
3353 i386_dr_region_ok_for_watchpoint. All uses updated.
3354 (i386_low_stopped_data_address): Renamed to
3355 i386_dr_stopped_data_address. All uses updated.
3356 (i386_low_stopped_by_watchpoint): Renamed to
3357 i386_dr_stopped_by_watchpoint. All uses updated.
3358
3359 2014-06-18 Gary Benson <gbenson@redhat.com>
3360
3361 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3362 (i386_dr_low_can_set_control): Likewise.
3363 (i386_insert_aligned_watchpoint): New check.
3364
3365 2014-06-18 Gary Benson <gbenson@redhat.com>
3366
3367 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3368 Renamed to state.
3369
3370 2014-06-18 Gary Benson <gbenson@redhat.com>
3371
3372 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3373 instead of fatal and error.
3374 (i386_handle_nonaligned_watchpoint): Likewise.
3375
3376 2014-06-18 Gary Benson <gbenson@redhat.com>
3377
3378 * i386-low.c (i386_get_debug_register_length): New macro.
3379 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3380 (i386_show_dr): Use debug_printf instead of fprintf. Use
3381 phex to format values.
3382
3383 2014-06-18 Gary Benson <gbenson@redhat.com>
3384
3385 * i386-low.h: Comment changes.
3386 * i386-low.c: Likewise.
3387
3388 2014-06-18 Gary Benson <gbenson@redhat.com>
3389
3390 * i386-low.c: Whitespace changes.
3391
3392 2014-06-12 Tom Tromey <tromey@redhat.com>
3393
3394 * utils.c (freeargv): Remove.
3395
3396 2014-06-12 Tom Tromey <tromey@redhat.com>
3397
3398 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3399 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3400 (parse_debug_format_options): Likewise.
3401 (gdbserver_usage): Likewise.
3402 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3403 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3404 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3405 against libiberty.
3406 ($(LIBGNU)): Depend on libiberty.
3407 (all-lib): Recurse into all subdirs.
3408 (install-only): Invoke "install" target in subdirs.
3409 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3410 targets.
3411 * configure: Rebuild.
3412 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3413 for vasprintf, vsnprintf, or gettimeofday.
3414 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3415 srv_tgtobj.
3416
3417 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3418
3419 * development.sh: Delete.
3420 * Makefile.in (config.status): Adjust dependency on development.sh.
3421 * configure.ac: Adjust development.sh source call.
3422 * configure: Regenerate.
3423
3424 2014-06-02 Pedro Alves <palves@redhat.com>
3425
3426 * ax.c (gdb_free_agent_expr): New function.
3427 * ax.h (gdb_free_agent_expr): New declaration.
3428 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3429 list.
3430 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3431 static.
3432 (clear_breakpoint_conditions_and_commands): New function.
3433 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3434 (clear_breakpoint_conditions_and_commands): New declaration.
3435
3436 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3437
3438 * linux-aarch64-low.c (asm/ptrace.h): Include.
3439
3440 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3441
3442 Fix TLS access for -static -pthread.
3443 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3444 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3445 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3446
3447 2014-05-20 Pedro Alves <palves@redhat.com>
3448
3449 * linux-aarch64-low.c (aarch64_insert_point)
3450 (aarch64_remove_point): No longer check whether the type is
3451 supported here. Adjust to new interface.
3452 (the_low_target): Install aarch64_supports_z_point_type as
3453 supports_z_point_type method.
3454 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3455 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3456 instead of a Z packet char. Adjust.
3457 (arm_supports_z_point_type): New function.
3458 (arm_insert_point, arm_remove_point): Adjust to new interface.
3459 (the_low_target): Install arm_supports_z_point_type.
3460 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3461 (cris_insert_point, cris_remove_point): Adjust to new interface.
3462 Don't check whether the type is supported here.
3463 (the_low_target): Install cris_supports_z_point_type.
3464 * linux-low.c (linux_supports_z_point_type): New function.
3465 (linux_insert_point, linux_remove_point): Adjust to new interface.
3466 * linux-low.h (struct linux_target_ops) <insert_point,
3467 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3468 raw_breakpoint pointer parameter.
3469 <supports_z_point_type>: New method.
3470 * linux-mips-low.c (mips_supports_z_point_type): New function.
3471 (mips_insert_point, mips_remove_point): Adjust to new interface.
3472 Use mips_supports_z_point_type.
3473 (the_low_target): Install mips_supports_z_point_type.
3474 * linux-ppc-low.c (the_low_target): Install NULL as
3475 supports_z_point_type method.
3476 * linux-s390-low.c (the_low_target): Install NULL as
3477 supports_z_point_type method.
3478 * linux-sparc-low.c (the_low_target): Install NULL as
3479 supports_z_point_type method.
3480 * linux-x86-low.c (x86_supports_z_point_type): New function.
3481 (x86_insert_point): Adjust to new insert_point interface. Use
3482 insert_memory_breakpoint. Adjust to new
3483 i386_low_insert_watchpoint interface.
3484 (x86_remove_point): Adjust to remove_point interface. Use
3485 remove_memory_breakpoint. Adjust to new
3486 i386_low_remove_watchpoint interface.
3487 (the_low_target): Install x86_supports_z_point_type.
3488 * lynx-low.c (lynx_target_ops): Install NULL as
3489 supports_z_point_type callback.
3490 * nto-low.c (nto_supports_z_point_type): New.
3491 (nto_insert_point, nto_remove_point): Adjust to new interface.
3492 (nto_target_ops): Install nto_supports_z_point_type.
3493 * mem-break.c: Adjust intro comment.
3494 (struct raw_breakpoint) <raw_type, size>: New fields.
3495 <inserted>: Update comment.
3496 <shlib_disabled>: Delete field.
3497 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3498 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3499 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3500 (raw_bkpt_type_to_target_hw_bp_type): New function.
3501 (find_enabled_raw_code_breakpoint_at): New function.
3502 (find_raw_breakpoint_at): New type and size parameters. Use them.
3503 (insert_memory_breakpoint): New function, based off
3504 set_raw_breakpoint_at.
3505 (remove_memory_breakpoint): New function.
3506 (set_raw_breakpoint_at): Reimplement.
3507 (set_breakpoint): New, based on set_breakpoint_at.
3508 (set_breakpoint_at): Reimplement.
3509 (delete_raw_breakpoint): Go through the_target->remove_point
3510 instead of assuming memory breakpoints.
3511 (find_gdb_breakpoint_at): Delete.
3512 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3513 (find_gdb_breakpoint): New function.
3514 (set_gdb_breakpoint_at): Delete.
3515 (z_type_supported): New function.
3516 (set_gdb_breakpoint_1): New function, loosely based off
3517 set_gdb_breakpoint_at.
3518 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3519 (delete_gdb_breakpoint_at): Delete.
3520 (delete_gdb_breakpoint_1): New function, loosely based off
3521 delete_gdb_breakpoint_at.
3522 (delete_gdb_breakpoint): New function.
3523 (clear_gdb_breakpoint_conditions): Rename to ...
3524 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3525 breakpoint.
3526 (add_condition_to_breakpoint): Make static.
3527 (add_breakpoint_condition): Take a struct breakpoint pointer
3528 instead of an address. Adjust.
3529 (gdb_condition_true_at_breakpoint): Rename to ...
3530 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3531 z_type parameter.
3532 (gdb_condition_true_at_breakpoint): Reimplement.
3533 (add_breakpoint_commands): Take a struct breakpoint pointer
3534 instead of an address. Adjust.
3535 (gdb_no_commands_at_breakpoint): Rename to ...
3536 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3537 parameter. Return true if no breakpoint was found. Change debug
3538 output.
3539 (gdb_no_commands_at_breakpoint): Reimplement.
3540 (run_breakpoint_commands): Rename to ...
3541 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3542 and change return type to boolean.
3543 (run_breakpoint_commands): New function.
3544 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3545 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3546 breakpoint. Go through the_target->remove_point instead of
3547 assuming memory breakpoint.
3548 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3549 software and hardware breakpoints.
3550 (reinsert_raw_breakpoint): Go through the_target->insert_point
3551 instead of assuming memory breakpoint.
3552 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3553 software and hardware breakpoints.
3554 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3555 Check both software and hardware breakpoints.
3556 (validate_inserted_breakpoint): Assert the breakpoint is a
3557 software breakpoint. Set the inserted flag to -1 instead of
3558 setting shlib_disabled.
3559 (delete_disabled_breakpoints): Adjust.
3560 (validate_breakpoints): Only validate software breakpoints.
3561 Adjust to inserted flag change.
3562 (check_mem_read, check_mem_write): Skip breakpoint types other
3563 than software breakpoints. Adjust to inserted flag change.
3564 * mem-break.h (enum raw_bkpt_type): New enum.
3565 (raw_breakpoint, struct process_info): Forward declare.
3566 (Z_packet_to_target_hw_bp_type): Delete declaration.
3567 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3568 (set_gdb_breakpoint, delete_gdb_breakpoint)
3569 (clear_breakpoint_conditions): New declarations.
3570 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3571 (breakpoint_inserted_here): Update comment.
3572 (add_breakpoint_condition, add_breakpoint_commands): Replace
3573 address parameter with a breakpoint pointer parameter.
3574 (gdb_breakpoint_here): Update comment.
3575 (delete_gdb_breakpoint_at): Delete.
3576 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3577 * server.c (process_point_options): Take a struct breakpoint
3578 pointer instead of an address. Adjust.
3579 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3580 delete_gdb_breakpoint.
3581 * spu-low.c (spu_target_ops): Install NULL as
3582 supports_z_point_type method.
3583 * target.h: Include mem-break.h.
3584 (struct target_ops) <prepare_to_access_memory>: Update comment.
3585 <supports_z_point_type>: New field.
3586 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3587 instead of a char. Also take a raw breakpoint pointer.
3588 * win32-arm-low.c (the_low_target): Install NULL as
3589 supports_z_point_type.
3590 * win32-i386-low.c (i386_supports_z_point_type): New function.
3591 (i386_insert_point, i386_remove_point): Adjust to new interface.
3592 (the_low_target): Install i386_supports_z_point_type.
3593 * win32-low.c (win32_supports_z_point_type): New function.
3594 (win32_insert_point, win32_remove_point): Adjust to new interface.
3595 (win32_target_ops): Install win32_supports_z_point_type.
3596 * win32-low.h (struct win32_target_ops):
3597 <supports_z_point_type>: New method.
3598 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3599 instead of a char. Also take a raw breakpoint pointer.
3600
3601 2014-05-20 Pedro Alves <palves@redhat.com>
3602
3603 * mem-break.h: Include break-common.h.
3604 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3605 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3606 (Z_packet_to_target_hw_bp_type): New declaration.
3607 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3608 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3609 (Z_PACKET_ACCESS_WP): Delete macros.
3610 (Z_packet_to_hw_type): Delete function.
3611 * i386-low.h: Don't include break-common.h here.
3612 (Z_packet_to_hw_type): Delete declaration.
3613 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3614 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3615 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3616 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3617 * linux-aarch64-low.c: Don't include break-common.h here.
3618 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3619 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3620 (Z_packet_to_target_hw_bp_type): Delete function.
3621 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3622 function.
3623 (mips_insert_point, mips_remove_point): Use
3624 Z_packet_to_target_hw_bp_type.
3625
3626 2014-05-20 Pedro Alves <palves@redhat.com>
3627
3628 * linux-aarch64-low.c: Include break-common.h.
3629 (enum target_point_type): Delete.
3630 (Z_packet_to_point_type): Rename to ...
3631 (Z_packet_to_target_hw_bp_type): ... this, and return a
3632 target_hw_bp_type instead.
3633 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3634 instead of an enum target_point_type.
3635 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3636 breakpoint type.
3637 (aarch64_dr_state_insert_one_point)
3638 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3639 (aarch64_handle_aligned_watchpoint)
3640 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3641 Take an enum target_hw_bp_type instead of an enum
3642 target_point_type.
3643 (aarch64_supports_z_point_type): New function.
3644 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3645 use Z_packet_to_target_hw_bp_type.
3646
3647 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3648
3649 * configure.ac: Only use -Werror by default when DEVELOPMENT
3650 is true.
3651 * configure: Regenerate.
3652
3653 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3654
3655 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3656 * linux-x86-low.c (X86_64_USER_REGS): New.
3657 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3658
3659 2014-04-28 Yao Qi <yao@codesourcery.com>
3660
3661 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3662 name.
3663
3664 2014-04-25 Pedro Alves <palves@redhat.com>
3665
3666 PR server/16255
3667 * linux-low.c (linux_attach_fail_reason_string): New function.
3668 (linux_attach_lwp): Delete.
3669 (linux_attach_lwp_1): Rename to ...
3670 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3671 argument. Remove "initial" parameter. Return int instead of
3672 void. Don't error or warn here.
3673 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3674 failure to attach to the tgid. Call warning when failing to
3675 attach to an lwp.
3676 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3677 argument. Remove "initial" parameter. Return int instead of
3678 void. Don't error or warn here.
3679 (linux_attach_fail_reason_string): New declaration.
3680 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3681 interface change. Use linux_attach_fail_reason_string.
3682
3683 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3684 Walfred Tedeschi <walfred.tedeschi@intel.com>
3685
3686 * Makefile.in: Added rules to handle new files
3687 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3688 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3689 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3690 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3691 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3692 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3693 x32-avx512-linux.o.
3694 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3695 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3696 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3697 i386/x32-avx512.xml.
3698 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3699 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3700 i386/x32-avx512-linux.xml.
3701 * i387-fp.c (num_avx512_k_registers): New constant for number
3702 of K registers.
3703 (num_avx512_zmmh_low_registers): New constant for number of
3704 lower ZMM registers (0-15).
3705 (num_avx512_zmmh_high_registers): New constant for number of
3706 higher ZMM registers (16-31).
3707 (num_avx512_ymmh_registers): New contant for number of higher
3708 YMM registers (ymm16-31 added by avx521 on x86_64).
3709 (num_avx512_xmm_registers): New constant for number of higher
3710 XMM registers (xmm16-31 added by AVX512 on x86_64).
3711 (struct i387_xsave): Add space for AVX512 registers.
3712 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3713 Add code to handle AVX512 registers.
3714 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3715 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3716 prototypei from generated file.
3717 (tdesc_amd64_avx512_linux): Likewise.
3718 (init_registers_x32_avx512_linux): Likewise.
3719 (tdesc_x32_avx512_linux): Likewise.
3720 (init_registers_i386_avx512_linux): Likewise.
3721 (tdesc_i386_avx512_linux): Likewise.
3722 (x86_64_regmap): Add AVX512 registers.
3723 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3724 mask.
3725 (initialize_low_arch): Add code to initialize AVX512 registers.
3726
3727 2014-04-23 Pedro Alves <palves@redhat.com>
3728
3729 * mem-break.c (find_gdb_breakpoint_at): Make static.
3730 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3731
3732 2014-04-23 Pedro Alves <palves@redhat.com>
3733
3734 * i386-low.c: Don't include break-common.h here.
3735 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3736 prototype to take target_hw_bp_type as argument instead of a Z
3737 packet char.
3738 * i386-low.h: Include break-common.h here.
3739 (Z_packet_to_hw_type): Declare.
3740 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3741 prototypes.
3742 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3743 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3744 (x86_remove_point): Convert the packet number to a
3745 target_hw_bp_type before calling i386_low_remove_watchpoint.
3746 * win32-i386-low.c (i386_insert_point): Convert the packet number
3747 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3748 (i386_remove_point): Convert the packet number to a
3749 target_hw_bp_type before calling i386_low_remove_watchpoint.
3750
3751 2014-04-23 Pedro Alves <palves@redhat.com>
3752
3753 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3754
3755 2014-04-10 Pedro Alves <palves@redhat.com>
3756
3757 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3758 Check if the condition or command is NULL before checking if the
3759 breakpoint is known. On success, return true.
3760 * mem-break.h (add_breakpoint_condition): Document return.
3761 (add_breakpoint_commands): Add describing comment.
3762 * server.c (skip_to_semicolon): New function.
3763 (process_point_options): Use it.
3764
3765 2014-04-09 Pedro Alves <palves@redhat.com>
3766
3767 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3768 to lwpid_of.
3769
3770 2014-02-27 Pedro Alves <palves@redhat.com>
3771
3772 PR 12702
3773 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3774 macros.
3775 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3776 output.
3777 (last_thread_of_process_p): Take a PID argument instead of a
3778 thread pointer.
3779 (linux_wait_for_lwp): Delete.
3780 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3781 functions.
3782 (linux_low_filter_event): New function, party factored out from
3783 linux_wait_for_event.
3784 (linux_wait_for_event): Rename to ...
3785 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3786 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3787 sigsuspend. Check for zombie leaders.
3788 (linux_wait_for_event): Reimplement as wrapper around
3789 linux_wait_for_event_filtered.
3790 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3791 a normal or signal exit is seen, it's the whole process exiting.
3792 (wait_for_sigstop): No longer a for_each_inferior callback.
3793 Rewrite on top of linux_wait_for_event_filtered.
3794 (stop_all_lwps): Call wait_for_sigstop directly.
3795 * server.c (resume, handle_target_event): Handle
3796 TARGET_WAITKIND_NO_RESUMED.
3797
3798 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3799
3800 * win32-low.c (psapi_get_dll_name,
3801 * win32_CreateToolhelp32Snapshot): Delete.
3802 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3803 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3804 Delete.
3805 (handle_load_dll): Add function description.
3806 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3807
3808 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3809
3810 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3811 Add comment.
3812 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3813 base address when calling win32_add_one_solib.
3814 (handle_load_dll): Delete local variable load_addr.
3815 Remove 0x1000 offset applied to DLL base address when calling
3816 win32_add_one_solib.
3817 (handle_unload_dll): Add comment.
3818
3819 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3820
3821 * win32-low.c (win32_add_all_dlls): Renames
3822 win32_ensure_ntdll_loaded. Rewrite function documentation.
3823 Adjust implementation to always load all DLLs.
3824 Add 0x1000 offset to DLL base address when calling
3825 win32_add_one_solib.
3826 (child_initialization_done): New static global.
3827 (do_initial_child_stuff): Set child_initialization_done to
3828 zero during child initialization, and 1 after. Replace call
3829 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3830 Add comment.
3831 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3832 (handle_unload_dll): Add function documentation.
3833 (get_child_debug_event): Ignore load and unload DLL events
3834 during child initialization.
3835
3836 2014-02-20 Doug Evans <dje@google.com>
3837
3838 Remove global all_lwps.
3839 * inferiors.h (ptid_of): Move here from linux-low.h.
3840 (pid_of, lwpid_of): Ditto.
3841 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3842 parameter is a struct thread_info * now.
3843 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3844 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3845 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3846 directly.
3847 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3848 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3849 * linux-arm-low.c (update_registers_callback): Update, "entry"
3850 parameter is a struct thread_info * now.
3851 Fetch lwpid from current_inferior directly.
3852 (arm_insert_point): Pass &all_threads to find_inferior instead of
3853 &all_lwps.
3854 (arm_remove_point): Ditto.
3855 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3856 (arm_prepare_to_resume): Fetch pid from thread.
3857 (arm_read_description): Fetch lwpid from current_inferior directly.
3858 * linux-low.c (all_lwps): Delete.
3859 (delete_lwp): Delete call to remove_inferior.
3860 (handle_extended_wait): Fetch lwpid from thread.
3861 (add_lwp): Don't set lwp->entry.id. Remove call to
3862 add_inferior_to_list.
3863 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3864 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3865 (kill_one_lwp_callback): Ditto.
3866 (linux_kill): Don't dereference NULL pointer.
3867 Fetch ptid,lwpid from thread.
3868 (get_detach_signal): Fetch ptid from thread.
3869 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3870 Simplify call to regcache_invalidate_thread.
3871 (delete_lwp_callback): Update, "entry" parameter is a
3872 struct thread_info * now. Fetch pid from thread.
3873 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3874 (status_pending_p_callback): Update, "entry" parameter is a
3875 struct thread_info * now. Fetch ptid from thread.
3876 (find_lwp_pid): Update, "entry" parameter is a
3877 struct thread_info * now.
3878 (linux_wait_for_lwp): Fetch pid from thread.
3879 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3880 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3881 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3882 (dequeue_one_deferred_signal): Ditto.
3883 (cancel_breakpoint): Fetch ptid from current_inferior.
3884 (linux_wait_for_event): Pass &all_threads to find_inferior,
3885 not &all_lwps. Fetch ptid, lwpid from thread.
3886 (count_events_callback): Update, "entry" parameter is a
3887 struct thread_info * now.
3888 (select_singlestep_lwp_callback): Ditto.
3889 (select_event_lwp_callback): Ditto.
3890 (cancel_breakpoints_callback): Ditto.
3891 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3892 not &all_lwps.
3893 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3894 (unsuspend_one_lwp): Update, "entry" parameter is a
3895 struct thread_info * now.
3896 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3897 not &all_lwps.
3898 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3899 Fetch lwpid from thread, not lwp.
3900 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3901 Pass &all_threads to find_inferior, not &all_lwps.
3902 (send_sigstop): Fetch lwpid from thread, not lwp.
3903 (send_sigstop_callback): Update, "entry" parameter is a
3904 struct thread_info * now.
3905 (suspend_and_send_sigstop_callback): Ditto.
3906 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3907 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3908 struct thread_info * now.
3909 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3910 from thread, lwp.
3911 (lwp_running): Update, "entry" parameter is a
3912 struct thread_info * now.
3913 (stop_all_lwps): Fetch ptid from thread.
3914 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3915 (linux_resume_one_lwp): Fetch lwpid from thread.
3916 (linux_set_resume_request): Update, "entry" parameter is a
3917 struct thread_info * now. Fetch pid, lwpid from thread.
3918 (resume_status_pending_p): Update, "entry" parameter is a
3919 struct thread_info * now.
3920 (need_step_over_p): Ditto. Fetch lwpid from thread.
3921 (start_step_over): Fetch lwpid from thread.
3922 (linux_resume_one_thread): Update, "entry" parameter is a
3923 struct thread_info * now. Fetch lwpid from thread.
3924 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3925 (proceed_one_lwp): Update, "entry" parameter is a
3926 struct thread_info * now. Fetch lwpid from thread.
3927 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3928 struct thread_info * now.
3929 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3930 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3931 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3932 directly.
3933 (regsets_store_inferior_registers): Ditto.
3934 (fetch_register, store_register): Ditto.
3935 (linux_read_memory, linux_write_memory): Ditto.
3936 (linux_request_interrupt): Ditto.
3937 (linux_read_auxv): Ditto.
3938 (linux_xfer_siginfo): Ditto.
3939 (linux_qxfer_spu): Ditto.
3940 (linux_qxfer_libraries_svr4): Ditto.
3941 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3942 moved to inferiors.h.
3943 (get_lwp): Delete.
3944 (get_thread_lwp): Update.
3945 (struct lwp_info): Delete member "entry". Simplify comment for
3946 member "thread".
3947 (all_lwps): Delete.
3948 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3949 current_inferior directly.
3950 (update_watch_registers_callback): Update, "entry" parameter is a
3951 struct thread_info * now. Fetch pid from thread.
3952 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3953 (mips_insert_point): Fetch lwpid from current_inferior.
3954 Pass &all_threads to find_inferior, not &all_lwps.
3955 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3956 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3957 directly.
3958 (mips_stopped_data_address): Ditto.
3959 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3960 directly.
3961 * linux-tile-low.c (tile_arch_setup): Ditto.
3962 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3963 (update_debug_registers_callback): Update, "entry" parameter is a
3964 struct thread_info * now. Fetch pid from thread.
3965 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3966 Pass &all_threads to find_inferior, not &all_lwps.
3967 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3968 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3969 Pass &all_threads to find_inferior, not &all_lwps.
3970 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3971 (i386_dr_low_get_status): Ditto.
3972 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3973 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3974 (x86_linux_read_description): Ditto.
3975 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3976
3977 2014-02-20 Doug Evans <dje@google.com>
3978
3979 * inferiors.c (get_first_inferior): Fix buglet.
3980
3981 2014-02-19 Doug Evans <dje@google.com>
3982
3983 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3984 * inferiors.c (add_thread): Change result type to struct thread_info *.
3985 All callers updated.
3986 (add_lwp): Call add_thread here instead of in callers.
3987 All callers updated.
3988 * linux-low.h (get_lwp_thread): Rewrite.
3989 (struct lwp_info): New member "thread".
3990
3991 2014-02-19 Doug Evans <dje@google.com>
3992
3993 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3994 All callers updated.
3995
3996 2014-02-19 Doug Evans <dje@google.com>
3997
3998 * inferiors.c (add_thread): Fix whitespace.
3999
4000 2014-02-19 Doug Evans <dje@google.com>
4001
4002 * dll.c (clear_dlls): Replace accessing list implemention details
4003 with API function.
4004 * gdbthread.h (get_first_thread): Declare.
4005 * inferiors.c (for_each_inferior_with_data): New function.
4006 (get_first_thread): New function.
4007 (find_thread_ptid): Simplify.
4008 (get_first_inferior): New function.
4009 (clear_list): Delete.
4010 (one_inferior_p): New function.
4011 (clear_inferior_list): New function.
4012 (clear_inferiors): Update.
4013 * inferiors.h (for_each_inferior_with_data): Declare.
4014 (clear_inferior_list): Declare.
4015 (one_inferior_p): Declare.
4016 (get_first_inferior): Declare.
4017 * linux-low.c (linux_wait_for_event): Replace accessing list
4018 implemention details with API function.
4019 * server.c (target_running): Ditto.
4020 (accumulate_file_name_length): New function.
4021 (emit_dll_description): New function.
4022 (handle_qxfer_libraries): Replace accessing list implemention
4023 details with API function.
4024 (handle_qxfer_threads_worker): New function.
4025 (handle_qxfer_threads_proper): Replace accessing list implemention
4026 details with API function.
4027 (handle_query): Ditto.
4028 (visit_actioned_threads_callback_ftype): New typedef.
4029 (visit_actioned_threads_data): New struct.
4030 (visit_actioned_threads): Rewrite to be find_inferior callback.
4031 (resume): Call find_inferior.
4032 (handle_status): Replace accessing list implemention
4033 details with API function.
4034 (process_serial_event): Replace accessing list implemention details
4035 with API function.
4036 * target.c (set_desired_inferior): Replace accessing list implemention
4037 details with API function.
4038 * tracepoint.c (same_process_p): New function.
4039 (gdb_agent_about_to_close): Replace accessing list implemention
4040 details with API function.
4041 * win32-low.c (child_delete_thread): Replace accessing list
4042 implemention details with API function.
4043 (match_dll_by_basename): New function.
4044 (dll_is_loaded_by_basename): New function.
4045 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4046 details call to dll_is_loaded_by_basename.
4047
4048 2014-02-19 Doug Evans <dje@google.com>
4049
4050 * dll.h (struct dll_info): Add comment.
4051 * gdbthread.h (struct thread_info): Add comment.
4052 (current_ptid): Simplify.
4053 * inferiors.c (add_process): Update.
4054 (remove_process): Update.
4055 * inferiors.h (struct process_info): Rename member "head" to "entry".
4056 * linux-low.c (delete_lwp): Update.
4057 (add_lwp): Update.
4058 (last_thread_of_process_p): Update.
4059 (kill_one_lwp_callback, linux_kill): Update.
4060 (status_pending_p_callback): Update.
4061 (wait_for_sigstop): Update. Simplify read of ptid.
4062 (start_step_over): Update.
4063 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4064 (get_lwp_thread): Update.
4065 (struct lwp_info): Rename member "head" to "entry".
4066 * regcache.h (inferior_list_entry): Delete.
4067 * server.c (kill_inferior_callback): Update.
4068 (detach_or_kill_inferior_callback): Update.
4069 (print_started_pid): Update.
4070 (print_attached_pid): Update.
4071 (process_serial_event): Simplify read of ptid.
4072 * thread-db.c (thread_db_create_event): Update.
4073 (thread_db_get_tls_address): Update.
4074 * win32-low.c (current_inferior_ptid): Simplify.
4075
4076 2014-02-19 Tom Tromey <tromey@redhat.com>
4077
4078 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4079 argument.
4080 (target_supports_btrace): Update.
4081
4082 2014-02-14 Yao Qi <yao@codesourcery.com>
4083
4084 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4085 (rsp-low-ipa.o): New target.
4086
4087 2014-02-12 Tom Tromey <tromey@redhat.com>
4088
4089 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4090 convert_ascii_to_int.
4091 * regcache.c (registers_to_string): Likewise.
4092 * remote-utils.c (decode_M_packet): Likewise.
4093 * server.c (process_serial_event): Likewise.
4094
4095 2014-02-12 Tom Tromey <tromey@redhat.com>
4096
4097 * server.c (handle_query, handle_v_run): Use hex2bin, not
4098 unhexify.
4099 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4100
4101 2014-02-12 Tom Tromey <tromey@redhat.com>
4102
4103 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4104 convert_int_to_ascii.
4105 * regcache.c (registers_to_string, collect_register_as_string):
4106 Likewise.
4107 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4108 Likewise.
4109 * server.c (process_serial_event): Likewise.
4110 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4111 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4112
4113 2014-02-12 Tom Tromey <tromey@redhat.com>
4114
4115 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4116 bin2hex, not hexify.
4117 * tracepoint.c (cmd_qtstatus): Likewise.
4118
4119 2014-02-12 Tom Tromey <tromey@redhat.com>
4120
4121 * remote-utils.c (monitor_output): Pass explicit length to
4122 hexify.
4123
4124 2014-02-12 Tom Tromey <tromey@redhat.com>
4125
4126 * tracepoint.c: Include rsp-low.h.
4127 * server.c: Include rsp-low.h.
4128 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4129 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4130 declare.
4131 * remote-utils.c: Include rsp-low.h.
4132 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4133 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4134 (convert_int_to_ascii, convert_ascii_to_int): Move to
4135 common/rsp-low.c.
4136 * regcache.c: Include rsp-low.h.
4137 * ax.c: Include rsp-low.h.
4138 * Makefile.in (SFILES): Add common/rsp-low.c.
4139 (OBS): Add rsp-low.o.
4140 (rsp-low.o): New target.
4141
4142 2014-02-12 Tom Tromey <tromey@redhat.com>
4143
4144 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4145 Include print-utils.h.
4146 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4147 (plongest, thirty_two, phex_nz): Remove.
4148 * Makefile.in (SFILES): Add common/print-utils.c.
4149 (OBS): Add print-utils.o.
4150 (print-utils-ipa.o): New target.
4151 (print-utils.o): New target.
4152 (IPA_OBJS): Add print-utils-ipa.o.
4153
4154 2014-02-06 Tom Tromey <tromey@redhat.com>
4155
4156 * Makefile.in (SFILES): Fix indentation.
4157
4158 2014-02-05 Doug Evans <dje@google.com>
4159
4160 * linux-low.c (linux_wait_for_event): Improve comment.
4161 (linux_wait_1): Keep current_inferior in sync with event_child.
4162
4163 2014-01-22 Doug Evans <dje@google.com>
4164
4165 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4166
4167 2014-01-22 Doug Evans <dje@google.com>
4168
4169 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4170 * configure: Regenerate.
4171 * config.in: Regenerate.
4172 * Makefile.in (SFILES): Add debug.c.
4173 (OBS): Add debug.o.
4174 * debug.c: New file.
4175 * debug.h: New file.
4176 * linux-aarch64-low.c (*): Update all debugging printfs to use
4177 debug_printf instead of fprintf.
4178 * linux-arm-low.c (*): Ditto.
4179 * linux-cris-low.c (*): Ditto.
4180 * linux-crisv32-low.c (*): Ditto.
4181 * linux-m32r-low.c (*): Ditto.
4182 * linux-sparc-low.c (*): Ditto.
4183 * linux-x86.c (*): Ditto.
4184 * linux-low.c (*): Ditto.
4185 (linux_wait_1): Add calls to debug_enter, debug_exit.
4186 (linux_wait): Remove redundant debugging printf.
4187 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4188 (linux_resume, unstop_all_lwps): Ditto.
4189 * mem-break.c (*): Update all debugging printfs to use
4190 debug_printf instead of fprintf.
4191 * remote-utils.c (*): Ditto.
4192 * thread-db.c (*): Ditto.
4193 * server.c #include <ctype.h>, "gdb_vecs.h".
4194 (debug_threads): Moved to debug.c.
4195 (*): Update all debugging printfs to use debug_printf instead of
4196 fprintf.
4197 (start_inferior): Replace call to fflush with call to debug_flush.
4198 (monitor_show_help): Mention set debug-format.
4199 (parse_debug_format_options): New function.
4200 (handle_monitor_command): Handle "monitor set debug-format".
4201 (gdbserver_usage): Mention --debug-format.
4202 (main): Parse --debug-format.
4203 * server.h (debug_threads): Declaration moved to debug.h.
4204 #include "debug.h".
4205 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4206 trace_debug_1 that uses debug_printf.
4207 (tracepoint_look_up_symbols): Update all debugging printfs to use
4208 debug_printf instead of fprintf.
4209
4210 2014-01-20 Baruch Siach <baruch@tkos.co.il>
4211
4212 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4213 sys/ptrace.h.
4214
4215 2014-01-17 Pedro Alves <palves@redhat.com>
4216
4217 PR build/16445
4218 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4219 defined after including gdb_proc_service.h.
4220
4221 2014-01-16 Doug Evans <dje@google.com>
4222
4223 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4224 (match_dll): Use it.
4225
4226 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4227
4228 * target.h (target_ops) <read_btrace>: Change parameters and
4229 return type to allow error reporting.
4230 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4231 trace reading errors on.
4232 * linux-low.c (linux_low_read_btrace): Pass trace reading
4233 errors on.
4234 (linux_low_disable_btrace): New.
4235
4236 2014-01-15 Doug Evans <dje@google.com>
4237
4238 * inferiors.c (thread_id_to_gdb_id): Delete.
4239 * inferiors.h (thread_id_to_gdb_id): Delete.
4240
4241 2014-01-13 Eli Zaretskii <eliz@gnu.org>
4242
4243 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4244 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4245 versions.
4246
4247 2014-01-08 Pedro Alves <palves@redhat.com>
4248
4249 * server.c (handle_status): Don't discard previous queued stop
4250 replies or thread's pending status here.
4251 (main) <disconnection>: Do it here instead.
4252
4253 2014-01-08 Pedro Alves <palves@redhat.com>
4254
4255 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4256 * server.c (visit_actioned_threads, handle_pending_status): New
4257 function.
4258 (handle_v_cont): Factor out parts to ...
4259 (resume): ... this new function. If in all-stop, and a thread
4260 being resumed has a pending status, report it without actually
4261 resuming.
4262 (myresume): Adjust to use the new 'resume' function.
4263 (clear_pending_status_callback, set_pending_status_callback)
4264 (find_status_pending_thread_callback): New functions.
4265 (handle_status): Handle the case of multiple threads having
4266 interesting statuses to report. Report threads' real last signal
4267 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4268 with an interesting thread to report the status for, instead of
4269 always reporting the status of the first thread.
4270
4271 2014-01-01 Joel Brobecker <brobecker@adacore.com>
4272
4273 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4274 * gdbreplay.c (gdbreplay_version): Likewise.
4275
4276 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4277
4278 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4279 iov.iov_len with the real length in use.
4280
4281 2013-12-13 Joel Brobecker <brobecker@adacore.com>
4282
4283 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4284 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4285 for all targets that use win32-low.c.
4286 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4287 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4288
4289 2013-12-13 Pedro Alves <palves@redhat.com>
4290
4291 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4292 if equal to TARGET_WAITKIND_LOADED.
4293 * win32-low.c (cached_status): New static global.
4294 (win32_wait): Add declaration.
4295 (do_initial_child_stuff): Flush all initial pending debug events
4296 up to the initial breakpoint.
4297 (win32_wait): If CACHED_STATUS was set, return that instead
4298 of doing a real wait. Remove the code resuming the execution
4299 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4300 during the initial phase. Also remove the code changing
4301 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4302 TARGET_WAITKIND_STOPPED.
4303
4304 2013-12-11 Yao Qi <yao@codesourcery.com>
4305
4306 * notif.c (handle_notif_ack): Return 0 if no notification
4307 matches.
4308
4309 2013-11-20 Doug Evans <dje@google.com>
4310
4311 * linux-low.c (linux_set_resume_request): Fix comment.
4312
4313 2013-11-20 Doug Evans <dje@google.com>
4314
4315 * linux-low.c (resume_status_pending_p): Tweak comment.
4316
4317 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4318
4319 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4320 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4321 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4322 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4323 (srv_amd64_regobj): Add amd64-mpx.o.
4324 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4325 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4326 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4327 * i387-fp.c (num_pl_bnd_register) Added constant.
4328 (num_pl_bnd_cfg_registers) Added constant.
4329 (struct i387_xsave) Added reserved area and MPX fields.
4330 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4331 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4332 function.
4333 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4334 (init_registers_amd64_mpx_linux): Declare new function.
4335 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4336 (x86_64_regmap): Add MPX registers.
4337 (x86_linux_read_description): Add MPX case.
4338 (initialize_low_arch): Initialize MPX targets.
4339
4340 2013-11-18 Tom Tromey <tromey@redhat.com>
4341
4342 * configure: Rebuild.
4343 * configure.ac: Don't check for stdlib.h.
4344 * gdbreplay.c: Unconditionally include stdlib.h.
4345
4346 2013-11-18 Tom Tromey <tromey@redhat.com>
4347
4348 * config.in: Rebuild.
4349 * configure: Rebuild.
4350 * configure.ac: Don't use AC_HEADER_DIRENT.
4351
4352 2013-11-18 Tom Tromey <tromey@redhat.com>
4353
4354 * server.h: Don't check HAVE_STRING_H.
4355 * gdbreplay.c: Don't check HAVE_STRING_H.
4356 * configure: Rebuild.
4357
4358 2013-11-18 Tom Tromey <tromey@redhat.com>
4359
4360 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4361 LIBGNU.
4362
4363 2013-11-08 Tom Tromey <tromey@redhat.com>
4364
4365 * configure, config.in: Rebuild.
4366 * configure.ac: Remove unused configury.
4367
4368 2013-11-08 Tom Tromey <tromey@redhat.com>
4369
4370 * acinclude.m4: Include common.m4, codeset.m4.
4371 * configure, config.in: Rebuild.
4372 * configure.ac: Use GDB_AC_COMMON.
4373
4374 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4375
4376 * linux-s390-low.c (HWCAP_S390_TE): New define.
4377 (s390_arch_setup): Consider the TE field in the HWCAP for
4378 determining 'have_regset_tdb'.
4379
4380 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4381
4382 PR gdb/16014
4383 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4384 call to sizeof.
4385
4386 2013-10-02 Pedro Alves <palves@redhat.com>
4387
4388 * server.c (process_serial_event): Don't output "GDBserver
4389 exiting" if GDB is connected through stdio.
4390 * target.c (mywait): Likewise, be silent if GDB is connected
4391 through stdio.
4392
4393 2013-10-01 Joel Brobecker <brobecker@adacore.com>
4394
4395 * lynx-low.c (lynx_add_threads_after_attach): New function.
4396 (lynx_attach): Remove call to add_thread. Add call to
4397 lynx_add_threads_after_attach instead.
4398
4399 2013-09-28 Mike Frysinger <vapier@gentoo.org>
4400
4401 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4402 * config.in, configure: Regenerated.
4403
4404 2013-09-18 Yao Qi <yao@codesourcery.com>
4405
4406 PR server/15959
4407 * server.c (start_inferior): Clear 'resume_info'.
4408
4409 2013-09-16 Jiong Wang <jiwang@tilera.com>
4410
4411 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4412 for each register.
4413
4414 2013-09-16 Jiong Wang <jiwang@tilera.com>
4415
4416 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4417 linux-tile-low.o to srv_tgtobj.
4418
4419 2013-09-16 Will Newton <will.newton@linaro.org>
4420
4421 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4422 out regs.
4423
4424 2013-09-06 Pedro Alves <palves@redhat.com>
4425
4426 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4427 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4428 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4429 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4430 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4431 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4432
4433 2013-09-06 Pedro Alves <palves@redhat.com>
4434
4435 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4436 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4437
4438 2013-09-06 Pedro Alves <palves@redhat.com>
4439
4440 * linux-amd64-ipa.c: Include tracepoint.h.
4441 * linux-i386-ipa.c: Include tracepoint.h.
4442
4443 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4444
4445 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4446 (ps_get_thread_area): New function.
4447
4448 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4449
4450 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4451 (initialize_low_arch): Call init_registers_crisv32 rather than
4452 init_register_crisv32.
4453
4454 2013-09-05 Pedro Alves <palves@redhat.com>
4455
4456 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4457 to ...
4458 * hostio.h: ... this new file.
4459 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4460 win32-low.c: Include hostio.h.
4461
4462 2013-09-05 Pedro Alves <palves@redhat.com>
4463
4464 * server.h (gdb_client_data, handler_func, callback_handler_func)
4465 (delete_file_handler, add_file_handler, append_callback_event)
4466 (delete_callback_event, start_event_loop, initialize_event_loop):
4467 Move to event-loop.h and include it.
4468 * event-loop.h: New file.
4469
4470 2013-09-05 Pedro Alves <palves@redhat.com>
4471
4472 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4473 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4474 (loaded_dll, unloaded_dll): Move to ...
4475 * dll.h: ... this new file.
4476 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4477
4478 2013-09-05 Pedro Alves <palves@redhat.com>
4479
4480 * server.h (current_process, get_thread_process, all_processes)
4481 (add_inferior_to_list, for_each_inferior, current_inferior)
4482 (remove_inferior, add_process, remove_process, find_process_pid)
4483 (have_started_inferiors_p, have_attached_inferiors_p)
4484 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4485 (clear_inferiors, find_inferior, find_inferior_id)
4486 (inferior_target_data, set_inferior_target_data)
4487 (inferior_regcache_data, set_inferior_regcache_data): Move to
4488 inferiors.h, and include it.
4489 * inferiors.h: New file.
4490
4491 2013-09-05 Pedro Alves <palves@redhat.com>
4492
4493 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4494 Move ...
4495 * ax.h: ... here.
4496
4497 2013-09-05 Pedro Alves <palves@redhat.com>
4498
4499 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4500 tracepoint.h.
4501 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4502 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4503 (handle_tracepoint_general_set, handle_tracepoint_query)
4504 (tracepoint_finished_step, tracepoint_was_hit)
4505 (release_while_stepping_state_list, current_traceframe)
4506 (in_readonly_region, traceframe_read_mem)
4507 (fetch_traceframe_registers, traceframe_read_sdata)
4508 (traceframe_read_info, struct fast_tpoint_collect_status)
4509 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4510 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4511 (supply_fast_tracepoint_registers)
4512 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4513 (ipa_tdesc, claim_trampoline_space)
4514 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4515 (agent_mem_read, agent_get_trace_state_variable_value)
4516 (agent_set_trace_state_variable_value, agent_tsv_read)
4517 (agent_mem_read_string, get_raw_reg_func_addr)
4518 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4519 * tracepoint.h: ... this new file.
4520
4521 2013-09-05 Pedro Alves <palves@redhat.com>
4522
4523 * server.h (perror_with_name, error, fatal, warning, paddress)
4524 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4525 include it.
4526 * utils.h: New file.
4527
4528 2013-09-05 Pedro Alves <palves@redhat.com>
4529
4530 * server.h (remote_debug, noack_mode, transport_is_reliable)
4531 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4532 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4533 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4534 (write_enn, initialize_async_io, enable_async_io)
4535 (disable_async_io, check_remote_input_interrupt_request)
4536 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4537 (dead_thread_notify, prepare_resume_reply)
4538 (decode_address_to_semicolon, decode_address, decode_m_packet)
4539 (decode_M_packet, decode_X_packet, decode_xfer_write)
4540 (decode_search_memory_packet, unhexify, hexify)
4541 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4542 (look_up_one_symbol, relocate_instruction)
4543 (monitor_output): Move to remote-utils.h, and include it.
4544 * remote-utils.h: New file.
4545
4546 2013-09-05 Pedro Alves <palves@redhat.com>
4547
4548 * server.h (_): Delete.
4549
4550 2013-09-02 Pedro Alves <palves@redhat.com>
4551
4552 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4553 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4554 allocated.
4555 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4556
4557 2013-09-02 Pierre Muller <muller@sourceware.org>
4558
4559 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4560 or WriteProcessMemory complete successfully and handle
4561 ERROR_PARTIAL_COPY error.
4562
4563 2013-09-02 Pedro Alves <palves@redhat.com>
4564
4565 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4566 error instead of EIO.
4567
4568 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4569
4570 PR server/15604
4571 * linux-low.c: Include filestuff.h.
4572 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4573 * lynx-low.c: Include filestuff.h.
4574 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4575 * server.c: Include filestuff.h.
4576 (main): Call notice_open_fds.
4577 * spu-low.c: Include filestuff.h.
4578 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4579
4580 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4581
4582 * Makefile.in: Explain why ../target and ../nat are not
4583 listed as include file search paths.
4584 (linux-waitpid.o): New object file rule.
4585 * configure.srv (srv_native_linux_obj): New variable.
4586 Replace all occurrences of linux native object files with
4587 $srv_native_linux_obj.
4588 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4589 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4590 (linux_enable_event_reporting): Remove declaration.
4591 (my_waitpid): Moved to common/linux-waitpid.c.
4592 (linux_wait_for_event): Pass ptid when calling
4593 linux_enable_event_reporting.
4594 (linux_supports_tracefork_flag): Remove.
4595 (linux_enable_event_reporting): Likewise.
4596 (linux_tracefork_grandchild): Remove.
4597 (STACK_SIZE): Moved to common/linux-ptrace.c.
4598 (linux_tracefork_child): Remove.
4599 (linux_test_for_tracefork): Remove.
4600 (linux_look_up_symbols): Call linux_supports_traceclone.
4601 (initialize_low): Remove call to linux_test_for_tracefork.
4602 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4603 common/linux-ptrace.h.
4604 (PTRACE_TYPE_ARG4): Likewise.
4605 Include linux-ptrace.h.
4606
4607 2013-08-21 Pedro Alves <palves@redhat.com>
4608
4609 * config.in: Renegerate.
4610
4611 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4612
4613 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4614 (SFILES): Remove $(srcdir)/common/target-common.c and
4615 add $(srcdir)/target/waitstatus.c.
4616 (OBS): Remove target-common.o and add waitstatus.o.
4617 (server_h): Remove $(srcdir)/../common/target-common.h and
4618 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4619 and $(srcdir)/../target/waitstatus.h.
4620 (target-common.o): Remove.
4621 (waitstatus.o): New target object file.
4622 * target.h: Do not include target-common.h and
4623 include target/resume.h, target/wait.h and
4624 target/waitstatus.h.
4625
4626 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4627
4628 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4629 to PTRACE_TYPE_ARG3.
4630 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4631 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4632 PTRACE_TYPE_ARG4.
4633 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4634 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4635
4636 2013-07-27 Jie Zhang <jie@codesourcery.com>
4637 Daniel Jacobowitz <dan@codesourcery.com>
4638 Yao Qi <yao@codesourcery.com>
4639
4640 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4641 (mips-linux-watch.o): New rule.
4642 (mips_linux_watch_h): New variable.
4643 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4644 srv_tgtobj.
4645 * linux-mips-low.c: Include mips-linux-watch.h.
4646 (struct arch_process_info, struct arch_lwp_info): New.
4647 (update_watch_registers_callback): New function.
4648 (mips_linux_new_process, mips_linux_new_thread) New functions.
4649 (mips_linux_prepare_to_resume, mips_insert_point): New
4650 functions.
4651 (mips_remove_point, mips_stopped_by_watchpoint): New
4652 functions.
4653 (rsp_bp_type_to_target_hw_bp_type): New function.
4654 (mips_stopped_data_address): New function.
4655 (the_low_target): Add watchpoint support functions.
4656
4657 2013-07-27 Yao Qi <yao@codesourcery.com>
4658
4659 * i386-low.c: Include break-common.h.
4660 (enum target_hw_bp_type): Remove.
4661
4662 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4663
4664 * Makefile.in (SFILES): /common/target-common.c.
4665 (OBS): Add target-common.o.
4666 (server_h): Add $(srcdir)/../common/target-common.h.
4667 (target-common.o): New target.
4668 * server.c (queue_stop_reply_callback): Free
4669 status string after use.
4670 * target.c (target_waitstatus_to_string): Remove.
4671 * target.h: Include target-common.h.
4672 (resume_kind): Likewise.
4673 (target_waitkind): Likewise.
4674 (target_waitstatus): Likewise.
4675 (TARGET_WNOHANG): Likewise.
4676
4677 2013-07-04 Yao Qi <yao@codesourcery.com>
4678
4679 * Makefile.in (host_alias): Use @host_noncanonical@.
4680 (target_alias): Use @target_noncanonical@.
4681 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4682 ACX_NONCANONICAL_HOST.
4683 * configure: Regenerated.
4684
4685 Revert:
4686 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4687
4688 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4689 * configure: Rebuild.
4690 * Makefile.in (version_host, version_target): Get from configure.
4691 (version.c): Use $(version_host) and $(version_target).
4692
4693 2013-07-03 Pedro Alves <palves@redhat.com>
4694
4695 * Makefile.in (config.status): Depend on development.sh.
4696 * acinclude.m4: Include libmcheck.m4.
4697 * configure: Regenerate.
4698
4699 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4700
4701 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4702 attribute inside the parentheses.
4703 (winapi_DebugSetProcessKillOnExit): Ditto.
4704 (winapi_DebugBreakProcess): Ditto.
4705 (winapi_GenerateConsoleCtrlEvent): Ditto.
4706
4707 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4708
4709 * notif.h (notif_event): Add a dummy member to avoid compiler
4710 errors.
4711
4712 2013-07-01 Pedro Alves <palves@redhat.com>
4713
4714 * hostio.c (HOSTIO_PATH_MAX): Define.
4715 (require_filename, handle_open, handle_unlink, handle_readlink):
4716 Use it.
4717
4718 2013-07-01 Pedro Alves <palves@redhat.com>
4719
4720 * server.h: Include "pathmax.h".
4721 * linux-low.c: Don't include sys/param.h.
4722 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4723 MAXPATHLEN.
4724 * win32-low.c: Don't include sys/param.h.
4725 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4726
4727 2013-07-01 Pedro Alves <palves@redhat.com>
4728
4729 * event-loop.c: Don't check HAVE_UNISTD_H before including
4730 <unistd.h>.
4731 * gdbreplay.c: Likewise.
4732 * remote-utils.c: Likewise.
4733 * server.c: Likewise.
4734 * configure.ac: Don't check for unistd.h.
4735 * configure: Regenerate.
4736
4737 2013-06-28 Tom Tromey <tromey@redhat.com>
4738
4739 * Makefile.in (version.c): Use version.in, not
4740 common/version.in.
4741
4742 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4743
4744 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4745 * configure: Rebuild.
4746 * Makefile.in (version_host, version_target): Get from configure.
4747 (version.c): Use $(version_host) and $(version_target).
4748
4749 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4750
4751 Fix trace-status to output user name without trailing colon.
4752 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4753
4754 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4755
4756 Fix trace-status to output proper start-time and stop-time.
4757 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4758 output start time and stop time in hex as gdb expects.
4759
4760 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4761
4762 * tracepoint.c (build_traceframe_info_xml): Output trace state
4763 variables present in the trace buffer.
4764
4765 2013-06-24 Tom Tromey <tromey@redhat.com>
4766
4767 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4768 create-version.sh.
4769 (version.o): Remove.
4770 * gdbreplay.c: Include version.h.
4771 (version, host_name): Don't declare.
4772 * server.h: Include version.h.
4773 (version, host_name): Don't declare.
4774
4775 2013-06-12 Pedro Alves <palves@redhat.com>
4776
4777 * linux-x86-low.c (linux_is_elf64): Delete global.
4778 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4779 with local linux_pid_exe_is_elf_64_file use.
4780
4781 2013-06-11 Pedro Alves <palves@redhat.com>
4782
4783 * linux-low.c (regset_disabled, disable_regset): New functions.
4784 (regsets_fetch_inferior_registers)
4785 (regsets_store_inferior_registers): Use them.
4786 (initialize_regsets_info); Don't allocate the disabled_regsets
4787 array here.
4788 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4789 comment.
4790
4791 2013-06-11 Pedro Alves <palves@redhat.com>
4792
4793 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4794 xmalloc.
4795
4796 2013-06-11 Pedro Alves <palves@redhat.com>
4797
4798 * linux-x86-low.c (initialize_low_arch): Call
4799 init_registers_x32_avx_linux.
4800
4801 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4802
4803 Fix compatibility with Android Bionic.
4804 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4805 it is not empty.
4806
4807 2013-06-07 Pedro Alves <palves@redhat.com>
4808
4809 PR server/14823
4810 * Makefile.in (OBS): Add tdesc.o.
4811 (IPA_OBJS): Add tdesc-ipa.o.
4812 (tdesc-ipa.o): New rule.
4813 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4814 interface.
4815 * linux-low.c (new_inferior): Delete.
4816 (disabled_regsets, num_regsets): Delete.
4817 (linux_add_process): Adjust to set the new per-process
4818 new_inferior flag.
4819 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4820 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4821 was a stop. When calling arch_setup, switch the current inferior
4822 to the thread that got an event.
4823 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4824 (regsets_fetch_inferior_registers)
4825 (regsets_store_inferior_registers): New regsets_info parameter.
4826 Adjust to use it.
4827 (linux_register_in_regsets): New regs_info parameter. Adjust to
4828 use it.
4829 (register_addr, fetch_register, store_register): New usrregs_info
4830 parameter. Adjust to use it.
4831 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4832 parameter regs_info. Adjust to use it.
4833 (linux_fetch_registers): Get the current inferior's regs_info, and
4834 adjust to use it.
4835 (linux_store_registers): Ditto.
4836 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4837 (initialize_low): Don't initialize the target_regsets here. Call
4838 initialize_low_arch.
4839 * linux-low.h (target_regsets): Delete declaration.
4840 (struct regsets_info): New.
4841 (struct usrregs_info): New.
4842 (struct regs_info): New.
4843 (struct process_info_private) <new_inferior>: New field.
4844 (struct linux_target_ops): Delete the num_regs, regmap, and
4845 regset_bitmap fields. New field regs_info.
4846 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4847 * i387-fp.c (num_xmm_registers): Delete.
4848 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4849 calls to new interface.
4850 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4851 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4852 Infer the number of xmm registers from the regcache's target
4853 description.
4854 * i387-fp.h (num_xmm_registers): Delete.
4855 * inferiors.c (add_thread): Don't install the thread's regcache
4856 here.
4857 * proc-service.c (gregset_info): Fetch the current inferior's
4858 regs_info. Adjust to use it.
4859 * regcache.c: Include tdesc.h.
4860 (register_bytes, reg_defs, num_registers)
4861 (gdbserver_expedite_regs): Delete.
4862 (get_thread_regcache): If the thread doesn't have a regcache yet,
4863 create one, instead of aborting gdbserver.
4864 (regcache_invalidate_one): Rename to ...
4865 (regcache_invalidate_thread): ... this.
4866 (regcache_invalidate_one): New.
4867 (regcache_invalidate): Only invalidate registers of the current
4868 process.
4869 (init_register_cache): Add target_desc parameter, and use it.
4870 (new_register_cache): Ditto. Assert the target description has a
4871 non zero registers_size.
4872 (regcache_cpy): Add assertions. Adjust.
4873 (realloc_register_cache, set_register_cache): Delete.
4874 (registers_to_string, registers_from_string): Adjust.
4875 (find_register_by_name, find_regno, find_register_by_number)
4876 (register_cache_size): Add target_desc parameter, and use it.
4877 (free_register_cache_thread, free_register_cache_thread_one)
4878 (regcache_release, register_cache_size): New.
4879 (register_size): Add target_desc parameter, and use it.
4880 (register_data, supply_register, supply_register_zeroed)
4881 (supply_regblock, supply_register_by_name, collect_register)
4882 (collect_register_as_string, collect_register_by_name): Adjust.
4883 * regcache.h (struct target_desc): Forward declare.
4884 (struct regcache) <tdesc>: New field.
4885 (init_register_cache, new_register_cache): Add target_desc
4886 parameter.
4887 (regcache_invalidate_thread): Declare.
4888 (regcache_invalidate_one): Delete declaration.
4889 (regcache_release): Declare.
4890 (find_register_by_number, register_cache_size, register_size)
4891 (find_regno): Add target_desc parameter.
4892 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4893 declarations.
4894 * remote-utils.c: Include tdesc.h.
4895 (outreg, prepare_resume_reply): Adjust.
4896 * server.c: Include tdesc.h.
4897 (gdbserver_xmltarget): Delete declaration.
4898 (get_features_xml, process_serial_event): Adjust.
4899 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4900 declare.
4901 (struct process_info) <tdesc>: New field.
4902 (ipa_tdesc): Declare.
4903 * tdesc.c: New file.
4904 * tdesc.h: New file.
4905 * tracepoint.c: Include tdesc.h.
4906 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4907 (get_context_regcache): Adjust to pass ipa_tdesc down.
4908 (do_action_at_tracepoint): Adjust to get the register cache size
4909 from the context regcache's description.
4910 (traceframe_walk_blocks): Adjust to get the register cache size
4911 from the current trace frame's description.
4912 (traceframe_get_pc): Adjust to get current trace frame's
4913 description and pass it down.
4914 (gdb_collect): Adjust to get the register cache size from the
4915 IPA's description.
4916 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4917 (gdbserver_xmltarget): Delete.
4918 (initialize_low_tracepoint): Set the ipa's target description.
4919 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4920 (initialize_low_tracepoint): Set the ipa's target description.
4921 * linux-x86-low.c: Include tdesc.h.
4922 [__x86_64__] (is_64bit_tdesc): New.
4923 (ps_get_thread_area, x86_get_thread_area): Use it.
4924 (i386_cannot_store_register): Rename to ...
4925 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4926 (i386_cannot_fetch_register): Rename to ...
4927 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4928 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4929 to new interface.
4930 (target_regsets): Rename to ...
4931 (x86_regsets): ... this.
4932 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4933 interface.
4934 (x86_siginfo_fixup): Use is_64bit_tdesc.
4935 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4936 (tdesc_x32_avx_linux, tdesc_x32_linux)
4937 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4938 Declare.
4939 (x86_linux_update_xmltarget): Delete.
4940 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4941 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4942 (AMD64_LINUX_USER64_CS): New.
4943 (x86_linux_read_description): New, based on
4944 x86_linux_update_xmltarget.
4945 (same_process_callback): New.
4946 (x86_arch_setup_process_callback): New.
4947 (x86_linux_update_xmltarget): New.
4948 (x86_regsets_info): New.
4949 (amd64_linux_regs_info): New.
4950 (i386_linux_usrregs_info): New.
4951 (i386_linux_regs_info): New.
4952 (x86_linux_regs_info): New.
4953 (x86_arch_setup): Reimplement.
4954 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4955 (x86_emit_ops): Ditto.
4956 (the_low_target): Adjust. Install x86_linux_regs_info,
4957 x86_cannot_fetch_register, and x86_cannot_store_register.
4958 (initialize_low_arch): New.
4959 * linux-ia64-low.c (tdesc_ia64): Declare.
4960 (ia64_fetch_register): Adjust.
4961 (ia64_usrregs_info, regs_info): New globals.
4962 (ia64_regs_info): New function.
4963 (the_low_target): Adjust.
4964 (initialize_low_arch): New function.
4965 * linux-sparc-low.c (tdesc_sparc64): Declare.
4966 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4967 Adjust.
4968 (sparc_arch_setup): New function.
4969 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4970 (the_low_target): Adjust.
4971 (initialize_low_arch): New function.
4972 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4973 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4974 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4975 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4976 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4977 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4978 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4979 (tdesc_powerpc_isa205_vsx64l): Declare.
4980 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4981 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4982 (ppc_set_pc, ppc_get_hwcap): Adjust.
4983 (ppc_usrregs_info): Forward declare.
4984 (!__powerpc64__) ppc_regmap_adjusted: New global.
4985 (ppc_arch_setup): Adjust to the current process'es target
4986 description.
4987 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4988 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4989 (ppc_store_evrregset): Adjust.
4990 (target_regsets): Rename to ...
4991 (ppc_regsets): ... this, and make static.
4992 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4993 (ppc_regs_info): New function.
4994 (the_low_target): Adjust.
4995 (initialize_low_arch): New function.
4996 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4997 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4998 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4999 (tdesc_s390x_linux64v2): Declare.
5000 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5001 (s390_fill_gregset, s390_store_last_break): Adjust.
5002 (target_regsets): Rename to ...
5003 (s390_regsets): ... this, and make static.
5004 (s390_get_pc, s390_set_pc): Adjust.
5005 (s390_get_hwcap): New target_desc parameter, and use it.
5006 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5007 (s390_arch_setup): Adjust to set the current process'es target
5008 description. Don't adjust the regmap.
5009 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5010 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5011 (regs_info_3264): New globals.
5012 (s390_regs_info): New function.
5013 (the_low_target): Adjust.
5014 (initialize_low_arch): New function.
5015 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5016 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5017 [__mips64] (init_registers_mips_linux)
5018 (init_registers_mips_dsp_linux): Delete defines.
5019 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5020 (have_dsp): New global.
5021 (mips_read_description): New, based on mips_arch_setup.
5022 (mips_arch_setup): Reimplement.
5023 (get_usrregs_info): New function.
5024 (mips_cannot_fetch_register, mips_cannot_store_register)
5025 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5026 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5027 (target_regsets): Rename to ...
5028 (mips_regsets): ... this, and make static.
5029 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5030 (dsp_regs_info, regs_info): New globals.
5031 (mips_regs_info): New function.
5032 (the_low_target): Adjust.
5033 (initialize_low_arch): New function.
5034 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5035 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5036 Declare.
5037 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5038 (arm_read_description): New, with bits factored from
5039 arm_arch_setup.
5040 (arm_arch_setup): Reimplement.
5041 (target_regsets): Rename to ...
5042 (arm_regsets): ... this, and make static.
5043 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5044 (arm_regs_info): New function.
5045 (the_low_target): Adjust.
5046 (initialize_low_arch): New function.
5047 * linux-m68k-low.c (tdesc_m68k): Declare.
5048 (target_regsets): Rename to ...
5049 (m68k_regsets): ... this, and make static.
5050 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5051 (m68k_regs_info): New function.
5052 (m68k_arch_setup): New function.
5053 (the_low_target): Adjust.
5054 (initialize_low_arch): New function.
5055 * linux-sh-low.c (tdesc_sharch): Declare.
5056 (target_regsets): Rename to ...
5057 (sh_regsets): ... this, and make static.
5058 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5059 (sh_regs_info, sh_arch_setup): New functions.
5060 (the_low_target): Adjust.
5061 (initialize_low_arch): New function.
5062 * linux-bfin-low.c (tdesc_bfin): Declare.
5063 (bfin_arch_setup): New function.
5064 (bfin_usrregs_info, regs_info): New globals.
5065 (bfin_regs_info): New function.
5066 (the_low_target): Adjust.
5067 (initialize_low_arch): New function.
5068 * linux-cris-low.c (tdesc_cris): Declare.
5069 (cris_arch_setup): New function.
5070 (cris_usrregs_info, regs_info): New globals.
5071 (cris_regs_info): New function.
5072 (the_low_target): Adjust.
5073 (initialize_low_arch): New function.
5074 * linux-cris-low.c (tdesc_crisv32): Declare.
5075 (cris_arch_setup): New function.
5076 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5077 (cris_regs_info): New function.
5078 (the_low_target): Adjust.
5079 (initialize_low_arch): New function.
5080 * linux-m32r-low.c (tdesc_m32r): Declare.
5081 (m32r_arch_setup): New function.
5082 (m32r_usrregs_info, regs_info): New globals.
5083 (m32r_regs_info): Adjust.
5084 (initialize_low_arch): New function.
5085 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5086 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5087 (tic6x_usrregs_info): Forward declare.
5088 (tic6x_read_description): New function, based on ...
5089 (tic6x_arch_setup): ... this. Reimplement.
5090 (target_regsets): Rename to ...
5091 (tic6x_regsets): ... this, and make static.
5092 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5093 (tic6x_regs_info): New function.
5094 (the_low_target): Adjust.
5095 (initialize_low_arch): New function.
5096 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5097 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5098 (target_regsets): Rename to ...
5099 (xtensa_regsets): ... this, and make static.
5100 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5101 globals.
5102 (xtensa_arch_setup, xtensa_regs_info): New functions.
5103 (the_low_target): Adjust.
5104 (initialize_low_arch): New function.
5105 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5106 (nios2_arch_setup): Set the current process'es tdesc.
5107 (target_regsets): Rename to ...
5108 (nios2_regsets): ... this.
5109 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5110 (nios2_regs_info): New function.
5111 (the_low_target): Adjust.
5112 (initialize_low_arch): New function.
5113 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5114 (aarch64_arch_setup): Set the current process'es tdesc.
5115 (target_regsets): Rename to ...
5116 (aarch64_regsets): ... this.
5117 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5118 (aarch64_regs_info): New function.
5119 (the_low_target): Adjust.
5120 (initialize_low_arch): New function.
5121 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5122 globals.
5123 (target_regsets): Rename to ...
5124 (tile_regsets): ... this.
5125 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5126 (tile_regs_info): New function.
5127 (tile_arch_setup): Set the current process'es tdesc.
5128 (the_low_target): Adjust.
5129 (initialize_low_arch): New function.
5130 * spu-low.c (tdesc_spu): Declare.
5131 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5132 * win32-arm-low.c (tdesc_arm): Declare.
5133 (arm_arch_setup): New function.
5134 (the_low_target): Install arm_arch_setup instead of
5135 init_registers_arm.
5136 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5137 (init_windows_x86): Rename to ...
5138 (i386_arch_setup): ... this. Set `win32_tdesc'.
5139 (the_low_target): Adjust.
5140 * win32-low.c (win32_tdesc): New global.
5141 (child_add_thread): Don't create the thread cache here.
5142 (do_initial_child_stuff): Set the new process'es tdesc.
5143 * win32-low.h (struct target_desc): Forward declare.
5144 (win32_tdesc): Declare.
5145 * lynx-i386-low.c (tdesc_i386): Declare global.
5146 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5147 * lynx-low.c (lynx_tdesc): New global.
5148 (lynx_add_process): Set the new process'es tdesc.
5149 * lynx-low.h (struct target_desc): Forward declare.
5150 (lynx_tdesc): Declare global.
5151 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5152 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5153 * nto-low.c (nto_tdesc): New global.
5154 (do_attach): Set the new process'es tdesc.
5155 * nto-low.h (struct target_desc): Forward declare.
5156 (nto_tdesc): Declare.
5157 * nto-x86-low.c (tdesc_i386): Declare.
5158 (nto_x86_arch_setup): Set `nto_tdesc'.
5159
5160 2013-06-04 Gary Benson <gbenson@redhat.com>
5161
5162 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5163 to qSupported response when appropriate.
5164 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5165 with nonzero-length annex.
5166 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5167 arguments supplied in annex.
5168
5169 2013-05-31 Doug Evans <dje@google.com>
5170
5171 PR server/15594
5172 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5173 64 bits in 64-cross-32 environment.
5174
5175 2013-05-28 Pedro Alves <palves@redhat.com>
5176
5177 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5178 (aarch64-without-fpu.c): Delete rule.
5179 * configure.srv (aarch64*-*-linux*): Remove references to
5180 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5181 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5182 declaration.
5183
5184 2013-05-24 Pedro Alves <palves@redhat.com>
5185
5186 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5187 instead of strchr/decode_address. Error if the range isn't split
5188 with a ','. Don't assume there's be a ':' in the action.
5189
5190 2013-05-23 Yao Qi <yao@codesourcery.com>
5191 Pedro Alves <palves@redhat.com>
5192
5193 * linux-low.c (lwp_in_step_range): New function.
5194 (linux_wait_1): If the thread was range stepping and stopped
5195 outside the stepping range, report the stop to GDB. Otherwise,
5196 continue stepping. Add range stepping debug output.
5197 (linux_set_resume_request): Copy the step range from the resume
5198 request to the lwp.
5199 (linux_supports_range_stepping): New.
5200 (linux_target_ops) <supports_range_stepping>: Set to
5201 linux_supports_range_stepping.
5202 * linux-low.h (struct linux_target_ops)
5203 <supports_range_stepping>: New field.
5204 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5205 * linux-x86-low.c (x86_supports_range_stepping): New.
5206 (the_low_target) <supports_range_stepping>: Set to
5207 x86_supports_range_stepping.
5208 * server.c (handle_v_cont): Handle 'r' action.
5209 (handle_v_requests): Append ";r" if the target supports range
5210 stepping.
5211 * target.h (struct thread_resume) <step_range_start,
5212 step_range_end>: New fields.
5213 (struct target_ops) <supports_range_stepping>:
5214 New field.
5215 (target_supports_range_stepping): New macro.
5216
5217 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5218
5219 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5220 confusion in comment.
5221
5222 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5223
5224 * lynx-low.c (struct process_info_private): New type.
5225 (lynx_add_process): New function.
5226 (lynx_create_inferior, lynx_attach): Replace calls to
5227 add_process by calls to lynx_add_process.
5228 (lynx_resume): If PTID is null, then try using
5229 current_process()->private->last_wait_event_ptid.
5230 Add comments.
5231 (lynx_clear_inferiors): Delete. The contents of that function
5232 has been inlined in lynx_mourn;
5233 (lynx_wait_1): Save the ptid in the process's private data.
5234 (lynx_mourn): Free the process' private data. Replace call
5235 to lynx_clear_inferiors by call to clear_inferiors.
5236
5237 2013-05-17 Yao Qi <yao@codesourcery.com>
5238
5239 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5240 the right place.
5241
5242 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
5243
5244 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5245 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5246 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5247 PT_TEXT_END_ADDR guards. Update comments.
5248 (linux_target_op) <read_offsets>: Conditionally define to
5249 linux_read_offsets if the target is UCLIBC and if it defines
5250 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5251
5252 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5253 Andrew Jenner <andrew@codesourcery.com>
5254
5255 * Makefile.in (SFILES): Add linux-nios2-low.c.
5256 (clean): Add action to delete nios2-linux.c.
5257 (nios2-linux.c): New rule.
5258 * configure.srv: Add nios2*-*-linux*.
5259 * linux-nios2-low.c: New.
5260
5261 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5262
5263 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5264
5265 2013-04-25 Hui Zhu <hui@codesourcery.com>
5266
5267 PR gdb/15186
5268 * ax.c (ax_printf): Add fflush.
5269
5270 2013-04-22 Tom Tromey <tromey@redhat.com>
5271
5272 * Makefile.in (SFILES): Add filestuff.c.
5273 (OBS): Add filestuff.o.
5274 (filestuff.o): New target.
5275 * config.in, configure: Rebuild.
5276 * configure.ac: Check for fdwalk, pipe2.
5277
5278 2013-04-17 Pedro Alves <palves@redhat.com>
5279
5280 * configure.ac (USE_THREAD_DB): Delete variable.
5281 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5282 Don't AC_SUBST USE_THREAD_DB.
5283 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5284 * config.in, configure: Regenerate.
5285
5286 2013-04-16 Pedro Alves <palves@redhat.com>
5287
5288 * linux-low.h (struct lwp_info) <thread_known>: Move under
5289 the USE_THREAD_DB #ifdef.
5290
5291 2013-04-16 Pedro Alves <palves@redhat.com>
5292
5293 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5294 (linux-low.o): Delete rule.
5295 * linux-low.h: Always include "gdb_thread_db.h" instead of
5296 conditionally including thread_db.h.
5297 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5298 HAVE_THREAD_DB_H.
5299
5300 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5301
5302 * Makefile.in (install-only): Fix make install regression.
5303
5304 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5305
5306 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5307 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5308 installation.
5309 * gdbserver.1: Remove.
5310
5311 2013-03-22 Pedro Alves <palves@redhat.com>
5312
5313 * linux-low.c (handle_extended_wait): Don't call
5314 linux_enable_event_reporting.
5315
5316 2013-03-15 Tony Theodore <tonyt@logyst.com>
5317
5318 PR build/9098:
5319 * Makefile.in (SHELL): Use @SHELL@.
5320
5321 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5322
5323 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5324 compiler warning.
5325
5326 2013-03-13 Joel Brobecker <brobecker@adacore.com>
5327
5328 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5329 Remove extraneous NULL element.
5330
5331 2013-03-13 Yao Qi <yao@codesourcery.com>
5332
5333 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5334 'V' block in trace frame.
5335
5336 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5337
5338 * target.h (struct target_ops): Add btrace ops.
5339 (target_supports_btrace): New macro.
5340 (target_enable_btrace): New macro.
5341 (target_disable_btrace): New macro.
5342 (target_read_btrace): New macro.
5343 * gdbthread.h (struct thread_info): Add btrace field.
5344 * server.c: Include btrace-common.h.
5345 (handle_btrace_general_set): New function.
5346 (handle_btrace_enable): New function.
5347 (handle_btrace_disable): New function.
5348 (handle_general_set): Call handle_btrace_general_set.
5349 (handle_qxfer_btrace): New function.
5350 (struct qxfer qxfer_packets[]): Add btrace entry.
5351 * inferiors.c (remove_thread): Disable btrace.
5352 * linux-low: Include linux-btrace.h.
5353 (linux_low_enable_btrace): New function.
5354 (linux_low_read_btrace): New function.
5355 (linux_target_ops): Add btrace ops.
5356 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5357 Add srv_linux_btrace=yes.
5358 (x86_64-*-linux*): Add linux-btrace.o.
5359 Add srv_linux_btrace=yes.
5360 * configure.ac: Define HAVE_LINUX_BTRACE.
5361 * config.in: Regenerated.
5362 * configure: Regenerated.
5363
5364 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5365
5366 * server.c (handle_qxfer): Preserve error message if -3 is
5367 returned.
5368 (qxfer): Document the -3 return value.
5369
5370 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5371
5372 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5373 (linux_btrace_h): New variable.
5374 (linux-btrace.o): New rule.
5375
5376 2013-03-08 Stan Shebs <stan@codesourcery.com>
5377 Hafiz Abid Qadeer <abidh@codesourcery.com>
5378
5379 * tracepoint.c (trace_buffer_size): New global.
5380 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5381 (init_trace_buffer): Change to one-argument function. Allocate
5382 trace buffer memory.
5383 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5384 handle QTBuffer:size packet.
5385 (cmd_bigqtbuffer_size): New function.
5386 (initialize_tracepoint): Call init_trace_buffer with
5387 DEFAULT_TRACE_BUFFER_SIZE.
5388 * server.c (handle_query): Add QTBuffer:size in the
5389 supported packets.
5390
5391 2013-03-07 Yao Qi <yao@codesourcery.com>
5392
5393 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5394 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5395 of -1.
5396 (cmd_qtsp): Adjust condition. Do post increment.
5397 Set cur_action and cur_step_action back to 0.
5398
5399 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5400
5401 PR server/15236
5402 * linux-low.c (linux_write_memory): Return early success if LEN is
5403 zero.
5404
5405 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
5406
5407 * configure.srv: Add x86_64-*-cygwin* as target.
5408
5409 2013-02-28 Tom Tromey <tromey@redhat.com>
5410
5411 * configure.ac: Invoke AC_SYS_LARGEFILE.
5412 * configure, config.in: Rebuild.
5413
5414 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5415
5416 * win32-low.c: Throughout, fix format strings and casts of
5417 printf-like functions to avoid type related warnings on all
5418 platforms.
5419 (get_child_debug_event): Print dwDebugEventCode as hex since
5420 that's how it's usually documented.
5421
5422 2013-02-28 Yao Qi <yao@codesourcery.com>
5423
5424 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5425 pulongest.
5426
5427 2013-02-27 Jiong Wang <jiwang@tilera.com>
5428
5429 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5430 (reg-tilegx32.c): New rule.
5431 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5432 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5433 different register info initializer according to elf class.
5434 (init_registers_tilgx32): New function. The tilegx32 register info
5435 initializer.
5436 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5437 (tile_store_gregset): Likewise.
5438
5439 2013-02-27 Yao Qi <yao@codesourcery.com>
5440
5441 * server.c (process_point_options): Print debug message when
5442 debug_threads is true.
5443
5444 2013-02-26 Yao Qi <yao@codesourcery.com>
5445
5446 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5447
5448 2013-02-19 Pedro Alves <palves@redhat.com>
5449 Kai Tietz <ktietz@redhat.com>
5450
5451 PR gdb/15161
5452
5453 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5454 instead of strtoul to extract address from packet.
5455 (process_serial_event) <'z'>: Likewise.
5456
5457 2013-02-18 Yao Qi <yao@codesourcery.com>
5458
5459 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5460
5461 2013-02-14 Pedro Alves <palves@redhat.com>
5462
5463 Plug memory leak.
5464
5465 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5466 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5467
5468 2013-02-14 Pedro Alves <palves@redhat.com>
5469
5470 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5471
5472 2013-02-14 Pedro Alves <palves@redhat.com>
5473
5474 * tracepoint.c (save_string): Delete.
5475 (add_tracepoint_action): Use savestring instead of save_string.
5476
5477 2013-02-12 Pedro Alves <palves@redhat.com>
5478
5479 * linux-xtensa-low.c: Ditto.
5480 * xtensa-xtregs.c: Ditto.
5481
5482 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5483
5484 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5485 thread_db.
5486
5487 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5488
5489 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5490 aarch64_num_wp_regs and aarch64_num_bp_regs to
5491 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5492
5493 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5494
5495 * linux-aarch64-low.c (ps_get_thread_area): Replace
5496 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5497
5498 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5499 Marcus Shawcroft <marcus.shawcroft@arm.com>
5500 Nigel Stephens <nigel.stephens@arm.com>
5501 Yufeng Zhang <yufeng.zhang@arm.com>
5502
5503 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5504 (aarch64.c, aarch64-without-fpu.c): New targets.
5505 * configure.srv (aarch64*-*-linux*): New.
5506 * linux-aarch64-low.c: New file.
5507
5508 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5509
5510 * linux-low.c (handle_extended_wait, linux_create_inferior)
5511 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5512 (dequeue_one_deferred_signal, linux_resume_one_thread)
5513 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5514 (linux_tracefork_grandchild, linux_test_for_tracefork)
5515 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5516 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5517 where the argument is 0.
5518
5519 2013-01-25 Yao Qi <yao@codesourcery.com>
5520
5521 * event-loop.c: Include "queue.h".
5522 (gdb_event_p): New typedef.
5523 (struct gdb_event) <next_event>: Remove.
5524 (event_queue): Change to QUEUE(gdb_event_p).
5525 (async_queue_event): Remove.
5526 (gdb_event_xfree): New.
5527 (initialize_event_loop): New.
5528 (process_event): Use API from QUEUE.
5529 (wait_for_event): Likewise.
5530 * server.c (main): Call initialize_event_loop.
5531 * server.h (initialize_event_loop): Declare.
5532
5533 2013-01-18 Yao Qi <yao@codesourcery.com>
5534
5535 * ax.h (struct eval_agent_expr_context): New.
5536 (gdb_eval_agent_expr): Update declaration.
5537 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5538 TFRAME. Add new argument CTX.
5539 * server.h (struct eval_agent_expr_context): Declare.
5540 (agent_mem_read, agent_tsv_read): Update declaration.
5541 (agent_mem_read_string): Likewise.
5542 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5543 (add_traceframe_block): Add new argument TPOINT.
5544 Increase TPOINT->traceframe_usage.
5545 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5546 eval_tracepoint_agent_expr.
5547 (condition_true_at_tracepoint): Likewise.
5548 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5549 (agent_mem_read_string, agent_tsv_read): Likewise.
5550
5551 2013-01-16 Yao Qi <yao@codesourcery.com>
5552
5553 * linux-low.c (linux_resume_one_lwp): Don't check
5554 'lwp->bp_reinsert != 0'.
5555
5556 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5557 Pedro Alves <palves@redhat.com>
5558
5559 * lynx-low.c (ptrace_request_to_str): Define a temporary
5560 macro and use it to simplify this function's implementation.
5561
5562 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5563
5564 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5565 sets errno.
5566
5567 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5568
5569 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5570
5571 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5572
5573 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5574
5575 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5576
5577 * lynx-low.c (lynx_resume): Use the resume_info parameter
5578 to determine the ptid for the lynx_ptrace call, unless
5579 it is equal to minus_one_ptid, in which case we use the
5580 ptid of the current_inferior.
5581 (lynx_wait_1): After having received a thread create/exit
5582 event, resume the inferior's execution using the signaling
5583 thread's ptid, rather than the old ptid.
5584
5585 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5586
5587 * lynx-low.c (lynx_resume): Delete variable ret.
5588
5589 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5590
5591 * gdbreplay.c (gdbreplay_version): Update copyright year.
5592 * server.c (gdbserver_version): Likewise.
5593
5594 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5595
5596 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5597 new thread.
5598
5599 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5600
5601 * lynx-low.c (ptrace_request_to_str): Add handling for
5602 PTRACE_GETTRACESIG.
5603
5604 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5605
5606 * lynx-low.c (lynx_attach): Delete variable new_process.
5607
5608 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5609
5610 * lynx-low.c (lynx_create_inferior): Delete variable
5611 new_process.
5612
5613 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5614
5615 * lynx-low.c (ptrace_request_to_str): Do not handle
5616 PTRACE_GETTHREADLIST if this macro does not exist.
5617
5618 2012-12-15 Yao Qi <yao@codesourcery.com>
5619
5620 * Makefile.in (OBS): Add notif.o.
5621 * notif.c, notif.h: New.
5622 * server.c: Include "notif.h".
5623 (struct vstop_notif) <next>: Remove.
5624 <base>: New field.
5625 (queue_stop_reply): Update.
5626 (push_event, send_next_stop_reply): Remove.
5627 (discard_queued_stop_replies): Update.
5628 (notif_stop): New variable.
5629 (handle_v_stopped): Remove.
5630 (handle_v_requests): Don't call handle_v_stopped. Call
5631 handle_ack_notif instead.
5632 (queue_stop_reply_callback): Call notif_event_enque instead
5633 of queue_stop_reply.
5634 (handle_status): Don't call send_next_stop_reply, call
5635 notif_write_event instead.
5636 (kill_inferior_callback): Likewise.
5637 (detach_or_kill_inferior_callback): Likewise.
5638 (main): Call initialize_notif.
5639 (process_serial_event): Call QUEUE_is_empty.
5640 (handle_target_event): Call notif_push instead of push event.
5641 * server.h (push_event): Remove declaration.
5642
5643 2012-12-10 Tom Tromey <tromey@redhat.com>
5644
5645 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5646 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5647 macros.
5648 (.c.o): Rewrite.
5649 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5650 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5651 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5652 (amd64-linux-ipa.o, ax.o): Rewrite.
5653 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5654 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5655 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5656 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5657 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5658 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5659 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5660 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5661 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5662 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5663 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5664 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5665 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5666 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5667 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5668 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5669 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5670 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5671 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5672 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5673 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5674 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5675 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5676 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5677 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5678 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5679 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5680 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5681 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5682 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5683 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5684 (reg-tilegx.o): Remove.
5685 (all_object_files): New macro.
5686 Include .deps files.
5687 * aclocal.m4, configure: Rebuild.
5688 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5689 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5690 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5691
5692 2012-12-05 Tom Tromey <tromey@redhat.com>
5693
5694 PR gdb/14917:
5695 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5696
5697 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5698
5699 * configure.ac: Check for linux/perf_event.h.
5700 * config.in: Regenerated.
5701 * configure: Regenerated.
5702
5703 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5704
5705 * hostio.c (handle_readlink): Decrease buffer size
5706 parameter passed to readlink by one byte.
5707
5708 2012-11-26 Yao Qi <yao@codesourcery.com>
5709
5710 * configure.ac (build_warnings): Append '-Wempty-body'.
5711 * configure: Regenerated.
5712 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5713 body.
5714
5715 2012-11-15 Pierre Muller <muller@sourceware.org>
5716
5717 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5718 * config.in: Regenerate.
5719 * configure: Regenerate.
5720 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5721 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5722 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5723 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5724 header.
5725 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5726 instead of <sys/wait.h> header.
5727 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5728
5729 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5730
5731 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5732 (various make rules): Remove -DGDBSERVER
5733
5734 2012-11-09 Yao Qi <yao@codesourcery.com>
5735
5736 * spu-low.c (current_ptid): Move it to ..
5737 * gdbthread.h: ... here. New.
5738 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5739 * server.c (myresume, process_serial_event): Likewise.
5740 * thread-db.c (thread_db_find_new_threads): Likewise.
5741 * tracepoint.c (run_inferior_command): Likewise.
5742
5743 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5744
5745 * server.c (handle_search_memory_1): Include access length in
5746 warning message.
5747
5748 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5749
5750 * linux-crisv32-low.c: Fix compile errors.
5751
5752 2012-09-04 Yao Qi <yao@codesourcery.com>
5753
5754 * tracepoint.c (cmd_qtsv): Adjust debug message.
5755 Don't check CUR_TPOINT.
5756
5757 2012-08-28 Yao Qi <yao@codesourcery.com>
5758
5759 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5760 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5761 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5762 Remove declarations of xmalloc, xreallloc, xstrdup and
5763 freeargv.
5764 * Makefile.in (libiberty_h): New.
5765 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5766 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5767
5768 2012-08-23 Yao Qi <yao@codesourcery.com>
5769
5770 * server.h: Remove declaration of 'xsnprintf'.
5771
5772 2012-08-22 Keith Seitz <keiths@redhat.com>
5773
5774 * server.h: Include build-gnulib-gbserver/config.h.
5775 * gdbreplay.c: Likewise.
5776
5777 2012-08-08 Doug Evans <dje@google.com>
5778
5779 * Makefile.in (SFILES): Add gdb_vecs.c.
5780 (OBS): Add gdb_vecs.o.
5781 (gdb_vecs_h, host_defs_h): New variables.
5782 (thread-db.o): Add $(gdb_vecs_h) dependency.
5783 (gdb_vecs.o): New rule.
5784 * thread-db.c: #include "gdb_vecs.h".
5785 (thread_db_load_search): Use a vector to iterate over path elements.
5786 Handle text appearing after "$pdir".
5787
5788 * configure.ac: Add check for strstr.
5789 * config.in: Regenerate.
5790 * configure: Regenerate.
5791
5792 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5793
5794 * hostio.c (handle_pread): If pread fails, fall back to attempting
5795 lseek/read.
5796 (handle_pwrite): Likewise for pwrite.
5797
5798 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5799
5800 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5801 between unsupported TYPE and unimplementable ADDR/LEN combination.
5802 (arm_insert_point): Act on new return value.
5803
5804 2012-07-31 Pedro Alves <palves@redhat.com>
5805
5806 * server.c (process_point_options): Only skip tokens if we find
5807 one that is unrecognized. Don't treat 'X' specially while
5808 skipping unrecognized tokens.
5809
5810 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5811
5812 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5813 to 4-byte-align HW breakpoint addresses for Thumb.
5814
5815 2012-07-27 Yao Qi <yao@codesourcery.com>
5816
5817 PR remote/14161.
5818
5819 * server.h: Declare gdb_agent_about_to_close.
5820 * target.c (kill_inferior): Include "agent.h".
5821 New. Send command 'kill'.
5822 * target.h (kill_inferior): Removed macro.
5823 * tracepoint.c (gdb_agent_about_to_close): New.
5824 (gdb_agent_helper_thread): Handle command 'close'.
5825 Wait endlessly until the inferior stops.
5826 Install gdb_agent_remove_socket to atexit hook.
5827 (agent_socket_name): New static variable.
5828 (gdb_agent_socket_init): Replace local variable 'name' with
5829 'agent_socket_name'.
5830 (gdb_agent_remove_socket): New.
5831
5832 2012-07-27 Yao Qi <yao@codesourcery.com>
5833
5834 * server.c (process_point_options): Stop at 'X' when parsing.
5835
5836 2012-07-19 Michael Eager <eager@eagercon.com>
5837
5838 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5839 to hw_execute.
5840 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5841 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5842 hardware breakpoint.
5843
5844 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5845
5846 * gdbserver/linux-low.c (initialize_low): Call
5847 linux_ptrace_init_warnings.
5848
5849 2012-07-02 Doug Evans <dje@google.com>
5850
5851 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5852 pointer to int.
5853
5854 2012-07-02 Stan Shebs <stan@codesourcery.com>
5855
5856 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5857 (ax.o): Add it to build rule.
5858 (ax-ipa.o): Ditto.
5859 (OBS): Add format.o.
5860 (IPA_OBS): Add format.o.
5861 * server.c (handle_query): Claim support for breakpoint commands.
5862 (process_point_options): Add command case.
5863 (process_serial_event): Leave running if there are printfs in
5864 effect.
5865 * mem-break.h (any_persistent_commands): Declare.
5866 (add_breakpoint_commands): Declare.
5867 (gdb_no_commands_at_breakpoint): Declare.
5868 (run_breakpoint_commands): Declare.
5869 * mem-break.c (struct point_command_list): New struct.
5870 (struct breakpoint): New field command_list.
5871 (any_persistent_commands): New function.
5872 (add_commands_to_breakpoint): New function.
5873 (add_breakpoint_commands): New function.
5874 (gdb_no_commands_at_breakpoint): New function.
5875 (run_breakpoint_commands): New function.
5876 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5877 locally.
5878 * ax.c: Include format.h.
5879 (ax_printf): New function.
5880 (gdb_eval_agent_expr): Add printf opcode.
5881
5882 2012-06-13 Yao Qi <yao@codesourcery.com>
5883
5884 * server.c (start_inferior): Remove duplicated writes to fields
5885 'last_resume_kind' and 'last_status' of 'current_inferior'.
5886
5887 2012-06-12 Yao Qi <yao@codesourcery.com>
5888 Pedro Alves <palves@redhat.com>
5889
5890 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5891 comment.
5892 * server.c (handle_v_cont): Extend comment.
5893
5894 2012-06-11 Yao Qi <yao@codesourcery.com>
5895
5896 * linux-low.c (linux_attach): Add 'static'.
5897
5898 2012-06-06 Yao Qi <yao@codesourcery.com>
5899
5900 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5901
5902 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5903
5904 Fix gcc -flto compilation warning.
5905 * server.c (main): Make variable multi_mode and attach volatile.
5906
5907 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5908
5909 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5910 if the platform doesn't know about it.
5911
5912 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5913
5914 * Makefile.in (SFILES): Add linux-tile-low.c.
5915 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5916 * configure.srv: Handle tilegx-*-linux*.
5917 * linux-tile-low.c: New file.
5918
5919 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5920
5921 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5922
5923 2012-05-24 Pedro Alves <palves@redhat.com>
5924
5925 PR gdb/7205
5926
5927 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5928
5929 2012-05-24 Pedro Alves <palves@redhat.com>
5930
5931 PR gdb/7205
5932
5933 Replace target_signal with gdb_signal throughout.
5934
5935 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5936
5937 * linux-low.c (linux_store_registers): Avoid the copying sequence
5938 when no data has been retrieved by ptrace.
5939
5940 2012-05-22 Will Deacon <will.deacon@arm.com>
5941
5942 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5943 Include asm/ptrace.h.
5944 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5945 already defined.
5946
5947 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5948
5949 * linux-low.c (linux_store_registers): Don't re-retrieve data
5950 with ptrace that has already been obtained from /proc. Always
5951 copy any data retrieved with ptrace to the buffer supplied.
5952
5953 2012-05-11 Yao Qi <yao@codesourcery.com>
5954 Pedro Alves <palves@redhat.com>
5955
5956 * linux-low.c (enum stopping_threads_kind): New.
5957 (stopping_threads): Change type to `enum stopping_threads_kind'.
5958 (handle_extended_wait): If stopping and suspending threads, leave
5959 the new_lwp suspended too.
5960 (linux_wait_for_event): Adjust.
5961 (stop_all_lwps): Set `stopping_threads' to
5962 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5963 whether we're suspending threads or just stopping them. Assert no
5964 recursion happens.
5965
5966 2012-04-29 Yao Qi <yao@codesourcery.com>
5967
5968 * server.h: Move some code to ...
5969 * gdbthread.h: ... here. New.
5970 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5971 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5972 (nto-low.o, win32-low.o): Likewise.
5973 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5974 * regcache.c, remote-utils.c, server.c: Likewise.
5975 * target.c, tracepoint.c, win32-low.c: Likewise.
5976
5977 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5978
5979 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5980 (PTRACE_ARG4_TYPE): Likewise.
5981 (PTRACE_XFER_TYPE): Likewise.
5982 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5983 ptrace to PTRACE_ARG3_TYPE.
5984 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5985 (PTRACE_ARG4_TYPE): Likewise.
5986 (PTRACE_XFER_TYPE): Likewise.
5987 (linux_detach_one_lwp): Cast fourth argument of
5988 ptrace to long then PTRACE_ARG4_TYPE.
5989 (regsets_fetch_inferior_registers): Cast third argument of
5990 ptrace to long then PTRACE_ARG3_TYPE.
5991 (regsets_store_inferior_registers): Likewise.
5992
5993 2012-04-20 Pedro Alves <palves@redhat.com>
5994
5995 * configure: Regenerate.
5996
5997 2012-04-19 Pedro Alves <palves@redhat.com>
5998
5999 * Makefile.in (GNULIB_BUILDDIR): New.
6000 (LIBGNU, INCGNU, GNULIB_H): Adjust.
6001 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6002 (all, install-only, uninstall, clean-info, all-lib, clean): No
6003 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6004 (maintainer-clean realclean distclean): Use subdir_do.
6005 (subdir_do): New.
6006 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
6007 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
6008 * acinclude.m4: Include acx_configure_dir.m4.
6009 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6010 calls. Call AC_PROG_RANLIB. Configure gnulib using
6011 ACX_CONFIGURE_DIR.
6012 (GNULIB): New.
6013 (GNULIB_STDINT_H): Adjust.
6014 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6015 * gdbreplay.c: Include build-gnulib/config.h.
6016 * server.h: Likewise.
6017 * aclocal.m4: Regenerate.
6018 * config.in: Regenerate.
6019 * configure: Regenerate.
6020
6021 2012-04-19 Pedro Alves <palves@redhat.com>
6022
6023 * Makefile.in (LIBGNU, INCGNU): Adjust.
6024 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6025 (all, install-only, uninstall, clean-info, all-lib, clean)
6026 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6027 * configure.ac: Adjust AC_OUTPUT output.
6028 * aclocal.m4: Regenerate.
6029 * configure: Regenerate.
6030
6031 2012-04-19 Pedro Alves <palves@redhat.com>
6032
6033 * Makefile.in (generated_files): New.
6034 (server_h): Remove the explicit dependency on config.h, and depend
6035 on $generated_files.
6036
6037 2012-04-19 Pedro Alves <palves@redhat.com>
6038
6039 * Makefile.in (INCGNU): Add -Ignulib.
6040
6041 2012-04-19 Pedro Alves <palves@redhat.com>
6042
6043 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6044 (INCGNU): ... this, and spell out -I here.
6045 (GNULIB_LIB): Rename to ...
6046 (LIBGNU): ... this.
6047 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6048
6049 2012-04-19 Pedro Alves <palves@redhat.com>
6050
6051 * config.in: Regenerate.
6052
6053 2012-04-19 Pedro Alves <palves@redhat.com>
6054
6055 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6056 * server.h (memmem): Remove declaration.
6057 * config.in: Regenerate.
6058 * configure: Regenerate.
6059
6060 2012-04-19 Yao Qi <yao@codesourcery.com>
6061
6062 * Makefile.in (SFILES): Add common/vec.c.
6063 (OBS): Add vec.o.
6064 (vec.o): New rule.
6065
6066 2012-04-19 Yao Qi <yao@codesourcery.com>
6067
6068 * remote-utils.c (prepare_resume_reply): Replace with macro
6069 target_core_of_thread.
6070 * server.c (handle_qxfer_threads_proper): Likewise.
6071 * target.h (traget_core_of_thread): New macro.
6072
6073 2012-04-18 Pedro Alves <palves@redhat.com>
6074
6075 * aclocal.m4: Regenerate.
6076 * configure: Regenerate.
6077
6078 2012-04-16 Yao Qi <yao@codesourcery.com>
6079
6080 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6081 duplicated on address.
6082
6083 2012-04-16 Yao Qi <yao@codesourcery.com>
6084
6085 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6086 (struct tracepoint_action_ops) <send>: New field.
6087 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6088 (agent_expr_send, x_tracepoint_action_send): New.
6089 (l_tracepoint_action_send): New.
6090 (cmd_qtdp): Download and install tracepoint
6091 according to `use_agent'.
6092 (run_inferior_command): Add one more parameter `len'.
6093 Update callers.
6094 (tracepoint_send_agent): New.
6095 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6096
6097 2012-04-16 Yao Qi <yao@codesourcery.com>
6098
6099 * tracepoint.c (download_tracepoints): Moved to ...
6100 (cmd_qtstart): ... here.
6101
6102 2012-04-14 Yao Qi <yao@codesourcery.com>
6103
6104 * tracepoint.c: Include inttypes.h.
6105 (struct collect_memory_action): Use sized types.
6106 (struct tracepoint): Likewise.
6107 (cmd_qtdp, stop_tracing): Update print specifiers.
6108 (cmd_qtp, response_tracepoint): Likewise.
6109 (collect_data_at_tracepoint): Likewise.
6110 (collect_data_at_step): Likewise.
6111
6112 2012-04-14 Yao Qi <yao@codesourcery.com>
6113
6114 Import gnulib module inttypes.
6115 * aclocal.m4, config.in, configure: Regenerated.
6116
6117 2012-04-14 Yao Qi <yao@codesourcery.com>
6118
6119 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6120 Makefile and config.status at last.
6121
6122 2012-04-13 Yao Qi <yao@codesourcery.com>
6123
6124 * tracepoint.c: Include stdint.h unconditionally.
6125
6126 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6127
6128 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6129 on BFD_HAVE_SYS_PROCFS_TYPE.
6130 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6131 * configure: Regenerate.
6132 * config.in: Likewise.
6133
6134 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6135
6136 * Makefile.in (clean): Also remove x32.c x32-linux.c
6137 x32-avx.c x32-avx-linux.c.
6138 (x32.o): New target.
6139 (x32.c): Likewise.
6140 (x32-linux.o): Likewise.
6141 (x32-linux.c): Likewise.
6142 (x32-avx.o): Likewise.
6143 (x32-avx.c): Likewise.
6144 (x32-avx-linux.o): Likewise.
6145 (x32-avx-linux.c): Likewise.
6146
6147 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6148 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6149 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6150 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6151 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6152 i386/x32-avx-linux.xml.
6153
6154 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6155 (init_registers_x32_avx_linux): Likwise.
6156 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6157 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6158
6159 2012-04-13 Pedro Alves <palves@redhat.com>
6160
6161 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6162 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6163 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6164 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6165 the sub-make.
6166
6167 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6168
6169 * linux-x86-low.c (compat_x32_clock_t): New.
6170 (compat_x32_siginfo_t): Likewise.
6171 (compat_x32_siginfo_from_siginfo): Likewise.
6172 (siginfo_from_compat_x32_siginfo): Likewise.
6173 (linux_is_elf64): Likewise.
6174 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6175 and siginfo_from_compat_x32_siginfo for x32.
6176 (x86_arch_setup): Set linux_is_elf64.
6177
6178 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6179
6180 PR gdb/13969
6181 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6182 e_machine field.
6183 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6184 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6185 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6186 compatible with process.
6187
6188 2012-04-12 Yao Qi <yao@codesourcery.com>
6189
6190 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6191 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6192 (install-only, install-info, clean): Handle sub dir gnulib.
6193 (all-lib, am--refresh): New targets.
6194 (memmem.o): Remove target.
6195 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6196 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6197 (AC_REPLACE_FUNCS): Remove memmem.
6198 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6199 (AC_OUTPUT): Generate Makefile in gnulib/.
6200 * aclocal.m4, config.in, configure: Regenerated.
6201
6202 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6203
6204 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6205
6206 2012-04-05 Pedro Alves <palves@redhat.com>
6207
6208 -Werror=strict-aliasing
6209
6210 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6211 pointer.
6212
6213 2012-04-04 Pedro Alves <palves@redhat.com>
6214
6215 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6216 (sparc_store_gregset_from_stack, sparc_store_gregset)
6217 (sparc_breakpoint_at): Fix formatting.
6218
6219 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6220
6221 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6222 are available.
6223 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6224 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6225 * config.in: Regenerate.
6226 * configure: Likewise.
6227
6228 2012-03-29 Pedro Alves <palves@redhat.com>
6229
6230 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6231 Correct ptrace arguments.
6232
6233 2012-03-28 Pedro Alves <palves@redhat.com>
6234
6235 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6236 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6237 (IA64_FR1_REGNUM): New defines.
6238 (ia64_fetch_register): New.
6239 (the_low_target): Install it.
6240 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6241 field.
6242 * linux-low.c (linux_fetch_registers): Try the
6243 the_low_target.fetch_register hook first.
6244
6245 * linux-arm-low.c (the_low_target): Adjust.
6246 * linux-bfin-low.c (the_low_target): Adjust.
6247 * linux-cris-low.c (the_low_target): Adjust.
6248 * linux-crisv32-low.c (the_low_target): Adjust.
6249 * linux-m32r-low.c (the_low_target): Adjust.
6250 * linux-m68k-low.c (the_low_target): Adjust.
6251 * linux-mips-low.c (the_low_target): Adjust.
6252 * linux-ppc-low.c (the_low_target): Adjust.
6253 * linux-s390-low.c (the_low_target): Adjust.
6254 * linux-sh-low.c (the_low_target): Adjust.
6255 * linux-sparc-low.c (the_low_target): Adjust.
6256 * linux-tic6x-low.c (the_low_target): Adjust.
6257 * linux-x86-low.c (the_low_target): Adjust.
6258 * linux-xtensa-low.c (the_low_target): Adjust.
6259
6260 2012-03-26 Pedro Alves <palves@redhat.com>
6261
6262 * server.c (handle_qxfer_libraries): Don't bail early if
6263 the_target->qxfer_libraries_svr4 is not NULL.
6264
6265 2012-03-26 Pedro Alves <palves@redhat.com>
6266
6267 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6268
6269 2012-03-23 Pedro Alves <palves@redhat.com>
6270
6271 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6272 "library-list-svr4" element's start tag when the the DSO list is
6273 empty.
6274
6275 2012-03-23 Pedro Alves <palves@redhat.com>
6276
6277 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6278 a variable whose type size is the same as the inferior's pointer
6279 size.
6280
6281 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6282
6283 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6284 struct siginfo.
6285 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6286 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6287 * linux-low.h: Include <signal.h>.
6288 (struct siginfo): Remove forward declaration.
6289 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6290 struct siginfo.
6291
6292 2012-03-21 Mike Frysinger <vapier@gentoo.org>
6293
6294 * .gitignore: Ignore more files.
6295
6296 2012-03-19 Pedro Alves <palves@redhat.com>
6297 Jan Kratochvil <jan.kratochvil@redhat.com>
6298
6299 * server.c (cont_thread, general_thread): Add describing comments.
6300 (start_inferior): Clear `cont_thread'.
6301 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6302 of a process.
6303
6304 2012-03-15 Yao Qi <yao@codesourcery.com>
6305
6306 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6307 handling to ...
6308 (cmd_qtdp): ... here.
6309
6310 2012-03-15 Yao Qi <yao@codesourcery.com>
6311
6312 * tracepoint.c (struct tracepoint_action_ops): New.
6313 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6314 (m_tracepoint_action_download): New.
6315 (r_tracepoint_action_download): New.
6316 (x_tracepoint_action_download): New.
6317 (l_tracepoint_action_download): New.
6318 (add_tracepoint_action): Install `action->ops' according type.
6319 (download_tracepoint_1): Move code `download' function pointer
6320 of various tracepoint_action_ops.
6321
6322 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6323
6324 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6325 linux_ptrace_attach_warnings.
6326
6327 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6328
6329 * Makefile.in (linux-ptrace.o): New.
6330 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6331 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6332 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6333 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6334 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6335 of these targets.
6336 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6337
6338 2012-03-08 Yao Qi <yao@codesourcery.com>
6339 Pedro Alves <palves@redhat.com>
6340
6341 Fix PR server/13392.
6342 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6343 offset of JMP insn.
6344 * tracepoint.c (remove_tracepoint): New.
6345 (cmd_qtdp): Call remove_tracepoint when failed to install.
6346
6347 2012-03-07 Pedro Alves <palves@redhat.com>
6348
6349 * linux-low.c (get_detach_signal): New.
6350 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6351 Pass on pending signals to PTRACE_DETACH. Check the result of the
6352 ptrace call.
6353 * server.c (program_signals, program_signals_p): New.
6354 (handle_general_set): Handle QProgramSignals.
6355 * server.h (program_signals, program_signals_p): Declare.
6356
6357 2012-03-05 Pedro Alves <palves@redhat.com>
6358 Jan Kratochvil <jan.kratochvil@redhat.com>
6359
6360 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6361 New comment why.
6362
6363 2012-03-03 Yao Qi <yao@codesourcery.com>
6364
6365 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6366 agent_look_up_symbols.
6367
6368 2012-03-03 Yao Qi <yao@codesourcery.com>
6369
6370 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6371 (linux-x86-low.o): Likewise.
6372 * server.h: Remove in_process_agent_loaded.
6373 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6374 common/agent.c.
6375 Update callers.
6376
6377 2012-03-03 Yao Qi <yao@codesourcery.com>
6378
6379 * tracepoint.c (gdb_agent_capability): New global.
6380 (in_process_agent_loaded_ust): Renamed to
6381 `in_process_agent_supports_ust'.
6382 Update callers.
6383 (in_process_agent_supports_ust): Call agent_capability_check.
6384 (clear_installed_tracepoints): Assert that agent supports
6385 agent.
6386
6387 2012-03-03 Yao Qi <yao@codesourcery.com>
6388
6389 * linux-low.c (linux_supports_agent): New.
6390 (linux_target_ops): Initialize field `supports_agent' with
6391 linux_supports_agent.
6392 * target.h (struct target_ops) <supports_agent>: New.
6393 (target_supports_agent): New macro.
6394 * server.c (handle_general_set): Handle packet 'QAgent'.
6395 (handle_query): Send `QAgent+'.
6396 * Makefile.in (server.o): Depends on agent.h.
6397
6398 2012-03-03 Yao Qi <yao@codesourcery.com>
6399
6400 * Makefile.in (OBS): Add agent.o.
6401 Add new rule for agent.o.
6402 Track dependence of tracepoint.c on agent.h.
6403 * tracepoint.c (run_inferior_command_1):
6404 (run_inferior_command): Call agent_run_command.
6405 (gdb_ust_connect_sync_socket): Deleted. Move it to
6406 common/agent.c.
6407 (resume_thread, stop_thread): Likewise.
6408 (gdb_ust_socket_init): Renamed to ...
6409 (gdb_agent_socket_init): ... New.
6410 (gdb_ust_thread): Renamed to ...
6411 (gdb_agent_helper_thread): ... New.
6412 (gdb_ust_init): Move some code to ...
6413 (gdb_agent_init): ... here. New.
6414 [HAVE_UST]: Call gdb_ust_init.
6415 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6416 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6417 * config.in, configure: Regenerated.
6418
6419 2012-03-02 Pedro Alves <palves@redhat.com>
6420
6421 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6422 * linux-low.c (struct simple_pid_list): New.
6423 (stopped_pids): New a struct simple_pid_list pointer.
6424 (add_to_pid_list, pull_pid_from_list): New.
6425 (handle_extended_wait): Don't assume the first signal new children
6426 report is SIGSTOP. Adjust call to pull_pid_from_list.
6427 (linux_wait_for_lwp): Adjust.
6428
6429 2012-03-02 Yao Qi <yao@codesourcery.com>
6430
6431 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6432 debug log.
6433
6434 2012-03-02 Yao Qi <yao@codesourcery.com>
6435
6436 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6437 `stop_pc' and `tpoint'. Update caller.
6438
6439 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6440
6441 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6442 * linux-low.c (use_linux_regsets): New macro.
6443 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6444 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6445 (linux_register_in_regsets): New function.
6446 (usr_fetch_inferior_registers): Skip registers covered by
6447 regsets.
6448 (usr_store_inferior_registers): Likewise.
6449 (usr_fetch_inferior_registers): New macro.
6450 (usr_store_inferior_registers): Likewise.
6451 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6452 (linux_store_registers): Likewise.
6453 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6454 prototype.
6455 (init_registers_mips64_dsp_linux): Likewise.
6456 (init_registers_mips_linux): New macro.
6457 (init_registers_mips_dsp_linux): Likewise.
6458 (mips_dsp_num_regs): Likewise.
6459 (DSP_BASE, DSP_CONTROL): New fallback macros.
6460 (mips_base_regs): New macro.
6461 (mips_regmap): Use it. Fix the size.
6462 (mips_dsp_regmap): New variable.
6463 (mips_dsp_regset_bitmap): Likewise.
6464 (mips_arch_setup): New function.
6465 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6466 than mips_regmap.
6467 (mips_cannot_store_register): Likewise.
6468 (the_low_target): Update .arch_setup, .num_regs and .regmap
6469 initializers. Add .regset_bitmap initializer.
6470 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6471 initializer.
6472 * linux-bfin-low.c (the_low_target): Likewise.
6473 * linux-cris-low.c (the_low_target): Likewise.
6474 * linux-crisv32-low.c (the_low_target): Likewise.
6475 * linux-ia64-low.c (the_low_target): Likewise.
6476 * linux-m32r-low.c (the_low_target): Likewise.
6477 * linux-m68k-low.c (the_low_target): Likewise.
6478 * linux-ppc-low.c (the_low_target): Likewise.
6479 * linux-s390-low.c (the_low_target): Likewise.
6480 * linux-sh-low.c (the_low_target): Likewise.
6481 * linux-sparc-low.c (the_low_target): Likewise.
6482 * linux-tic6x-low.c (the_low_target): Likewise.
6483 * linux-x86-low.c (the_low_target): Likewise.
6484 * linux-xtensa-low.c (the_low_target): Likewise.
6485 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6486 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6487 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6488 srv_xmlfiles.
6489 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6490 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6491
6492 2012-02-29 Yao Qi <yao@codesourcery.com>
6493 Pedro Alves <palves@redhat.com>
6494
6495 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6496 `step_over_finished' is true.
6497
6498 2012-02-27 Pedro Alves <palves@redhat.com>
6499
6500 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6501 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6502
6503 2012-02-27 Pedro Alves <palves@redhat.com>
6504
6505 PR server/9684
6506 * linux-low.c (pid_is_stopped): New.
6507 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6508
6509 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6510
6511 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6512 of conditions.
6513
6514 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6515
6516 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6517
6518 2012-02-24 Luis Machado <lgustavo@codesourcery>
6519
6520 * server.c (handle_query): Advertise support for target-side
6521 breakpoint condition evaluation.
6522 (process_point_options): New function.
6523 (process_serial_event): When inserting a breakpoint, check for
6524 a target-side condition that should be evaluated.
6525
6526 * mem-break.c: Include regcache.h and ax.h.
6527 (point_cond_list_t): New data structure.
6528 (breakpoint) <cond_list>: New field.
6529 (find_gdb_breakpoint_at): Make non-static.
6530 (delete_gdb_breakpoint_at): Clear any target-side
6531 conditions.
6532 (clear_gdb_breakpoint_conditions): New function.
6533 (add_condition_to_breakpoint): Likewise.
6534 (add_breakpoint_condition): Likewise.
6535 (gdb_condition_true_at_breakpoint): Likewise.
6536 (gdb_breakpoint_here): Return result directly instead
6537 of going through a local variable.
6538
6539 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6540 (clear_gdb_breakpoint_conditions): Likewise.
6541 (add_breakpoint_condition): Likewise.
6542 (gdb_condition_true_at_breakpoint): Likewise.
6543
6544 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6545 (need_step_over_p): Take target-side breakpoint condition into
6546 consideration.
6547
6548 2012-02-24 Luis Machado <lgustavo@codesourcery>
6549
6550 * server.h: Include tracepoint.h.
6551 (agent_mem_read, agent_get_trace_state_variable_value,
6552 agent_set_trace_state_variable_value,
6553 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6554 get_set_tsv_func_addr): New prototypes.
6555
6556 * ax.h: New include file.
6557 * ax.c: New source file.
6558
6559 * tracepoint.c: Include ax.h.
6560 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6561 agent_expr, eval_result_type): Move to ax.h.
6562 (parse_agent_expr): Rename to ...
6563 (gdb_parse_agent_expr): ... this, make it non-static and move
6564 to ax.h.
6565 (unparse_agent_expr) Rename to ...
6566 (gdb_unparse_agent_expr): ... this, make it non-static and move
6567 to ax.h.
6568 (eval_agent_expr): Rename to ...
6569 (eval_tracepoint_agent_expr): ... this.
6570 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6571 forward declarations.
6572 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6573 (agent_get_trace_state_variable_value): New function.
6574 (agent_set_trace_state_variable_value): New function.
6575 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6576 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6577 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6578 (condition_true_at_tracepoint): Likewise.
6579 (parse_agent_expr): Rename to ...
6580 (gdb_parse_agent_expr): ... this and move to ax.c.
6581 (unparse_agent_expr): Rename to ...
6582 (gdb_unparse_agent_expr): ... this and move to ax.c.
6583 (gdb_agent_op_name): Move to ax.c.
6584 (eval_agent_expr): Rename to ...
6585 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6586 and move to ax.c.
6587 (eval_tracepoint_agent_expr): New function.
6588 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6589 non-static.
6590 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6591 ax.c.
6592 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6593 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6594 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6595 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6596 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6597 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6598 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6599 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6600 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6601 (compile_bytecodes): Remove forward declaration.
6602 (is_goto_target): Move to ax.c.
6603 (compile_bytecodes): Move to ax.c and call
6604 agent_get_trace_state_variable_value (...) and
6605 agent_set_trace_state_variable_value (...).
6606
6607 * Makefile.in: Update ax.c and IPA dependencies.
6608
6609 2012-02-24 Pedro Alves <palves@redhat.com>
6610
6611 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6612 (cmd_bigqtbuffer_circular): ... this. Only handle
6613 'QTBuffer:circular:'.
6614 (handle_tracepoint_general_set): Adjust.
6615
6616 2012-02-16 Yao Qi <yao@codesourcery.com>
6617
6618 * inferiors.c: Move code to ...
6619 * dll.c: .... here. New.
6620 * server.h: Declare clear_dlls.
6621 * Makefile.in (SFILES): Add dll.c.
6622 (OBS): Add dll.o
6623 (dll.o): New rule.
6624
6625 2012-02-11 Yao Qi <yao@codesourcery.com>
6626
6627 * server.c: (handle_monitor_command): Add a new parameter
6628 `own_buf'.
6629 (handle_query): Update caller.
6630
6631 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6632
6633 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6634 * configure, config.in: Regenerate.
6635 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6636 is not defined.
6637
6638 2012-02-02 Pedro Alves <palves@redhat.com>
6639
6640 Try SIGKILL first, then PTRACE_KILL.
6641 * linux-low.c (linux_kill_one_lwp): New.
6642 (linux_kill_one_lwp): Rename to ...
6643 (kill_one_lwp_callback): ... this. Use the new
6644 linux_kill_one_lwp.
6645
6646 2012-02-02 Pedro Alves <palves@redhat.com>
6647
6648 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6649 inferior.
6650
6651 2012-01-27 Pedro Alves <palves@redhat.com>
6652
6653 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6654 (elf_64_file_p): Make static.
6655 (linux_pid_exe_is_elf_64_file): New.
6656 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6657 Delete declarations.
6658 (linux_pid_exe_is_elf_64_file): Declare.
6659 * linux-x86-low.c (x86_arch_setup): Use
6660 linux_pid_exe_is_elf_64_file.
6661
6662 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6663
6664 * linux-low.c (linux_wait_for_event_1): Rename to ...
6665 (linux_wait_for_event): ... here and merge it with former
6666 linux_wait_for_event - new variable wait_ptid, use it.
6667 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6668
6669 2012-01-23 Pedro Alves <palves@redhat.com>
6670
6671 * server.c (main): Avoid yet another case of infinite loop while
6672 detaching/killing after a longjmp.
6673
6674 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6675
6676 Code cleanup.
6677 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6678
6679 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6680
6681 * hostio.c (handle_readlink): New function.
6682 (handle_vFile): Call it to handle "vFile:readlink" packets.
6683
6684 2012-01-20 Pedro Alves <palves@redhat.com>
6685 Ulrich Weigand <ulrich.weigand@linaro.org>
6686
6687 * server.c (handle_v_requests): Only support vAttach and vRun to
6688 start multiple processes when in extended protocol mode.
6689
6690 2012-01-17 Pedro Alves <palves@redhat.com>
6691
6692 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6693 memalign plus mprotect to allocate the scratch buffer.
6694
6695 2012-01-13 Pedro Alves <palves@redhat.com>
6696
6697 * server.c (attach_inferior): Clear `cont_thread'.
6698
6699 2012-01-13 Pedro Alves <palves@redhat.com>
6700
6701 * server.c (main): Avoid infinite loop while detaching/killing
6702 after a longjmp.
6703
6704 2012-01-09 Doug Evans <dje@google.com>
6705
6706 * server.c (start_inferior): Set last_ptid in --wrapper case.
6707
6708 2012-01-06 Yao Qi <yao@codesourcery.com>
6709
6710 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6711 defined.
6712 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6713
6714 2012-01-04 Yao Qi <yao@codesourcery.com>
6715
6716 * tracepoint.c (cmd_qtdp): Print debug message
6717 for static tracepoint.
6718
6719 2012-01-04 Yao Qi <yao@codesourcery.com>
6720
6721 * tracepoint.c (trace_vdebug): Differentiate debug message
6722 between gdbserver and IPA.
6723
6724 2012-01-03 Yao Qi <yao@codesourcery.com>
6725
6726 * tracepoint.c (tracepoint_was_hit): Don't collect for
6727 static tracepoint.
6728
6729 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6730
6731 * terminal.h: Reformat copyright header.
6732
6733 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6734
6735 * server.c (gdbserver_version): Update copyright year.
6736 * gdbreplay.c (gdbreplay_version): Likewise.
6737
6738 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6739
6740 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6741
6742 Revert:
6743 2011-12-18 Hui Zhu <teawater@gmail.com>
6744 * linux-low.c (linux_create_inferior): Save return value to ret.
6745
6746 2011-12-18 Hui Zhu <teawater@gmail.com>
6747
6748 * linux-low.c (linux_create_inferior): Save return value to ret.
6749
6750 2011-12-16 Doug Evans <dje@google.com>
6751
6752 * linux-low.c (linux_create_inferior): If stdio connection,
6753 redirect stdin from /dev/null, stdout to stderr.
6754 * remote-utils.c (remote_is_stdio): New static global.
6755 (remote_connection_is_stdio): New function.
6756 (remote_prepare): Handle stdio connection.
6757 (remote_open): Ditto.
6758 (remote_close): Don't close stdin for stdio connections.
6759 (read_prim,write_prim): New functions. Replace all calls to
6760 read/write to these.
6761 * server.c (main): Watch for "-" argument. Move call to
6762 remote_prepare before start_inferior.
6763 * server.h (STDIO_CONNECTION_NAME): New macro.
6764 (remote_connection_is_stdio): Declare.
6765
6766 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6767 in debugging output.
6768
6769 2011-12-15 Yao Qi <yao@codesourcery.com>
6770
6771 * tracepoint.c: Include sys/syscall.h.
6772 (gdb_ust_thread): Remove preprocessor conditional.
6773
6774 2011-12-14 Pedro Alves <pedro@codesourcery.com>
6775
6776 * linux-low.c (linux_detach_one_lwp): Call
6777 the_low_target.prepare_to_resume before detaching.
6778
6779 2011-12-14 Yao Qi <yao@codesourcery.com>
6780
6781 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6782 of write.
6783
6784 2011-12-14 Yao Qi <yao@codesourcery.com>
6785
6786 * i386-low.c (i386_low_stopped_data_address): Initialize local
6787 variable `control'.
6788
6789 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6790
6791 PR remote/13492
6792
6793 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6794 DR_CONTROL unless necessary. Extend comments.
6795 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6796 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6797
6798 2011-12-13 Yao Qi <yao@codesourcery.com>
6799
6800 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6801 macros.
6802 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6803
6804 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6805
6806 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6807 Print new debug message for such case.
6808
6809 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6810
6811 Fix overlapping memcpy.
6812 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6813 the read_inferior_memory transfer.
6814 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6815 write_inferior_memory transfer.
6816 (set_fast_tracepoint_jump): New variable buf. Use it for the
6817 read_inferior_memory and write_inferior_memory transfers.
6818 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6819 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6820 Use it for the write_inferior_memory transfer.
6821 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6822 buffers.
6823
6824 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6825
6826 * linux-low.c (fetch_register, store_register): Make code
6827 consistent, fix formatting.
6828
6829 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6830
6831 * linux-low.c (usr_store_inferior_registers): Factor out code
6832 to handle individual registers into...
6833 (store_register): ... this new function.
6834
6835 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6836
6837 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6838 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6839 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6840 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6841 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6842 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6843 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6844 (srv_xmlfiles): Add new XML files.
6845
6846 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6847 and <sys/uio.h>.
6848 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6849 (init_registers_s390_linux32v1): Add prototype.
6850 (init_registers_s390_linux32v2): Likewise.
6851 (init_registers_s390_linux64v1): Likewise.
6852 (init_registers_s390_linux64v2): Likewise.
6853 (init_registers_s390x_linux64v1): Likewise.
6854 (init_registers_s390x_linux64v2): Likewise.
6855 (s390_num_regs): Increment to 52.
6856 (s390_regmap): Add orig_r2 register.
6857 (s390_num_regs_3264): Increment to 68.
6858 (s390_regmap_3264): Add orig_r2 register.
6859 (s390_collect_ptrace_register): Handle orig_r2 register.
6860 (s390_supply_ptrace_register): Likewise.
6861 (s390_fill_last_break): New function.
6862 (s390_store_last_break): Likewise.
6863 (s390_fill_system_call): New function.
6864 (s390_store_system_call): Likewise.
6865 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6866 register sets.
6867 (s390_check_regset): New function.
6868 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6869 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6870 Update target_regsets for available register sets.
6871
6872 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6873 Jan Kratochvil <jan.kratochvil@redhat.com>
6874
6875 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6876 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6877 New.
6878 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6879 * linux-low.h (struct process_info_private): New member r_debug.
6880 * server.c (handle_qxfer_libraries): Call
6881 the_target->qxfer_libraries_svr4.
6882 (handle_qxfer_libraries_svr4): New function.
6883 (qxfer_packets): New entry "libraries-svr4".
6884 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6885 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6886 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6887 PACKET_qXfer_libraries_svr4.
6888
6889 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6890
6891 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6892 PSW address/mask between 8-byte and 16-byte formats.
6893 (s390_supply_ptrace_register): Likewise.
6894 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6895 basic addressing mode bit.
6896
6897 2011-11-24 Stan Shebs <stan@codesourcery.com>
6898
6899 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6900
6901 2011-11-17 Stan Shebs <stan@codesourcery.com>
6902
6903 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6904 (tracing_start_time): New global.
6905 (tracing_stop_time): New global.
6906 (tracing_user_name): New global.
6907 (tracing_notes): New global.
6908 (tracing_stop_note): New global.
6909 (cmd_qtstart): Set traceframe_usage, start_time.
6910 (stop_tracing): Set stop_time.
6911 (cmd_qtstatus): Report additional status.
6912 (cmd_qtp): New function.
6913 (handle_tracepoint_query): Call it.
6914 (cmd_qtnotes): New function.
6915 (handle_tracepoint_general_set): Call it.
6916 (get_timestamp): Rename from tsv_get_timestamp.
6917
6918 2011-11-14 Stan Shebs <stan@codesourcery.com>
6919 Kwok Cheung Yeung <kcy@codesourcery.com>
6920
6921 * linux-x86-low.c (small_jump_insn): New.
6922 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6923 trampoline and error message, build a trampoline and issue a small
6924 jump instruction to it.
6925 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6926 trampoline and error message.
6927 (x86_get_min_fast_tracepoint_insn_len): New.
6928 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6929 * linux-low.h (struct linux_target_ops): Add arguments to
6930 install_fast_tracepoint_jump_pad operation, add new operation.
6931 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6932 arguments.
6933 (linux_get_min_fast_tracepoint_insn_len): New function.
6934 (linux_target_op): Add new operation.
6935 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6936 (gdb_trampoline_buffer_end): Ditto.
6937 (gdb_trampoline_buffer_error): Ditto.
6938 (struct ipa_sym_addresses): Add fields for new IPA variables.
6939 (symbol_list): Add entries for new IPA variables.
6940 (struct tracepoint): Add fields to hold the address range of the
6941 trampoline used by the tracepoint.
6942 (trampoline_buffer_head): New static variable.
6943 (trampoline_buffer_tail): Ditto.
6944 (claim_trampoline_space): New function.
6945 (have_fast_tracepoint_trampoline_buffer): New function.
6946 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6947 structure.
6948 (install_fast_tracepoint): Ditto, also add error buffer argument.
6949 (cmd_qtminftpilen): New function.
6950 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6951 (fast_tracepoint_from_trampoline_address): New function.
6952 (fast_tracepoint_collecting): Handle trampoline as part of jump
6953 pad space.
6954 (set_trampoline_buffer_space): New function.
6955 (initialize_tracepoint): Initialize new IPA variables.
6956 * target.h (struct target_ops): Add arguments to
6957 install_fast_tracepoint_jump_pad operation, add new
6958 get_min_fast_tracepoint_insn_len operation.
6959 (target_get_min_fast_tracepoint_insn_len): New.
6960 (install_fast_tracepoint_jump_pad): Add arguments.
6961 * server.h (IPA_BUFSIZ): Define.
6962 * linux-i386-ipa.c: Include extra header files.
6963 (initialize_fast_tracepoint_trampoline_buffer): New function.
6964 (initialize_low_tracepoint): Call it.
6965 * server.h (set_trampoline_buffer_space): Declare.
6966 (claim_trampoline_space): Ditto.
6967 (have_fast_tracepoint_trampoline_buffer): Ditto.
6968
6969 2011-11-14 Yao Qi <yao@codesourcery.com>
6970
6971 * server.c (handle_query): Handle InstallInTrace for qSupported.
6972 * tracepoint.c (add_tracepoint): Sort list.
6973 (install_tracepoint, download_tracepoint): New.
6974 (cmd_qtdp): Call them to install and download tracepoints.
6975 (sort_tracepoints): Removed.
6976 (cmd_qtstart): Update.
6977
6978 2011-11-14 Yao Qi <yao@codesourcery.com>
6979
6980 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6981 * mem-break.h: Declare.
6982 * tracepoint.c (cmd_qtstart): Move some code to ...
6983 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6984 New.
6985 (download_tracepoints): Move some code to ...
6986 (download_tracepoint_1): ... here. New.
6987
6988 2011-11-08 Yao Qi <yao@codesourcery.com>
6989
6990 * remote-utils.c (relocate_instruction): A comment fix.
6991
6992 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6993
6994 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6995 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6996 dr_status_mirror and dr_control_mirror from debug_reg_state.
6997 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6998 (i386_initial_stuff): Remove use of deleted globals.
6999 (i386_get_thread_context, i386_set_thread_context,
7000 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7001 from debug_reg_state.
7002
7003 2011-11-05 Yao Qi <yao@codesourcery.com>
7004
7005 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7006 address as TPOINT's.
7007
7008 2011-11-02 Stan Shebs <stan@codesourcery.com>
7009
7010 * tracepoint.c (agent_mem_read_string): New function.
7011 (eval_agent_expr): Call it for tracenz.
7012 * server.c (handle_query): Report support for tracenz.
7013
7014 2011-11-02 Yao Qi <yao@codesourcery.com>
7015
7016 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7017
7018 2011-11-02 Yao Qi <yao@codesourcery.com>
7019
7020 * target.h: Fix a typo in comment.
7021
7022 2011-10-31 Pedro Alves <pedro@codesourcery.com>
7023
7024 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7025 clobber the breakpoints' shadows with fast tracepoint jumps.
7026 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7027 * target.c (write_inferior_memory): Also pass MYADDR down to
7028 check_mem_write.
7029
7030 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7031
7032 * configure.ac: Check support for personality routine.
7033 * configure: Regenerate.
7034 * config.in: Likewise.
7035 * linux-low.c: Include <sys/personality.h>.
7036 Define ADDR_NO_RANDOMIZE if necessary.
7037 (linux_create_inferior): Disable address space randomization when
7038 forking inferior, if requested.
7039 (linux_supports_disable_randomization): New function.
7040 (linux_target_ops): Install it.
7041 * server.h (disable_randomization): Declare.
7042 * server.c (disable_randomization): New global variable.
7043 (handle_general_set): Handle QDisableRandomization.
7044 (handle_query): Likewise for qSupported.
7045 (main): Support --disable-randomization and --no-disable-randomization
7046 command line arguments.
7047 * target.h (struct target_ops): Add supports_disable_randomization.
7048 (target_supports_disable_randomization): New macro.
7049
7050 2011-09-29 Mike Frysinger <vapier@gentoo.org>
7051
7052 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7053 ifdef check.
7054 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7055 [!PT_GETDSBT] (target_loadmap): New definition.
7056 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7057 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7058 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7059 and PT_GETDSBT to LINUX_LOADMAP.
7060 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7061 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7062
7063 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7064
7065 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7066 (arm_linux_hwbp_cap): New static variable.
7067 (arm_linux_get_hwbp_cap): Replace by ...
7068 (arm_linux_init_hwbp_cap): ... this new function.
7069 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7070 (arm_linux_get_hw_watchpoint_count): Likewise.
7071 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7072 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7073 (arm_prepare_to_resume): Use perror_with_name instead of error.
7074
7075 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7076
7077 * linux-arm-low.c: Include <signal.h>.
7078 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7079 (struct arm_linux_hwbp_cap): New data type.
7080 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7081 (struct arm_linux_hw_breakpoint): New data type.
7082 (MAX_BPTS, MAX_WPTS): Define.
7083 (struct arch_process_info, struct arch_lwp_info): New data types.
7084 (arm_linux_get_hwbp_cap): New function.
7085 (arm_linux_get_hw_breakpoint_count): Likewise.
7086 (arm_linux_get_hw_watchpoint_count): Likewise.
7087 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7088 (arm_hwbp_control_initialize): Likewise.
7089 (arm_hwbp_control_is_enabled): Likewise.
7090 (arm_hwbp_control_is_initialized): Likewise.
7091 (arm_hwbp_control_disable): Likewise.
7092 (arm_linux_hw_breakpoint_equal): Likewise.
7093 (arm_linux_hw_point_initialize): Likewise.
7094 (struct update_registers_data): New data structure.
7095 (update_registers_callback: New function.
7096 (arm_insert_point): Likewise.
7097 (arm_remove_point): Likewise.
7098 (arm_stopped_by_watchpoint): Likewise.
7099 (arm_stopped_data_address): Likewise.
7100 (arm_new_process): Likewise.
7101 (arm_new_thread): Likewise.
7102 (arm_prepare_to_resume): Likewise.
7103 (the_low_target): Register arm_insert_point, arm_remove_point,
7104 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7105 arm_new_thread, and arm_prepare_to_resume.
7106
7107 2011-09-15 Stan Shebs <stan@codesourcery.com>
7108
7109 * server.h (struct emit_ops): Add compare-goto fields.
7110 * tracepoint.c (gdb_agent_op_sizes): New table.
7111 (emit_eq_goto): New function.
7112 (emit_ne_goto): New function.
7113 (emit_lt_goto): New function.
7114 (emit_le_goto): New function.
7115 (emit_gt_goto): New function.
7116 (emit_ge_goto): New function.
7117 (is_goto_target): New function.
7118 (compile_bytecodes): Recognize special cases of compare-goto
7119 combinations and call specialized emitters for them.
7120 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7121 (amd64_emit_ne_goto): New function.
7122 (amd64_emit_lt_goto): New function.
7123 (amd64_emit_le_goto): New function.
7124 (amd64_emit_gt_goto): New function.
7125 (amd64_emit_ge_goto): New function.
7126 (amd64_emit_ops): Add the new functions.
7127 (i386_emit_eq_goto): New function.
7128 (i386_emit_ne_goto): New function.
7129 (i386_emit_lt_goto): New function.
7130 (i386_emit_le_goto): New function.
7131 (i386_emit_gt_goto): New function.
7132 (i386_emit_ge_goto): New function.
7133 (i386_emit_ops): Add the new functions.
7134
7135 2011-09-08 Stan Shebs <stan@codesourcery.com>
7136
7137 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7138 (i386_emit_epilogue): Restore %ebx.
7139
7140 2011-08-31 Jie Zhang <jzhang918@gmail.com>
7141
7142 * server.c (step_thread): Remove definition.
7143 (process_serial_event): Don't handle Hs.
7144 * server.h (step_thread): Remove declaration.
7145 * target.c (set_desired_inferior): Remove use of step_thread.
7146
7147 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7148
7149 * linux-low.c: Include linux-procfs.h.
7150 (linux_attach_lwp_1): Update comments.
7151 (linux_attach): Scan for existing threads when attaching to a
7152 process that is the tgid.
7153 * Makefile.in: Update dependencies.
7154
7155 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7156
7157 * configure.srv: Add linux-procfs.o dependencies.
7158
7159 2011-08-14 Yao Qi <yao@codesourcery.com>
7160
7161 * target.h (struct target_ops): Fix indent.
7162 * win32-low.c (win32_target_ops): Fix comment.
7163
7164 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
7165 Yao Qi <yao@codesourcery.com>
7166
7167 * Makefile.in (clean): Remove tic6x-*.c files.
7168 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7169 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7170 (tic6x-c64xp-linux.c): Likewise.
7171 * configure.srv: Add support for tic6x-*-uclinux.
7172 * linux-tic6x-low.c: New.
7173 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7174
7175 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
7176 Yao Qi <yao@codesourcery.com>
7177
7178 * target.h (struct target_ops): Add read_loadmap.
7179 * linux-low.c (struct target_loadseg): New type.
7180 (struct target_loadmap): New type.
7181 (linux_read_loadmap): New function.
7182 (linux_target_ops): Add linux_read_loadmap.
7183 * server.c (handle_query): Support qXfer:fdpic:read packet.
7184 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7185 to NULL.
7186
7187 2011-08-05 Eli Zaretskii <eliz@gnu.org>
7188
7189 * win32-low.c: Include <stdint.h>.
7190
7191 2011-07-22 Pedro Alves <pedro@codesourcery.com>
7192
7193 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7194 to the inferior here.
7195 (i386_remove_aligned_watchpoint): Ditto.
7196 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7197 fit part of the watchpoint in the debug registers.
7198 (i386_update_inferior_debug_regs): New.
7199 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7200 registers, and only update the inferior on success.
7201 (i386_low_remove_watchpoint): Ditto.
7202
7203 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7204
7205 * linux-low.c (compare_ints, unique, list_threads, show_process,
7206 linux_core_of_thread): Delete.
7207 (linux_target_ops): Change linux_core_of_thread to
7208 linux_common_core_of_thread.
7209 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7210 * utils.c (malloc_failure): Change type of argument.
7211 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7212 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7213 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7214 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7215 (IPA_OBJS): Add common-utils-ipa.o.
7216 (ptid_h, linux_osdata_h): New macros.
7217 (server_h): Add common/common-utils.h, common/xml-utils.h,
7218 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7219 common/ptid.h.
7220 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7221 ptid.o, buffer.o): New rules.
7222 (linux-low.o): Add common/linux-osdata.h as a dependency.
7223 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7224 * configure.ac: Add AC_HEADER_DIRENT check.
7225 * config.in: Regenerate.
7226 * configure: Regenerate.
7227 * remote-utils.c (xml_escape_text): Delete.
7228 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7229 buffer_xml_printf): Move to common/buffer.c.
7230 * server.c (main): Remove call to initialize_inferiors.
7231 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7232 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7233 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7234 internal_error, gdb_assert, gdb_assert_fail): Delete.
7235 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7236 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7237 common/buffer.h.
7238 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7239 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7240 initialize_inferiors): Delete.
7241
7242 2011-07-20 Pedro Alves <pedro@codesourcery.com>
7243
7244 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7245 symbol error.
7246
7247 2011-05-31 Pedro Alves <pedro@codesourcery.com>
7248
7249 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7250 assertion.
7251 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7252
7253 2011-05-26 Yao Qi <yao@codesourcery.com>
7254
7255 * Makefile.in (thread-db.o): Track dependence to
7256 common/gdb_thread_db.h.
7257 * thread-db.c: include gdb_thread_db.h from right place.
7258
7259 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7260
7261 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7262 __FILE__ and __LINE__ to internal_error.
7263
7264 2011-05-13 Doug Evans <dje@google.com>
7265
7266 * thread-db.c (try_thread_db_load_from_sdir): New function.
7267 (try_thread_db_load_from_dir): New function.
7268 (thread_db_load_search): Handle $sdir, ignore $pdir.
7269 Remove trying of system directories if search of
7270 libthread-db-search-path fails, that is now done via $sdir.
7271
7272 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7273
7274 * server.c (handle_query): Add EnableDisableTracepoints to the list
7275 of supported features.
7276 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7277 tracepoints.
7278 (cmd_qtenable_disable): New.
7279 (cmd_qtstart): Install tracepoints even if disabled.
7280 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7281 receiving a QTEnable or QTDisable packet.
7282 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7283 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7284 tracepoints.
7285 (gdb_probe): Skip data collection if static tracepoint is disabled.
7286
7287 2011-05-10 Doug Evans <dje@google.com>
7288
7289 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7290
7291 2011-05-04 Doug Evans <dje@google.com>
7292
7293 * linux-low.c (linux_join): Skip process lookup.
7294 * spu-low.c (spu_join): Ditto.
7295 * server.c (join_inferiors_callback): Delete.
7296 (process_serial_event): For 'D' packet (detach) call join_inferior
7297 directly.
7298
7299 2011-05-04 Joseph Myers <joseph@codesourcery.com>
7300
7301 * README: Don't mention xscale*-*-linux*.
7302 * configure.srv (xscale*-*-linux*): Don't handle target.
7303
7304 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7305
7306 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7307 casting pointers.
7308 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7309 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7310 (i386_emit_void_call_2): Likewise.
7311
7312 2011-04-26 Yao Qi <yao@codesourcery.com>
7313
7314 * linux-low.c: Move common macros to linux-ptrace.h.
7315 Include linux-ptrace.h.
7316 * Makefile.in (linux_ptrace_h): New.
7317 (linux-low.o): Depends on linux-ptrace.h.
7318
7319 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7320
7321 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7322 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7323 (remote_prepare): New function with most of the TCP code from ...
7324 (remote_open): ... here. Detect PORT here unconditionally. Move also
7325 setting transport_is_reliable.
7326 * server.c (run_once): New variable.
7327 (gdbserver_usage): Document it.
7328 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7329 the first run if RUN_ONCE.
7330 * server.h (run_once, remote_prepare): New declarations.
7331
7332 2011-04-19 Tom Tromey <tromey@redhat.com>
7333
7334 * win32-low.c (handle_load_dll): Remove duplicate "the".
7335
7336 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7337
7338 Remove support for old Cygwin 1.5 versions.
7339 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7340 function to avoid warning.
7341 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7342 warning.
7343
7344 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7345
7346 * gdbserver/server.h (Macro _): Define it if not available.
7347
7348 2011-03-14 Michael Snyder <msnyder@vmware.com>
7349
7350 * hostio.c (handle_close): Remove unnecessary null test.
7351
7352 2011-03-10 Joel Brobecker <brobecker@adacore.com>
7353
7354 * Makefile.in (maintainer-clean realclean distclean): Remove
7355 "make ... subdir_do" command.
7356
7357 2011-03-10 Michael Snyder <msnyder@vmware.com>
7358
7359 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7360
7361 * server.c (handle_v_run): Free alloced buffer on early return.
7362
7363 2011-03-09 Yao Qi <yao@codesourcery.com>
7364
7365 Revert:
7366 2011-03-04 Yao Qi <yao@codesourcery.com>
7367
7368 * Makefile.in: Remove GNU make feature --directory.
7369
7370 2011-03-05 Yao Qi <yao@codesourcery.com>
7371
7372 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7373 (subdir_do): New make target. Copied from gdb/Makefile.
7374 (maintainer-clean, realclean, distclean, clean): Call corresponding
7375 make targets in common/Makefile.
7376
7377 2011-02-11 Yao Qi <yao@codesourcery.com>
7378
7379 * configure.ac: Call AC_PROG_RANLIB.
7380 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7381 * configure: Regenerate.
7382
7383 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7384
7385 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7386
7387 2011-03-06 Yao Qi <yao@codesourcery.com>
7388
7389 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7390
7391 2011-03-05 Yao Qi <yao@codesourcery.com>
7392
7393 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7394 (subdir_do): New make target. Copied from gdb/Makefile.
7395 (maintainer-clean, realclean, distclean, clean): Call corresponding
7396 make targets in common/Makefile.
7397
7398 2011-03-04 Yao Qi <yao@codesourcery.com>
7399
7400 * Makefile.in: Remove GNU make feature --directory.
7401
7402 2011-03-04 Michael Snyder <msnyder@vmware.com>
7403
7404 * server.c (queue_stop_reply): Call xmalloc not malloc.
7405
7406 2011-03-02 Michael Snyder <msnyder@vmware.com>
7407
7408 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7409
7410 2011-02-28 Michael Snyder <msnyder@vmware.com>
7411
7412 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7413 (cmd_qtframe): Ditto.
7414 (cmd_qtbuffer): Ditto.
7415 (cmd_bigqtbuffer): Ditto.
7416
7417 * utils.c (decimal2str): Initialize 'width' to nine, then
7418 don't mess with it.
7419
7420 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7421
7422 * hostio.c (require_data): Free *data, not data.
7423
7424 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7425
7426 * hostio.c (require_data): Use free, not xfree.
7427
7428 2011-02-27 Michael Snyder <msnyder@vmware.com>
7429
7430 * server.c (handle_query): Discard unused value.
7431
7432 * hostio.c (require_data): Free malloc memory before returning
7433 error.
7434
7435 2011-02-26 Michael Snyder <msnyder@vmware.com>
7436
7437 * linux-low.c (list_threads): Call closedir for dirent.
7438
7439 2011-02-27 Michael Snyder <msnyder@vmware.com>
7440
7441 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7442 a case statement falls through.
7443
7444 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7445
7446 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7447 in comparison.
7448
7449 2011-02-26 Michael Snyder <msnyder@vmware.com>
7450
7451 * utils.c (decimal2str): Eliminate dead code and dead param.
7452 (pulongest): Drop dead param from call to decimal2str.
7453 (plongest): Ditto.
7454
7455 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7456
7457 Revert the following patch (not approved yet):
7458 2011-02-21 Hui Zhu <teawater@gmail.com>
7459 * tracepoint.c (tp_printf): New function.
7460 (eval_agent_expr): Handle gdb_agent_op_printf.
7461
7462 2011-02-21 Hui Zhu <teawater@gmail.com>
7463
7464 * tracepoint.c (tp_printf): New function.
7465 (eval_agent_expr): Handle gdb_agent_op_printf.
7466
7467 2011-02-18 Tom Tromey <tromey@redhat.com>
7468
7469 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7470 (tracepoint.o): Likewise.
7471 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7472 (gdb_agent_op_names): Likewise.
7473
7474 2011-02-18 Tom Tromey <tromey@redhat.com>
7475
7476 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7477 gdb_agent_op_rot>: New constants.
7478 (gdb_agent_op_names): Add pick and roll.
7479 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7480 cases.
7481
7482 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7483
7484 * aclocal.m4: Regenerated with aclocal-1.11.1.
7485
7486 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7487
7488 * server.c (handle_qxfer_traceframe_info): New.
7489 (qxfer_packets): Register "traceframe-info".
7490 (handle_query): Report support for qXfer:traceframe-info:read+.
7491 * tracepoint.c (match_blocktype): New.
7492 (traceframe_find_block_type): Rename to ...
7493 (traceframe_walk_blocks): ... this. Add callback filter argument,
7494 and use it.
7495 (traceframe_find_block_type): New, reimplemented on top of
7496 traceframe_walk_blocks.
7497 (build_traceframe_info_xml): New.
7498 (traceframe_read_info): New.
7499 * server.h (traceframe_read_info): Declare.
7500
7501 2011-02-11 Yao Qi <yao@codesourcery.com>
7502
7503 * configure.ac: Call AC_PROG_RANLIB.
7504 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7505 * configure: Regenerate.
7506
7507 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7508
7509 * server.c (gdb_read_memory): Change return semantics to allow
7510 partial transfers.
7511 (handle_search_memory_1): Adjust.
7512 (process_serial_event) <'m' packet>: Handle partial transfers.
7513 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7514
7515 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7516
7517 * regcache.c (init_register_cache): Initialize
7518 regcache->register_status.
7519 (free_register_cache): Release regcache->register_status.
7520 (regcache_cpy): Copy register_status.
7521 (registers_to_string): Print 'x's for unavailable registers.
7522 (supply_register): Mark the register's status valid or
7523 unavailable, depending on whether a buffer was passed in or not.
7524 (supply_register_zeroed): New.
7525 (supply_regblock): Mark the registers' status valid or
7526 unavailable, depending on whether a buffer was passed in or not.
7527 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7528 (struct regcache): New `register_status' field.
7529 (supply_register_zeroed): Declare.
7530 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7531 supply_register_zeroed, rather than passing a NULL buffer to
7532 supply_register.
7533 * tracepoint.c (fetch_traceframe_registers): Update comment.
7534
7535 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7536
7537 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7538 buffer explicit.
7539
7540 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7541
7542 * server.h (decode_xfer_write): Change prototype.
7543 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7544 and don't extract the annex here.
7545 * server.c (decode_xfer_read): Remove `annex' parameter,
7546 and don't extract the annex here.
7547 (decode_xfer): New.
7548 (struct qxfer): New.
7549 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7550 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7551 (handle_qxfer_statictrace): New functions, abstracted out from
7552 handle_query, and made to use the struct qxfer interface.
7553 (handle_threads_qxfer_proper): Rename to ...
7554 (handle_qxfer_threads_proper): ... this.
7555 (handle_threads_qxfer): Rename to ...
7556 (handle_qxfer_threads): ... this. Adjust.
7557 (qxfer_packets): New array.
7558 (handle_qxfer): New function.
7559 (handle_query): Use handle_qxfer.
7560
7561 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7562
7563 * gdbreplay.c: Shorten lines of >= 80 columns.
7564 * linux-low.c: Ditto.
7565 * linux-ppc-low.c: Ditto.
7566 * linux-s390-low.c: Ditto.
7567 * linux-sparc-low.c: Ditto.
7568 * linux-x86-low.c: Ditto.
7569 * linux-xtensa-low.c: Ditto.
7570 * mem-break.c: Ditto.
7571 * nto-low.c: Ditto.
7572 * regcache.h: Ditto.
7573 * remote-utils.c: Ditto.
7574 * server.c: Ditto.
7575 * server.h: Ditto.
7576 * thread-db.c: Ditto.
7577 * tracepoint.c: Ditto.
7578 * utils.c: Ditto.
7579 * win32-low.h: Ditto.
7580
7581 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7582
7583 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7584 update.
7585
7586 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7587
7588 * server.c (gdbserver_version): Update copyright year in version
7589 output.
7590 * gdbreplay.c (gdbreplay_version): Ditto.
7591
7592 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7593
7594 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7595 * linux-bfin-low.c: New file.
7596 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7597 PT_DATA_ADDR for BFIN targets.
7598 * Makefile.in (SFILES): Add linux-bfin-low.c.
7599 (clean): Remove reg-bfin.c.
7600 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7601 * README: Mention supported Blackfin targets.
7602
7603 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7604
7605 * .gitignore: New file.
7606
7607 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7608
7609 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7610
7611 2010-10-22 Jie Zhang <jie@codesourcery.com>
7612
7613 * Makefile.in: Add FLAGS_TO_PASS variable.
7614 (install): Remove dependency of install-only and recursively
7615 invoke make for install-only.
7616
7617 2010-10-04 Doug Evans <dje@google.com>
7618
7619 * Makefile.in (uninstall): Use $(DESTDIR).
7620
7621 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7622
7623 PR gdb/11842
7624
7625 * linux-x86-low.c (compat_siginfo_from_siginfo)
7626 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7627 si_code is < 0. Check for si_code == SI_TIMER before checking for
7628 si_code < 0.
7629
7630 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7631
7632 * lynx-i386-low.c: New file.
7633 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7634
7635 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7636
7637 * lynx-low.c (ptrace_request_to_str): Remove handling for
7638 request values that have been removed in LynxOS 5.x.
7639
7640 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7641
7642 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7643 <ptrace.h>
7644
7645 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7646
7647 * configure.ac: Add --enable-inprocess-agent option.
7648 * configure: Rebuilt.
7649
7650 2010-09-06 Yao Qi <yao@codesourcery.com>
7651
7652 * linux-low.c (linux_kill): Remove unused variable.
7653 (linux_stabilize_threads): Likewise.
7654 * server.c (start_inferior): Likewise.
7655 (queue_stop_reply_callback): Likewise.
7656 * tracepoint.c (do_action_at_tracepoint): Likewise.
7657
7658 2010-09-06 Yao Qi <yao@codesourcery.com>
7659
7660 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7661 on return.
7662
7663 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7664
7665 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7666
7667 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7668
7669 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7670 "$(IPA_DEPFILES)".
7671
7672 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7673
7674 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7675 gdbserver/lynx-ppc-low.c: New files.
7676 * Makefile.in (lynx_low_h): New variable.
7677 (lynx-low.o, lynx-ppc-low.o): New rules.
7678 * configure.ac: On LynxOS, link with -lnetinet.
7679 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7680 * configure: regenerate.
7681
7682 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7683
7684 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7685 * configure.ac: Add check for vasprintf and vsnprintf.
7686 * configure, config.in: Regenerate.
7687 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7688
7689 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7690
7691 * gdbreplay.c: Move include of alloca.h up, next to include of
7692 malloc.h.
7693 * server.h: Add include of malloc.h.
7694 * mem-break.c: Remove include of malloc.h.
7695 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7696
7697 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7698
7699 * Makefile.in (memmem.o): Build with -Wno-error.
7700
7701 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7702
7703 * utils.c (xsnprintf): Make non-static.
7704 * server.h: Add xsnprintf declaration.
7705 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7706 replace calls to snprintf by calls to xsnprintf throughout.
7707
7708 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7709
7710 * configure.ac: Add configure check for alloca.
7711 * configure, config.in: Regenerate.
7712 * server.h: Include alloca.h if it exists.
7713 * gdbreplay.c: Include alloca.h if it exists.
7714
7715 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7716
7717 * linux-low.c (__SIGRTMIN): Define if not already defined.
7718 (linux_create_inferior): Check for __ANDROID__ rather than
7719 __SIGRTMIN.
7720 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7721 are already deferred.
7722 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7723 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7724 stopped and already has a pending signal to report.
7725 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7726 a pending signal to report or is moving out of a jump pad.
7727 (linux_init_signals): Check for __ANDROID__ rather than
7728 __SIGRTMIN.
7729
7730 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7731
7732 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7733 debug_threads check. Avoid a linear search when not doing debug
7734 output.
7735
7736 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7737
7738 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7739 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7740 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7741 (process_event): Change local fd's type to gdb_fildes_t.
7742 (create_file_handler): Adjust prototype.
7743 (delete_file_handler): Adjust prototype.
7744 (handle_file_event): Adjust prototype. Use pfildes.
7745 (create_file_event): Adjsut prototype.
7746 * remote-utils.c (remote_desc, listen_desc): Change type to
7747 gdb_fildes_t.
7748 * server.h: New gdb_fildes_t typedef.
7749 [USE_WIN32API]: Include winsock2.h.
7750 (delete_file_handler, add_file_handler): Adjust prototypes.
7751 (pfildes): Declare.
7752 * utils.c (pfildes): New.
7753
7754 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7755
7756 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7757 * configure: Regenerate.
7758
7759 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7760
7761 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7762 (linux_done_accessing_memory): ... this.
7763 (linux_target_ops): Adjust.
7764 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7765 * nto-low.c (nto_target_ops): Adjust comment.
7766 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7767 * spu-low.c (spu_target_ops): Adjust comment.
7768 * target.h (target_ops): Rename unprepare_to_access_memory field
7769 to done_accessing_memory.
7770 (unprepare_to_access_memory): Rename to ...
7771 (done_accessing_memory): ... this.
7772
7773 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7774
7775 * linux-low.c (linux_prepare_to_access_memory): New.
7776 (linux_unprepare_to_access_memory): New.
7777 (linux_target_ops): Install them.
7778 * server.c (read_memory): Rename to ...
7779 (gdb_read_memory): ... this. Use
7780 prepare_to_access_memory/prepare_to_access_memory.
7781 (write_memory): Rename to ...
7782 (gdb_write_memory): ... this. Use
7783 prepare_to_access_memory/prepare_to_access_memory.
7784 (handle_search_memory_1): Adjust.
7785 (process_serial_event): Adjust.
7786 * target.h (struct target_ops): New fields
7787 prepare_to_access_memory and unprepare_to_access_memory.
7788 (prepare_to_access_memory, unprepare_to_access_memory): New.
7789 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7790 prepare_to_access_memory/prepare_to_access_memory.
7791 * nto-low.c (nto_target_ops): Adjust.
7792 * spu-low.c (spu_target_ops): Adjust.
7793 * win32-low.c (win32_target_ops): Adjust.
7794
7795 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7796
7797 * Makefile.in (WARN_CFLAGS): Get it from configure.
7798 (WERROR_CFLAGS): New.
7799 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7800 * configure.ac: Introduce --enable-werror, which adds -Werror to
7801 the compiler command line. Enabled by default. Disable with
7802 --disable-werror. Add -Wdeclaration-after-statement
7803 Wpointer-arith and -Wformat-nonliteral to warning flags.
7804 * configure: Regenerate.
7805
7806 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7807
7808 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7809
7810 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7811
7812 * gdbreplay.c (remote_error): New.
7813 (gdbchar): New.
7814 (expect): Use gdbchar. Check for error reading from GDB.
7815 Clarify sync error output.
7816 (play): Check for errors writing to GDB.
7817 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7818 * remote-utils.c (getpkt): Check for errors writing to the remote
7819 descriptor.
7820
7821 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7822
7823 * linux-low.c (linux_wait_1): Move non-debugging code out of
7824 `debug_threads' control.
7825
7826 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7827
7828 * linux-low.c (linux_wait_1): Don't set last_status here.
7829 * server.c (push_event, queue_stop_reply_callback): Assert we're
7830 not pushing a TARGET_WAITKIND_IGNORE event.
7831 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7832 (myresume, handle_target_event): Set the thread's last_resume_kind
7833 and last_status from the target returned status.
7834
7835 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7836
7837 PR threads/10729
7838
7839 * linux-x86-low.c (update_debug_registers_callback): New.
7840 (i386_dr_low_set_addr): Use it.
7841 (i386_dr_low_get_addr): New.
7842 (i386_dr_low_set_control): Use update_debug_registers_callback.
7843 (i386_dr_low_get_control): New.
7844 (i386_dr_low_get_status): Adjust.
7845 * linux-low.c (linux_stop_lwp): New.
7846 * linux-low.h (linux_stop_lwp): Declare.
7847
7848 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7849 argument instead of a i386_debug_reg_state.
7850 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7851 a i386_debug_reg_state.
7852 (i386_insert_aligned_watchpoint): Adjust.
7853 (i386_remove_aligned_watchpoint): Adjust.
7854 (i386_low_stopped_data_address): Read the debug registers from the
7855 inferior instead of from the mirrors.
7856 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7857 (i386_dr_low_get_addr): Declare.
7858 (i386_dr_low_get_control): Declare.
7859 (i386_dr_low_get_status): Change prototype.
7860
7861 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7862 (i386_dr_low_get_addr): New.
7863 (i386_dr_low_get_control): New.
7864 (i386_dr_low_get_status): Adjust prototype. Return
7865 dr_status_mirror.
7866 (i386_initial_stuff): Clear dr_status_mirror and
7867 dr_control_mirror.
7868 (i386_get_thread_context): Adjust.
7869 (i386_set_thread_context): Adjust.
7870 (i386_thread_added): Adjust.
7871
7872 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7873
7874 * linux-low.h (linux_thread_area): Delete declaration.
7875
7876 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7877
7878 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7879 after its termination.
7880
7881 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7882
7883 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7884 (gdb_wants_all_stopped): Delete.
7885 (linux_wait_1): Don't call them.
7886 * server.c (handle_v_cont): Tag all threads as want-stopped.
7887 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7888 stopped as "client-wants-stopped".
7889
7890 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7891
7892 * Makefile.in (signals_h): New.
7893 (server_h): Depend on it.
7894 (server.o): Don't depend on $(signals_def).
7895 (signals.o): Depend on $(signals_def).
7896
7897 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7898
7899 * Makefile.in (signals_def): New.
7900 (server_h): Append include/gdb/signals.h and signals_def.
7901 (server.o): Append signals_def.
7902
7903 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7904
7905 * server.c (handle_target_event): Use target_signal_to_host for
7906 resume_info.sig initialization.
7907 * target.h (struct thread_resume) <sig>: New comment.
7908
7909 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7910
7911 * server.c (handle_query): strcpy() the returned string from paddress()
7912 instead of sprintf().
7913 * utils.c (paddress): Return phex_nz().
7914
7915 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7916
7917 * server.c (handle_v_cont): Call mourn_inferior if process
7918 just exited.
7919 (myresume): Likewise.
7920
7921 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7922
7923 Static tracepoints, and integration with UST.
7924
7925 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7926 * mem-break.c (uninsert_all_breakpoints)
7927 (reinsert_all_breakpoints): New.
7928 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7929 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7930 (gdb_agent_ust_loaded, helper_thread_id)
7931 (gdb_agent_helper_thread_id): New macros.
7932 (struct ipa_sym_addresses): Add addr_ust_loaded,
7933 addr_helper_thread_id, addr_cmd_buf.
7934 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7935 (in_process_agent_loaded_ust): New.
7936 (write_e_ust_not_loaded): New.
7937 (maybe_write_ipa_ust_not_loaded): New.
7938 (struct collect_static_trace_data_action): New.
7939 (enum tracepoint_type) <static_tracepoint>: New.
7940 (struct tracepoint) <handle>: Mention static tracepoints.
7941 (struct static_tracepoint_ctx): New.
7942 (CMD_BUF_SIZE): New.
7943 (add_tracepoint_action): Handle static tracepoint actions.
7944 (unprobe_marker_at): New.
7945 (clear_installed_tracepoints): Handle static tracepoints.
7946 (cmd_qtdp): Handle static tracepoints.
7947 (probe_marker_at): New.
7948 (cmd_qtstart): Handle static tracepoints.
7949 (response_tracepoint): Handle static tracepoints.
7950 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7951 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7952 (get_context_regcache): Handle static tracepoints.
7953 (do_action_at_tracepoint): Handle static tracepoint actions.
7954 (traceframe_find_block_type): Handle static trace data blocks.
7955 (traceframe_read_sdata): New.
7956 (download_tracepoints): Download static tracepoint actions.
7957 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7958 (GDB_PROBE_NAME): New.
7959 (ust_ops): New.
7960 (GET_UST_SYM): New.
7961 (USTF): New.
7962 (dlsym_ust): New.
7963 (ust_marker_to_static_tracepoint): New.
7964 (gdb_probe): New.
7965 (collect_ust_data_at_tracepoint): New.
7966 (gdb_ust_probe): New.
7967 (UNIX_PATH_MAX, SOCK_DIR): New.
7968 (gdb_ust_connect_sync_socket): New.
7969 (resume_thread, stop_thread): New.
7970 (run_inferior_command): New.
7971 (init_named_socket): New.
7972 (gdb_ust_socket_init): New.
7973 (cstr_to_hexstr): New.
7974 (next_st): New.
7975 (first_marker, next_marker): New.
7976 (response_ust_marker): New.
7977 (cmd_qtfstm, cmd_qtsstm): New.
7978 (unprobe_marker_at, probe_marker_at): New.
7979 (cmd_qtstmat, gdb_ust_thread): New.
7980 (gdb_ust_init): New.
7981 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7982 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7983 (ST_REGENTRY): New.
7984 (x86_64_st_collect_regmap): New.
7985 (X86_64_NUM_ST_COLLECT_GREGS): New.
7986 (AMD64_RIP_REGNUM): New.
7987 (supply_static_tracepoint_registers): New.
7988 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7989 (ST_REGENTRY): New.
7990 (i386_st_collect_regmap): New.
7991 (i386_NUM_ST_COLLECT_GREGS): New.
7992 (supply_static_tracepoint_registers): New.
7993 * server.c (handle_query): Handle qXfer:statictrace:read.
7994 <qSupported>: Report support for StaticTracepoints, and
7995 qXfer:statictrace:read features.
7996 * server.h (traceframe_read_sdata)
7997 (supply_static_tracepoint_registers): Declare.
7998 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7999 (unpack_varlen_hex): Include in IPA build.
8000 * Makefile.in (ustlibs, ustinc): New.
8001 (IPA_OBJS): Add remote-utils-ipa.o.
8002 ($(IPA_LIB)): Link -ldl and -lpthread.
8003 (UST_CFLAGS): New.
8004 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8005 * config.in, configure: Regenerate.
8006
8007 2010-06-20 Ian Lance Taylor <iant@google.com>
8008 Pedro Alves <pedro@codesourcery.com>
8009
8010 * linux-x86-low.c (always_true): Delete.
8011 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8012 trying to fool the compiler with always_true.
8013
8014 2010-06-20 Pedro Alves <pedro@codesourcery.com>
8015
8016 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8017 conditions in gdbserver.
8018
8019 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8020
8021 * spu-low.c (spu_read_memory): Wrap around local store limit.
8022 (spu_write_memory): Likewise.
8023
8024 2010-06-15 Pedro Alves <pedro@codesourcery.com>
8025
8026 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8027 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8028 LONGEST uses.
8029 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8030 uses.
8031 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8032 uses with LONGEST uses.
8033
8034 2010-06-14 Stan Shebs <stan@codesourcery.com>
8035 Pedro Alves <pedro@codesourcery.com>
8036
8037 Bytecode compiler.
8038
8039 * linux-x86-low.c: Include limits.h.
8040 (add_insns): New.
8041 (always_true): New.
8042 (EMIT_ASM): New.
8043 (EMIT_ASM32): New.
8044 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8045 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8046 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8047 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8048 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8049 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8050 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8051 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8052 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8053 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8054 (amd64_emit_void_call_2): New.
8055 (amd64_emit_ops): New.
8056 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8057 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8058 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8059 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8060 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8061 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8062 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8063 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8064 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8065 (i386_emit_stack_adjust, i386_emit_int_call_1)
8066 (i386_emit_void_call_2): New.
8067 (i386_emit_ops): New.
8068 (x86_emit_ops): New.
8069 (the_low_target): Install x86_emit_ops.
8070 * server.h (struct emit_ops): New.
8071 (get_raw_reg_func_addr): Declare.
8072 (current_insn_ptr, emit_error): Declare.
8073 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8074 (set_trace_state_variable_value): New defines.
8075 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8076 addr_get_trace_state_variable_value and
8077 addr_set_trace_state_variable_value.
8078 (symbol_list): New fields for get_raw_reg,
8079 get_trace_state_variable_value and set_trace_state_variable_value.
8080 (condfn): New typedef.
8081 (struct tracepoint): New field `compiled_cond'.
8082 (do_action_at_tracepoint): Clear compiled_cond.
8083 (get_trace_state_variable_value, set_trace_state_variable_value):
8084 Export in the IPA.
8085 (condition_true_at_tracepoint): If there's a compiled condition,
8086 run that.
8087 (current_insn_ptr, emit_error): New globals.
8088 (struct bytecode_address): New.
8089 (get_raw_reg_func_addr): New.
8090 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8091 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8092 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8093 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8094 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8095 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8096 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8097 (compile_tracepoint_condition, compile_bytecodes): New.
8098 * target.h (emit_ops): Forward declare.
8099 (struct target_ops): New field emit_ops.
8100 (target_emit_ops): New.
8101 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8102 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8103 * linux-low.c (linux_emit_ops): New.
8104 (linux_target_ops): Install it.
8105 * linux-low.h (struct linux_target_ops): New field emit_ops.
8106
8107 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8108
8109 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8110 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8111
8112 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8113 Stan Shebs <stan@codesourcery.com>
8114
8115 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8116 (all): Depend on $(extra_libraries).
8117 (install-only): Install the IPA.
8118 (IPA_OBJS, IPA_LIB): New.
8119 (clean): Remove the IPA lib.
8120 (IPAGENT_CFLAGS): New.
8121 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8122 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8123 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8124 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8125 * configure.ac: Check for atomic builtins support in the compiler.
8126 (IPA_DEPFILES, extra_libraries): Define.
8127 * configure.srv (ipa_obj): Add description.
8128 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8129 (i[34567]86-*-linux*): Set ipa_obj.
8130 (x86_64-*-linux*): Set ipa_obj.
8131 * linux-low.c (stabilizing_threads): New.
8132 (supports_fast_tracepoints): New.
8133 (linux_detach): Stabilize threads before detaching.
8134 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8135 the lwp is either not stabilizing, or is moving out of a jump pad.
8136 (linux_fast_tracepoint_collecting): New.
8137 (maybe_move_out_of_jump_pad): New.
8138 (enqueue_one_deferred_signal): New.
8139 (dequeue_one_deferred_signal): New.
8140 (linux_wait_for_event_1): If moving out of a jump pad, defer
8141 pending signals to later.
8142 (linux_stabilize_threads): New.
8143 (linux_wait_1): Check if threads need moving out of jump pads, and
8144 do it if so.
8145 (stuck_in_jump_pad_callback): New.
8146 (move_out_of_jump_pad_callback): New.
8147 (lwp_running): New.
8148 (linux_resume_one_lwp): Handle moving out of jump pads.
8149 (linux_set_resume_request): Dequeue deferred signals.
8150 (need_step_over_p): Also step over fast tracepoint jumps.
8151 (start_step_over): Also uninsert fast tracepoint jumps.
8152 (finish_step_over): Also reinsert fast tracepoint jumps.
8153 (linux_install_fast_tracepoint_jump): New.
8154 (linux_target_ops): Install linux_stabilize_threads and
8155 linux_install_fast_tracepoint_jump_pad.
8156 * linux-low.h (linux_target_ops) <get_thread_area,
8157 install_fast_tracepoint_jump_pad>: New fields.
8158 (struct lwp_info) <collecting_fast_tracepoint,
8159 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8160 (linux_get_thread_area): Declare.
8161 * linux-x86-low.c (jump_insn): New.
8162 (x86_get_thread_area): New.
8163 (append_insns): New.
8164 (push_opcode): New.
8165 (amd64_install_fast_tracepoint_jump_pad): New.
8166 (i386_install_fast_tracepoint_jump_pad): New.
8167 (x86_install_fast_tracepoint_jump_pad): New.
8168 (the_low_target): Install x86_get_thread_area and
8169 x86_install_fast_tracepoint_jump_pad.
8170 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8171 (struct fast_tracepoint_jump): New.
8172 (fast_tracepoint_jump_insn): New.
8173 (fast_tracepoint_jump_shadow): New.
8174 (find_fast_tracepoint_jump_at): New.
8175 (fast_tracepoint_jump_here): New.
8176 (delete_fast_tracepoint_jump): New.
8177 (set_fast_tracepoint_jump): New.
8178 (uninsert_fast_tracepoint_jumps_at): New.
8179 (reinsert_fast_tracepoint_jumps_at): New.
8180 (set_breakpoint_at): Use write_inferior_memory.
8181 (uninsert_raw_breakpoint): Use write_inferior_memory.
8182 (check_mem_read): Mask out fast tracepoint jumps.
8183 (check_mem_write): Mask out fast tracepoint jumps.
8184 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8185 (set_fast_tracepoint_jump): Declare.
8186 (delete_fast_tracepoint_jump)
8187 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8188 (reinsert_fast_tracepoint_jumps_at): Declare.
8189 * regcache.c: Don't compile many functions when building the
8190 in-process agent library.
8191 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8192 the register buffer in the heap.
8193 (free_register_cache): If the register buffer isn't owned by the
8194 regcache, don't free it.
8195 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8196 pre-existing register caches.
8197 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8198 type.
8199 (convert_ascii_to_int): : Constify `from' parameter type.
8200 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8201 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8202 the needed buffer in-place.
8203 (relocate_instruction): New.
8204 * server.c (handle_query) <qSymbols>: If the target supports
8205 tracepoints, give it a chance of looking up symbols. Report
8206 support for fast tracepoints.
8207 (handle_status): Stabilize threads.
8208 (process_serial_event): Adjust.
8209 * server.h (struct fast_tracepoint_jump): Forward declare.
8210 (struct process_info) <fast_tracepoint_jumps>: New field.
8211 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8212 (decode_X_packet, decode_M_packet): Adjust.
8213 (relocate_instruction): Declare.
8214 (in_process_agent_loaded): Declare.
8215 (tracepoint_look_up_symbols): Declare.
8216 (struct fast_tpoint_collect_status): Declare.
8217 (fast_tracepoint_collecting): Declare.
8218 (force_unlock_trace_buffer): Declare.
8219 (handle_tracepoint_bkpts): Declare.
8220 (initialize_low_tracepoint)
8221 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8222 * target.h (struct target_ops) <stabilize_threads,
8223 install_fast_tracepoint_jump_pad>: New fields.
8224 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8225 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8226 [HAVE_STDINT_H]: Include stdint.h.
8227 (trace_debug_1): Rename to ...
8228 (trace_vdebug): ... this.
8229 (trace_debug): Rename to ...
8230 (trace_debug_1): ... this. Add `level' parameter.
8231 (trace_debug): New.
8232 (ATTR_USED, ATTR_NOINLINE): New.
8233 (IP_AGENT_EXPORT): New.
8234 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8235 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8236 (about_to_request_buffer_space, trace_buffer_is_full)
8237 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8238 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8239 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8240 (traceframe_write_count, traceframes_created)
8241 (trace_state_variables)
8242 New renaming defines.
8243 (struct ipa_sym_addresses): New.
8244 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8245 (symbol_list): New.
8246 (ipa_sym_addrs): New.
8247 (all_tracepoint_symbols_looked_up): New.
8248 (in_process_agent_loaded): New.
8249 (write_e_ipa_not_loaded): New.
8250 (maybe_write_ipa_not_loaded): New.
8251 (tracepoint_look_up_symbols): New.
8252 (debug_threads) [IN_PROCESS_AGENT]: New.
8253 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8254 (UNKNOWN_SIDE_EFFECTS): New.
8255 (stop_tracing): New.
8256 (flush_trace_buffer): New.
8257 (stop_tracing_bkpt): New.
8258 (flush_trace_buffer_bkpt): New.
8259 (read_inferior_integer): New.
8260 (read_inferior_uinteger): New.
8261 (read_inferior_data_pointer): New.
8262 (write_inferior_data_pointer): New.
8263 (write_inferior_integer): New.
8264 (write_inferior_uinteger): New.
8265 (struct collect_static_trace_data_action): Delete.
8266 (enum tracepoint_type): New.
8267 (struct tracepoint) <type>: New field `type'.
8268 <actions_str, step_actions, step_actions_str>: Only include in
8269 GDBserver.
8270 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8271 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8272 (tracepoints): Use IP_AGENT_EXPORT.
8273 (last_tracepoint): Don't include in the IPA.
8274 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8275 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8276 (alloced_trace_state_variables): New.
8277 (trace_state_variables): Use IP_AGENT_EXPORT.
8278 (traceframe_t): Delete unused variable.
8279 (circular_trace_buffer): Don't include in the IPA.
8280 (trace_buffer_start): Delete.
8281 (struct trace_buffer_control): New.
8282 (trace_buffer_free): Delete.
8283 (struct ipa_trace_buffer_control): New.
8284 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8285 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8286 New.
8287 (trace_buffer_ctrl): New.
8288 (TRACE_BUFFER_CTRL_CURR): New.
8289 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8290 Reimplement as macros.
8291 (trace_buffer_wrap): Delete.
8292 (traceframe_write_count, traceframe_read_count)
8293 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8294 (struct tracepoint_hit_ctx) <type>: New field.
8295 (struct fast_tracepoint_ctx): New.
8296 (memory_barrier): New.
8297 (cmpxchg): New.
8298 (record_tracepoint_error): Update atomically in the IPA.
8299 (clear_inferior_trace_buffer): New.
8300 (about_to_request_buffer_space): New.
8301 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8302 updating the same buffer.
8303 (add_tracepoint): Default the tracepoint's type to trap
8304 tracepoint, and orig_size to -1.
8305 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8306 internal variables.
8307 (create_trace_state_variable): New parameter `gdb'. Handle it.
8308 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8309 (cmd_qtdp): Handle fast tracepoints.
8310 (cmd_qtdv): Adjust.
8311 (max_jump_pad_size): New.
8312 (gdb_jump_pad_head): New.
8313 (get_jump_space_head): New.
8314 (claim_jump_space): New.
8315 (sort_tracepoints): New.
8316 (MAX_JUMP_SIZE): New.
8317 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8318 IPA.
8319 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8320 support. Upload fast traceframes, and delete internal IPA
8321 breakpoints.
8322 (stop_tracing_handler): New.
8323 (flush_trace_buffer_handler): New.
8324 (cmd_qtstop): Upload fast tracepoints.
8325 (response_tracepoint): Handle fast tracepoints.
8326 (tracepoint_finished_step): Upload fast traceframes. Set the
8327 tracepoint hit context's tracepoint type.
8328 (handle_tracepoint_bkpts): New.
8329 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8330 type. Add comment about fast tracepoints.
8331 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8332 non-existing action_str field.
8333 (get_context_regcache): Handle fast tracepoints.
8334 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8335 to the regcache.
8336 (fast_tracepoint_from_jump_pad_address): New.
8337 (fast_tracepoint_from_ipa_tpoint_address): New.
8338 (collecting_t): New.
8339 (force_unlock_trace_buffer): New.
8340 (fast_tracepoint_collecting): New.
8341 (collecting): New.
8342 (gdb_collect): New.
8343 (write_inferior_data_ptr): New.
8344 (target_tp_heap): New.
8345 (target_malloc): New.
8346 (download_agent_expr): New.
8347 (UALIGN): New.
8348 (download_tracepoints): New.
8349 (download_trace_state_variables): New.
8350 (upload_fast_traceframes): New.
8351 (IPA_FIRST_TRACEFRAME): New.
8352 (IPA_NEXT_TRACEFRAME_1): New.
8353 (IPA_NEXT_TRACEFRAME): New.
8354 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8355 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8356 (gdb_jump_pad_buffer_end): New.
8357 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8358 (initialize_tracepoint): Adjust.
8359 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8360 buffer. Initialize the low module.
8361 * utils.c (PREFIX, TOOLNAME): New.
8362 (malloc_failure): Use PREFIX.
8363 (error): In the IPA, an error causes an exit.
8364 (fatal, warning): Use PREFIX.
8365 (internal_error): Use TOOLNAME.
8366 (NUMCELLS): Increase to 10.
8367 * configure, config.in: Regenerate.
8368
8369 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8370
8371 * server.c (handle_query) <qSupported>: Do two passes over the
8372 qSupported string to avoid nesting strtok.
8373
8374 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8375
8376 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8377 (CDEPS): New.
8378 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8379 -Wl,--dynamic-list.
8380 * configure: Regenerate.
8381 * proc-service.list: New.
8382
8383 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8384
8385 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8386 New comment.
8387
8388 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8389
8390 * gdbreplay.c (remote_open): Check error return from socket() call by
8391 its equality to -1 not by it being negative.
8392 * remote-utils.c (remote_open): Likewise.
8393
8394 2010-05-23 Pedro Alves <pedro@codesourcery.com>
8395
8396 * config.h: Regenerate.
8397
8398 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8399
8400 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8401 doesn't provide PTRACE_GET_THREAD_AREA.
8402
8403 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8404
8405 * linux-m68k-low.c: Include <asm/ptrace.h>
8406 (ps_get_thread_area): Implement.
8407
8408 2010-05-03 Doug Evans <dje@google.com>
8409
8410 * event-loop.c (struct callback_event): New struct.
8411 (callback_list): New global.
8412 (append_callback_event, delete_callback_event): New functions.
8413 (process_callback): New function.
8414 (start_event_loop): Call it.
8415 * remote-utils.c (NOT_SCHEDULED): Define.
8416 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8417 moved out of readchar.
8418 (readchar): Rewrite. Call reschedule before returning.
8419 (reset_readchar): New function.
8420 (remote_close): Call it.
8421 (process_remaining, reschedule): New functions.
8422 * server.h (callback_handler_func): New typedef.
8423 (append_callback_event, delete_callback_event): Declare.
8424
8425 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8426
8427 * proc-service.c (ps_pglobal_lookup): Use
8428 thread_db_look_up_one_symbol.
8429 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8430 parameter. Use it instead of all_symbols_looked_up.
8431 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8432 field.
8433 (all_symbols_looked_up): Don't declare.
8434 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8435 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8436 field.
8437 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8438 Set all_symbols_looked_up here.
8439 (thread_db_look_up_one_symbol): New.
8440 (thread_db_get_tls_address): Adjust.
8441 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8442 thread_db object on the heap, and tentatively set it in the
8443 process structure.
8444 (thread_db_init): Don't set all_symbols_looked_up here.
8445 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8446
8447 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8448
8449 * linux-low.c (linux_kill, linux_detach): Adjust.
8450 (status_pending_p_callback): Remove redundant statement. Check
8451 for !TARGET_WAITIKIND_IGNORE, instead of
8452 TARGET_WAITKIND_STOPPED.
8453 (handle_tracepoints): Make sure LWP is locked. Adjust.
8454 (linux_wait_for_event_1): Adjust.
8455 (linux_cancel_breakpoints): New.
8456 (unsuspend_one_lwp): New.
8457 (unsuspend_all_lwps): New.
8458 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8459 (send_sigstop_callback): Change return type to int, add new
8460 `except' parameter and handle it.
8461 (suspend_and_send_sigstop_callback): New.
8462 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8463 pass them down. If SUSPEND, also increment the lwp's suspend
8464 count.
8465 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8466 (need_step_over_p): Don't consider suspended LWPs.
8467 (start_step_over): Adjust.
8468 (proceed_one_lwp): Change return type to int, add new `except'
8469 parameter and handle it.
8470 (unsuspend_and_proceed_one_lwp): New.
8471 (proceed_all_lwps): Use find_inferior instead of
8472 for_each_inferior.
8473 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8474 also decrement the suspend count of LWPs. Pass `except' down,
8475 instead of hacking its suspend count.
8476 (linux_pause_all): Add `freeze' parameter. Adjust.
8477 (linux_unpause_all): New.
8478 (linux_target_ops): Install linux_unpause_all.
8479 * server.c (handle_status): Adjust.
8480 * target.h (struct target_ops): New fields `unpause_all' and
8481 `cancel_breakpoints'. Add new parameter to `pause_all'.
8482 (pause_all): Add new `freeze' parameter.
8483 (unpause_all): New.
8484 (cancel_breakpoints): New.
8485 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8486 cancel breakpoints.
8487 (cmd_qtstart): Pause threads.
8488 (stop_tracing): Pause threads, and cancel breakpoints.
8489 * win32-low.c (win32_target_ops): Adjust.
8490
8491 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8492
8493 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8494 the inferior right away from here...
8495 (linux_wait_1): ... to here, and adjust to check the thread's
8496 last_resume_kind instead of the lwp's step or stop_expected flags.
8497
8498 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8499
8500 * README: Use consistent `GDB' and `GDBserver' spellings.
8501
8502 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8503
8504 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8505 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8506 (linux_detach_one_lwp): Assume the lwp is stopped.
8507 (any_thread_of): Delete.
8508 (linux_detach): Stop all lwps here. Don't blindly delete all
8509 breakpoints.
8510 (delete_lwp_callback): New.
8511 (linux_mourn): Delete all lwps of the process that is gone.
8512 (linux_wait_1): Don't delete the last lwp of the process here.
8513 * mem-break.h (mark_breakpoints_out): Declare.
8514 * mem-break.c (mark_breakpoints_out): New.
8515 (free_all_breakpoints): Use it.
8516 * server.c (handle_target_event): If the process is gone, mark
8517 breakpoints out.
8518 * thread-db.c (struct thread_db) <create_bp>: New field.
8519 (thread_db_enable_reporting): Fix prototype. Store a thread event
8520 breakpoint reference in the thread_db struct.
8521 (thread_db_load_search): Clear the thread_db object.
8522 (try_thread_db_load_1): Ditto.
8523 (switch_to_process): New.
8524 (disable_thread_event_reporting): Use it.
8525 (remove_thread_event_breakpoints): New.
8526 (thread_db_detach, thread_db_mourn): Use it.
8527
8528 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8529
8530 * linux-low.c (linux_enable_event_reporting): New.
8531 (linux_wait_for_event_1, handle_extended_wait): Use it.
8532
8533 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8534
8535 * linux-low.c (linux_kill_one_lwp, linux_kill)
8536 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8537 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8538 SIGSTOP even if the LWP is stopped.
8539 (send_sigstop_callback): New.
8540 (stop_all_lwps): Use send_sigstop_callback instead.
8541 (linux_resume_one_thread): Adjust.
8542 (proceed_one_lwp): Still proceed an LWP that the client has
8543 requested to stop, if we haven't reported it as stopped yet. Make
8544 sure that LWPs the client want stopped, have a pending SIGSTOP.
8545
8546 2010-04-26 Doug Evans <dje@google.com>
8547
8548 * server.c (handle_general_set): Make static.
8549
8550 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8551 Print received char after testing for error/eof instead of before.
8552 (input_interrupt): Tweak comment.
8553
8554 2010-04-23 Doug Evans <dje@google.com>
8555
8556 * server.c (start_inferior): Print inferior argv if --debug.
8557
8558 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8559
8560 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8561 * nto-x86-low.c: Include server.h
8562
8563 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8564
8565 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8566 be consistent with other sources of this directory.
8567 (init_registers_amd64): Correct name of source file of this function
8568 in the comment.
8569
8570 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8571
8572 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8573 64-bit executables.
8574
8575 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8576
8577 * win32-i386-low.c: Add 64-bit support.
8578 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8579 (init_registers_amd64): Declare.
8580 (mappings): Add 64-bit version of array.
8581 (init_windows_x86): New function.
8582 (the_low_target): Change init_arch field to init_windows_x86.
8583
8584 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8585
8586 * win32-low.c: Adapt to support also 64-bit architecture.
8587 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8588 (get_image_name): Use SIZE_T type for local variable `done'.
8589 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8590 (toolhelp_get_dll_name): Idem.
8591 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8592 Use uintptr_t typecast to avoid warning.
8593 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8594 (handle_exception): Use phex_nz to avoid warning.
8595 (win32_wait): Remove unused local variable `process'.
8596
8597 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8598
8599 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8600 `amd64-avx.o'.
8601
8602 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8603
8604 * configure.ac: Use `ws2_32' library for srv_mingw.
8605 * configure: Regenerate.
8606 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8607 * remote-utils.c: Likewise.
8608
8609 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8610
8611 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8612 if __x86_64__ is defined.
8613
8614 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8615
8616 * configure: Regenerate.
8617
8618 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8619
8620 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8621 * target.h (target_ops): New get_tib_address field.
8622 * win32-low.h (win32_thread_info): Add thread_local_base field.
8623 * win32-low.c (child_add_thread): Add tlb argument.
8624 Set thread_local_base field to TLB.
8625 (get_child_debug_event): Adapt to child_add_thread change.
8626 (win32_get_tib_address): New function.
8627 (win32_target_ops): Set get_tib_address field to
8628 win32_get_tib_address.
8629 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8630
8631 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8632
8633 * linux-low.c (linux_mourn): Also remove the process.
8634 * server.c (handle_target_event): Don't remove the process here.
8635 * nto-low.c (nto_mourn): New.
8636 (nto_target_ops): Install it.
8637 * spu-low.c (spu_mourn): New.
8638 (spu_target_ops): Install it.
8639 * win32-low.c (win32_mourn): New.
8640 (win32_target_ops): Install it.
8641
8642 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8643
8644 * server.h (buffer_xml_printf): Remove redundant `;'.
8645
8646 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8647
8648 * regcache.c (set_register_cache): Invalidate regcaches before
8649 changing the register cache layout.
8650 (regcache_invalidate_one): Allow a NULL regcache.
8651 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8652 regcaches before changing the register cache layout or the target
8653 regsets.
8654
8655 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8656
8657 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8658 variable warning on Linux/x86-64.
8659
8660 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8661
8662 GDBserver disconnected tracing support.
8663
8664 * linux-low.c (linux_remove_process): Delete.
8665 (add_lwp): Don't set last_resume_kind here.
8666 (linux_kill): Use `mourn'.
8667 (linux_detach): Use `thread_db_detach', and `mourn'.
8668 (linux_mourn): New.
8669 (linux_attach_lwp_1): Adjust comment.
8670 (linux_attach): last_resume_kind moved the thread_info; adjust.
8671 (status_pending_p_callback): Adjust.
8672 (linux_wait_for_event_1): Adjust.
8673 (count_events_callback, select_singlestep_lwp_callback)
8674 (select_event_lwp_callback, cancel_breakpoints_callback)
8675 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8676 (proceed_one_lwp): Adjust.
8677 (linux_async): Add debug output.
8678 (linux_thread_stopped): New.
8679 (linux_pause_all): New.
8680 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8681 linux_pause_all.
8682 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8683 (thread_db_free): Delete declaration.
8684 (thread_db_detach, thread_db_mourn): Declare.
8685 * thread-db.c (thread_db_init): Use thread_db_mourn.
8686 (thread_db_free): Delete, split in two.
8687 (disable_thread_event_reporting): New.
8688 (thread_db_detach): New.
8689 (thread_db_mourn): New.
8690
8691 * server.h (struct thread_info) <last_resume_kind>: New field.
8692 <attached>: Add comment.
8693 <gdb_detached>: New field.
8694 (handler_func): Change return type to int.
8695 (handle_serial_event, handle_target_event): Ditto.
8696 (gdb_connected): Declare.
8697 (tracing): Delete.
8698 (disconnected_tracing): Declare.
8699 (stop_tracing): Declare.
8700
8701 * server.c (handle_query) <qSupported>: Report support for
8702 disconnected tracing.
8703 (queue_stop_reply_callback): Account for running threads.
8704 (gdb_wants_thread_stopped): New.
8705 (gdb_wants_all_threads_stopped): New.
8706 (gdb_reattached_process): New.
8707 (handle_status): Clear the `gdb_detached' flag of all processes.
8708 In all-stop, stop all threads.
8709 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8710 (process_serial_event): If the remote connection breaks, or if an
8711 exit was forced with "monitor exit", force an event loop exit.
8712 Handle disconnected tracing on detach.
8713 (handle_serial_event): Adjust.
8714 (handle_target_event): If GDB isn't connected, forward events back
8715 to the inferior, unless the last process exited, in which case,
8716 exit gdbserver. Adjust interface.
8717
8718 * remote-utils.c (remote_open): Don't block in accept. Instead
8719 register an event loop source on the listen socket file
8720 descriptor. Refactor bits into ...
8721 (listen_desc): ... this new global.
8722 (gdb_connected): ... this new function.
8723 (enable_async_notification): ... this new function.
8724 (handle_accept_event): ... this new function.
8725 (remote_close): Clear remote_desc.
8726
8727 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8728
8729 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8730 New fields.
8731 (mourn_inferior): Define.
8732 (target_process_qsupported): Avoid the dangling else problem.
8733 (thread_stopped): Define.
8734 (pause_all): Define.
8735 (target_waitstatus_to_string): Declare.
8736 * target.c (target_waitstatus_to_string): New.
8737
8738 * tracepoint.c (tracing): Make extern.
8739 (disconnected_tracing): New.
8740 (stop_tracing): Make extern. Handle tracing stops due to GDB
8741 disconnecting.
8742 (cmd_qtdisconnected): New.
8743 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8744 (handle_tracepoint_general_set): Handle QTDisconnected.
8745
8746 * event-loop.c (event_handler_func): Change return type to int.
8747 (process_event): Bail out if the event handler wants the event
8748 loop to stop.
8749 (handle_file_event): Ditto.
8750 (start_event_loop): Bail out if the event handler wants the event
8751 loop to stop.
8752
8753 * nto-low.c (nto_target_ops): Adjust.
8754 * spu-low.c (spu_wait): Don't remove the process here.
8755 (spu_target_ops): Adjust.
8756 * win32-low.c (win32_wait): Don't remove the process here.
8757 (win32_target_ops): Adjust.
8758
8759 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8760
8761 * regcache.c (realloc_register_cache): Invalidate inferior's
8762 regcache before recreating it.
8763
8764 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8765
8766 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8767
8768 2010-04-09 Stan Shebs <stan@codesourcery.com>
8769 Pedro Alves <pedro@codesourcery.com>
8770
8771 * server.h (LONGEST): New.
8772 (struct thread_info) <while_stepping>: New field.
8773 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8774 Declare.
8775 (initialize_tracepoint, handle_tracepoint_general_set)
8776 (handle_tracepoint_query, tracepoint_finished_step)
8777 (tracepoint_was_hit, release_while_stepping_state_list):
8778 (current_traceframe): Declare.
8779 * server.c (handle_general_set): Handle tracepoint packets.
8780 (read_memory): New.
8781 (write_memory): New.
8782 (handle_search_memory_1): Use read_memory.
8783 (handle_query): Report support for conditional tracepoints, trace
8784 state variables, and tracepoint sources. Handle tracepoint
8785 queries.
8786 (main): Initialize the tracepoints module.
8787 (process_serial_event): Handle traceframe reads/writes.
8788
8789 * linux-low.c (handle_tracepoints): New.
8790 (linux_wait_1): Call it.
8791 (linux_resume_one_lwp): Handle while-stepping.
8792 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8793 (linux_target_ops): Install them.
8794 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8795 New field.
8796 * linux-x86-low.c (x86_supports_tracepoints): New.
8797 (the_low_target). Install it.
8798
8799 * mem-break.h (delete_breakpoint): Declare.
8800 * mem-break.c (delete_breakpoint): Make external.
8801
8802 * target.h (struct target_ops): Add `supports_tracepoints',
8803 `read_pc', and `write_pc' fields.
8804 (target_supports_tracepoints): Define.
8805 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8806 (phex_nz): New.
8807
8808 * regcache.h (struct regcache) <registers_owned>: New field.
8809 (init_register_cache, regcache_cpy): Declare.
8810 (regcache_read_pc, regcache_write_pc): Declare.
8811 (register_cache_size): Declare.
8812 (supply_regblock): Declare.
8813 * regcache.c (init_register_cache): New.
8814 (new_register_cache): Use it.
8815 (regcache_cpy): New.
8816 (register_cache_size): New.
8817 (supply_regblock): New.
8818 (regcache_read_pc, regcache_write_pc): New.
8819
8820 * tracepoint.c: New.
8821
8822 * Makefile.in (OBS): Add tracepoint.o.
8823 (tracepoint.o): New rule.
8824
8825 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8826
8827 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8828 (i386-mmx.o): New.
8829 (i386-mmx.c): Likewise.
8830 (i386-mmx-linux.o): Likewise.
8831 (i386-mmx-linux.c): Likewise.
8832
8833 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8834 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8835 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8836 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8837
8838 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8839 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8840 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8841
8842 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8843
8844 * Makefile.in (clean): Updated.
8845 (i386-avx.o): New.
8846 (i386-avx.c): Likewise.
8847 (i386-avx-linux.o): Likewise.
8848 (i386-avx-linux.c): Likewise.
8849 (amd64-avx.o): Likewise.
8850 (amd64-avx.c): Likewise.
8851 (amd64-avx-linux.o): Likewise.
8852 (amd64-avx-linux.c): Likewise.
8853
8854 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8855 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8856 (srv_amd64_regobj): Add amd64-avx.o.
8857 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8858 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8859 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8860 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8861 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8862 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8863 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8864
8865 * i387-fp.c: Include "i386-xstate.h".
8866 (i387_xsave): New.
8867 (i387_cache_to_xsave): Likewise.
8868 (i387_xsave_to_cache): Likewise.
8869 (x86_xcr0): Likewise.
8870
8871 * i387-fp.h (i387_cache_to_xsave): Likewise.
8872 (i387_xsave_to_cache): Likewise.
8873 (x86_xcr0): Likewise.
8874
8875 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8876 * linux-crisv32-low.c (target_regsets): Likewise.
8877 * linux-m68k-low.c (target_regsets): Likewise.
8878 * linux-mips-low.c (target_regsets): Likewise.
8879 * linux-ppc-low.c (target_regsets): Likewise.
8880 * linux-s390-low.c (target_regsets): Likewise.
8881 * linux-sh-low.c (target_regsets): Likewise.
8882 * linux-sparc-low.c (target_regsets): Likewise.
8883 * linux-xtensa-low.c (target_regsets): Likewise.
8884
8885 * linux-low.c: Include <sys/uio.h>.
8886 (regsets_fetch_inferior_registers): Support nt_type.
8887 (regsets_store_inferior_registers): Likewise.
8888 (linux_process_qsupported): New.
8889 (linux_target_ops): Add linux_process_qsupported.
8890
8891 * linux-low.h (regset_info): Add nt_type.
8892 (linux_target_ops): Add process_qsupported.
8893
8894 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8895 and <sys/uio.h>.
8896 (init_registers_i386_avx_linux): New.
8897 (init_registers_amd64_avx_linux): Likewise.
8898 (xmltarget_i386_linux_no_xml): Likewise.
8899 (xmltarget_amd64_linux_no_xml): Likewise.
8900 (PTRACE_GETREGSET): Likewise.
8901 (PTRACE_SETREGSET): Likewise.
8902 (x86_fill_xstateregset): Likewise.
8903 (x86_store_xstateregset): Likewise.
8904 (use_xml): Likewise.
8905 (x86_linux_update_xmltarget): Likewise.
8906 (x86_linux_process_qsupported): Likewise.
8907 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8908 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8909 init_registers_i386_linux here. Call
8910 x86_linux_update_xmltarget.
8911 (the_low_target): Add x86_linux_process_qsupported.
8912
8913 * server.c (handle_query): Call target_process_qsupported.
8914
8915 * target.h (target_ops): Add process_qsupported.
8916 (target_process_qsupported): New.
8917
8918 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8919
8920 * inferiors.c (add_thread): Set last_status kind to
8921 TARGET_WAITKIND_IGNORE.
8922 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8923 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8924 (linux_wait_1): Move `thread' local definition to block that uses
8925 it. Don't NULL initialize `event_child'.
8926 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8927 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8928 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8929
8930 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8931
8932 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8933 an extended waitstatus, or by a watchpoint.
8934 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8935 thread was stepping or has been stopped by a watchpoint.
8936
8937 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8938
8939 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8940 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8941 of another, then delete the previous, and validate all
8942 breakpoints.
8943 (validate_inserted_breakpoint): New.
8944 (delete_disabled_breakpoints): New.
8945 (validate_breakpoints): New.
8946 (check_mem_read): Validate breakpoints before trusting their
8947 shadow. Delete disabled breakpoints.
8948 (check_mem_write): Validate breakpoints before trusting they
8949 should be inserted. Delete disabled breakpoints.
8950 * mem-break.h (validate_breakpoints):
8951 * server.c (handle_query): Validate breakpoints when we see a
8952 qSymbol query.
8953
8954 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8955
8956 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8957 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8958 if we could tell there's a GDB breakpoint at stop_pc.
8959 (need_step_over_p): Don't do a step over if we find a GDB
8960 breakpoint at the resume PC.
8961
8962 * mem-break.c (struct raw_breakpoint): New.
8963 (enum bkpt_type): New type `gdb_breakpoint'.
8964 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8965 fields. New field `raw'.
8966 (find_raw_breakpoint_at): New.
8967 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8968 breakpoint instead.
8969 (set_breakpoint_at): Adjust.
8970 (delete_raw_breakpoint): New.
8971 (release_breakpoint): New.
8972 (delete_breakpoint): Rename to...
8973 (delete_breakpoint_1): ... this. Add proc parameter. Use
8974 release_breakpoint. Return ENOENT.
8975 (delete_breakpoint): Reimplement.
8976 (find_breakpoint_at): Delete.
8977 (find_gdb_breakpoint_at): New.
8978 (delete_breakpoint_at): Delete.
8979 (set_gdb_breakpoint_at): New.
8980 (delete_gdb_breakpoint_at): New.
8981 (gdb_breakpoint_here): New.
8982 (set_reinsert_breakpoint): Use release_breakpoint.
8983 (uninsert_breakpoint): Rename to ...
8984 (uninsert_raw_breakpoint): ... this.
8985 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8986 (reinsert_raw_breakpoint): Change parameter type to
8987 raw_breakpoint.
8988 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8989 instead.
8990 (check_breakpoints): Adjust. Use release_breakpoint.
8991 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8992 (breakpoint_inserted_here): Ditto.
8993 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8994 Don't trust the breakpoint's shadow if it is not inserted.
8995 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8996 (delete_all_breakpoints): Adjust.
8997 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8998 use delete_breakpoint_1.
8999
9000 * mem-break.h (breakpoints_supported): Delete declaration.
9001 (set_gdb_breakpoint_at): Declare.
9002 (gdb_breakpoint_here): Declare.
9003 (delete_breakpoint_at): Delete.
9004 (delete_gdb_breakpoint_at): Declare.
9005
9006 * server.h (struct raw_breakpoint): Forward declare.
9007 (struct process_info): New field `raw_breakpoints'.
9008
9009 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9010 breakpoints.
9011
9012 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9013
9014 * linux-low.c (status_pending_p_callback): Fix comment.
9015 (linux_wait_for_event_1): Move most of the internal breakpoint
9016 handling from here...
9017 (linux_wait_1): ... to here.
9018 (count_events_callback): New.
9019 (select_singlestep_lwp_callback): New.
9020 (select_event_lwp_callback): New.
9021 (cancel_breakpoints_callback): New.
9022 (select_event_lwp): New.
9023 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9024 priority to all LWPs that have had events that should be reported
9025 to the client. Cancel breakpoints when about to reporting the
9026 event to the client, not while stopping lwps. No longer cancel
9027 finished single-steps here.
9028 (cancel_finished_single_step): Delete.
9029 (cancel_finished_single_steps): Delete.
9030
9031 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9032
9033 * mem-break.c (enum bkpt_type): New.
9034 (struct breakpoint): New field `type'.
9035 (set_breakpoint_at): Change return type to struct breakpoint
9036 pointer. Set type to `other_breakpoint' by default.
9037 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9038 in the breakpoint list.
9039 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9040 (reinsert_breakpoint): Rename to ...
9041 (reinsert_raw_breakpoint): ... this.
9042 (reinsert_breakpoints_at): Adjust.
9043 * mem-break.h (struct breakpoint): Declare.
9044 (set_breakpoint_at): Change return type to struct breakpoint
9045 pointer.
9046
9047 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9048
9049 * server.c (handle_query): Assign, not compare.
9050
9051 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9052
9053 Teach linux gdbserver to step-over-breakpoints.
9054
9055 * linux-low.c (can_hardware_single_step): New.
9056 (supports_breakpoints): New.
9057 (handle_extended_wait): If stopping threads, read the stop pc of
9058 the new cloned LWP.
9059 (get_pc): New.
9060 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9061 low target doesn't support retrieving the PC.
9062 (add_lwp): Set last_resume_kind to resume_continue.
9063 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9064 (linux_attach): Don't clear stop_expected. Set the lwp's
9065 last_resume_kind to resume_stop.
9066 (linux_detach_one_lwp): Don't check for removed breakpoints.
9067 (check_removed_breakpoint): Delete.
9068 (status_pending_p): Rename to ...
9069 (status_pending_p_callback): ... this. Don't check for removed
9070 breakpoints. Don't consider threads that are stopped from GDB's
9071 perspective.
9072 (linux_wait_for_lwp): Always read the stop_pc here.
9073 (cancel_breakpoint): New.
9074 (step_over_bkpt): New global.
9075 (linux_wait_for_event_1): Implement stepping over breakpoints.
9076 (gdb_wants_lwp_stopped): New.
9077 (gdb_wants_all_stopped): New.
9078 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9079 single-step traps here. Store the thread's last reported target
9080 wait status.
9081 (send_sigstop): Don't clear stop_expected. Always set it,
9082 instead.
9083 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9084 (cancel_finished_single_step): New.
9085 (cancel_finished_single_steps): New.
9086 (wait_for_sigstop): Don't cancel finished single-step traps here.
9087 (linux_resume_one_lwp): Don't check for removed breakpoints.
9088 Don't set `step' on non-hardware step archs.
9089 (linux_set_resume_request): Ignore resume_stop requests if already
9090 stopping or stopped. Set the lwp's last_resume_kind.
9091 (resume_status_pending_p): Don't check for removed breakpoints.
9092 (need_step_over_p): New.
9093 (start_step_over): New.
9094 (finish_step_over): New.
9095 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9096 requests. Clear the thread's last reported target waitstatus.
9097 Don't use the `suspended' flag. Don't consider pending breakpoints.
9098 (linux_resume): Start a step-over if necessary.
9099 (proceed_one_lwp): New.
9100 (proceed_all_lwps): New.
9101 (unstop_all_lwps): New.
9102 * linux-low.h (struct lwp_info): Rewrite comment for the
9103 `suspended' flag. Add the `stop_pc' field. Delete the
9104 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9105 Add `'last_resume_kind' and `need_step_over' fields.
9106 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9107 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9108 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9109 (set_raw_breakpoint_at): New.
9110 (set_breakpoint_at): Rewrite to use it.
9111 (reinsert_breakpoint_handler): Delete.
9112 (set_reinsert_breakpoint): New.
9113 (reinsert_breakpoint_by_bp): Delete.
9114 (delete_reinsert_breakpoints): New.
9115 (uninsert_breakpoint): Rewrite.
9116 (uninsert_breakpoints_at): New.
9117 (reinsert_breakpoint): Rewrite.
9118 (reinsert_breakpoints_at): New.
9119 (check_breakpoints): Rewrite.
9120 (breakpoint_here): New.
9121 (breakpoint_inserted_here): New.
9122 (check_mem_read): Adjust.
9123 * mem-break.h (breakpoints_supported, breakpoint_here)
9124 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9125 (reinsert_breakpoint_by_bp): Delete declaration.
9126 (delete_reinsert_breakpoints): Declare.
9127 (reinsert_breakpoint): Delete declaration.
9128 (reinsert_breakpoints_at): Declare.
9129 (uninsert_breakpoint): Delete declaration.
9130 (uninsert_breakpoints_at): Declare.
9131 (check_breakpoints): Adjust prototype.
9132 * server.h: Adjust include order.
9133 (struct thread_info): Declare here. Add a `last_status' field.
9134
9135 2010-03-23 Michael Snyder <msnyder@vmware.com>
9136
9137 * server.c (crc32): New function.
9138 (handle_query): Add handling for 'qCRC:' request.
9139
9140 2010-03-23 Pedro Alves <pedro@codesourcery.com>
9141
9142 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9143 lwp had been stopped by a watchpoint.
9144
9145 2010-03-16 Pedro Alves <pedro@codesourcery.com>
9146
9147 * server.h (internal_error): Declare.
9148 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9149 * utils.c (internal_error): New function.
9150
9151 2010-03-15 Andreas Schwab <schwab@redhat.com>
9152
9153 * configure.srv: Fix typo setting srv_regobj.
9154
9155 2010-03-15 Pedro Alves <pedro@codesourcery.com>
9156
9157 * linux-low.c (fetch_register): Avoid passing a non string literal
9158 format to `error'.
9159 (usr_store_inferior_registers): Ditto.
9160
9161 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9162
9163 * linux-low.c (linux_write_memory): Bail out early if peeking
9164 memory failed.
9165
9166 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9167
9168 * linux-low.h (struct lwp_info): New fields
9169 `stopped_by_watchpoint' and `stopped_data_address'.
9170 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9171 here, and cache them in the lwp object.
9172 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9173 directly.
9174 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9175 field.
9176 (linux_stopped_by_watchpoint): Rewrite.
9177 (linux_stopped_data_address): Rewrite.
9178
9179 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
9180
9181 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9182 switching the current inferior, not before.
9183
9184 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9185
9186 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9187 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9188 i386-linux.c and amd64-linux.c.
9189 (reg-i386.o): Removed.
9190 (reg-i386.c): Likewise.
9191 (reg-i386-linux.o): Likewise.
9192 (reg-i386-linux.c): Likewise.
9193 (reg-x86-64.o): Likewise.
9194 (reg-x86-64.c): Likewise.
9195 (reg-x86-64-linux.o): Likewise.
9196 (reg-x86-64-linux.c): Likewise.
9197 (i386.o): New.
9198 (i386.c): Likewise.
9199 (i386-linux.o): Likewise.
9200 (i386-linux.c): Likewise.
9201 (amd64.o): Likewise.
9202 (amd64.c): Likewise.
9203 (amd64-linux.o): Likewise.
9204 (amd64-linux.c): Likewise.
9205
9206 * configure.srv (srv_i386_regobj): New.
9207 (srv_i386_linux_regobj): Likewise.
9208 (srv_amd64_regobj): Likewise.
9209 (srv_amd64_linux_regobj): Likewise.
9210 (srv_i386_32bit_xmlfiles): Likewise.
9211 (srv_i386_64bit_xmlfiles): Likewise.
9212 (srv_i386_xmlfiles): Likewise.
9213 (srv_amd64_xmlfiles): Likewise.
9214 (srv_i386_linux_xmlfiles): Likewise.
9215 (srv_amd64_linux_xmlfiles): Likewise.
9216 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9217 srv_xmlfiles to $srv_i386_xmlfiles.
9218 (i[34567]86-*-mingw32ce*): Likewise.
9219 (i[34567]86-*-mingw*): Likewise.
9220 (i[34567]86-*-nto*): Likewise.
9221 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9222 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9223 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9224 (x86_64-*-linux*): Likewise.
9225
9226 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9227 (init_registers_amd64_linux): New.
9228 (x86_arch_setup): Replace init_registers_x86_64_linux with
9229 init_registers_amd64_linux.
9230
9231 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9232
9233 * configure.ac: Check for libdl. If it is not available link against
9234 static libthread_db.
9235 * configure: Regenerate.
9236
9237 2010-02-22 Pedro Alves <pedro@codesourcery.com>
9238
9239 PR9605
9240
9241 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9242 handing a read watchpoint.
9243 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9244
9245 2010-02-12 Doug Evans <dje@google.com>
9246
9247 * linux-low.c (linux_supports_tracefork_flag): Document.
9248 (linux_look_up_symbols): Add comment.
9249
9250 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9251
9252 * regcache.c (supply_register): Clear regcache if buf is NULL.
9253
9254 2010-02-02 Nicolas Roche <roche@sourceware.org>
9255 Joel Brobecker <brobecker@adacore.com>
9256
9257 * inferiors.c (find_inferior): Add function documentation.
9258 (unloaded_dll): Handle the case where the unloaded dll has not
9259 been previously registered in the dll list.
9260
9261 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9262
9263 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9264 (thumb2_breakpoint): New.
9265 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9266
9267 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9268
9269 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9270 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9271 breakpoints.
9272
9273 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9274
9275 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9276
9277 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9278
9279 * linux-s390-low.c (s390_collect_ptrace_register)
9280 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9281
9282 2010-01-21 Doug Evans <dje@google.com>
9283
9284 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9285 (PTRACE_ARG4_TYPE): New macro.
9286 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9287 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9288 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9289 (usr_store_inferior_registers): Ditto.
9290 (linux_read_memory, linux_write_memory): Ditto.
9291 (linux_test_for_tracefork): Ditto.
9292
9293 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9294 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9295
9296 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9297
9298 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9299 target.
9300
9301 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9302
9303 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9304 prototype to take a regcache. Adjust.
9305
9306 2010-01-20 Pedro Alves <pedro@codesourcery.com>
9307
9308 * regcache.h (struct thread_info): Forward declare.
9309 (struct regcache): New.
9310 (new_register_cache): Adjust prototype.
9311 (get_thread_regcache): Declare.
9312 (free_register_cache): Adjust prototype.
9313 (registers_to_string, registers_from_string): Ditto.
9314 (supply_register, supply_register_by_name, collect_register)
9315 (collect_register_as_string, collect_register_by_name): Ditto.
9316 * regcache.c (struct inferior_regcache_data): Delete.
9317 (get_regcache): Rename to ...
9318 (get_thread_regcache): ... this. Adjust. Switch inferior before
9319 fetching registers.
9320 (regcache_invalidate_one): Adjust.
9321 (regcache_invalidate): Fix prototype.
9322 (new_register_cache): Return the new register cache.
9323 (free_register_cache): Change prototype.
9324 (realloc_register_cache): Adjust.
9325 (registers_to_string): Change prototype to take a regcache. Adjust.
9326 (registers_from_string): Ditto.
9327 (register_data): Ditto.
9328 (supply_register): Ditto.
9329 (supply_register_by_name): Ditto.
9330 (collect_register): Ditto.
9331 (collect_register_as_string): Ditto.
9332 (collect_register_by_name): Ditto.
9333 * server.c (process_serial_event): Adjust.
9334 * linux-low.h (regset_fill_func, regset_store_func): Change
9335 prototype.
9336 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9337 Change prototype.
9338 * linux-low.c (get_stop_pc): Adjust.
9339 (check_removed_breakpoint): Adjust.
9340 (linux_wait_for_event): Adjust.
9341 (linux_resume_one_lwp): Adjust.
9342 (fetch_register): Add regcache parameter. Adjust.
9343 (usr_store_inferior_registers): Ditto.
9344 (regsets_fetch_inferior_registers): Ditto.
9345 (regsets_store_inferior_registers): Ditto.
9346 (linux_fetch_registers, linux_store_registers): Ditto.
9347 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9348 regcache. Adjust.
9349 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9350 Ditto.
9351 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9352 prototype to take a regcache.
9353 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9354 * remote-utils.c (convert_ascii_to_int, outreg)
9355 (prepare_resume_reply): Change prototype to take a regcache.
9356 Adjust.
9357 * target.h (struct target_ops) <fetch_registers, store_registers>:
9358 Change prototype to take a regcache.
9359 (fetch_inferior_registers, store_inferior_registers): Change
9360 prototype to take a regcache. Adjust.
9361 * proc-service.c (ps_lgetregs): Adjust.
9362 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9363 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9364 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9365 take a regcache. Adjust.
9366 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9367 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9368 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9369 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9370 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9371 (cris_cannot_fetch_register):
9372 (cris_breakpoint_at): Change prototype to take a regcache.
9373 Adjust.
9374 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9375 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9376 to take a regcache. Adjust.
9377 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9378 Adjust.
9379 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9380 take a regcache. Adjust.
9381 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9382 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9383 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9384 * linux-mips-low.c (mips_get_pc):
9385 (mips_set_pc): Change prototype to take a regcache. Adjust.
9386 (mips_reinsert_addr): Adjust.
9387 (mips_collect_register): Change prototype to take a regcache.
9388 Adjust.
9389 (mips_supply_register):
9390 (mips_collect_register_32bit, mips_supply_register_32bit)
9391 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9392 (mips_store_fpregset): Ditto.
9393 * linux-ppc-low.c (ppc_supply_ptrace_register)
9394 (ppc_supply_ptrace_register): Ditto.
9395 (parse_spufs_run): Adjust.
9396 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9397 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9398 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9399 take a regcache. Adjust.
9400 * linux-s390-low.c (s390_collect_ptrace_register)
9401 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9402 (s390_set_pc): Change prototype to take a regcache. Adjust.
9403 (s390_arch_setup): Adjust.
9404 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9405 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9406 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9407 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9408 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9409 regcache. Adjust.
9410 (sparc_breakpoint_at): Adjust.
9411 * linux-xtensa-low.c (xtensa_fill_gregset):
9412 (xtensa_store_gregset):
9413 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9414 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9415 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9416 prototype to take a regcache. Adjust.
9417 * win32-arm-low.c (arm_fetch_inferior_register)
9418 (arm_store_inferior_register): Change prototype to take a
9419 regcache. Adjust.
9420 * win32-i386-low.c (i386_fetch_inferior_register)
9421 (i386_store_inferior_register): Change prototype to take a
9422 regcache. Adjust.
9423 * win32-low.c (child_fetch_inferior_registers)
9424 (child_store_inferior_registers): Change prototype to take a
9425 regcache. Adjust.
9426 (win32_wait): Adjust.
9427 (win32_fetch_inferior_registers): Change prototype to take a
9428 regcache. Adjust.
9429 (win32_store_inferior_registers): Adjust.
9430 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9431 store_inferior_register>: Change prototype to take a regcache.
9432
9433 2010-01-20 Doug Evans <dje@google.com>
9434
9435 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9436 #ifdef.
9437 (linux_wait_for_event1, linux_init_signals): Ditto.
9438 (W_STOPCODE): Provide definition if missing.
9439
9440 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9441
9442 * linux-low.c (linux_core_of_thread): New.
9443 (compare_ints, show_process, list_threads): New.
9444 (linux_qxfer_osdata): Report threads and cores.
9445 (linux_target_op): Register linux_core_of_thread.
9446 * remote-utils.c (prepare_resume_reply): Report the core.
9447 (buffer_xml_printf): Support %d specifier.
9448 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9449 New.
9450 (handle_query): Handle qXfer:threads. Announce availability
9451 thereof.
9452 * target.h (struct target_ops): New field core_of_thread.
9453
9454 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9455
9456 * Makefile.in (clean): Remove new generated files.
9457 (reg-s390.o, reg-s390.c): Remove rules.
9458 (reg-s390x.o, reg-s390x.c): Likewise.
9459 (s390-linux32.o, s390-linux32.c): Add rules.
9460 (s390-linux64.o, s390-linux64.c): Likewise.
9461 (s390x-linux64.o, s390x-linux64.c): Likewise.
9462 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9463 * linux-s390-low.c: Include <elf.h>.
9464 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9465 (init_registers_s390): Remove prototype.
9466 (init_registers_s390x): Likewise.
9467 (init_registers_s390_linux32): Add prototype.
9468 (init_registers_s390_linux64): Likewise.
9469 (init_registers_s390x_linux64): Likewise.
9470 (s390_num_regs_3264): New define.
9471 (s390_regmap_3264): New global variable.
9472 (s390_cannot_fetch_register): Remove obsolete check.
9473 (s390_cannot_store_register): Likewise.
9474 (s390_collect_ptrace_register): Handle upper/lower register halves.
9475 (s390_supply_ptrace_register): Likewise.
9476 (s390_fill_gregset): Update to register number changes.
9477 (s390_get_hwcap): New routine.
9478 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9479 Install appropriate regmap and register set.
9480
9481 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9482
9483 * server.c (gdbserver_version): Update copyright year to 2010.
9484 * gdbreplay.c (gdbreplay_version): Likewise.
9485
9486 2009-12-28 Doug Evans <dje@google.com>
9487
9488 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9489 elf/external.h. Include <elf.h> instead but only if necessary.
9490
9491 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9492
9493 * linux-low.c (linux_remove_process): Remove `detaching'
9494 parameter. Don't release/detach from thread_db here.
9495 (linux_kill): Release/detach from thread_db here, ...
9496 (linux_detach): ... and here, before actually detaching.
9497 (linux_wait_1): ... and here, when a process exits.
9498 * thread-db.c (any_thread_of): New.
9499 (thread_db_free): Switch the current inferior to a thread of the
9500 passed in process.
9501
9502 2009-12-21 Doug Evans <dje@google.com>
9503
9504 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9505
9506 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9507 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9508 warning ifndef __NR_tkill. Move setting of errno there too.
9509 Delete unnecessary resetting of errno after syscall.
9510 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9511
9512 * configure.ac: Check for dladdr.
9513 * config.in: Regenerate.
9514 * configure: Regenerate.
9515 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9516 (try_thread_db_load): Update.
9517
9518 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9519
9520 2009-12-18 Doug Evans <dje@google.com>
9521
9522 * event-loop.c: Include unistd.h if it exists.
9523
9524 * linux-low.c (my_waitpid): Move definition away from being in
9525 between linux_tracefork_child/linux_test_for_tracefork.
9526
9527 * gdb_proc_service.h (psaddr_t): Fix type.
9528 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9529 signature to match glibc.
9530
9531 2009-12-16 Doug Evans <dje@google.com>
9532
9533 * linux-low.c (linux_read_memory): Fix argument to read.
9534
9535 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9536
9537 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9538 events, don't leave current_inferior pointing at null.
9539
9540 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9541
9542 * win32-low.c (LOG): Delete.
9543 (OUTMSG): Output to stderr.
9544 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9545 on compile time LOG macro.
9546 (win32_wait): Fix debug output.
9547
9548 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9549
9550 * win32-low.c (win32_add_one_solib): If the dll name is
9551 "ntdll.dll", prepend the system directory to the dll path.
9552
9553 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9554
9555 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9556
9557 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9558 Vladimir Prus <vladimir@codesourcery.com>
9559
9560 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9561 * configure.ac: Check for __mcoldfire__ and set
9562 gdb_cv_m68k_is_coldfire.
9563 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9564 reg-cf.o and reg-m68k.o.
9565 * configure: Regenerated.
9566
9567 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9568
9569 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9570 Pass it to thread_db_free.
9571 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9572 proper `detaching' argument to linux_remove_process.
9573 * linux-low.h (thread_db_free): Add `detaching' parameter.
9574 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9575 to thread_db_free.
9576 (thread_db_free): Add `detaching' parameter. Only
9577 call td_ta_clear_event if detaching from process.
9578
9579 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9580
9581 * thread-db.c (thread_db_free): Fix typo.
9582
9583 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9584
9585 PR gdb/10838
9586 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9587
9588 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9589
9590 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9591 with an i686 compiler.
9592 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9593 needed.
9594 * configure: Rebuilt.
9595
9596 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9597
9598 PR gdb/10783
9599
9600 * server.c (handle_search_memory_1): Correct read_addr initialization
9601 in loop for searching subsequent chunks.
9602
9603 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9604
9605 * configure.ac: New --with-libthread-db option.
9606 * thread-db.c: Allow direct dependence on libthread_db.
9607 (thread_db_free): Adjust.
9608 * config.in: Regenerate.
9609 * configure: Likewise.
9610
9611 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9612
9613 PR gdb/10757
9614 * thread-db.c (attach_thread): New function.
9615 (maybe_attach_thread): Return success/failure.
9616 (find_new_threads_callback): Adjust.
9617 (thread_db_find_new_threads): Loop until no new threads.
9618
9619 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9620
9621 * proc-service.c (ps_lgetregs): Formatting.
9622
9623 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9624
9625 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9626 * configure.ac: Adjust.
9627 * linux-low.h (struct process_info_private): Move members to struct
9628 thread_db.
9629 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9630 * linux-low.c (linux_remove_process): Adjust.
9631 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9632 * server.c (handle_query): Move code ...
9633 (handle_monitor_command): ... here. New function.
9634 * target.h (struct target_ops): New member.
9635 * thread-db.c (struct thread_db): New.
9636 (libthread_db_search_path): New variable.
9637 (thread_db_create_event, thread_db_enable_reporting)
9638 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9639 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9640 (try_thread_db_load_1, dladdr_to_soname): New functions.
9641 (try_thread_db_load, thread_db_load_search): New functions.
9642 (thread_db_init): Search for libthread_db.
9643 (thread_db_free): New function.
9644 (thread_db_handle_monitor_command): Likewise.
9645 * config.in: Regenerate.
9646 * configure: Regenerate.
9647
9648 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9649
9650 * spu-low.c (spu_kill): Wait for inferior to terminate.
9651 Call clear_inferiors.
9652 (spu_detach): Call clear_inferiors.
9653
9654 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9655
9656 * aclocal.m4: Regenerate.
9657 * config.in: Likewise.
9658 * configure: Likewise.
9659
9660 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9661
9662 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9663 (parse_spufs_run): New function.
9664 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9665 (ppc_breakpoint_at): Handle SPU breakpoints.
9666
9667 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9668
9669 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9670 (SPUFS_MAGIC): Define.
9671 (spu_enumerate_spu_ids): New function.
9672 (linux_qxfer_spu): New function.
9673 (linux_target_ops): Install linux_qxfer_spu.
9674
9675 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9676
9677 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9678 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9679 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9680 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9681 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9682 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9683 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9684 (init_registers_powerpc_cell32l): Add prototype.
9685 (init_registers_powerpc_cell64l): Likewise.
9686 (ppc_arch_setup): Detect Cell/B.E. architecture.
9687
9688 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9689
9690 * Makefile.in (datarootdir): New variable.
9691
9692 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9693
9694 * linux-low.c (linux_write_memory): Update debugging output.
9695 * Makefile.in (clean): Add new descriptions.
9696 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9697 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9698 * configure.srv: Add new files for arm*-*-linux*.
9699 * linux-arm-low.c: Add new declarations.
9700 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9701 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9702 (HWCAP_VFPv3D16): New.
9703 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9704 instead of __IWMMXT__.
9705 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9706 (arm_arch_setup): New.
9707 (target_regsets): Remove #ifdef. Add VFP regset.
9708 (the_low_target): Use arm_arch_setup.
9709
9710 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9711
9712 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9713 the main thread again.
9714
9715 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9716
9717 Adding Neutrino gdbserver.
9718 * configure: Regenerated.
9719 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9720 * configure.srv (i[34567]86-*-nto*): New target.
9721 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9722 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9723 (nto_comctrl) [__QNX__]: New function.
9724 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9725
9726 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9727
9728 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9729 srv_tgtobj.
9730
9731 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9732 Pedro Alves <pedro@codesourcery.com>
9733
9734 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9735 don't support CONTEXT_EXTENDED_REGISTERS.
9736 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9737 (the_low_target): Install them.
9738 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9739 failing with ERROR_PIPE_NOT_CONNECTED.
9740
9741 2009-06-30 Doug Evans <dje@google.com>
9742 Pierre Muller <muller@ics.u-strasbg.fr>
9743
9744 Add h/w watchpoint support to x86-linux, win32-i386.
9745 * Makefile.in (SFILES): Add i386-low.c
9746 (i386_low_h): Define.
9747 (i386-low.o): Add dependencies.
9748 (linux-x86-low.o): Add i386-low.h dependency.
9749 (win32-i386-low.o): Ditto.
9750 * i386-low.c: New file.
9751 * i386-low.h: New file.
9752 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9753 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9754 * linux-low.c (linux_add_process): Initialize arch_private.
9755 (linux_remove_process): Free arch_private.
9756 (add_lwp): Initialize arch_private.
9757 (delete_lwp): Free arch_private.
9758 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9759 provided.
9760 * linux-low.h (process_info_private): New member arch_private.
9761 (lwp_info): New member arch_private.
9762 (linux_target_ops): New members new_process, new_thread,
9763 prepare_to_resume.
9764 (ptid_of): New macro.
9765 * linux-x86-low.c: Include stddef.h, i386-low.h.
9766 (arch_process_info): New struct.
9767 (arch_lwp_info): New struct.
9768 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9769 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9770 (i386_dr_low_get_status): New function.
9771 (x86_insert_point, x86_remove_point): New functions.
9772 (x86_stopped_by_watchpoint): New function.
9773 (x86_stopped_data_address): New function.
9774 (x86_linux_new_process, x86_linux_new_thread): New functions.
9775 (x86_linux_prepare_to_resume): New function.
9776 (the_low_target): Add entries for insert_point, remove_point,
9777 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9778 prepare_to_resume.
9779 * server.c (debug_hw_points): New global.
9780 (monitor_show_help): Document set debug-hw-points.
9781 (handle_query): Process "set debug-hw-points".
9782 * server.h (debug_hw_points): Declare.
9783 (paddress): Declare.
9784 * utils.c (NUMCELLS, CELLSIZE): New macros.
9785 (get_sell, xsnprintf, paddress): New functions.
9786 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9787 remove_point, stopped_by_watchpoint, stopped_data_address.
9788 * win32-i386-low.c: Include i386-low.h.
9789 (debug_reg_state): Replaces dr.
9790 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9791 (i386_dr_low_get_status): New function.
9792 (i386_insert_point, i386_remove_point): New functions.
9793 (i386_stopped_by_watchpoint): New function.
9794 (i386_stopped_data_address): New function.
9795 (i386_initial_stuff): Update.
9796 (get_thread_context,set_thread_context,i386_thread_added): Update.
9797 (the_low_target): Add entries for insert_point,
9798 remove_point, stopped_by_watchpoint, stopped_data_address.
9799 * win32-low.c (win32_insert_watchpoint): New function.
9800 (win32_remove_watchpoint): New function.
9801 (win32_stopped_by_watchpoint): New function.
9802 (win32_stopped_data_address): New function.
9803 (win32_target_ops): Add entries for insert_watchpoint,
9804 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9805 * win32-low.h (win32_target_ops): New members insert_point,
9806 remove_point, stopped_by_watchpoint, stopped_data_address.
9807
9808 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9809
9810 * server.c (process_serial_event): Re-return unsupported, not
9811 error, if the type isn't recognized. Re-allow supporting only
9812 insert or remove packets. Also call require_running for
9813 breakpoints. Add missing break statement to default case. Tidy.
9814 * target.h (struct target_ops): Rename insert_watchpoint to
9815 insert_point, and remove_watchpoint to remove_point.
9816
9817 * linux-low.h (struct linux_target_ops): Likewise.
9818 * linux-low.c (linux_insert_watchpoint): Rename to ...
9819 (linux_insert_point): ... this. Adjust.
9820 (linux_remove_watchpoint): Rename to ...
9821 (linux_remove_point): ... this. Adjust.
9822 (linux_target_ops): Adjust.
9823 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9824 (cris_insert_point): ... this.
9825 (cris_remove_watchpoint): Rename to ...
9826 (cris_remove_point): ... this.
9827 (the_low_target): Adjust.
9828
9829 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9830
9831 * server.c (handle_v_kill): Pass signal_pid to
9832 kill_inferior if multi_process is zero.
9833
9834 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9835
9836 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9837 * target.h (target_ops): Comment for *_watchpoint to make it clear
9838 the functions can get types '0' and '1'.
9839
9840 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9841
9842 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9843 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9844 * regcache.c (get_regcache): Likewise.
9845 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9846 * win32-low.c (child_fetch_inferior_registers): Remove check for
9847 regno 0.
9848
9849 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9850 Pedro Alves <pedro@codesourcery.com>
9851
9852 * target.h (struct target_ops) <supports_multi_process>: New
9853 callback.
9854 (target_supports_multi_process): New.
9855 * server.c (handle_query): Even if GDB reports support, only
9856 enable multi-process if the target also supports it. Report
9857 multi-process support only if the target backend supports it.
9858 * linux-low.c (linux_supports_multi_process): New function.
9859 (linux_target_ops): Install it as target_supports_multi_process
9860 callback.
9861
9862 2009-05-24 Doug Evans <dje@google.com>
9863
9864 Global renaming of find_thread_pid to find_thread_ptid.
9865 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9866 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9867 All callers updated.
9868
9869 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9870 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9871 directly.
9872
9873 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9874 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9875 (linux_resume_one_lwp): Ditto.
9876
9877 2009-05-23 Doug Evans <dje@google.com>
9878
9879 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9880 from struct inferior_list_entry * to struct lwp_info *.
9881 All callers updated.
9882
9883 2009-05-13 Doug Evans <dje@google.com>
9884
9885 * linux-x86-low.c: Don't include assert.h.
9886 (x86_siginfo_fixup): Use fatal, not assert.
9887 (x86_arch_setup): Fix comment.
9888
9889 2009-05-12 Doug Evans <dje@google.com>
9890
9891 Biarch support for i386/amd64 gdbserver.
9892 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9893 Add linux-x86-low.c.
9894 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9895 (linux-x86-low.o): Add.
9896 * linux-x86-64-low.c: Delete.
9897 * linux-i386-low.c: Delete.
9898 * linux-x86-low.c: New file.
9899 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9900 linux-x86-low.o.
9901 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9902 linux-x86-low.o.
9903 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9904 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9905 (linux_child_pid_to_exec_file): New function.
9906 (elf_64_header_p, elf_64_file_p): New functions.
9907 (siginfo_fixup): New function.
9908 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9909 give target a chance to convert layout.
9910 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9911 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9912
9913 2009-05-07 Doug Evans <dje@google.com>
9914
9915 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9916 (regsets_store_inferior_registers): Ditto.
9917
9918 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9919
9920 PR server/10048
9921
9922 * linux-low.c (must_set_ptrace_flags): Delete.
9923 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9924 of the global.
9925 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9926 `lwp->must_set_ptrace_flags' instead.
9927 (linux_wait_for_event_1): Set ptrace options here.
9928 (linux_wait_1): ... not here.
9929
9930 2009-04-30 Doug Evans <dje@google.com>
9931
9932 * inferiors.c (started_inferior_callback): New function.
9933 (attached_inferior_callback): New function.
9934 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9935 * server.c (print_started_pid, print_attached_pid): New functions.
9936 (detach_or_kill_for_exit): New function.
9937 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9938 * server.h (have_started_inferiors_p): Declare.
9939 (have_attached_inferiors_p): Declare.
9940
9941 * inferiors.c (remove_process): Fix memory leak, free process.
9942 * linux-low.c (linux_remove_process): New function.
9943 (linux_kill): Call it instead of remove_process.
9944 (linux_detach, linux_wait_1): Ditto.
9945
9946 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9947
9948 * configure.srv: Add x86 Windows CE target.
9949
9950 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9951
9952 * inferiors.c (get_thread_process): Make global.
9953 * server.h (get_thread_process): Add prototype.
9954 * thread-db.c (find_one_thread): Use get_thread_process
9955 instead of current_process.
9956 (thread_db_get_tls_address): Do not crash if called when
9957 thread layer is not yet initialized.
9958
9959 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9960
9961 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9962 * spu-low.c (current_tid): Rename to ...
9963 (current_ptid): ... this.
9964 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9965 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9966 ptid_get_lwp (current_ptid) instead of current_tid.
9967 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9968 instead of current_tid. Use find_process_pid to verify pid
9969 argument is valid. Pass proper argument to remove_process.
9970 (spu_thread_alive): Compare current_ptid instead of current_tid.
9971 (spu_resume): Likewise.
9972
9973 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9974
9975 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9976 variable.
9977
9978 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9979
9980 Implement the multiprocess extensions, and add linux multiprocess
9981 support.
9982
9983 * server.h (ULONGEST): Declare.
9984 (struct ptid, ptid_t): New.
9985 (minus_one_ptid, null_ptid): Declare.
9986 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9987 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9988 (struct inferior_list_entry): Change `id' type from unsigned from
9989 to ptid_t.
9990 (struct sym_cache, struct breakpoint, struct
9991 process_info_private): Forward declare.
9992 (struct process_info): Declare.
9993 (current_process): Declare.
9994 (all_processes): Declare.
9995 (initialize_inferiors): Declare.
9996 (add_thread): Adjust to use ptid_t.
9997 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9998 (add_process, remove_process, find_thread_pid): Declare.
9999 (find_inferior_id): Adjust to use ptid_t.
10000 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10001 (multi_process): Declare.
10002 (push_event): Adjust to use ptid_t.
10003 (read_ptid, write_ptid): Declare.
10004 (prepare_resume_reply): Adjust to use ptid_t.
10005 (clear_symbol_cache): Declare.
10006 * inferiors.c (all_processes): New.
10007 (null_ptid, minus_one_ptid): New.
10008 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10009 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10010 (add_thread): Change unsigned long to ptid. Remove gdb_id
10011 parameter. Adjust.
10012 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10013 (gdb_id_to_thread): Rename to ...
10014 (find_thread_pid): ... this. Change unsigned long to ptid.
10015 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10016 (loaded_dll, pull_pid_from_list): Adjust.
10017 (add_process, remove_process, find_process_pid)
10018 (get_thread_process, current_process, initialize_inferiors): New.
10019 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10020 (struct target_waitstatus) <related_pid>: Ditto.
10021 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10022 return type to int.
10023 (struct target_ops) <join>: Add `pid' argument.
10024 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10025 (struct target_ops) <wait>: Add `ptid' field. Change return type
10026 to ptid.
10027 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10028 (mywait): Add `ptid' argument. Change return type to ptid_t.
10029 (target_pid_to_str): Declare.
10030 * target.c (set_desired_inferior): Adjust to use ptids.
10031 (mywait): Add new `ptid' argument. Adjust.
10032 (target_pid_to_str): New.
10033 * mem-break.h (free_all_breakpoints): Declare.
10034 * mem-break.c (breakpoints): Delelete.
10035 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10036 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10037 to use per-process breakpoint list.
10038 (free_all_breakpoints): New.
10039 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10040 (symbol_cache, all_symbols_looked_up): Delete.
10041 (hexchars): New.
10042 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10043 read_ptid): New.
10044 (prepare_resume_reply): Change ptid argument's type from unsigned
10045 long to ptid_t. Adjust. Implement W;process and X;process.
10046 (free_sym_cache, clear_symbol_cache): New.
10047 (look_up_one_symbol): Adjust to per-process symbol cache. *
10048 * server.c (cont_thread, general_thread, step_thread): Change type
10049 to ptid_t.
10050 (attached): Delete.
10051 (multi_process): New.
10052 (last_ptid): Change type to ptid_t.
10053 (struct vstop_notif) <ptid>: Change type to ptid_t.
10054 (queue_stop_reply, push_event): Change `ptid' argument's type to
10055 ptid_t.
10056 (discard_queued_stop_replies): Add `pid' argument.
10057 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10058 changes. Don't reference the `attached' global.
10059 (attach_inferior): Adjust to mywait interface changes.
10060 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10061 features. Handle and report "multiprocess+". Handle
10062 "qAttached:PID".
10063 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10064 changes.
10065 (handle_v_kill): New.
10066 (handle_v_stopped): Adjust to use target_pid_to_str.
10067 (handle_v_requests): Allow multiple attaches and runs when
10068 multiprocess extensions are in effect. Handle "vKill".
10069 (myresume): Adjust to use ptids.
10070 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10071 (handle_status): Adjust to discard_queued_stop_replies interface
10072 change.
10073 (first_thread_of, kill_inferior_callback)
10074 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10075 (main): Call initialize_inferiors. Adjust to use ptids, killing
10076 and detaching from all inferiors. Handle multiprocess packet
10077 variants.
10078 * linux-low.h: Include gdb_proc_service.h.
10079 (struct process_info_private): New.
10080 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10081 <lwpid_of>: Use ptid_get_lwp.
10082 (get_lwp_thread): Adjust.
10083 (struct lwp_info): Add `dead' member.
10084 (find_lwp_pid): Declare.
10085 * linux-low.c (thread_db_active): Delete.
10086 (new_inferior): Adjust comment.
10087 (inferior_pid): Delete.
10088 (linux_add_process): New.
10089 (handle_extended_wait): Adjust.
10090 (add_lwp): Change unsigned long to ptid.
10091 (linux_create_inferior): Add process to processes table. Adjust
10092 to use ptids. Don't set new_inferior here.
10093 (linux_attach_lwp): Rename to ...
10094 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10095 it. Adjust to use ptids.
10096 (linux_attach_lwp): New.
10097 (linux_attach): Add process to processes table. Don't set
10098 new_inferior here.
10099 (struct counter): New.
10100 (second_thread_of_pid_p, last_thread_of_process_p): New.
10101 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10102 multiple processes.
10103 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10104 processes. Remove process from process table.
10105 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10106 to multiple processes.
10107 (any_thread_of): New.
10108 (linux_detach): Add `pid' argument, and handle it. Remove process
10109 from processes table.
10110 (linux_join): Add `pid' argument. Handle it.
10111 (linux_thread_alive): Change unsighed long argument to ptid_t.
10112 Consider dead lwps as not being alive.
10113 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10114 threads we're not interested in.
10115 (same_lwp, find_lwp_pid): New.
10116 (linux_wait_for_lwp): Change `pid' argument's type from int to
10117 ptid_t. Adjust.
10118 (linux_wait_for_event): Rename to ...
10119 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10120 from int to ptid_t. Adjust.
10121 (linux_wait_for_event): New.
10122 (linux_wait_1): Add `ptid' argument. Change return type to
10123 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10124 that exit from the process table.
10125 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10126 Adjust.
10127 (mark_lwp_dead): New.
10128 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10129 stopping all threads, mark its main lwp as dead.
10130 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10131 ptids.
10132 (fetch_register, usr_store_inferior_registers)
10133 (regsets_fetch_inferior_registers)
10134 (regsets_store_inferior_registers, linux_read_memory)
10135 (linux_write_memory): Inline `inferior_pid'.
10136 (linux_look_up_symbols): Adjust to use per-process
10137 `thread_db_active'.
10138 (linux_request_interrupt): Adjust to use ptids.
10139 (linux_read_auxv): Inline `inferior_pid'.
10140 (initialize_low): Don't reference thread_db_active.
10141 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10142 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10143 (ps_getpid): Return the pid of the current inferior.
10144 * thread-db.c (proc_handle, thread_agent): Delete.
10145 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10146 per-process data.
10147 (find_one_thread): Change argument type to ptid_t. Adjust to
10148 per-process data.
10149 (maybe_attach_thread): Adjust to per-process data and ptids.
10150 (thread_db_find_new_threads): Ditto.
10151 (thread_db_init): Ditto.
10152 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10153 processes table. Adjust to use ptids.
10154 (spu_kill, spu_detach): Adjust interface. Remove process from
10155 processes table.
10156 (spu_join, spu_thread_alive): Adjust interface.
10157 (spu_wait): Adjust interface. Remove process from processes
10158 table. Adjust to use ptids.
10159 * win32-low.c (current_inferior_tid): Delete.
10160 (current_inferior_ptid): New.
10161 (debug_event_ptid): New.
10162 (thread_rec): Take a ptid. Adjust.
10163 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10164 (child_delete_thread): Ditto.
10165 (do_initial_child_stuff): Add `attached' argument. Add process to
10166 processes table.
10167 (child_fetch_inferior_registers, child_store_inferior_registers):
10168 Adjust.
10169 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10170 (win32_attach): Pass 1 to do_initial_child_stuff.
10171 (win32_kill): Adjust interface. Remove process from processes
10172 table.
10173 (win32_detach): Ditto.
10174 (win32_join): Adjust interface.
10175 (win32_thread_alive): Take a ptid.
10176 (win32_resume): Adjust to use ptids.
10177 (get_child_debug_event): Ditto.
10178 (win32_wait): Adjust interface. Remove exiting process from
10179 processes table.
10180
10181 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10182
10183 Non-stop mode support.
10184
10185 * server.h (non_stop): Declare.
10186 (gdb_client_data, handler_func): Declare.
10187 (delete_file_handler, add_file_handler, start_event_loop):
10188 Declare.
10189 (handle_serial_event, handle_target_event, push_event)
10190 (putpkt_notif): Declare.
10191 * target.h (enum resume_kind): New.
10192 (struct thread_resume): Replace `step' field by `kind' field.
10193 (TARGET_WNOHANG): Define.
10194 (struct target_ops) <wait>: Add `options' argument.
10195 <supports_non_stop, async, start_non_stop>: New fields.
10196 (target_supports_non_stop, target_async): New.
10197 (start_non_stop): Declare.
10198 (mywait): Add `options' argument.
10199 * target.c (mywait): Add `options' argument. Print child exit
10200 notifications here.
10201 (start_non_stop): New.
10202 * server.c (non_stop, own_buf, mem_buf): New globals.
10203 (struct vstop_notif): New.
10204 (notif_queue): New global.
10205 (queue_stop_reply, push_event, discard_queued_stop_replies)
10206 (send_next_stop_reply): New.
10207 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10208 interface changes.
10209 (attach_inferior): In non-stop mode, don't wait for the target
10210 here.
10211 (handle_general_set): Handle QNonStop.
10212 (handle_query): When handling qC, return the current general
10213 thread, instead of the first thread of the list.
10214 (handle_query): If the backend supports non-stop mode, include
10215 QNonStop+ in the qSupported query response.
10216 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10217 and non-stop mode.
10218 (handle_v_attach, handle_v_run): Handle non-stop mode.
10219 (handle_v_stopped): New.
10220 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10221 (myresume): Adjust to use resume_kind. Handle non-stop.
10222 (queue_stop_reply_callback): New.
10223 (handle_status): Handle non-stop mode.
10224 (main): Clear non_stop flag on reconnection. Use the event-loop.
10225 Refactor serial protocol handling from here ...
10226 (process_serial_event): ... to this new function. When GDB
10227 selects any thread, select one here. In non-stop mode, wait until
10228 GDB acks all pending events before exiting.
10229 (handle_serial_event, handle_target_event): New.
10230 * remote-utils.c (remote_open): Install remote_desc in the event
10231 loop.
10232 (remote_close): Remove remote_desc from the event loop.
10233 (putpkt_binary): Rename to...
10234 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10235 (putpkt_binary): New as wrapper around putpkt_binary_1.
10236 (putpkt_notif): New.
10237 (prepare_resume_reply): In non-stop mode, don't change the
10238 general_thread.
10239 * event-loop.c: New.
10240 * Makefile.in (OBJ): Add event-loop.o.
10241 (event-loop.o): New rule.
10242
10243 * linux-low.h (pid_of): Moved here.
10244 (lwpid_of): New.
10245 (get_lwp_thread): Use lwpid_of.
10246 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10247 * linux-low.c (pid_of): Delete.
10248 (inferior_pid): Use lwpid_of.
10249 (linux_event_pipe): New.
10250 (target_is_async_p): New.
10251 (delete_lwp): New.
10252 (handle_extended_wait): Use lwpid_of.
10253 (add_lwp): Don't set lwpid field.
10254 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10255 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10256 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10257 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10258 first. Adjust to linux_wait_for_event interface changes. Use
10259 lwpid_of.
10260 (linux_detach): Don't delete the main lwp here.
10261 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10262 (status_pending_p): Don't consider explicitly suspended lwps.
10263 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10264 pointer. Add OPTIONS argument. Change return type to int. Use
10265 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10266 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10267 pointer. Add status pointer argument. Return a pid instead of a
10268 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10269 changes. In non-stop mode, don't switch to a random thread.
10270 (linux_wait): Rename to...
10271 (linux_wait_1): ... this. Add target_options argument, and handle
10272 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10273 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10274 clean exit and signal exit code. Don't stop all threads in
10275 non-stop mode. In all-stop mode, only stop all threads when
10276 reporting a stop to GDB. Handle explicit thread stop requests.
10277 (async_file_flush, async_file_mark): New.
10278 (linux_wait): New.
10279 (send_sigstop): Use lwpid_of.
10280 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10281 interface changes. In non-stop mode, don't switch to a random
10282 thread.
10283 (linux_resume_one_lwp): Use lwpid_of.
10284 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10285 (linux_resume_one_thread): ... this. Handle resume_stop. In
10286 non-stop mode, don't look for pending flag in all threads.
10287 (resume_status_pending_p): Don't consider explicitly suspended
10288 threads.
10289 (my_waitpid): Reimplement. Emulate __WALL.
10290 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10291 Use lwpid_of.
10292 (sigchld_handler, linux_supports_non_stop, linux_async)
10293 (linux_start_non_stop): New.
10294 (linux_target_ops): Register linux_supports_non_stop, linux_async
10295 and linux_start_non_stop.
10296 (initialize_low): Install SIGCHLD handler.
10297 * thread-db.c (thread_db_create_event, find_one_thread)
10298 (thread_db_get_tls_address): Use lwpid_of.
10299 * win32-low.c (win32_detach): Adjust to use resume_kind.
10300 (win32_wait): Add `options' argument.
10301 * spu-low.c (spu_resume): Adjust to use resume_kind.
10302 (spu_wait): Add `options' argument.
10303
10304 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10305
10306 Decouple target code from remote protocol.
10307
10308 * target.h (enum target_waitkind): New.
10309 (struct target_waitstatus): New.
10310 (struct target_ops) <wait>: Return an unsigned long. Take a
10311 target_waitstatus pointer instead of a char pointer.
10312 (mywait): Likewise.
10313 * target.c (mywait): Change prototype to return an unsigned long.
10314 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10315 * server.h (thread_from_wait, old_thread_from_wait): Delete
10316 declarations.
10317 (prepare_resume_reply): Change prototype to take a
10318 target_waitstatus.
10319 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10320 (last_status, last_ptid): New.
10321 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10322 pid instead of a signal.
10323 (attach_inferior): Remove "status" and "signal" parameters.
10324 Adjust.
10325 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10326 not as an address.
10327 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10328 (handle_v_requests, myresume): Remove "status" and "signal"
10329 parameters. Adjust.
10330 (handle_status): New.
10331 (main): Delete local `status'. Adjust.
10332 * remote-utils.c: Include target.h.
10333 (prepare_resume_reply): Change prototype to take a
10334 target_waitstatus. Adjust.
10335
10336 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10337 interface.
10338 * spu-low.c (spu_wait): Adjust.
10339 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10340 Delete.
10341 (win32_wait): Adjust.
10342
10343 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10344
10345 * target.h (struct thread_resume): Delete leave_stopped member.
10346 (struct target_ops): Add a `n' argument to the `resume' callback.
10347 * server.c (start_inferior): Adjust.
10348 (handle_v_cont, myresume): Adjust.
10349 * linux-low.c (check_removed_breakpoint): Adjust to resume
10350 interface change, and to removed leave_stopped field.
10351 (resume_ptr): Delete.
10352 (struct thread_resume_array): New.
10353 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10354 resume interface change.
10355 (linux_continue_one_thread, linux_queue_one_thread)
10356 (resume_status_pending_p): Check if the resume field is NULL
10357 instead of checking the leave_stopped member.
10358 (linux_resume): Adjust to the target resume interface change.
10359 * spu-low.c (spu_resume): Adjust to the target resume interface
10360 change.
10361 * win32-low.c (win32_detach, win32_resume): Ditto.
10362
10363 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10364
10365 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10366 flag.
10367 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10368 pending.
10369 (linux_continue_one_thread): Only preserve the stepping flag if
10370 there's a pending breakpoint.
10371
10372 2009-03-31 Pedro Alves <pedro@codesourcery.com>
10373
10374 * server.c (main): After the inferior having exited, call
10375 remote_close before exiting gdbserver.
10376
10377 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10378
10379 Fix size of FPSCR in Power 7 processors.
10380 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10381 (PPC_FEATURE_HAS_DFP): New #define.
10382 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10383 size of the FPSCR.
10384
10385 2009-03-23 Pedro Alves <pedro@codesourcery.com>
10386
10387 * server.c (handle_query) Whitespace and formatting.
10388
10389 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10390
10391 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10392 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10393 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10394 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10395 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10396 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10397 Makefile.in, configure.ac: Fix whitespace throughout.
10398 * configure: Regenerate.
10399
10400 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10401
10402 * inferiors.c (find_inferior): Make it safe for the callback
10403 function to delete the currently iterated inferior.
10404
10405 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10406
10407 * Makefile.in (linuw_low_h): Move higher.
10408 (thread-db.o): Depend on $(linux_low_h).
10409
10410 2009-03-17 Pedro Alves <pedro@codesourcery.com>
10411
10412 Rename "process" to "lwp" throughout.
10413
10414 * linux-low.c (all_processes): Rename to...
10415 (all_lwps): ... this.
10416 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10417 (add_process): Rename to ...
10418 (add_lwp): ... this. Adjust.
10419 (linux_create_inferior): Adjust.
10420 (linux_attach_lwp): Adjust.
10421 (linux_attach): Adjust.
10422 (linux_kill_one_process): Rename to ...
10423 (linux_kill_one_lwp): ... this. Adjust.
10424 (linux_kill): Adjust.
10425 (linux_detach_one_process): Rename to ...
10426 (linux_detach_one_lwp): ... this. Adjust.
10427 (linux_detach): Adjust.
10428 (check_removed_breakpoint): Adjust.
10429 (status_pending_p): Adjust.
10430 (linux_wait_for_process): Rename to ...
10431 (linux_wait_for_lwp): ... this. Adjust.
10432 (linux_wait_for_event): Adjust.
10433 (send_sigstop): Adjust.
10434 (wait_for_sigstop): Adjust.
10435 (stop_all_processes): Rename to ...
10436 (stop_all_lwps): ... this.
10437 (linux_resume_one_process): Rename to ...
10438 (linux_resume_one_lwp): ... this. Adjust.
10439 (linux_set_resume_request, linux_continue_one_thread)
10440 (linux_queue_one_thread, resume_status_pending_p)
10441 (usr_store_inferior_registers, regsets_store_inferior_registers)
10442 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10443 Adjust.
10444 * linux-low.h (get_process): Rename to ...
10445 (get_lwp): ... this. Adjust.
10446 (get_thread_process): Rename to ...
10447 (get_thread_lwp): ... this. Adjust.
10448 (get_process_thread): Rename to ...
10449 (get_lwp_thread): ... this. Adjust.
10450 (struct process_info): Rename to ...
10451 (struct lwp_info): ... this.
10452 (all_processes): Rename to ...
10453 (all_lwps): ... this.
10454 * proc-service.c (ps_lgetregs): Adjust.
10455 * thread-db.c (thread_db_create_event, find_one_thread)
10456 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10457
10458 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10459
10460 * server.c (handle_query): Handle "qAttached".
10461
10462 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10463
10464 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10465 GPLv3, update license URL.
10466
10467 2009-03-01 Doug Evans <dje@google.com>
10468
10469 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10470 (server_h): Add gdb_signals.h.
10471 (signals.o): Update.
10472 * server.h (target_signal_from_host,target_signal_to_host_p)
10473 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10474
10475 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10476
10477 * remote-utils.c (getpkt): Also generate remote-debug
10478 information if noack_mode is set.
10479
10480 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10481
10482 * server.c (handle_query): Report qXfer:siginfo:read and
10483 qXfer:siginfo:write as supported and handle them.
10484 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10485 * linux-low.c (linux_xfer_siginfo): New.
10486 (linux_target_ops): Set it.
10487
10488 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10489
10490 * server.c (gdbserver_usage): Mention --remote-debug.
10491 (main): Accept '--remote-debug' switch.
10492
10493 2009-01-18 Doug Evans <dje@google.com>
10494
10495 * regcache.c (new_register_cache): No need to check result of xcalloc.
10496 * server.c (handle_search_memory): Back out calls to xmalloc,
10497 result is checked and error is returned to user upon failure.
10498 (handle_query): Ditto. Add more checks for result of malloc.
10499 (handle_v_cont): Check result of malloc, report error back to
10500 user upon failure.
10501 (handle_v_run): Ditto. Call freeargv.
10502 * server.h (freeargv): Declare.
10503 * utils.c (freeargv): New fn.
10504
10505 2009-01-15 Doug Evans <dje@google.com>
10506
10507 * gdbreplay.c (perror_with_name): Make arg const char *.
10508 * server.h (target_signal_to_name): Make return type const char *.
10509 * thread-db.c (thread_db_err_str): Make return type const char *.
10510 * utils.c (perror_with_name): Make arg const char *.
10511
10512 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10513
10514 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10515 when handling a EXIT_PROCESS_DEBUG_EVENT.
10516
10517 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10518
10519 * gdbreplay.c (gdbreplay_version): Update copyright year.
10520 * server.c (gdbserver_version): Likewise.
10521
10522 2009-01-05 Doug Evans <dje@google.com>
10523
10524 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10525 (handle_extended_wait): Improve comment.
10526
10527 2008-12-13 Doug Evans <dje@google.com>
10528
10529 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10530 * server.h (ATTR_MALLOC): New macro.
10531 (xmalloc,xcalloc,xstrdup): Declare.
10532 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10533 * inferiors.c: Ditto.
10534 * linux-low.c: Ditto.
10535 * mem-break.c: Ditto.
10536 * regcache.c: Ditto.
10537 * remote-utils.c: Ditto.
10538 * server.c: Ditto.
10539 * target.c: Ditto.
10540 * win32-low.c: Ditto.
10541
10542 2008-12-12 Doug Evans <dje@google.com>
10543
10544 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10545 in debugging printf.
10546
10547 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10548
10549 2008-12-09 Doug Evans <dje@google.com>
10550
10551 * linux-low.h (struct process_info): Delete member tid, unused.
10552 * thread-db.c (find_one_thread): Update.
10553 (maybe_attach_thread): Update.
10554
10555 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10556
10557 * target.h (struct target_ops): Add qxfer_osdata member.
10558 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10559 and dirent.h.
10560 (linux_qxfer_osdata): New functions.
10561 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10562 callback.
10563 * server.c (handle_query): Handle "qXfer:osdata:read:".
10564 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10565 (buffer_xml_printf): New functions.
10566 * server.h (struct buffer): New.
10567 (buffer_grow_str, buffer_grow_str0): New macros.
10568 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10569 (buffer_xml_printf): Declare.
10570
10571 2008-11-24 Doug Evans <dje@google.com>
10572
10573 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10574
10575 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10576
10577 * server.c (handle_v_run): Always use the supplied argument list.
10578
10579 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10580
10581 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10582 (xtensa_regmap_table): Add entry for scompare1.
10583
10584 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10585
10586 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10587 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10588 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10589 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10590 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10591 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10592 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10593 XML target descriptions.
10594 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10595 when inferior is running on an ISA 2.05 or later processor. Add
10596 special case to return offset for full 64-bit slot of FPSCR when
10597 in 32-bits.
10598
10599 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10600
10601 * Makefile.in (SFILES, clean): Added sparc64 files.
10602 (reg-sparc64.o, reg-sparc64.c): New.
10603 * configure.srv (sparc*-*-linux*): New configuration.
10604 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10605 syscall arguments for SPARC.
10606 (regsets_store_inferior_registers): Likewise.
10607 * linux-sparc-low.c: New file.
10608
10609 2008-10-21 Doug Evans <dje@google.com>
10610
10611 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10612 (READLINE_DIR,READLINE_DEP): Delete.
10613 (INTERNAL_CFLAGS): Update.
10614 (LINTFLAGS): Update.
10615
10616 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10617
10618 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10619 whole argv from the last run, not just argv[0].
10620
10621 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10622
10623 * regcache.c (new_register_cache): Return NULL if the register
10624 cache size isn't known yet.
10625 (free_register_cache): Avoid dereferencing a NULL regcache.
10626
10627 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10628
10629 * configure.srv: Merge MIPS and MIPS64.
10630
10631 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10632
10633 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10634
10635 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10636
10637 * Makefile.in: Add required vsx dependencies.
10638
10639 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10640 Declare init_registers_powerpc_vsx32l.
10641 Declare init_registers_powerpc_vsx64l.
10642 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10643 (ppc_arch_setup): Check for VSX in hwcap.
10644 (ppc_fill_vsxregset): New function.
10645 (ppc_store_vsxregset): New function.
10646 Add new VSX entry in regset_info target_regsets.
10647
10648 * configure.srv: Add new VSX dependencies.
10649
10650 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10651
10652 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10653 (remote_open): Set or clear transport_is_reliable.
10654 (putpkt_binary): Don't expect acks in noack mode.
10655 (getpkt): Don't send ack/nac in noack mode.
10656 * server.c (handle_general_set): Handle QStartNoAckMode.
10657 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10658 qSupported.
10659 (main): Reset noack_mode on every connection.
10660 * server.h (noack_mode): Declare.
10661
10662 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10663
10664 * Makefile.in (GDBREPLAY_OBS): New variable.
10665 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10666
10667 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10668 Daniel Jacobowitz <dan@codesourcery.com>
10669
10670 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10671 (usr_store_inferior_registers): Likewise.
10672 (regsets_store_inferior_registers): Likewise.
10673
10674 2008-07-31 Rolf Jansen <rj@surtec.com>
10675 Pedro Alves <pedro@codesourcery.com>
10676
10677 * configure.ac: Check for memmem declaration.
10678 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10679 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10680 (disable_packet_qfThreadInfo): Unconditionally compile.
10681 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10682 * configure, config.in: Regenerate.
10683
10684 2008-07-28 Doug Kwan <dougkwan@google.com>
10685
10686 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10687 (linux_write_memory): Remove declaration of errno.
10688
10689 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10690
10691 * linux-low.c (handle_extended_wait): Do not use "status"
10692 variable uninitialized.
10693
10694 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10695
10696 * server.c (handle_v_attach): Inhibit reporting dll changes.
10697
10698 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10699
10700 * remote-utils.c (prepare_resume_reply): If requested, don't
10701 output "thread:TID" in the T stop reply.
10702
10703 * server.c (disable_packet_vCont, disable_packet_Tthread)
10704 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10705 (handle_query): If requested, disable support for qC, qfThreadInfo
10706 and qsThreadInfo.
10707 (handle_v_requests): If requested, disable support for vCont.
10708 (gdbserver_show_disableable): New.
10709 (main): Handle --disable-packet and --disable-packet=LIST.
10710
10711 * server.h (disable_packet_vCont, disable_packet_Tthread)
10712 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10713
10714 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10715
10716 * server.c (gdbserver_usage): Mention --version.
10717
10718 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10719
10720 * Makefile.in (gdbreplay.o): New rule.
10721
10722 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10723
10724 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10725 message, not gdbserver.
10726
10727 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10728 Nathan Sidwell <nathan@codesourcery.com>
10729 Joseph Myers <joseph@codesourcery.com>
10730
10731 * acinclude.m4: Include ../../config/acx.m4.
10732 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10733 * configure, config.in: Regenerate.
10734 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10735 * server.c (gdbserver_version): Print PKGVERSION.
10736 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10737 (main): Adjust gdbserver_usage calls.
10738 * gdbreplay.c (version, host_name): Add declarations.
10739 (gdbreplay_version, gdbreplay_usage): New.
10740 (main): Accept --version and --help options.
10741
10742 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10743
10744 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10745 (arm_breakpoint_at): Handle Thumb.
10746 (the_low_target): Add comment.
10747
10748 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10749
10750 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10751
10752 2008-05-09 Doug Evans <dje@google.com>
10753
10754 * server.h (decode_search_memory_packet): Declare.
10755 * remote-utils.c (decode_search_memory_packet): New fn.
10756 * server.c (handle_search_memory_1): New fn.
10757 (handle_search_memory): New fn.
10758 (handle_query): Process qSearch:memory packets.
10759
10760 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10761
10762 * regcache.c (registers_length): Remove.
10763 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10764 full register packet.
10765 * regcache.h (registers_length): Remove prototype.
10766 * server.h (PBUFSIZ): Define to 16384.
10767
10768 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10769
10770 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10771 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10772 powerpc-64l.o, and powerpc-altivec64l.o.
10773 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10774 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10775 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10776 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10777 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10778 to srv_xmlfiles.
10779
10780 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10781 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10782 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10783 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10784 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10785 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10786 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10787 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10788 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10789 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10790 (clean): Update.
10791
10792 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10793 (init_registers_powerpc_32l): ... this new prototype.
10794 (init_registers_powerpc_32): Remove, replace by ...
10795 (init_registers_powerpc_altivec32l): ... this new prototype.
10796 (init_registers_powerpc_e500): Remove, replace by ...
10797 (init_registers_powerpc_e500l): ... this new prototype.
10798 (init_registers_ppc64): Remove, replace by ...
10799 (init_registers_powerpc_64l): ... this new prototype.
10800 (init_registers_powerpc_64): Remove, replace by ...
10801 (init_registers_powerpc_altivec64l): ... this new prototype.
10802 (ppc_num_regs): Set to 73.
10803 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10804 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10805 (ppc_cannot_store_register): Handle orig_r3 and trap.
10806 (ppc_arch_setup): Update init_registers_... calls.
10807 (ppc_fill_gregset): Handle orig_r3 and trap.
10808
10809 * inferiors.c (clear_inferiors): Reset current_inferior.
10810
10811 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10812
10813 * acinclude.m4: Add override.m4.
10814 * configure: Regenerate.
10815
10816 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10817
10818 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10819 initial call to init_register_ppc64.
10820
10821 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10822
10823 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10824 single powerpc*-*-linux* case.
10825 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10826
10827 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10828
10829 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10830 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10831 from reg_xmlfiles.
10832 * linux-ppc-low.c: Include <elf.h>.
10833 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10834 (ppc_hwcap): New global variable.
10835 (ppc_regmap): Remove __SPE__ #ifdef sections.
10836 (ppc_regmap_e500): New global variable.
10837 (ppc_cannot_store_register): Update __SPE__ special case.
10838 (ppc_get_hwcap): New function.
10839 (ppc_arch_setup): Use it to determine whether inferior supports
10840 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10841 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10842 Do not access registers if target does not support AltiVec.
10843 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10844 Do not access registers if target does not support SPE.
10845 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10846
10847 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10848
10849 * linux-low.c (disabled_regsets, num_regsets): New.
10850 (use_regsets_p): Delete.
10851 (linux_wait_for_process): Clear disabled_regsets.
10852 (regsets_fetch_inferior_registers): Check and set it.
10853 (regsets_store_inferior_registers): Likewise.
10854 (linux_fetch_registers, linux_store_registers): Do not use
10855 use_regsets_p.
10856 (initialize_low): Allocate disabled_regsets.
10857
10858 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10859
10860 * Makefile.in (LIBOBJS): New.
10861 (OBS): Use LIBOBJS.
10862 (memmem.o): New rule.
10863 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10864 * configure: Regenerated.
10865
10866 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10867
10868 * server.c (handle_query): Never return "unsupported" for
10869 qXfer:features:read queries.
10870
10871 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10872
10873 * server.c (get_features_xml): Fix inverted condition.
10874 (handle_query): Always support qXfer:feature:read.
10875
10876 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10877
10878 * server.c (wrapper_argv): New.
10879 (start_inferior): Handle wrapper_argv. If set, expect an extra
10880 trap.
10881 (gdbserver_usage): Document --wrapper.
10882 (main): Parse --wrapper.
10883
10884 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10885
10886 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10887 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10888 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10889 (ppc_set_pc): Likewise.
10890 (ppc_arch_setup): New function.
10891 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10892 of collect_register.
10893 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10894
10895 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10896
10897 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10898 instead of linux-ppc64-low.o.
10899 * linux-ppc64-low.c: Remove file.
10900 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10901 (linux-ppc64-low.o): Remove rule.
10902
10903 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10904 (init_registers_powerpc_64): Likewise.
10905 (ppc_regmap): Conditionally define depending on __powerpc64__.
10906 (ppc_cannot_store_register): Do not special-case "fpscr" when
10907 compiled on __powerpc64__.
10908 (ppc_collect_ptrace_register): New function.
10909 (ppc_supply_ptrace_register): New function.
10910 (ppc_breakpoint): Change type to "unsigned int".
10911 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10912 (the_low_target): Conditionally provide initializers for the
10913 arch_setup member depending on __powerpc64__. Install
10914 collect_ptrace_register and supply_ptrace_register members.
10915
10916 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10917
10918 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10919 * server.c (gdbserver_xmltarget): Define.
10920 (get_features_xml): Use it to replace "target.xml" and arch_string.
10921
10922 * configure.srv: Remove srv_xmltarget. Add XML files that were
10923 mentioned there to srv_xmlfiles instead. Remove conditional tests
10924 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10925 srv_xmlfiles and srv_regobj to include all possible choices.
10926 * configure.ac (srv_xmltarget): Remove.
10927 (srv_xmlfiles): Do not add "target.xml".
10928 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10929 checks for supplementary target information.
10930 * configure: Regenerate.
10931 * Makefile.in (XML_TARGET): Remove.
10932 (target.xml): Remove rule.
10933 (clean): Do not clean up target.xml.
10934 (.PRECIOUS): Do not mention target.xml.
10935
10936 * target.h (struct target_ops): Remove arch_string member.
10937 * linux-low.c (linux_arch_string): Remove.
10938 (linux_target_ops): Remove arch_string initializer.
10939 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10940 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10941 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10942 * spu-low.c (spu_arch_string): Remove.
10943 (spu_target_ops): Remove arch_string initializer.
10944 * win32-low.c (win32_arch_string): Remove.
10945 (win32_target_ops): Remove arch_string initializer.
10946 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10947 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10948 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10949
10950 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10951
10952 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10953 by collect_ptrace_register and supply_ptrace_register hooks.
10954 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10955 instead of checking for the_low_target.left_pad_xfer.
10956 (usr_store_inferior_registers): Use collect_ptrace_register callback
10957 instead of checking for the_low_target.left_pad_xfer.
10958
10959 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10960 (s390_supply_ptrace_register): Likewise.
10961 (s390_fill_gregset): Call s390_collect_ptrace_register.
10962 (the_low_target): Update.
10963
10964 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10965 (ppc_supply_ptrace_register): Likewise.
10966 (the_low_target): Update.
10967
10968 * linux-i386-low.c (the_low_target): Update.
10969 * linux-x86-64-low.c (the_low_target): Update.
10970
10971 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10972
10973 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10974 reg-s390.o and reg-s390x.o.
10975
10976 * linux-low.c (new_inferior): New global variable.
10977 (linux_create_inferior, linux_attach): Set it.
10978 (linux_wait_for_process): Call the_low_target.arch_setup after the
10979 target has stopped for the first time.
10980 (initialize_low): Do not call the_low_target.arch_setup.
10981
10982 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10983 (s390_set_pc): Likewise.
10984 (s390_arch_setup): New function.
10985 (the_low_target): Use s390_arch_setup as arch_setup routine.
10986
10987 * regcache.c (realloc_register_cache): New function.
10988 (set_register_cache): Call it for each existing regcache.
10989
10990 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10991
10992 * server.h (init_registers): Remove prototype.
10993
10994 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10995 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10996 instead of init_registers ().
10997 * linux-arm-low.c (init_registers_arm): Add prototype.
10998 (init_registers_arm_with_iwmmxt): Likewise.
10999 (the_low_target): Add initializer for arch_setup field.
11000 * linux-cris-low.c (init_registers_cris): Add prototype.
11001 (the_low_target): Add initializer for arch_setup field.
11002 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11003 (the_low_target): Add initializer for arch_setup field.
11004 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11005 (the_low_target): Add initializer for arch_setup field.
11006 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11007 (the_low_target): Add initializer for arch_setup field.
11008 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11009 (the_low_target): Add initializer for arch_setup field.
11010 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11011 (the_low_target): Add initializer for arch_setup field.
11012 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11013 (init_registers_mips64_linux): Likewise.
11014 (the_low_target): Add initializer for arch_setup field.
11015 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11016 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11017 (the_low_target): Add initializer for arch_setup field.
11018 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11019 (init_registers_powerpc_64): Likewise.
11020 (the_low_target): Add initializer for arch_setup field.
11021 * linux-s390-low.c (init_registers_s390): Add prototype.
11022 (init_registers_s390x): Likewise.
11023 (the_low_target): Add initializer for arch_setup field.
11024 * linux-sh-low.c (init_registers_sh): Add prototype.
11025 (the_low_target): Add initializer for arch_setup field.
11026 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11027 (the_low_target): Add initializer for arch_setup field.
11028 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11029 (the_low_target): Add initializer for arch_setup field.
11030
11031 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11032 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11033 instead of init_registers ().
11034 * win32-arm-low.c (init_registers_arm): Add prototype.
11035 (the_low_target): Add initializer for arch_setup field.
11036 * win32-i386-low.c (init_registers_i386): Add prototype.
11037 (the_low_target): Add initializer for arch_setup field.
11038
11039 * spu-low.c (init_registers_spu): Add prototype.
11040 (initialize_low): Call initialie_registers_spu () instead of
11041 initialize_registers ().
11042
11043 2008-02-19 Pedro Alves <pedro@codesourcery.com>
11044
11045 * server.c (handle_v_requests): When handling the vRun and vAttach
11046 packets, if already debugging a process, don't kill it. Return an
11047 error instead.
11048
11049 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11050
11051 * server.c (handle_query): Correct length check.
11052
11053 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11054
11055 * win32-low.c (do_initial_child_stuff): Add process handle
11056 parameter. Set current_process_handle and current_process_id from the
11057 parameters. Clear globals.
11058 (win32_create_inferior): Don't set current_process_handle and
11059 current_process_id here. Instead pass them on the call to
11060 do_initial_child_stuff.
11061 (win32_attach): Likewise.
11062 (win32_clear_inferiors): New.
11063 (win32_kill): Don't close the current process handle or the
11064 current thread handle here. Instead call win32_clear_inferiors.
11065 (win32_detach): Don't open a new handle to the process. Call
11066 win32_clear_inferiors.
11067 (win32_join): Don't rely on current_process_handle; open a new
11068 handle using the process id.
11069 (win32_wait): Call win32_clear_inferiors when the inferior process
11070 has exited.
11071
11072 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11073
11074 * server.c (monitor_show_help): Add "exit".
11075
11076 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11077
11078 * Makefile.in (SFILES): Add linux-xtensa-low.c.
11079 (clean): Add reg-xtensa.c.
11080 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11081 * configure.srv (xtensa*-*-linux*) New target.
11082 * linux-xtensa-low.c: New.
11083 * xtensa-xtregs.c: New.
11084
11085 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11086
11087 * hostio.c: Don't include errno.h.
11088 (errno_to_fileio_errno): Move to hostio-errno.
11089 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11090 error number outputting to the target->hostio_last_error callback.
11091 (hostio_packet_error): Use FILEIO_EINVAL directly.
11092 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11093 calls to hostio_error.
11094 * hostio-errno.c: New.
11095 * server.h (hostio_last_error_from_errno): Declare.
11096 * target.h (target_ops): Add hostio_last_error member.
11097 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11098 as hostio_last_error handler.
11099 * spu-low.c (spu_target_ops): Likewise.
11100 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11101 (wince_hostio_last_error): New functions.
11102 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11103 as hostio_last_error handler.
11104 (win32_target_ops) [!_WIN32_WCE]: Register
11105 hostio_last_error_from_errno as hostio_last_error handler.
11106 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11107 (hostio-errno.o): New rule.
11108 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11109 * configure.srv (srv_hostio_err_objs): New variable. Default to
11110 hostio-errno.o.
11111 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11112 * configure: Regenerate.
11113
11114 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11115
11116 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11117 (linux_kill, linux_detach): Clean up the process list.
11118 * remote-utils.c (remote_open): Improve port number parsing.
11119 (putpkt_binary, input_interrupt): Only send interrupts if the target
11120 is running.
11121 * server.c (extended_protocol): Make static.
11122 (attached): Define earlier.
11123 (exit_requested, response_needed, program_argv): New variables.
11124 (target_running): New.
11125 (start_inferior): Clear attached here.
11126 (attach_inferior): Set attached here.
11127 (require_running): Define.
11128 (handle_query): Use require_running and target_running. Implement
11129 "monitor exit".
11130 (handle_v_attach, handle_v_run): New.
11131 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11132 (gdbserver_usage): Update.
11133 (main): Redo argument parsing. Handle --debug and --multi. Handle
11134 --attach along with other options or after the port. Save
11135 program_argv. Support no initial program. Resynchronize
11136 communication with GDB after an error. Handle "monitor exit".
11137 Use require_running and target_running. Always allow the extended
11138 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11139 restart in extended mode.
11140 * README: Refer to the GDB manual. Update --attach usage.
11141
11142 2007-12-20 Andreas Schwab <schwab@suse.de>
11143
11144 * linux-low.c (STACK_SIZE): Define.
11145 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11146 (linux_test_for_tracefork): Likewise.
11147
11148 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11149
11150 * linux-low.c (linux_wait_for_event): Update messages. Do not
11151 reinsert auto-delete breakpoints.
11152 * mem-break.c (struct breakpoint): Change return type of handler to
11153 int.
11154 (set_breakpoint_at): Update handler type.
11155 (reinsert_breakpoint_handler): Return 1 instead of calling
11156 delete_breakpoint.
11157 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11158 setting a new one.
11159 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11160 * mem-break.h (set_breakpoint_at): Update handler type.
11161 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11162 * win32-low.c (auto_delete_breakpoint): New.
11163 (get_child_debug_event): Use it.
11164
11165 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11166
11167 * configure.ac: Check for pread and pwrite.
11168 * hostio.c (handle_pread): Fall back to lseek and read.
11169 (handle_pwrite): Fall back to lseek and write.
11170 * config.in, configure: Regenerated.
11171
11172 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11173
11174 * server.c (myresume): Add own_buf argument.
11175 (main): Update calls.
11176
11177 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11178
11179 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11180 * remote-utils.c (remote_open): Do not call disable_async_io.
11181 (block_async_io): Delete.
11182 (unblock_async_io): Make static.
11183 (initialize_async_io): New.
11184 * server.c (handle_v_cont): Handle async I/O here.
11185 (myresume): Likewise. Move other common resume tasks here...
11186 (main): ... from here. Call initialize_async_io. Disable async
11187 I/O before the main loop.
11188 * server.h (initialize_async_io): Declare.
11189 (block_async_io, unblock_async_io): Delete prototypes.
11190 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11191
11192 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11193
11194 * remote-utils.c (readchar): Allow binary data in received messages.
11195
11196 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11197
11198 * win32-low.c (attaching): New global.
11199 (win32_create_inferior): Clear the `attaching' global.
11200 (win32_attach): Set the `attaching' global.
11201 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11202 attaching. Only set a breakpoint at the entry point if not
11203 attaching.
11204
11205 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11206
11207 * server.c (main): Don't report dll events on the initial
11208 connection on attaches.
11209
11210 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11211
11212 * server.c (main): Relax numerical bases supported for the pid of
11213 the --attach command line argument.
11214
11215 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11216
11217 * win32-low.c (win32_attach): Call OpenProcess before
11218 DebugActiveProcess, not after. Add last error output to error
11219 call.
11220
11221 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11222
11223 * win32-low.c (win32_get_thread_context)
11224 (win32_set_thread_context): New functions.
11225 (thread_rec): Use win32_get_thread_context.
11226 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11227 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11228 field.
11229
11230 2007-12-03 Leo Zayas
11231 Pedro Alves <pedro_alves@portugalmail.pt>
11232
11233 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11234 global variables.
11235 (child_add_thread): Minor cleanup.
11236 (child_continue): Resume artificially suspended threads before
11237 calling ContinueDebugEvent.
11238 (suspend_one_thread): New.
11239 (fake_breakpoint_event): New.
11240 (get_child_debug_event): Change return type to int. Check here if
11241 gdb sent an interrupt request. If a soft interrupt was requested,
11242 fake a breakpoint event. Return 0 if there is no event to handle,
11243 and 1 otherwise.
11244 (win32_wait): Don't check here if gdb sent an interrupt request.
11245 Ensure there is a valid event to handle.
11246 (win32_request_interrupt): Add soft interruption method as last
11247 resort.
11248
11249 2007-12-03 Leo Zayas
11250 Pedro Alves <pedro_alves@portugalmail.pt>
11251
11252 * win32-low.h (win32_thread_info): Add descriptions to the
11253 structure members. Replace `suspend_count' counter by a
11254 `suspended' flag.
11255 * win32-low.c (thread_rec): Update condition of when to get the
11256 context from the inferior. Rely on ContextFlags being set if it
11257 has already been retrieved. Only suspend the inferior thread if
11258 we haven't already. Warn if that fails.
11259 (continue_one_thread): s/suspend_count/suspended/. Only call
11260 ResumeThread once. Warn if that fails.
11261
11262 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11263
11264 * win32-low.c (win32_wait): Don't read from the inferior when it
11265 has already exited.
11266
11267 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11268
11269 * Makefile.in (win32_low_h): New variable.
11270 (win32-low.o): Add dependency on $(win32_low_h).
11271 (win32-arm-low.o, win32-i386-low.o): New rules.
11272
11273 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11274
11275 * hostio.c: Correct copyright year.
11276
11277 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11278
11279 * Makefile.in (OBS): Add hostio.o.
11280 (hostio.o): New rule.
11281 * server.h (handle_vFile): Declare.
11282 * hostio.c: New file.
11283 * server.c (handle_v_requests): Take packet_len and new_packet_len
11284 for binary packets. Call handle_vFile.
11285 (main): Update call to handle_v_requests.
11286
11287 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11288
11289 * linux-low.c: Include <sched.h>.
11290
11291 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11292
11293 * linux-low.c (linux_tracefork_grandchild): New.
11294 (linux_tracefork_child): Use clone.
11295 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11296
11297 2007-10-31 Joel Brobecker <brobecker@adacore.com>
11298
11299 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11300
11301 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11302
11303 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11304
11305 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11306
11307 * inferiors.c (change_inferior_id): Delete.
11308 (add_pid_to_list, pull_pid_from_list): New.
11309 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11310 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11311 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11312 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11313 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11314 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11315 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11316 (using_threads): Always set to 1.
11317 (handle_extended_wait): New.
11318 (add_process): Do not set TID.
11319 (linux_create_inferior): Set must_set_ptrace_flags.
11320 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11321 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11322 (linux_thread_alive): Rename TID argument to LWPID.
11323 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11324 (linux_wait_for_event): Do not use TID or check using_threads. Update
11325 call to dead_thread_notify. Call handle_extended_wait.
11326 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11327 (send_sigstop): Delete sigstop_sent.
11328 (wait_for_sigstop): Avoid TID.
11329 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11330 (linux_test_for_tracefork): New.
11331 (linux_lookup_signals): Use thread_db_active and
11332 linux_supports_tracefork_flag.
11333 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11334 * linux-low.h (get_process_thread): Avoid TID.
11335 (struct process_ifo): Move thread_known and tid to the end. Remove
11336 sigstop_sent.
11337 (linux_attach_lwp, thread_db_init): Update prototypes.
11338 * server.h (change_inferior_id): Delete prototype.
11339 (add_pid_to_list, pull_pid_from_list): New prototypes.
11340 * thread-db.c (thread_db_use_events): New.
11341 (find_first_thread): Rename to...
11342 (find_one_thread): ...this. Update callers and messages. Do not
11343 call fatal. Check thread_db_use_events. Do not call
11344 change_inferior_id or new_thread_notify.
11345 (maybe_attach_thread): Update. Do not call new_thread_notify.
11346 (thread_db_init): Set thread_db_use_events. Check use_events.
11347 * utils.c (fatal, warning): Correct message prefix.
11348
11349 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11350
11351 * Makefile.in (clean): Remove new files.
11352 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11353 (powerpc-64.o, powerpc-64.c): New rules.
11354 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11355 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11356 with SPE.
11357 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11358 SPE targets.
11359 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11360 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11361 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11362 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11363 (target_regsets): Add AltiVec and SPE register sets.
11364 * configure.ac: Check for AltiVec and SPE.
11365 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11366 (ppc_fill_vrregset, ppc_store_vrregset): New.
11367 (target_regsets): Add AltiVec register set.
11368 * configure: Regenerated.
11369
11370 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11371
11372 * linux-low.c (O_LARGEFILE): Define.
11373 (linux_read_memory): Use /proc/PID/mem.
11374 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11375 * configure, config.in: Regenerated.
11376
11377 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11378
11379 * linux-low.c (linux_wait_for_event): Do not pass signals while
11380 single-stepping.
11381
11382 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11383
11384 * win32-low.c (create_process): New.
11385 (win32_create_inferior): Use create_process instead of
11386 CreateProcess. If create_process failed retry appending an ".exe"
11387 suffix. Store the GetLastError result immediatelly after
11388 create_process calls and use it on the call to error.
11389
11390 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11391
11392 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11393
11394 2007-08-23 Joel Brobecker <brobecker@adacore.com>
11395
11396 * configure.ac: Switch license to GPLv3.
11397
11398 2007-08-01 Michael Snyder <msnyder@access-company.com>
11399
11400 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11401
11402 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11403
11404 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11405 typedef.
11406 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11407 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11408 CloseToolhelp32Snapshot.
11409 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11410 CloseToolhelp32Snapshot.
11411
11412 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
11413
11414 * server.c (main): Check for inferior exit before main loop.
11415
11416 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11417
11418 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11419 instead of on tmp_desc.
11420
11421 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11422 Daniel Jacobowitz <dan@codesourcery.com>
11423
11424 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11425 (add_thread): Minor cleanups.
11426 (clear_inferiors): Move lower in the file. Clear the DLL
11427 list.
11428 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11429 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11430 (xml_escape_text): New.
11431 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11432 for qSupported.
11433 (handle_v_cont): Report errors.
11434 (gdbserver_version): Update.
11435 (main): Correct size of own_buf. Do not report initial DLL events.
11436 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11437 (unloaded_dll, xml_escape_text): New.
11438 * win32-low.c (enum target_waitkind): Update comments.
11439 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11440 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11441 (win32_EnumProcessModules, win32_GetModuleInformation)
11442 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11443 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11444 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11445 (win32_Module32First, win32_Module32Next, load_toolhelp)
11446 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11447 (get_child_debug_event): Handle DLL events.
11448 (win32_wait): Likewise.
11449
11450 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11451
11452 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11453 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11454
11455 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11456
11457 * win32-low.c (handle_output_debug_string): Ignore event if not
11458 waiting.
11459
11460 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11461
11462 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11463
11464 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11465
11466 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11467
11468 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11469
11470 * inferiors.c (change_inferior_id): Add comment.
11471 * linux-low.c (check_removed_breakpoint): Add an early
11472 prototype. Improve debug output.
11473 (linux_attach): Doc update.
11474 (linux_detach_one_process, linux_detach): Clean up before releasing
11475 each process.
11476 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11477 * linux-low.h (struct process_info): Doc improvement.
11478 * mem-break.c (delete_all_breakpoints): New.
11479 * mem-break.h (delete_all_breakpoints): New prototype.
11480 * thread-db.c (find_first_thread): New.
11481 (thread_db_create_event): Call it instead of
11482 thread_db_find_new_threads. Clean up unused variables.
11483 (maybe_attach_thread): Remove first thread handling.
11484 (thread_db_find_new_threads): Use find_first_thread.
11485 (thread_db_get_tls_address): Likewise.
11486
11487 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11488
11489 * thread-db.c (thread_db_find_new_threads): Add prototype.
11490 (thread_db_create_event): Check for the main thread before adding
11491 a new thread.
11492 (maybe_attach_thread): Only enable event reporting if TID == 0.
11493 (thread_db_get_tls_address): Check for new threads.
11494
11495 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11496
11497 * linux-low.c (linux_create_inferior): Try execv before execvp.
11498 * spu-low.c (spu_create_inferior): Likewise.
11499
11500 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11501
11502 * linux-low.c (linux_create_inferior): Change execv to execvp.
11503 * spu-low.c (spu_create_inferior): Likewies.
11504
11505 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11506
11507 * Makefile.in (clean): Clean new files instead of deleted ones.
11508 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11509 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11510 rules.
11511 * configure.srv: Specify XML files and new regformats for MIPS and
11512 MIPS64 GNU/Linux.
11513 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11514 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11515 an entry for the restart register.
11516 (mips_cannot_fetch_register, mips_cannot_store_register)
11517 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11518 register names to match the XML descriptions.
11519 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11520 restart register instead of $0.
11521
11522 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11523 Markus Deuling <deuling@de.ibm.com>
11524
11525 * remote-utils.c (decode_xfer_write): New function.
11526 * server.h (decode_xfer_write): Add prototype.
11527 * server.c (handle_query): Add PACKET_LEN argument. Support
11528 qXfer:spu:read and qXfer:spu:write packets.
11529 (main): Pass packet_len to handle_query.
11530 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11531 * target.h (target_ops): Add qxfer_spu.
11532
11533 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11534
11535 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11536 accessing non-seekable spufs files.
11537
11538 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11539
11540 * server.c (handle_query): Add reply for qC packet.
11541
11542 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11543 Leo Zayas <lerele@champenstudios@com>
11544
11545 * server.h (check_remote_input_interrupt_request): New function.
11546 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11547 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11548 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11549 (check_remote_input_interrupt_request): New function.
11550 * server.h (check_remote_input_interrupt_request): Declare.
11551 * win32-low.c (winapi_DebugBreakProcess,
11552 winapi_GenerateConsoleCtrlEvent): New typedefs.
11553 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11554 to 250 ms.
11555 (win32_wait): Check for remote interrupt request
11556 with check_remote_input_interrupt_request.
11557 (win32_request_interrupt): New function.
11558 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11559
11560 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11561
11562 * win32-low.c (debug_registers_changed,
11563 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11564 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11565 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11566 (thread_rec): Get context using the low target.
11567 (child_add_thread): Call thread_added on the low target,
11568 which does the same thing.
11569 (regptr): Delete.
11570 (do_initial_child_stuff): Remove debug registers references.
11571 Set context using the low target. Resume threads after
11572 setting the contexts.
11573 (child_continue): Remove dead variable. Remove debug
11574 registers references.
11575 (child_fetch_inferior_registers): Go through the low target.
11576 (do_child_store_inferior_registers): Remove.
11577 (child_store_inferior_registers): Go through the low target.
11578 (win32_resume): Remove debug registers references.
11579 Set context using the low target.
11580 (handle_exception): Change return type to void. Don't record
11581 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11582 first chance exception.
11583 (get_child_debug_event): Change return type to void. Remove
11584 goto loop. Always return after waiting for debug event.
11585 (win32_wait): Convert to switch statement. Handle spurious
11586 events.
11587
11588 * win32-i386-low.c (debug_registers_changed,
11589 debug_registers_used): New.
11590 (initial_stuff): Rename to ...
11591 (i386_initial_stuff): ... this. Clear debug registers
11592 state variables.
11593 (store_debug_registers): Delete.
11594 (i386_get_thread_context): New.
11595 (load_debug_registers): Delete.
11596 (i386_set_thread_context): New.
11597 (i386_thread_added): New.
11598 (single_step): Rename to ...
11599 (i386_single_step): ... this.
11600 (do_fetch_inferior_registers): Rename to ...
11601 (i386_fetch_inferior_register): ... this.
11602 (i386_store_inferior_register): New.
11603 (the_low_target): Adapt to new interface.
11604
11605 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11606 (arm_get_thread_context): New.
11607 (arm_set_thread_context): New.
11608 (regptr): New.
11609 (do_fetch_inferior_registers): Rename to ...
11610 (arm_fetch_inferior_register): ... this.
11611 (arm_store_inferior_register): New.
11612 (arm_wince_breakpoint): Reimplement as unsigned long.
11613 (arm_wince_breakpoint_len): Define.
11614 (the_low_target): Adapt to new interface.
11615
11616 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11617 load_debug_registers. Add get_thread_context, set_thread_context,
11618 thread_added and store_inferior_register. Rename
11619 fetch_inferior_registers to fetch_inferior_register.
11620 (regptr): Remove declaration.
11621
11622 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11623
11624 * linux-low.c (linux_detach): Change return type to int. Return 0.
11625 * spu-low.c (spu_detach): Likewise.
11626
11627 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11628
11629 * target.h (target_ops): Change return type of detach to int.
11630 Add join.
11631 (join_inferior): New.
11632 * server.c (main): Don't skip detach support on mingw32.
11633 If the inferior doesn't support detaching return error.
11634 Call join_inferior instead of using waitpid.
11635 * linux-low.c (linux_join): New.
11636 (linux_target_op): Add linux_join.
11637 * spu-low.c (spu_join): New.
11638 (spu_target_ops): Add spu_join.
11639 * win32-low.c (win32_detach): Adapt to new interface.
11640 Reopen current_process_handle before detaching. Issue a child
11641 resume before detaching.
11642 (win32_join): New.
11643 (win32_target_op): Add win32_join.
11644
11645 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11646
11647 * win32-low.c (win32-attach): Fix return value.
11648 * target.h (target_ops): Describe ATTACH return values.
11649
11650 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11651
11652 * win32-low.c (GETPROCADDRESS): Define.
11653 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11654 (winapi_DebugSetProcessKillOnExit): Likewise.
11655 (win32_create_inferior): Force usage of ansi CreateProcessA.
11656 (win32_attach): Use GETPROCADDRESS.
11657 (win32_detach): Likewise.
11658
11659 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11660
11661 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11662
11663 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11664
11665 * win32-low.c: Commit leftover changes from 2007-03-29.
11666
11667 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11668
11669 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11670 fields short instead of int. Add explicit padding.
11671 (i387_cache_to_fsave): Remove unnecessary casts.
11672 (i387_fsave_to_cache): Doc fix.
11673 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11674
11675 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11676
11677 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11678 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11679
11680 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11681
11682 * configure.srv (arm*-*-mingw32ce*): Move near the other
11683 arm targets.
11684
11685 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11686
11687 * configure.ac: Add errno checking.
11688 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11689 sys/file.h and malloc.h.
11690 (AC_CHECK_DECLS): Add perror.
11691 (srv_mingwce): Handle.
11692 * configure.srv (i[34567]86-*-cygwin*): Add
11693 win32-i386-low.o to srv_tgtobj.
11694 (i[34567]86-*-mingw*): Likewise.
11695 (arm*-*-mingw32ce*): Add case.
11696 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11697 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11698 [__MINGW32CE__] (strerror): New function.
11699 [__MINGW32CE__] (errno): Define to GetLastError.
11700 [__MINGW32CE__] (COUNTOF): New macro.
11701 (remote_open): Remove extra close call.
11702 * mem-break.c (delete_breakpoint_at): New function.
11703 * mem-break.h (delete_breakpoint_at): Declare.
11704 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11705 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11706 [USE_WIN32API] (read, write): Add char* casts.
11707 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11708 * server.h: Include wincecompat.h on Windows CE.
11709 [HAVE_ERRNO_H]: Check.
11710 (perror): Declare if not declared.
11711 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11712 (perror_with_name): Remove errno declaration.
11713 * wincecompat.h: New.
11714 * wincecompat.c: New.
11715 * win32-low.h: New.
11716 * win32-arm-low.c: New.
11717 * win32-i386-low.c: New.
11718 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11719 (OUTMSG2): Make it safe.
11720 (_T): New macro.
11721 (COUNTOF): New macro.
11722 (NUM_REGS): Get it from the low target.
11723 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11724 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11725 (thread_rec): Let low target handle debug registers.
11726 (child_add_thread): Likewise.
11727 (child_init_thread_list): Likewise.
11728 (continue_one_thread): Likewise.
11729 (regptr): New.
11730 (do_child_fetch_inferior_registers): Move to ...
11731 * win32-i386-low.c: ... here, and rename to ...
11732 (do_fetch_inferior_registers): ... this.
11733 * win32-low.c (child_fetch_inferior_registers):
11734 Go through the low target.
11735 (do_child_store_inferior_registers): Use regptr.
11736 (strwinerror): New function.
11737 (win32_create_inferior): Handle Windows CE.
11738 Use strwinerror instead of strerror on Windows error
11739 codes. Add program to the error output.
11740 Don't close the main thread handle on Windows CE.
11741 (win32_attach): Use coredll.dll on Windows CE.
11742 (win32_kill): Close current process and current
11743 thread handles.
11744 (win32_detach): Use coredll.dll on Windows CE.
11745 (win32_resume): Let low target handle debug registers, and
11746 step request.
11747 (handle_exception): Add/Remove initial breakpoint. Avoid
11748 non-existant WSTOPSIG on Windows CE.
11749 (win32_read_inferior_memory): Cast to remove warning.
11750 (win32_arch_string): Go through the low target.
11751 (initialize_low): Call set_breakpoint_data with the low
11752 target's breakpoint.
11753 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11754 FOP_REGNUM, mappings): Move to ...
11755 * win32-i386-low.c: ... here.
11756 * win32-low.c (win32_thread_info): Move to ...
11757 * win32-low.h: ... here.
11758 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11759 win32-arm-low.c and wincecompat.c.
11760 (all:): Add $EXEEXT.
11761 (install-only:): Likewise.
11762 (gdbserver:): Likewise.
11763 (gdbreplay:): Likewise.
11764 * config.in: Regenerate.
11765 * configure: Regenerate.
11766
11767 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11768
11769 * win32-low.c: Rename typedef thread_info to
11770 win32_thread_info throughout.
11771
11772 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11773
11774 * win32-i386-low.c: Rename to ...
11775 * win32-low.c: ... this.
11776 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11777 * Makefile.in: Likewise.
11778
11779 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11780
11781 * remote-utils.c (monitor_output): Constify msg parameter.
11782 * server.h (monitor_output): Likewise.
11783 * win32-i386-low.c (handle_output_debug_string): New.
11784 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11785 handle_output_debug_string.
11786 (get_child_debug_event): Likewise.
11787
11788 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11789
11790 * server.c (main): Correct strtoul check.
11791
11792 2007-03-27 Jon Ringle <jon@ringle.org>
11793
11794 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11795
11796 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11797
11798 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11799
11800 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11801
11802 * terminal.h: Check HAVE_SGTTY_H.
11803
11804 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11805
11806 * remote-utils.c (remote_open): Print out the assigned port number.
11807
11808 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11809
11810 * remote-utils.c (monitor_output): New function.
11811 * server.c (debug_threads): Define here.
11812 (monitor_show_help): New function.
11813 (handle_query): Handle qRcmd.
11814 (main): Do not handle 'd' packet.
11815 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11816 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11817 of debug_threads.
11818
11819 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11820
11821 * Makefile.in (EXEEXT): New.
11822 (clean): Use $(EXEEXT).
11823
11824 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11825
11826 * target.h (target_ops): Rename send_signal to request_interrupt,
11827 and remove enum target_signal parameter.
11828 * linux-low.c (linux_request_interrupt): Rename from
11829 linux_send_signal, and always send SIGINT.
11830 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11831 and always send SIGINT.
11832 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11833 of send_signal.
11834 (input_interrupt): Likewise.
11835
11836 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11837
11838 * server.c (get_features_xml): Check if target implemented
11839 arch_string.
11840 * win32-i386-low.c (win32_arch_string): New.
11841 (win32_target_ops): Add win32_arch_string as arch_string member.
11842
11843 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11844
11845 * spu-low.c (spu_arch_string): New.
11846 (spu_target_ops): Add spu_arch_string.
11847
11848 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11849
11850 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11851 * configure.ac: Do not check for terminal.h.
11852 * configure, config.in: Regenerated.
11853
11854 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11855
11856 * Makefile.in (OBS): Add $(XML_BUILTIN).
11857 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11858 (clean): Update.
11859 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11860 (arm-with-iwmmxt.c): New.
11861 * config.in, configure: Regenerate.
11862 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11863 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11864 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11865 (arm*-*-linux*): Add iWMMXt and regset support.
11866 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11867 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11868 (arm_store_wmmxregset, target_regsets): New.
11869 * server.c (get_features_xml): Take annex argument. Check builtin
11870 XML documents.
11871 (handle_query): Handle multiple annexes.
11872
11873 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11874
11875 * remote-utils.c [USE_WIN32API] (read, write): Define.
11876 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11877 write.
11878
11879 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11880
11881 * linux-i386-low.c (the_low_target): Set arch_string.
11882 * linux-x86-64-low.c (the_low_target): Likewise.
11883 * linux-low.c (linux_arch_string): New.
11884 (linux_target_ops): Add it.
11885 * linux-low.h (struct linux_target_ops): Add arch_string.
11886 * server.c (write_qxfer_response): Use const void * for DATA.
11887 (get_features_xml): New.
11888 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11889 * target.h (struct target_ops): Add arch_string method.
11890
11891 2007-01-03 Denis Pilat <denis.pilat@st.com>
11892 Daniel Jacobowitz <dan@codesourcery.com>
11893
11894 * linux-low.c (linux_kill): Handle being called with no threads.
11895 * win32-i386-low.c (win32_kill): Likewise.
11896 (get_child_debug_event): Clear current_process_handle.
11897
11898 2006-12-30 Denis PILAT <denis.pilat@st.com>
11899 Daniel Jacobowitz <dan@codesourcery.com>
11900
11901 * remote-utils.c (remote_open): Check the type of specified
11902 serial port devices before opening them.
11903 * server.c (main): Kill the inferior if an error occurs during
11904 the first remote_open.
11905
11906 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11907
11908 * README: Update supported targets.
11909
11910 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11911
11912 * Makefile.in (clean): Remove reg-mips64.c.
11913 (reg-mips64.c, reg-mips64.o): New rules.
11914 * configure.srv: Handle mips64. Include regset support for mips.
11915 * linux-mips-low.c (union mips_register): New.
11916 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11917 (mips_breakpoint, mips_breakpoint_at): Use int.
11918 (mips_collect_register, mips_supply_register)
11919 (mips_collect_register_32bit, mips_supply_register_32bit)
11920 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11921 (mips_store_fpregset, target_regsets): New.
11922 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11923
11924 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11925
11926 * configure.srv: Add target "spu*-*-*".
11927 * Makefile.in (clean): Remove reg-spu.c.
11928 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11929 * spu-low.c: New file.
11930
11931 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11932
11933 * configure.ac: Correct td_thr_tls_get_addr test.
11934 * configure: Regenerated.
11935
11936 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11937
11938 * linux-low.c (linux_wait_for_event): Reformat. Use the
11939 pass_signals array.
11940 * remote-utils.c (decode_address_to_semicolon): New.
11941 * server.c (pass_signals, handle_general_set): New.
11942 (handle_query): Mention QPassSignals for qSupported.
11943 (main): Call handle_general_set.
11944 * server.h (pass_signals, decode_address_to_semicolon): New.
11945
11946 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11947
11948 * server.c (handle_query): Correct error handling for read_auxv.
11949
11950 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11951
11952 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11953 and srv_linux_thread_db to yes.
11954 * linux-s390-low.c (s390_fill_gregset): New function.
11955 (target_regsets): Define data structure.
11956
11957 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11958
11959 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11960 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11961 * config.in, configure: Regenerated.
11962 * inferiors.c (gdb_id_to_thread): New function.
11963 (gdb_id_to_thread_id): Use it.
11964 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11965 * linux-low.h (struct process_info): Add th member.
11966 (thread_db_get_tls_address): New prototype.
11967 * remote-utils.c (decode_address): Make non-static.
11968 * server.c (handle_query): Handle qGetTLSAddr.
11969 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11970 * target.h (struct target_ops): Add get_tls_address.
11971 * thread-db.c (maybe_attach_thread): Save the thread handle.
11972 (thread_db_get_tls_address): New.
11973
11974 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11975
11976 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11977 (linux_resume_one_process): Take a siginfo_t *. Update all
11978 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11979 (struct pending_signals): Add a siginfo_t.
11980 (linux_wait_for_process): Always set last_status.
11981 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11982 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11983 * linux-low.h (struct process_info): Add last_status.
11984
11985 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11986
11987 * remote-utils.c (try_rle): New function.
11988 (putpkt_binary): Use it.
11989
11990 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11991
11992 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11993 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11994 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11995 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11996 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11997 point registers.
11998
11999 2006-08-08 Richard Sandiford <richard@codesourcery.com>
12000
12001 * server.c (terminal_fd): New variable.
12002 (old_foreground_pgrp): Likewise.
12003 (restore_old_foreground_pgrp): New function.
12004 (start_inferior): Record the terminal file descriptor in terminal_fd
12005 and its original foreground group in old_foreground_pgrp. Register
12006 restore_old_foreground_pgrp with atexit().
12007
12008 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12009
12010 * server.c (handle_query): Correct qPart to qXfer.
12011
12012 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12013
12014 * configure.ac: Check for more headers which are missing on
12015 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12016 * configure.srv: Add Cygwin and mingw32.
12017 * remote-utils.c: Don't include headers unconditionally which
12018 are missing on mingw32. Include <winsock.h> for mingw32.
12019 (remote_open): Adjust for mingw32 support. Flush
12020 standard error after writing to it.
12021 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12022 (unblock_async_io, enable_async_io, disable_async_io)
12023 (readchar, getpkt): Update for Winsock support.
12024 (prepare_resume_reply): Expect a protocol signal number.
12025 * server.c: Disable <sys/wait.h> on mingw32.
12026 (start_inferior): Adjust for mingw32 support. Flush
12027 standard error after writing to it.
12028 (attach_inferior): Likewise. Use protocol signal
12029 numbers.
12030 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12031 and names.
12032 * win32-i386-low.c: New file.
12033 * Makefile.in (XM_CLIBS): Set.
12034 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12035 (win32-i386-low.o): New dependency rule.
12036 * linux-low.c (linux_wait): Use target signal numbers.
12037 * target.h (struct target_ops): Doc fix.
12038 * server.h (target_signal_to_name): New prototype.
12039 * gdbreplay.c: Don't include headers unconditionally which
12040 are missing on mingw32. Include <winsock.h> for mingw32.
12041 (remote_close, remote_open): Adjust for Winsock support.
12042 * configure, config.in: Regenerated.
12043
12044 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12045
12046 * server.c (decode_xfer_read, write_qxfer_response): New.
12047 (handle_query): Take a packet length argument. Handle
12048 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12049 the qSupported response.
12050 (main): Update call to handle_query.
12051
12052 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12053
12054 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12055 (putpkt_binary): Renamed from putpkt and adjusted for binary
12056 data.
12057 (putpkt): New wrapper for putpkt_binary.
12058 (readchar): Don't mask off the high bit.
12059 (decode_X_packet): New function.
12060 * server.c (main): Call putpkt_binary if a handler sets the packet
12061 length. Save the length of the incoming packet. Handle 'X'.
12062 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12063
12064 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12065
12066 * server.c (handle_query): Handle qSupported.
12067
12068 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12069
12070 * remote-utils.c (all_symbols_looked_up): New variable.
12071 (look_up_one_symbol): Check it.
12072 * server.h (look_up_one_symbol): New declaration.
12073 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12074
12075 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12076
12077 * Makefile.in (linux-arm-low.o): Update dependencies.
12078 * linux-arm-low.c: Include "gdb_proc_service.h".
12079 (PTRACE_GET_THREAD_AREA): Define.
12080 (ps_get_thread_area): New function.
12081
12082 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12083
12084 * configure.srv (m68k*-*-uclinux*): New target.
12085 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12086 (linux_resume_one_process): Remove extraneous cast.
12087 (linux_read_offsets): New.
12088 (linux_target_op): Add linux_read_offsets on mmuless systems.
12089 * server.c (handle_query): Add qOffsets logic.
12090 * target.h (struct target_ops): Add read_offsets.
12091
12092 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12093
12094 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12095 (PTRACE_GET_THREAD_AREA): Define.
12096 (ps_get_thread_area): New function.
12097 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12098 (linux-x86-64-low.o): Update.
12099
12100 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12101
12102 * configure.ac: Remove checks for prfpregset_t.
12103 * gdb_proc_service.h: New file.
12104 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12105 new "gdb_proc_service.h".
12106 * proc-service.c: Likewise.
12107 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12108 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12109 * Makefile.in (gdb_proc_service_h): Updated.
12110 * configure, config.in: Regenerated.
12111
12112 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12113
12114 * remote-utils.c (prepare_resume_reply): Move declaration
12115 of gdb_id_from_wait to the top of the block.
12116
12117 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12118
12119 * linux-low.c (regsets_store_inferior_registers): Read the regset
12120 from the target before filling it.
12121
12122 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12123
12124 * server.c (attach_inferior): Return SIGTRAP for a successful
12125 attach.
12126
12127 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12128
12129 * Makefile.in (OBS): Add version.o.
12130 (STAGESTUFF): Delete.
12131 (version.o): Add dependencies.
12132 (version.c): Replace rule.
12133 (clean): Remove version.c.
12134 * server.c (gdbserver_version): New.
12135 (gdbserver_usage): Use printf.
12136 (main): Handle --version and --help.
12137 * server.h (version, host_name): Add declarations.
12138
12139 2005-12-23 Eli Zaretskii <eliz@gnu.org>
12140
12141 * linux-arm-low.c:
12142 * linux-arm-low.c:
12143 * inferiors.c:
12144 * i387-fp.h:
12145 * i387-fp.c:
12146 * gdbreplay.c:
12147 * regcache.c:
12148 * proc-service.c:
12149 * mem-break.h:
12150 * mem-break.c:
12151 * linux-x86-64-low.c:
12152 * linux-sh-low.c:
12153 * linux-s390-low.c:
12154 * linux-ppc64-low.c:
12155 * linux-ppc-low.c:
12156 * linux-mips-low.c:
12157 * linux-m68k-low.c:
12158 * linux-m32r-low.c:
12159 * linux-low.h:
12160 * linux-low.c:
12161 * linux-ia64-low.c:
12162 * linux-i386-low.c:
12163 * linux-crisv32-low.c:
12164 * thread-db.c:
12165 * terminal.h:
12166 * target.h:
12167 * target.c:
12168 * server.h:
12169 * server.c:
12170 * remote-utils.c:
12171 * regcache.h:
12172 * utils.c:
12173 * Makefile.in:
12174 * configure.ac:
12175 * gdbserver.1: Add (C) after Copyright. Update the FSF
12176 address.
12177
12178 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12179
12180 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12181 (arm_breakpoint_at): Recognize both breakpoints.
12182 (the_low_target): Use the correct breakpoint instruction.
12183
12184 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12185
12186 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12187 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12188 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12189 (the_low_target): Update.
12190
12191 2005-10-25 Andreas Schwab <schwab@suse.de>
12192
12193 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12194
12195 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12196 (ia64_num_regs): Reduce to 462.
12197
12198 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12199
12200 * acinclude.m4: Correct quoting.
12201 * aclocal.m4: Regenerated.
12202
12203 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12204 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12205 (thread_db_init): Call thread_db_err_str.
12206 * configure.ac: Check for TD_VERSION.
12207 * config.in, configure: Regenerated.
12208
12209 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12210
12211 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12212
12213 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12214
12215 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12216 is not available. Define HAVE_PTRACE_GETREGS if it is.
12217 * config.in, configure: Regenerated.
12218 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12219 * linux-i386-low.c, linux-m68k-low.c: Update to use
12220 HAVE_PTRACE_GETREGS.
12221 * linux-low.c (regsets_fetch_inferior_registers)
12222 (regsets_store_inferior_registers): Only return 0 if we processed
12223 GENERAL_REGS.
12224 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12225 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12226
12227 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12228
12229 * inferiors.c (struct thread_info): Add gdb_id.
12230 (add_thread): Add gdb_id argument.
12231 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12232 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12233 calls to add_thread.
12234 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12235 * server.c (handle_query): Use thread_to_gdb_id.
12236 (handle_v_cont, main): Use gdb_id_to_thread_id.
12237 * server.h (add_thread): Update prototype.
12238 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12239 prototypes.
12240
12241 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12242
12243 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12244 left-padded registers.
12245 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12246 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12247
12248 2005-07-01 Steve Ellcey <sje@cup.hp.com>
12249
12250 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12251 * configure: Regenerate.
12252 * config.in: Regenerate.
12253 * server.h (NEED_DECLARATION_STRERROR):
12254 Replace with !HAVE_DECL_STRERROR.
12255
12256 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12257
12258 * linux-low.c (linux_wait, linux_send_signal): Don't test
12259 an unsigned long variable for > 0 if it could be MAX_ULONG.
12260 * server.c (myresume): Likewise.
12261 * target.c (set_desired_inferior): Likewise.
12262
12263 2005-06-13 Mark Kettenis <kettenis@gnu.org>
12264
12265 * configure.ac: Simplify and improve check for socklen_t.
12266 * configure, config.in: Regenerate.
12267
12268 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12269
12270 * acconfig.h: Remove.
12271 * configure.ac: Add a test for socklen_t. Use three-argument
12272 AC_DEFINE throughout.
12273 * config.in: Regenerated using autoheader 2.59.
12274 * configure: Regenerated.
12275
12276 * gdbreplay.c (socklen_t): Provide a default.
12277 (remote_open): Use socklen_t.
12278 * remote-utils.c (socklen_t): Provide a default.
12279 (remote_open): Use socklen_t.
12280 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12281 unsigned char.
12282
12283 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12284 char for buffers.
12285 * linux-low.c (linux_read_memory, linux_write_memory)
12286 (linux_read_auxv): Likewise.
12287 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12288 (check_mem_write): Likewise.
12289 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12290 Likewise.
12291 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12292 (registers_from_string, register_data): Likewise.
12293 * server.c (handle_query, main): Likewise.
12294 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12295 (decode_M_packet): Likewise.
12296 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12297 * target.h (struct target_ops): Update read_memory, write_memory,
12298 and read_auxv.
12299 (read_inferior_memory, write_inferior_memory): Update.
12300 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12301 to unsigned char *.
12302 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12303 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12304 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12305 linux-s390-low.c, linux-sh-low.c: Update for changes in
12306 read_inferior_memory and the_low_target->breakpoint.
12307
12308 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12309
12310 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12311 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12312 * configure.srv: Add powerpc64-*-linux*.
12313 * linux-ppc64-low.c: New file.
12314
12315 2005-05-23 Orjan Friberg <orjanf@axis.com>
12316
12317 * linux-cris-low.c: New file with support for CRIS.
12318 * linux-crisv32-low.c: Ditto for CRISv32.
12319 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12320 (clean): Add reg-cris.c and reg-crisv32.c.
12321 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12322 reg-crisv32.o, and reg-crisv32.c to make rules.
12323 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12324 recognized targets.
12325
12326 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12327
12328 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12329 of sizeof (PTRACE_XFER_TYPE).
12330 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12331
12332 2005-05-12 Orjan Friberg <orjanf@axis.com>
12333
12334 * target.h (struct target_ops): Add insert_watchpoint,
12335 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12336 pointers for hardware watchpoint support.
12337 * linux-low.h (struct linux_target_ops): Ditto.
12338 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12339 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12340 to linux_target_ops.
12341 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12342 reply packet.
12343 * server.c (main): Recognize 'Z' and 'z' packets.
12344
12345 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12346
12347 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12348 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12349 (the_low_target): Add new members.
12350
12351 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12352
12353 * proc-service.c (ps_lgetregs): Search all_processes instead of
12354 all_threads.
12355
12356 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12357
12358 * server.c (start_inferior): Change return type to int.
12359 (attach_inferior): Change sigptr to int *.
12360 (handle_v_cont, handle_v_requests): Change signal to int *.
12361 (main): Change signal to int.
12362
12363 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
12364
12365 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12366 * configure.srv: Add m32r*-*-linux*.
12367 * linux-m32r-low.c: New file.
12368
12369 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12370
12371 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12372
12373 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12374
12375 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12376 Take unsigned long arguments for PIDs.
12377 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12378 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12379 (wait_for_sigstop, linux_resume_one_process)
12380 (regsets_fetch_inferior_registers, linux_send_signal)
12381 (linux_read_auxv): Likewise. Update the types of variables holding
12382 PIDs. Update format string specifiers.
12383 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12384 * remote-utils.c (prepare_resume_reply): Likewise.
12385 * server.c (cont_thread, general_thread, step_thread)
12386 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12387 unsigned long.
12388 (handle_query): Update format specifiers.
12389 (handle_v_cont, main): Use strtoul for thread IDs.
12390 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12391 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12392 (general_thread, step_thread, thread_from_wait)
12393 (old_thread_from_wait): Update.
12394 * target.h (struct thread_resume): Use unsigned long for THREAD.
12395 (struct target_ops): Use unsigned long for arguments to attach and
12396 thread_alive.
12397
12398 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12399
12400 * acinclude.m4: Include bfd/bfd.m4 directly.
12401 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12402 <agriffis@toolchain.org>.
12403 * aclocal.m4, configure: Regenerated.
12404
12405 2005-01-07 Andrew Cagney <cagney@gnu.org>
12406
12407 * configure.ac: Rename configure.in, require autoconf 2.59.
12408 * configure: Re-generate.
12409
12410 2004-12-08 Daniel Jacobowitz <dan@debian.org>
12411
12412 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12413 LIBS when finished.
12414 * aclocal.m4: Regenerated.
12415 * configure: Regenerated.
12416
12417 2004-11-21 Andreas Schwab <schwab@suse.de>
12418
12419 * linux-m68k-low.c (m68k_num_gregs): Define.
12420 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12421 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12422 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12423 (m68k_breakpoint_at): New. Add to the_low_target.
12424
12425 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12426 srv_linux_thread_db to yes.
12427
12428 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12429
12430 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12431 (ARCH_SET_FS): Likewise.
12432 (ARCH_GET_FS): Likewise.
12433 (ARCH_GET_GS): Likewise.
12434
12435 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12436
12437 * linux-i386-low.c (ps_get_thread_area): New.
12438 * linux-x86-64-low.c (ps_get_thread_area): New.
12439 * linux-low.c: Include <sys/syscall.h>.
12440 (linux_kill_one_process): Don't kill the first thread here.
12441 (linux_kill): Kill the first thread here.
12442 (kill_lwp): New function.
12443 (send_sigstop, linux_send_signal): Use it.
12444 * proc-service.c: Clean up #ifdefs.
12445 (fpregset_info): Delete.
12446 (ps_lgetregs): Update and enable implementation.
12447 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12448 implementations.
12449 * remote-utils.c (struct sym_cache, symbol_cache): New.
12450 (input_interrupt): Print a clearer message.
12451 (async_io_enabled): New variable.
12452 (enable_async_io, disable_async_io): Use it. Update comments.
12453 (look_up_one_symbol): Use the symbol cache.
12454 * thread-db.c (thread_db_look_up_symbols): New function.
12455 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12456
12457 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12458
12459 * configure.in: Test for -rdynamic.
12460 * configure: Regenerated.
12461 * Makefile (INTERNAL_LDFLAGS): New.
12462 (gdbserver, gdbreplay): Use it.
12463
12464 2004-09-02 Andrew Cagney <cagney@gnu.org>
12465
12466 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12467
12468 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12469
12470 * linux-low.c (linux_wait): Clear all_processes list also.
12471
12472 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12473
12474 * linux-low.c: Include <errno.h>. Remove extern declaration of
12475 errno.
12476
12477 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12478
12479 * gdbreplay.c, server.h, utils.c: Update copyright years.
12480
12481 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12482
12483 * server.c (main): Print child status or termination signal from
12484 variable 'signal', not 'sig'.
12485
12486 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12487
12488 * linux-low.c (linux_read_memory): Change return type to
12489 int. Check for and return error from ptrace().
12490 * target.c (read_inferior_memory): Change return type to int. Pass
12491 back return status from the_target->read_memory().
12492 * target.h (struct target_ops): Adapt *read_memory() prototype.
12493 Update comment.
12494 (read_inferior_memory): Adapt prototype.
12495 * server.c (main): Return an error packet if
12496 read_inferior_memory() returns an error.
12497
12498 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12499
12500 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12501 Unify with other clean targets.
12502
12503 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12504
12505 * server.c (handle_v_cont): Call set_desired_inferior.
12506
12507 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12508
12509 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12510
12511 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12512
12513 * linux-low.c (linux_wait): Unblock async I/O.
12514 (linux_resume): Block and enable async I/O.
12515 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12516 * server.h (block_async_io, unblock_async_io): Add prototypes.
12517
12518 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12519
12520 * remote-utils.c (remote_open): Print a status notice after
12521 opening a TCP port.
12522 * server.c (attach_inferior): Print a status notice after
12523 attaching.
12524
12525 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12526
12527 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12528
12529 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12530
12531 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12532 error packet.
12533 * server.c, target.h: Update copyright years.
12534
12535 2004-02-25 Roland McGrath <roland@redhat.com>
12536
12537 * target.h (struct target_ops): New member `read_auxv'.
12538 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12539 * linux-low.c (linux_read_auxv): New function.
12540 (linux_target_ops): Initialize `read_auxv' member to that.
12541
12542 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12543
12544 Committed by Jim Blandy <jimb@redhat.com>.
12545
12546 * linux-s390-low.c (s390_num_regs): Update.
12547 (s390_regmap): Remove control registers. Use __s390x__ predefine
12548 instead of GPR_SIZE to distiguish s390 and s390x targets.
12549
12550 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12551
12552 * linux-low.c: Update copyright year.
12553 (check_removed_breakpoint): Clear pending_is_breakpoint.
12554 (linux_set_resume_request, linux_queue_one_thread)
12555 (resume_status_pending_p): New functions.
12556 (linux_continue_one_thread): Use process->resume.
12557 (linux_resume): Only resume threads if there are no pending events.
12558 * linux-low.h (struct process_info): Add resume request
12559 pointer.
12560
12561 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12562
12563 * regcache.c (new_register_cache): Clear the allocated register
12564 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12565
12566 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12567
12568 * linux-low.c (linux_resume): Take a struct thread_resume *
12569 argument.
12570 (linux_wait): Update call.
12571 (resume_ptr): New static variable.
12572 (linux_continue_one_thread): Renamed from
12573 linux_continue_one_process. Use resume_ptr.
12574 (linux_resume): Use linux_continue_one_thread.
12575 * server.c (handle_v_cont, handle_v_requests): New functions.
12576 (myresume): New function.
12577 (main): Handle 'v' case.
12578 * target.h (struct thread_resume): New type.
12579 (struct target_ops): Change argument of "resume" to struct
12580 thread_resume *.
12581 (myresume): Delete macro.
12582
12583 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12584
12585 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12586 (uninstall): Support DESTDIR.
12587
12588 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12589
12590 * configure.srv: Add xscale*linux copy of arm*linux entry.
12591
12592 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12593
12594 * linux-arm-low.c (arm_reinsert_addr): New function.
12595 (the_low_target): Add arm_reinsert_addr.
12596
12597 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12598
12599 * mem-break.c: Remove whitespace at end of file.
12600
12601 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12602
12603 * configure.in: Check whether we need to prototype strerror.
12604 * server.h: Optionally prototype strerror.
12605 * gdbreplay.c (perror_with_name): Use strerror.
12606 * linux-low.c (linux_attach_lwp): Use strerror.
12607 * utils.c (perror_with_name): Use strerror.
12608 * config.in, configure: Regenerated.
12609
12610 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12611
12612 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12613 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12614
12615 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12616
12617 * Makefile.in (SFILES): Update.
12618 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12619 low-sun3.c: Remove files.
12620
12621 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12622
12623 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12624 (linux_detach_one_process, linux_detach): New functions.
12625 (linux_target_ops): Add linux_detach.
12626 * server.c (main): Handle 'D' packet.
12627 * target.h (struct target_ops): Add "detach" member.
12628 (detach_inferior): Define.
12629
12630 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12631
12632 From Kelley Cook <kelleycook@wideopenwest.com>:
12633 * configure.srv: Accept i[34567]86 variants.
12634
12635 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12636
12637 * linux-low.c (linux_wait_for_event): Correct comment typos.
12638 (linux_resume_one_process): Call check_removed_breakpoint.
12639 (linux_send_signal): New function.
12640 (linux_target_ops): Add linux_send_signal.
12641 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12642 of kill.
12643 * target.h (struct target_ops): Add send_signal.
12644
12645 2003-05-29 Jim Blandy <jimb@redhat.com>
12646
12647 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12648 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12649 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12650 away part of the register's value.
12651
12652 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12653
12654 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12655 (linux_wait_for_event, linux_init_signals): Likewise.
12656
12657 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12658
12659 * configure.in: Check for stdlib.h.
12660 * configure: Regenerated.
12661 * config.in: Regenerated.
12662
12663 2003-01-04 Andreas Schwab <schwab@suse.de>
12664
12665 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12666
12667 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12668
12669 * Makefile.in: Remove obsolete code.
12670
12671 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12672
12673 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12674 defined(PT_FPR0_HI).
12675
12676 2002-11-17 Stuart Hughes <seh@zee2.com>
12677
12678 * linux-arm-low.c (arm_num_regs): Increase.
12679 (arm_regmap): Include status register.
12680
12681 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12682
12683 * linux-low.c (register_addr): Remove incorrect -1 check.
12684
12685 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12686
12687 * linux-low.c (linux_create_inferior): Call setpgid. Return
12688 the new PID.
12689 (unstopped_p, linux_signal_pid): Remove.
12690 (linux_target_ops): Remove linux_signal_pid.
12691 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12692 global instead of target method.
12693 * target.h (struct target_ops): Remove signal_pid. Update comment
12694 for create_inferior.
12695 * server.c (signal_pid): New variable.
12696 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12697 gdbserver. Set the child to be the foreground process group.
12698 (attach_inferior): Set signal_pid.
12699
12700 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12701
12702 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12703
12704 2002-08-20 Jim Blandy <jimb@redhat.com>
12705
12706 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12707 default for this.
12708
12709 2002-08-01 Andrew Cagney <cagney@redhat.com>
12710
12711 * Makefile.in: Make chill references obsolete.
12712
12713 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12714
12715 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12716 * configure: Regenerate.
12717 * config.in: Regenerate.
12718
12719 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12720
12721 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12722 (perror_with_name, remote_close, remote_open, expect, play): Static.
12723
12724 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12725
12726 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12727 byte offsets instead of an array of indexes.
12728 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12729
12730 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12731
12732 * regcache.c: Add comment.
12733
12734 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12735
12736 * thread-db.c: New file.
12737 * proc-service.c: New file.
12738 * acinclude.m4: New file.
12739 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12740 proc-service.o, and thread-db.o.
12741 (linux-low.o): Add USE_THREAD_DB.
12742 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12743 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12744 * aclocal.m4: Regenerated.
12745 * config.in: Regenerated.
12746 * configure: Regenerated.
12747 * configure.in: Check for proc_service.h, sys/procfs.h,
12748 thread_db.h, and linux/elf.h headrs.
12749 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12750 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12751 Check for -lthread_db and thread support.
12752 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12753 PowerPC, and SuperH.
12754 * i387-fp.c: Constify arguments.
12755 * i387-fp.h: Likewise.
12756 * inferiors.c: (struct thread_info): Renamed from
12757 `struct inferior_info'. Remove PID member. Use generic inferior
12758 list header. All uses updated.
12759 (inferiors, signal_pid): Removed.
12760 (all_threads): New variable.
12761 (get_thread): Define.
12762 (add_inferior_to_list): New function.
12763 (for_each_inferior): New function.
12764 (change_inferior_id): New function.
12765 (add_inferior): Removed.
12766 (remove_inferior): New function.
12767 (add_thread): New function.
12768 (free_one_thread): New function.
12769 (remove_thread): New function.
12770 (clear_inferiors): Use for_each_inferior and free_one_thread.
12771 (find_inferior): New function.
12772 (find_inferior_id): New function.
12773 (inferior_target_data): Update argument type.
12774 (set_inferior_target_data): Likewise.
12775 (inferior_regcache_data): Likewise.
12776 (set_inferior_regcache_data): Likewise.
12777 * linux-low.c (linux_bp_reinsert): Remove.
12778 (all_processes, stopping_threads, using_thrads)
12779 (struct pending_signals, debug_threads, pid_of): New.
12780 (inferior_pid): Replace with macro.
12781 (struct inferior_linux_data): Remove.
12782 (get_stop_pc, add_process): New functions.
12783 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12784 Use add_process and add_thread.
12785 (linux_attach_lwp): New function, based on old linux_attach. Use
12786 add_process and add_thread. Set stop_expected for new threads.
12787 (linux_attach): New function.
12788 (linux_kill_one_process): New function.
12789 (linux_kill): Kill all LWPs.
12790 (linux_thread_alive): Use find_inferior_id.
12791 (check_removed_breakpoints, status_pending_p): New functions.
12792 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12793 Update. Use WNOHANG. Wait for cloned processes also. Update process
12794 struct for the found process.
12795 (linux_wait_for_event): New function.
12796 (linux_wait): Use it. Support LWPs.
12797 (send_sigstop, wait_for_sigstop, stop_all_processes)
12798 (linux_resume_one_process, linux_continue_one_process): New functions.
12799 (linux_resume): Support LWPs.
12800 (REGISTER_RAW_SIZE): Remove.
12801 (fetch_register): Use register_size instead. Call supply_register.
12802 (usr_store_inferior_registers): Likewise. Call collect_register.
12803 Fix recursive case.
12804 (regsets_fetch_inferior_registers): Improve error message.
12805 (regsets_store_inferior_registers): Add debugging.
12806 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12807 (unstopped_p, linux_signal_pid): New functions.
12808 (linux_target_ops): Add linux_signal_pid.
12809 (linux_init_signals): New function.
12810 (initialize_low): Call it. Initialize using_threads.
12811 * regcache.c (inferior_regcache_data): Add valid
12812 flag.
12813 (get_regcache): Fetch registers lazily. Add fetch argument
12814 and update all callers.
12815 (regcache_invalidate_one, regcache_invalidate): New
12816 functions.
12817 (new_register_cache): Renamed from create_register_cache.
12818 Return the new regcache.
12819 (free_register_cache): Change argument to a void *.
12820 (registers_to_string, registers_from_string): Call get_regcache
12821 with fetch flag set.
12822 (register_data): Make static. Pass fetch flag to get_regcache.
12823 (supply_register): Call get_regcache with fetch flag clear.
12824 (collect_register): Call get_regcache with fetch flag set.
12825 (collect_register_as_string): New function.
12826 * regcache.h: Update.
12827 * remote-utils.c (putpkt): Flush after debug output and use
12828 stderr.
12829 Handle input interrupts while waiting for an ACK.
12830 (input_interrupt): Use signal_pid method.
12831 (getpkt): Flush after debug output and use stderr.
12832 (outreg): Use collect_register_as_string.
12833 (new_thread_notify, dead_thread_notify): New functions.
12834 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12835 and general_thread.
12836 (look_up_one_symbol): Flush after debug output.
12837 * server.c (step_thread, server_waiting): New variables.
12838 (start_inferior): Don't use signal_pid. Update call to mywait.
12839 (attach_inferior): Update call to mywait.
12840 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12841 (main): Don't fetch/store registers explicitly. Use
12842 set_desired_inferior. Support proposed ``Hs'' packet. Update
12843 calls to mywait.
12844 * server.h: Update.
12845 (struct inferior_list, struct_inferior_list_entry): New.
12846 * target.c (set_desired_inferior): New.
12847 (write_inferior_memory): Constify.
12848 (mywait): New function.
12849 * target.h: Update.
12850 (struct target_ops): New signal_pid method.
12851 (mywait): Removed macro, added prototype.
12852
12853 * linux-low.h (regset_func): Removed.
12854 (regset_fill_func, regset_store_func): New.
12855 (enum regset_type): New.
12856 (struct regset_info): Add type field. Use new operation types.
12857 (struct linux_target_ops): stop_pc renamed to get_pc.
12858 Add decr_pc_after_break and breakpoint_at.
12859 (get_process, get_thread_proess, get_process_thread)
12860 (strut process_info, all_processes, linux_attach_lwp)
12861 (thread_db_init): New.
12862
12863 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12864 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12865 (the_low_target): Add new members.
12866 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12867 (i386_store_fpxregset): Constify.
12868 (target_regsets): Add new kind identifier.
12869 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12870 (i386_set_pc): Add debugging.
12871 (i386_breakpoint_at): New function.
12872 (the_low_target): Add new members.
12873 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12874 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12875 (mips_breakpoint_at): New.
12876 (the_low_target): Add new members.
12877 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12878 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12879 (the_low_target): Add new members.
12880 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12881 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12882 (the_low_target): Add new members.
12883 * linux-x86-64-low.c (target_regsets): Add new kind
12884 identifier.
12885
12886 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12887
12888 From Martin Pool <mbp@samba.org>:
12889 * server.c (gdbserver_usage): New function.
12890 (main): Call it.
12891
12892 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12893
12894 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12895 stop_at -> stop_pc.
12896
12897 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12898
12899 * Makefile.in: Remove obsolete code.
12900
12901 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12902
12903 * linux-low.c (regsets_fetch_inferior_registers),
12904 (regsets_store_inferior_registers): Removed cast to int from
12905 ptrace() calls.
12906 * regcache.h: Added declaration of struct inferior_info.
12907
12908 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12909
12910 * inferiors.c (struct inferior_info): Add regcache_data.
12911 (add_inferior): Call create_register_cache.
12912 (clear_inferiors): Call free_register_cache.
12913 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12914 * regcache.c (struct inferior_regcache_data): New.
12915 (registers): Remove.
12916 (get_regcache): New function.
12917 (create_register_cache, free_register_cache): New functions.
12918 (set_register_cache): Don't initialize the register cache here.
12919 (registers_to_string, registers_from_string, register_data): Call
12920 get_regcache.
12921 * regcache.h: Add prototypes.
12922 * server.h: Likewise.
12923
12924 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12925
12926 * mem-break.c: New file.
12927 * mem-break.h: New file.
12928 * Makefile.in: Add mem-break.o rule; update server.h
12929 dependencies.
12930 * inferiors.c (struct inferior_info): Add target_data
12931 member.
12932 (clear_inferiors): Free target_data member if set.
12933 (inferior_target_data, set_inferior_target_data): New functions.
12934 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12935 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12936 * linux-low.c (linux_bp_reinsert): New variable.
12937 (struct inferior_linux_data): New.
12938 (linux_create_inferior): Use set_inferior_target_data.
12939 (linux_attach): Likewise. Call add_inferior.
12940 (linux_wait_for_one_inferior): New function.
12941 (linux_wait): Call it.
12942 (linux_write_memory): Add const.
12943 (initialize_low): Call set_breakpoint_data.
12944 * linux-low.h (struct linux_target_ops): Add breakpoint
12945 handling members.
12946 * server.c (attach_inferior): Remove extra add_inferior
12947 call.
12948 * server.h: Include mem-break.h. Update inferior.c
12949 prototypes.
12950 * target.c (read_inferior_memory)
12951 (write_inferior_memory): New functions.
12952 * target.h (read_inferior_memory)
12953 (write_inferior_memory): Change macros to prototypes.
12954 (struct target_ops): Update comments. Add const to write_memory
12955 definition.
12956
12957 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12958
12959 * linux-low.c (usr_store_inferior_registers): Support
12960 registers which are allowed to fail to store.
12961 * linux-low.h (linux_target_ops): Likewise.
12962 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12963 (ppc_cannot_store_register): FPSCR may not be storable.
12964
12965 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12966
12967 * server.h: Include <string.h> if HAVE_STRING_H.
12968 * ChangeLog: Correct paths in last ChangeLog entry.
12969
12970 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12971
12972 * linux-low.h: Remove obsolete prototypes.
12973 (struct linux_target_ops): New.
12974 (extern the_low_target): New.
12975 * linux-low.c (num_regs, regmap): Remove declarations.
12976 (register_addr): Use the_low_target explicitly.
12977 (fetch_register): Likewise.
12978 (usr_fetch_inferior_registers): Likewise.
12979 (usr_store_inferior_registers): Likewise.
12980 * linux-arm-low.c (num_regs): Remove.
12981 (arm_num_regs): Define.
12982 (arm_regmap): Renamed from regmap, made static.
12983 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12984 made static.
12985 (arm_cannot_store_register): Renamed from cannot_store_register,
12986 made static.
12987 (the_low_target): New.
12988 * linux-i386-low.c (num_regs): Remove.
12989 (i386_num_regs): Define.
12990 (i386_regmap): Renamed from regmap, made static.
12991 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12992 made static.
12993 (i386_cannot_store_register): Renamed from cannot_store_register,
12994 made static.
12995 (the_low_target): New.
12996 * linux-ia64-low.c (num_regs): Remove.
12997 (ia64_num_regs): Define.
12998 (ia64_regmap): Renamed from regmap, made static.
12999 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13000 made static.
13001 (ia64_cannot_store_register): Renamed from cannot_store_register,
13002 made static.
13003 (the_low_target): New.
13004 * linux-m68k-low.c (num_regs): Remove.
13005 (m68k_num_regs): Define.
13006 (m68k_regmap): Renamed from regmap, made static.
13007 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13008 made static.
13009 (m68k_cannot_store_register): Renamed from cannot_store_register,
13010 made static.
13011 (the_low_target): New.
13012 * linux-mips-low.c (num_regs): Remove.
13013 (mips_num_regs): Define.
13014 (mips_regmap): Renamed from regmap, made static.
13015 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13016 made static.
13017 (mips_cannot_store_register): Renamed from cannot_store_register,
13018 made static.
13019 (the_low_target): New.
13020 * linux-ppc-low.c (num_regs): Remove.
13021 (ppc_num_regs): Define.
13022 (ppc_regmap): Renamed from regmap, made static.
13023 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13024 made static.
13025 (ppc_cannot_store_register): Renamed from cannot_store_register,
13026 made static.
13027 (the_low_target): New.
13028 * linux-s390-low.c (num_regs): Remove.
13029 (s390_num_regs): Define.
13030 (s390_regmap): Renamed from regmap, made static.
13031 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13032 made static.
13033 (s390_cannot_store_register): Renamed from cannot_store_register,
13034 made static.
13035 (the_low_target): New.
13036 * linux-sh-low.c (num_regs): Remove.
13037 (sh_num_regs): Define.
13038 (sh_regmap): Renamed from regmap, made static.
13039 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13040 made static.
13041 (sh_cannot_store_register): Renamed from cannot_store_register,
13042 made static.
13043 (the_low_target): New.
13044 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13045 (the_low_target): New.
13046
13047 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13048
13049 * Makefile.in: Add stamp-h target.
13050 * configure.in: Create stamp-h.
13051 * configure: Regenerated.
13052
13053 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13054
13055 * inferiors.c: New file.
13056 * target.c: New file.
13057 * target.h: New file.
13058 * Makefile.in: Add target.o and inferiors.o. Update
13059 dependencies.
13060 * linux-low.c (inferior_pid): New static variable,
13061 moved from server.c.
13062 (linux_create_inferior): Renamed from create_inferior.
13063 Call add_inferior. Return 0 on success instead of a PID.
13064 (linux_attach): Renamed from myattach.
13065 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13066 (linux_thread_alive): Renamed from mythread_alive.
13067 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13068 child dies.
13069 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13070 (regsets_store_inferior_registers): Correct error message.
13071 Add missing ``return 0''.
13072 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13073 (linux_store_registers): Renamed from store_inferior_registers.
13074 (linux_read_memory): Renamed from read_inferior_memory.
13075 (linux_write_memory): Renamed from write_inferior_memory.
13076 (linux_target_ops): New structure.
13077 (initialize_low): Call set_target_ops ().
13078 * remote-utils.c (unhexify): New function.
13079 (hexify): New function.
13080 (input_interrupt): Send signals to ``signal_pid''.
13081 * server.c (inferior_pid): Remove.
13082 (start_inferior): Update create_inferior call.
13083 (attach_inferior): Call add_inferior.
13084 (handle_query): New function.
13085 (main): Call handle_query for `q' packets.
13086 * server.h: Include "target.h". Remove obsolete prototypes.
13087 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13088
13089 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13090
13091 * Makefile.in: Add WARN_CFLAGS. Update configury
13092 dependencies.
13093 * configure.in: Check for <string.h>
13094 * configure: Regenerate.
13095 * config.in: Regenerate.
13096 * gdbreplay.c: Include needed system headers.
13097 (remote_open): Remove strchr prototype.
13098 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13099 * regcache.c (supply_register): Change buf argument to const void *.
13100 (supply_register_by_name): Likewise.
13101 (collect_register): Change buf argument to void *.
13102 (collect_register_by_name): Likewise.
13103 * regcache.h: Add missing prototypes.
13104 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13105 * server.c (handle_query): New function.
13106 (attached): New static variable, moved out of main.
13107 (main): Quiet longjmp clobber warnings.
13108 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13109 * utils.c (error): Remove NORETURN.
13110 (fatal): Likewise.