Target remote mode fork and exec test updates
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-12-11 Yao Qi <yao.qi@linaro.org>
2
3 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4 arm_breakpoint_at if the process is 32-bit.
5
6 2015-12-11 Yao Qi <yao.qi@linaro.org>
7
8 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
9 arm breakpoint.
10
11 2015-12-07 Yao Qi <yao.qi@linaro.org>
12
13 * configure.srv: Append arm.o to srv_tgtobj for
14 aarch64*-*-linux* target.
15 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
16 from linux-arm-low.c.
17 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
18 (arm_breakpoint_len, thumb_breakpoint): Likewise.
19 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
20 (thumb2_breakpoint_len): Likewise.
21 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
22 (arm_breakpoint_kinds): Likewise.
23 (arm_breakpoint_kind_from_pc): Likewise.
24 (arm_sw_breakpoint_from_kind): Likewise.
25 (arm_breakpoint_kind_from_current_state): Likewise.
26 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
27 (arm_sw_breakpoint_from_kind): Declare.
28 (arm_breakpoint_kind_from_current_state): Declare.
29 (arm_breakpoint_at): Declare.
30 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
31 arm_sw_breakpoint_from_kind if process is 32-bit.
32 (aarch64_breakpoint_kind_from_pc): New function.
33 (aarch64_breakpoint_kind_from_current_state): New function.
34 (the_low_target): Initialize fields breakpoint_kind_from_pc
35 and breakpoint_kind_from_current_state.
36 * linux-arm-low.c (arm_breakpoint_kinds): Move to
37 linux-aarch32-low.c.
38 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
39 (arm_breakpoint, arm_breakpoint_len): Likewise.
40 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
41 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
42 (arm_is_thumb_mode): Likewise.
43 (arm_breakpoint_at): Likewise.
44 (arm_breakpoint_kind_from_pc): Likewise.
45 (arm_sw_breakpoint_from_kind): Likewise.
46 (arm_breakpoint_kind_from_current_state): Likewise.
47
48 Revert:
49 2015-08-04 Yao Qi <yao.qi@linaro.org>
50
51 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
52 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
53 * server.c (extended_protocol): Remove "static".
54 * server.h (extended_protocol): Declare it.
55
56 2015-12-04 Josh Stone <jistone@redhat.com>
57
58 * target.h (struct target_ops) <arch_setup>: Rename to ...
59 (struct target_ops) <post_create_inferior>: ... this.
60 (target_arch_setup): Rename to ...
61 (target_post_create_inferior): ... this, calling post_create_inferior.
62 * server.c (start_inferior): Update target_arch_setup calls to
63 target_post_create_inferior.
64 * linux-low.c (linux_low_ptrace_options): Forward declare.
65 (linux_arch_setup): Update its comment for general use.
66 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
67 (struct linux_target_ops): Use linux_post_create_inferior.
68 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
69 to post_create_inferior.
70 * nto-low.c (struct nto_target_ops): Likewise.
71 * spu-low.c (struct spu_target_ops): Likewise.
72 * win32-low.c (struct win32_target_ops): Likewise.
73
74 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
75
76 * linux-arm-low.c: Remove duplicate arch/arm.h include.
77
78 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
79
80 * linux-arm-low.c (arm_reinsert_addr): Remove function.
81 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
82 * linux-cris-low.c (cris_reinsert_addr> Remove function.
83 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
84 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
85 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
86 * linux-mips-low.c (mips_reinsert_addr): Remove function.
87 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
88 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
89 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
90 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
91 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
92
93 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
94
95 * linux-low.c (linux_look_up_symbols): Don't call
96 linux_supports_traceclone.
97 * linux-low.h (thread_db_init): Remove use_events argument.
98 * thread-db.c (thread_db_use_event): Remove global variable.
99 (struct thread_db) <td_thr_event_enable_p>: Remove field.
100 (struct thread_db) <td_create_bp>: Remove field.
101 (thread_db_create_event): Remove function.
102 (thread_db_enable_reporting): Likewise.
103 (find_one_thread): Don't check for thread_db_use_events.
104 (attach_thread): Likewise.
105 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
106 (try_thread_db_load_1): Don't check for thread_db_use_events.
107 (thread_db_init): Remove use_events argument and thread events
108 handling.
109 (remove_thread_event_breakpoints): Remove function.
110 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
111
112 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
113
114 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
115 New function.
116 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
117 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
118 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
119 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
120 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
121 Initialize.
122 * linux-crisv32-low.c (cris_supports_hardware_single_step):
123 New function.
124 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
125 * linux-low.c (can_hardware_single_step): Use
126 supports_hardware_single_step.
127 (can_software_single_step): New function.
128 (start_step_over): Call can_software_single_step.
129 (linux_supports_hardware_single_step): New function.
130 (struct target_ops) <supports_software_single_step>: Initialize.
131 * linux-low.h (struct linux_target_ops)
132 <supports_hardware_single_step>: Initialize.
133 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
134 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
135 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
136 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
137 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
138 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
139 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
140 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
141 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
142 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
143 Initialize.
144 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
145 (struct linux_target_ops) <tile_supports_hardware_single_step>:
146 Initialize.
147 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
148 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
149 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
150 New function.
151 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
152 * target.h (struct target_ops): <supports_software_single_step>:
153 New field.
154 (target_supports_software_single_step): New macro.
155
156 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
157
158 * linux-low.c (linux_wait_1): Fix pc advance condition.
159 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
160 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
161
162 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
163
164 * linux-arm-low.c (arm_is_thumb_mode): New function.
165 (arm_breakpoint_at): Use arm_is_thumb_mode.
166 (arm_breakpoint_kind_from_current_state): New function.
167 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
168 Initialize.
169 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
170 (linux_breakpoint_kind_from_current_state): New function.
171 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
172 * linux-low.h (struct linux_target_ops)
173 <breakpoint_kind_from_current_state>: New field.
174 * target.h (struct target_ops): Likewise.
175 (target_breakpoint_kind_from_current_state): New macro.
176
177 2015-11-30 Pedro Alves <palves@redhat.com>
178
179 * linux-low.c (linux_resume): Wake up the event loop before
180 returning.
181
182 2015-11-30 Pedro Alves <palves@redhat.com>
183
184 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
185 check.
186 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
187 to -1.
188 * target.c (struct thread_search): New structure.
189 (thread_search_callback): New function.
190 (prev_general_thread): New global.
191 (prepare_to_access_memory, done_accessing_memory): New functions.
192 * target.h (prepare_to_access_memory, done_accessing_memory):
193 Replace macros with function declarations.
194
195 2015-11-30 Pedro Alves <palves@redhat.com>
196
197 PR 14618
198 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
199 report TARGET_WAITKIND_NO_RESUMED.
200 * remote-utils.c (prepare_resume_reply): Handle
201 TARGET_WAITKIND_NO_RESUMED.
202 * server.c (report_no_resumed): New global.
203 (handle_query) <qSupported>: Handle "no-resumed+". Report
204 "no-resumed+" support.
205 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
206 return error if the client doesn't support no-resumed events.
207 (push_stop_notification): New function.
208 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
209 events if the client supports them.
210
211 2015-11-30 Pedro Alves <palves@redhat.com>
212
213 * linux-low.c (thread_still_has_status_pending_p): Don't check
214 vCont;t here.
215 (lwp_resumed): New function.
216 (status_pending_p_callback): Return early if the LWP is not
217 supposed to be resumed.
218
219 2015-11-30 Pedro Alves <palves@redhat.com>
220
221 * linux-low.c (handle_extended_wait): Assert that the LWP's
222 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
223 thread create events, leave the new child's status pending.
224 (linux_low_filter_event): If GDB wants to hear about thread exit
225 events, leave the LWP marked dead and don't delete it.
226 (linux_wait_for_event_filtered): Don't check for thread exit.
227 (filter_exit_event): New function.
228 (linux_wait_1): Use it, when returning an exit event.
229 (linux_resume_one_lwp_throw): Assert that the LWP's
230 waitstatus is TARGET_WAITKIND_IGNORE.
231 * remote-utils.c (prepare_resume_reply): Handle
232 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
233 * server.c (report_thread_events): New global.
234 (handle_general_set): Handle QThreadEvents.
235 (handle_query) <qSupported>: Handle and report QThreadEvents+;
236 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
237 TARGET_WAITKIND_THREAD_EXITED.
238 * server.h (report_thread_events): Declare.
239
240 2015-11-30 Pedro Alves <palves@redhat.com>
241
242 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
243 the thread's last_resume_kind was resume_stop.
244
245 2015-11-30 Pedro Alves <palves@redhat.com>
246
247 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
248 before returning.
249
250 2015-11-30 Pedro Alves <palves@redhat.com>
251
252 * server.c (handle_v_requests): Handle vCtrlC.
253
254 2015-11-30 Pedro Alves <palves@redhat.com>
255
256 * gdbthread.h (find_any_thread_of_pid): Declare.
257 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
258 functions.
259 * server.c (handle_query): If current_thread is NULL, look for
260 another thread of the selected process.
261
262 2015-11-26 Daniel Colascione <dancol@dancol.org>
263 Simon Marchi <simon.marchi@ericsson.com>
264
265 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
266 * server.c (handle_qxfer_threads_worker): Refactor to include thread
267 name in reply.
268 * target.h (struct target_ops) <thread_name>: New field.
269 (target_thread_name): New macro.
270
271 2015-11-23 Joel Brobecker <brobecker@adacore.com>
272
273 * regcache.h (regcache_invalidate_pid): Add declaration.
274 * regcache.c (regcache_invalidate_pid): New function, extracted
275 from regcache_invalidate.
276 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
277 Add trivial documentation comment.
278 * lynx-low.c: Use regcache_invalidate_pid instead of
279 regcache_invalidate.
280
281 2015-11-23 Joel Brobecker <brobecker@adacore.com>
282
283 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
284 and Elf64_auxv_t if the target is Android.
285
286 2015-11-22 Doug Evans <xdje42@gmail.com>
287
288 * target.h: #include <sys/types.h>.
289
290 2015-11-19 Pedro Alves <palves@redhat.com>
291
292 * linux-low.c (linux_process_qsupported): Change prototype.
293 Adjust.
294 * linux-low.h (struct linux_target_ops) <process_qsupported>:
295 Change prototype.
296 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
297 and adjust to loop over all features.
298 * server.c (handle_query) <qSupported>: Adjust to call
299 target_process_qsupported once, passing it a vector of unprocessed
300 features.
301 * target.h (struct target_ops) <process_qsupported>: Change
302 prototype.
303 (target_process_qsupported): Adjust.
304
305 2015-11-19 Pedro Alves <palves@redhat.com>
306
307 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
308 mode.
309 * configure: Regenerate.
310
311 2015-11-19 Pedro Alves <palves@redhat.com>
312
313 * configure: Regenerate.
314
315 2015-11-19 Yao Qi <yao.qi@linaro.org>
316
317 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
318 type to uint32_t.
319
320 2015-11-19 Yao Qi <yao.qi@linaro.org>
321
322 * linux-aarch64-low.c (enum aarch64_operand_type): New.
323 (struct aarch64_operand): Move enum out.
324
325 2015-11-19 Yao Qi <yao.qi@linaro.org>
326
327 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
328 struct user_fpsimd_state *.
329 (aarch64_store_fpregset): Likewise.
330
331 2015-11-19 Yao Qi <yao.qi@linaro.org>
332
333 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
334 struct user_pt_regs *.
335 (aarch64_store_gregset): Likewise.
336
337 2015-11-18 Pedro Alves <palves@redhat.com>
338
339 * Makefile.in (all_object_files): Add $IPA_OBJS.
340
341 2015-11-17 Pedro Alves <palves@redhat.com>
342
343 * win32-low.c (win32_resume): Use gdb_signal_from_host,
344 GDB_SIGNAL_0 and gdb_signal_to_string.
345
346 2015-11-17 Pedro Alves <palves@redhat.com>
347
348 * win32-low.c (handle_output_debug_string): Remove parameter.
349 (win32_kill): Remove our_status local and adjust call to
350 handle_output_debug_string.
351 (get_child_debug_event): Adjust call to
352 handle_output_debug_string.
353
354 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
355
356 * linux-mips-low.c (mips_fill_gregset): Add cast.
357 (mips_store_gregset): Likewise.
358 (mips_fill_fpregset): Likewise.
359 (mips_store_fpregset): Likewise.
360
361 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
362
363 * linux-mips-low.c (mips_add_watchpoint): Rename private to
364 priv.
365
366 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
367
368 * linux-mips-low.c (mips_linux_new_thread): Change type of
369 watch_type to enum target_hw_bp_type.
370
371 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
372
373 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
374 Change return type to arm_hwbp_type.
375
376 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
377
378 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
379 (arm_store_gregset): Likewise.
380 * linux-arm-low.c (arm_get_hwcap): Likewise.
381 (arm_read_description): Likewise.
382
383 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
384
385 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
386
387 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
388
389 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
390 (ppc_fill_vsxregset): Likewise.
391 (ppc_store_vsxregset): Likewise.
392 (ppc_fill_vrregset): Likewise.
393 (ppc_store_vrregset): Likewise.
394 (ppc_fill_evrregset): Likewise.
395 (ppc_store_evrregset): Likewise.
396
397 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
398
399 * linux-ppc-low.c (ppc_usrregs_info): Remove
400 forward-declaration.
401 (ppc_arch_setup): Move lower in file.
402
403 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
404
405 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
406 (ps_pdwrite): Likewise.
407
408 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
409
410 * linux-arm-low.c (arm_new_thread): Move pointer dereference
411 to after assert checks.
412
413 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
414
415 * proc-service.c (ps_pdread): Add/adjust casts.
416 (ps_pdwrite): Add/adjust casts.
417
418 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
419
420 * server.c (handle_search_memory_1): Cast return value of
421 memmem.
422
423 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
424
425 * server.c (write_qxfer_response): Change type of data to
426 gdb_byte *.
427
428 2015-10-29 Pedro Alves <palves@redhat.com>
429
430 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
431
432 2015-10-29 Pedro Alves <palves@redhat.com>
433
434 * tracepoint.c (clear_installed_tracepoints): Add casts.
435
436 2015-10-29 Pedro Alves <palves@redhat.com>
437
438 * server.c (handle_v_cont, process_serial_event): Add enum
439 gdb_signal casts to signal parsing code.
440
441 2015-10-29 Pedro Alves <palves@redhat.com>
442
443 * linux-low.h (NULL_REGSET): Define.
444 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
445 * linux-arm-low.c (arm_regsets): Likewise.
446 * linux-crisv32-low.c (cris_regsets): Likewise.
447 * linux-m68k-low.c (m68k_regsets): Likewise.
448 * linux-mips-low.c (mips_regsets): Likewise.
449 * linux-nios2-low.c (nios2_regsets): Likewise.
450 * linux-ppc-low.c (ppc_regsets): Likewise.
451 * linux-s390-low.c (s390_regsets): Likewise.
452 * linux-sh-low.c (sh_regsets): Likewise.
453 * linux-sparc-low.c (sparc_regsets): Likewise.
454 * linux-tic6x-low.c (tic6x_regsets): Likewise.
455 * linux-tile-low.c (tile_regsets): Likewise.
456 * linux-x86-low.c (x86_regsets): Likewise.
457 * linux-xtensa-low.c (xtensa_regsets): Likewise.
458
459 2015-10-29 Pedro Alves <palves@redhat.com>
460
461 * linux-low.h (NULL_REGSET): Define.
462 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
463 * linux-arm-low.c (arm_regsets): Likewise.
464 * linux-crisv32-low.c (cris_regsets): Likewise.
465 * linux-m68k-low.c (m68k_regsets): Likewise.
466 * linux-mips-low.c (mips_regsets): Likewise.
467 * linux-nios2-low.c (nios2_regsets): Likewise.
468 * linux-ppc-low.c (ppc_regsets): Likewise.
469 * linux-s390-low.c (s390_regsets): Likewise.
470 * linux-sh-low.c (sh_regsets): Likewise.
471 * linux-sparc-low.c (sparc_regsets): Likewise.
472 * linux-tic6x-low.c (tic6x_regsets): Likewise.
473 * linux-tile-low.c (tile_regsets): Likewise.
474 * linux-x86-low.c (x86_regsets): Likewise.
475 * linux-xtensa-low.c (xtensa_regsets): Likewise.
476
477 2015-10-26 Doug Evans <dje@google.com>
478
479 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
480
481 2015-10-26 Doug Evans <dje@google.com>
482
483 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
484
485 2015-10-26 Doug Evans <dje@google.com>
486
487 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
488 for debug_printf.
489 (attach_thread, find_new_threads_callback): Ditto.
490
491 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
492
493 * mem-break.h (set_breakpoint_data): Remove.
494
495 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
496
497 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
498 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
499 (initialize_low): Remove set_breakpoint_data call.
500 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
501 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
502 (initialize_low): Remove set_breakpoint_data call.
503 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
504 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
505 (initialize_low): Remove set_breakpoint_data call.
506
507 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
508
509 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
510 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
511 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
512 * target.h (target_breakpoint_kind_from_pc): New macro.
513
514 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
515
516 * linux-low.c (default_breakpoint_kind_from_pc): New function.
517 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
518 the default breakpoint kind.
519
520 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
521
522 * linux-arm-low.c (arm_supports_z_point_type): Add software
523 breakpoint support.
524
525 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
526
527 * linux-arm-low.c: Refactor breakpoint definitions.
528 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
529 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
530
531 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
532
533 * Makefile.in: Add arm.c/o.
534 * configure.srv: Likewise.
535 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
536 (arm_breakpoint_kind_from_pc): New function.
537 (arm_sw_breakpoint_from_kind): Return proper kind.
538 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
539
540 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
541
542 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
543 removal.
544 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
545 (struct raw_breakpoint) <size>: Remove.
546 (struct raw_breakpoint) <kind>: Add.
547 (bp_size): New function.
548 (bp_opcode): Likewise.
549 (find_raw_breakpoint_at): Adjust for kind.
550 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
551 (remove_memory_breakpoint): Adjust for kind call bp_size.
552 (set_raw_breakpoint_at): Adjust for kind.
553 (set_breakpoint): Likewise.
554 (set_breakpoint_at): Call breakpoint_kind_from_pc.
555 (delete_raw_breakpoint): Adjust for kind.
556 (delete_breakpoint): Likewise.
557 (find_gdb_breakpoint): Likewise.
558 (set_gdb_breakpoint_1): Likewise.
559 (set_gdb_breakpoint): Likewise.
560 (delete_gdb_breakpoint_1): Likewise.
561 (delete_gdb_breakpoint): Likewise.
562 (uninsert_raw_breakpoint): Likewise.
563 (reinsert_raw_breakpoint): Likewise.
564 (set_breakpoint_data): Remove.
565 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
566 (check_mem_read): Adjust for kind call bp_size.
567 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
568 (clone_one_breakpoint): Adjust for kind.
569 * mem-break.h (set_gdb_breakpoint): Likewise.
570 (delete_gdb_breakpoint): Likewise.
571 * server.c (process_serial_event): Likewise.
572
573 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
574
575 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
576 (struct linux_target_ops) <breakpoint>: Remove.
577 (struct linux_target_ops) <breakpoint_len>: Remove.
578 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
579 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
580 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
581 (arm_sw_breakpoint_from_kind): New function.
582 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
583 (struct linux_target_ops) <breakpoint>: Remove.
584 (struct linux_target_ops) <breakpoint_len>: Remove.
585 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
586 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
587 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
588 (struct linux_target_ops) <breakpoint>: Remove.
589 (struct linux_target_ops) <breakpoint_len>: Remove.
590 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
591 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
592 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
593 (struct linux_target_ops) <breakpoint>: Remove.
594 (struct linux_target_ops) <breakpoint_len>: Remove.
595 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
596 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
597 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
598 and sw_breakpoint_from_kind to increment the pc.
599 (linux_breakpoint_kind_from_pc): New function.
600 (linux_sw_breakpoint_from_kind): New function.
601 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
602 (initialize_low): Call breakpoint_kind_from_pc and
603 sw_breakpoint_from_kind to replace breakpoint_data/len.
604 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
605 New field.
606 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
607 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
608 (struct linux_target_ops) <breakpoint>: Remove.
609 (struct linux_target_ops) <breakpoint_len>: Remove.
610 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
611 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
612 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
613 (struct linux_target_ops) <breakpoint>: Remove.
614 (struct linux_target_ops) <breakpoint_len>: Remove.
615 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
616 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
617 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
618 (struct linux_target_ops) <breakpoint>: Remove.
619 (struct linux_target_ops) <breakpoint_len>: Remove.
620 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
621 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
622 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
623 (struct linux_target_ops) <breakpoint>: Remove.
624 (struct linux_target_ops) <breakpoint_len>: Remove.
625 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
626 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
627 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
628 (struct linux_target_ops) <breakpoint>: Remove.
629 (struct linux_target_ops) <breakpoint_len>: Remove.
630 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
631 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
632 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
633 (struct linux_target_ops) <breakpoint>: Remove.
634 (struct linux_target_ops) <breakpoint_len>: Remove.
635 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
636 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
637 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
638 (struct linux_target_ops) <breakpoint>: Remove.
639 (struct linux_target_ops) <breakpoint_len>: Remove.
640 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
641 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
642 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
643 (struct linux_target_ops) <breakpoint>: Remove.
644 (struct linux_target_ops) <breakpoint_len>: Remove.
645 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
646 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
647 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
648 (struct linux_target_ops) <breakpoint>: Remove.
649 (struct linux_target_ops) <breakpoint_len>: Remove.
650 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
651 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
652 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
653 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
654 (struct linux_target_ops) <breakpoint>: Remove.
655 (struct linux_target_ops) <breakpoint_len>: Remove.
656 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
657 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
658 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
659 (struct linux_target_ops) <breakpoint>: Remove.
660 (struct linux_target_ops) <breakpoint_len>: Remove.
661 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
662 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
663
664 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
665
666 * linux-cris-low.c (cris_get_pc): Remove void arg.
667
668 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
669
670 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
671 variable name.
672
673 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
674
675 * inferiors.c (thread_pid_matches_callback): New function.
676 (find_thread_process): New function.
677 (remove_thread): Reset current_thread.
678 (remove_process): Assert threads have been removed first.
679
680 2015-10-15 Yao Qi <yao.qi@linaro.org>
681
682 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
683 if it is 3.
684 (aarch64_remove_point): Likewise.
685 * regcache.c (regcache_register_size): New function.
686
687 2015-10-12 Yao Qi <yao.qi@linaro.org>
688
689 * linux-aarch64-low.c: Update all callers as emit_load_store
690 is renamed to aarch64_emit_load_store.
691
692 2015-10-12 Yao Qi <yao.qi@linaro.org>
693
694 * linux-aarch64-low.c: Update all callers of function renaming
695 from emit_insn to aarch64_emit_insn.
696
697 2015-10-12 Yao Qi <yao.qi@linaro.org>
698
699 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
700 arch/aarch64-insn.h.
701 (struct aarch64_memory_operand): Likewise.
702 (ENCODE): Likewise.
703 (emit_insn): Move to arch/aarch64-insn.c.
704 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
705 (emit_load_store): Move to arch/aarch64-insn.c.
706 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
707 (can_encode_int32): Remove.
708
709 2015-10-12 Yao Qi <yao.qi@linaro.org>
710
711 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
712 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
713 (aarch64_relocate_instruction): Likewise.
714 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
715 (struct aarch64_insn_visitor): Likewise.
716
717 2015-10-12 Yao Qi <yao.qi@linaro.org>
718
719 * linux-aarch64-low.c (struct aarch64_insn_data): New.
720 (struct aarch64_insn_visitor): New.
721 (struct aarch64_insn_relocation_data): New.
722 (aarch64_ftrace_insn_reloc_b): New function.
723 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
724 (aarch64_ftrace_insn_reloc_cb): Likewise.
725 (aarch64_ftrace_insn_reloc_tb): Likewise.
726 (aarch64_ftrace_insn_reloc_adr): Likewise.
727 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
728 (aarch64_ftrace_insn_reloc_others): Likewise.
729 (visitor): New.
730 (aarch64_relocate_instruction): Use visitor.
731
732 2015-10-12 Yao Qi <yao.qi@linaro.org>
733
734 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
735 int. Add argument buf.
736 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
737 aarch64_relocate_instruction.
738
739 2015-10-12 Yao Qi <yao.qi@linaro.org>
740
741 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
742 argument insn. Remove local variable insn. Don't call
743 target_read_uint32.
744 (aarch64_install_fast_tracepoint_jump_pad): Call
745 target_read_uint32.
746
747 2015-09-30 Yao Qi <yao.qi@linaro.org>
748
749 * linux-aarch64-low.c (emit_movk): Shorten a long line.
750 (emit_load_store_pair): Likewise.
751
752 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
753
754 * dll.c (match_dll): Add cast(s).
755 (unloaded_dll): Likewise.
756 * linux-low.c (second_thread_of_pid_p): Likewise.
757 (delete_lwp_callback): Likewise.
758 (count_events_callback): Likewise.
759 (select_event_lwp_callback): Likewise.
760 (linux_set_resume_request): Likewise.
761 * server.c (accumulate_file_name_length): Likewise.
762 (emit_dll_description): Likewise.
763 (handle_qxfer_threads_worker): Likewise.
764 (visit_actioned_threads): Likewise.
765 * thread-db.c (any_thread_of): Likewise.
766 * tracepoint.c (same_process_p): Likewise.
767 (match_blocktype): Likewise.
768 (build_traceframe_info_xml): Likewise.
769
770 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
771
772 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
773 assignment.
774 (gdb_unparse_agent_expr): Likewise.
775 * hostio.c (require_data): Likewise.
776 (handle_pread): Likewise.
777 * linux-low.c (disable_regset): Likewise.
778 (fetch_register): Likewise.
779 (store_register): Likewise.
780 (get_dynamic): Likewise.
781 (linux_qxfer_libraries_svr4): Likewise.
782 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
783 (set_fast_tracepoint_jump): Likewise.
784 (uninsert_fast_tracepoint_jumps_at): Likewise.
785 (reinsert_fast_tracepoint_jumps_at): Likewise.
786 (validate_inserted_breakpoint): Likewise.
787 (clone_agent_expr): Likewise.
788 * regcache.c (init_register_cache): Likewise.
789 * remote-utils.c (putpkt_binary_1): Likewise.
790 (decode_M_packet): Likewise.
791 (decode_X_packet): Likewise.
792 (look_up_one_symbol): Likewise.
793 (relocate_instruction): Likewise.
794 (monitor_output): Likewise.
795 * server.c (handle_search_memory): Likewise.
796 (handle_qxfer_exec_file): Likewise.
797 (handle_qxfer_libraries): Likewise.
798 (handle_qxfer): Likewise.
799 (handle_query): Likewise.
800 (handle_v_cont): Likewise.
801 (handle_v_run): Likewise.
802 (captured_main): Likewise.
803 * target.c (write_inferior_memory): Likewise.
804 * thread-db.c (try_thread_db_load_from_dir): Likewise.
805 * tracepoint.c (init_trace_buffer): Likewise.
806 (add_tracepoint_action): Likewise.
807 (add_traceframe): Likewise.
808 (add_traceframe_block): Likewise.
809 (cmd_qtdpsrc): Likewise.
810 (cmd_qtdv): Likewise.
811 (cmd_qtstatus): Likewise.
812 (response_source): Likewise.
813 (response_tsv): Likewise.
814 (cmd_qtnotes): Likewise.
815 (gdb_collect): Likewise.
816 (initialize_tracepoint): Likewise.
817
818 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
819
820 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
821 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
822 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
823 <NOP>: New.
824 (enum aarch64_condition_codes): New enum.
825 (w0): New static global.
826 (fp): Likewise.
827 (lr): Likewise.
828 (struct aarch64_memory_operand) <type>: New
829 MEMORY_OPERAND_POSTINDEX type.
830 (postindex_memory_operand): New helper function.
831 (emit_ret): New function.
832 (emit_load_store_pair): New function, factored out of emit_stp
833 with support for MEMORY_OPERAND_POSTINDEX.
834 (emit_stp): Rewrite using emit_load_store_pair.
835 (emit_ldp): New function.
836 (emit_load_store): Likewise.
837 (emit_ldr): Mention post-index instruction in comment.
838 (emit_ldrh): New function.
839 (emit_ldrb): New function.
840 (emit_ldrsw): Mention post-index instruction in comment.
841 (emit_str): Likewise.
842 (emit_subs): New function.
843 (emit_cmp): Likewise.
844 (emit_and): Likewise.
845 (emit_orr): Likewise.
846 (emit_orn): Likewise.
847 (emit_eor): Likewise.
848 (emit_mvn): Likewise.
849 (emit_lslv): Likewise.
850 (emit_lsrv): Likewise.
851 (emit_asrv): Likewise.
852 (emit_mul): Likewise.
853 (emit_sbfm): Likewise.
854 (emit_sbfx): Likewise.
855 (emit_ubfm): Likewise.
856 (emit_ubfx): Likewise.
857 (emit_csinc): Likewise.
858 (emit_cset): Likewise.
859 (emit_nop): Likewise.
860 (emit_ops_insns): New helper function.
861 (emit_pop): Likewise.
862 (emit_push): Likewise.
863 (aarch64_emit_prologue): New function.
864 (aarch64_emit_epilogue): Likewise.
865 (aarch64_emit_add): Likewise.
866 (aarch64_emit_sub): Likewise.
867 (aarch64_emit_mul): Likewise.
868 (aarch64_emit_lsh): Likewise.
869 (aarch64_emit_rsh_signed): Likewise.
870 (aarch64_emit_rsh_unsigned): Likewise.
871 (aarch64_emit_ext): Likewise.
872 (aarch64_emit_log_not): Likewise.
873 (aarch64_emit_bit_and): Likewise.
874 (aarch64_emit_bit_or): Likewise.
875 (aarch64_emit_bit_xor): Likewise.
876 (aarch64_emit_bit_not): Likewise.
877 (aarch64_emit_equal): Likewise.
878 (aarch64_emit_less_signed): Likewise.
879 (aarch64_emit_less_unsigned): Likewise.
880 (aarch64_emit_ref): Likewise.
881 (aarch64_emit_if_goto): Likewise.
882 (aarch64_emit_goto): Likewise.
883 (aarch64_write_goto_address): Likewise.
884 (aarch64_emit_const): Likewise.
885 (aarch64_emit_call): Likewise.
886 (aarch64_emit_reg): Likewise.
887 (aarch64_emit_pop): Likewise.
888 (aarch64_emit_stack_flush): Likewise.
889 (aarch64_emit_zero_ext): Likewise.
890 (aarch64_emit_swap): Likewise.
891 (aarch64_emit_stack_adjust): Likewise.
892 (aarch64_emit_int_call_1): Likewise.
893 (aarch64_emit_void_call_2): Likewise.
894 (aarch64_emit_eq_goto): Likewise.
895 (aarch64_emit_ne_goto): Likewise.
896 (aarch64_emit_lt_goto): Likewise.
897 (aarch64_emit_le_goto): Likewise.
898 (aarch64_emit_gt_goto): Likewise.
899 (aarch64_emit_ge_got): Likewise.
900 (aarch64_emit_ops_impl): New static global variable.
901 (aarch64_emit_ops): New target function, return
902 &aarch64_emit_ops_impl.
903 (struct linux_target_ops): Install it.
904
905 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
906
907 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
908 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
909 aarch64-ipa.o.
910 * linux-aarch64-ipa.c: New file.
911 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
912 and endian.h.
913 (aarch64_get_thread_area): New target method.
914 (extract_signed_bitfield): New helper function.
915 (aarch64_decode_ldr_literal): New function.
916 (enum aarch64_opcodes): New enum.
917 (struct aarch64_register): New struct.
918 (struct aarch64_operand): New struct.
919 (x0): New static global.
920 (x1): Likewise.
921 (x2): Likewise.
922 (x3): Likewise.
923 (x4): Likewise.
924 (w2): Likewise.
925 (ip0): Likewise.
926 (sp): Likewise.
927 (xzr): Likewise.
928 (aarch64_register): New helper function.
929 (register_operand): Likewise.
930 (immediate_operand): Likewise.
931 (struct aarch64_memory_operand): New struct.
932 (offset_memory_operand): New helper function.
933 (preindex_memory_operand): Likewise.
934 (enum aarch64_system_control_registers): New enum.
935 (ENCODE): New macro.
936 (emit_insn): New helper function.
937 (emit_b): New function.
938 (emit_bcond): Likewise.
939 (emit_cb): Likewise.
940 (emit_tb): Likewise.
941 (emit_blr): Likewise.
942 (emit_stp): Likewise.
943 (emit_ldp_q_offset): Likewise.
944 (emit_stp_q_offset): Likewise.
945 (emit_load_store): Likewise.
946 (emit_ldr): Likewise.
947 (emit_ldrsw): Likewise.
948 (emit_str): Likewise.
949 (emit_ldaxr): Likewise.
950 (emit_stxr): Likewise.
951 (emit_stlr): Likewise.
952 (emit_data_processing_reg): Likewise.
953 (emit_data_processing): Likewise.
954 (emit_add): Likewise.
955 (emit_sub): Likewise.
956 (emit_mov): Likewise.
957 (emit_movk): Likewise.
958 (emit_mov_addr): Likewise.
959 (emit_mrs): Likewise.
960 (emit_msr): Likewise.
961 (emit_sevl): Likewise.
962 (emit_wfe): Likewise.
963 (append_insns): Likewise.
964 (can_encode_int32_in): New helper function.
965 (aarch64_relocate_instruction): New function.
966 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
967 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
968 (struct linux_target_ops): Install aarch64_get_thread_area,
969 aarch64_install_fast_tracepoint_jump_pad and
970 aarch64_get_min_fast_tracepoint_insn_len.
971
972 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
973
974 * Makefile.in (aarch64-insn.o): New rule.
975 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
976
977 2015-09-21 Yao Qi <yao.qi@linaro.org>
978
979 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
980
981 2015-09-21 Yao Qi <yao.qi@linaro.org>
982
983 * tracepoint.c (max_jump_pad_size): Remove.
984
985 2015-09-18 Yao Qi <yao.qi@linaro.org>
986
987 * linux-aarch64-low.c: Don't include sys/uio.h.
988 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
989
990 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
991
992 * tracepoint.c (eval_result_type): Change prototype.
993 (condition_true_at_tracepoint): Fix argument to compiled_cond.
994
995 2015-09-15 Pedro Alves <palves@redhat.com>
996
997 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
998 Check whether to report exec events instead of checking whether
999 multiprocess is enabled.
1000
1001 2015-09-15 Pedro Alves <palves@redhat.com>
1002
1003 PR remote/18965
1004 * remote-utils.c (prepare_resume_reply): Merge
1005 TARGET_WAITKIND_VFORK_DONE switch case with the
1006 TARGET_WAITKIND_FORKED case.
1007
1008 2015-09-15 Yao Qi <yao.qi@linaro.org>
1009
1010 * server.c (handle_query): Check string comparison using
1011 "else if" instead of "if".
1012
1013 2015-09-15 Yao Qi <yao.qi@linaro.org>
1014
1015 * server.c (vCont_supported): New global variable.
1016 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1017 matches. Append ";vContSupported+" to own_buf.
1018 (handle_v_requests): Append ";s;S" to own_buf if target supports
1019 hardware single step or vCont_supported is false.
1020 (capture_main): Set vCont_supported to zero.
1021
1022 2015-09-15 Yao Qi <yao.qi@linaro.org>
1023
1024 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1025 it to ...
1026 (linux_supports_hardware_single_step): ... New function.
1027 (linux_target_ops): Update.
1028 * lynx-low.c (lynx_target_ops): Set field
1029 supports_hardware_single_step to target_can_do_hardware_single_step.
1030 * nto-low.c (nto_target_ops): Likewise.
1031 * spu-low.c (spu_target_ops): Likewise.
1032 * win32-low.c (win32_target_ops): Likewise.
1033 * target.c (target_can_do_hardware_single_step): New function.
1034 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1035 Remove. <supports_hardware_single_step>: New field.
1036 (target_supports_conditional_breakpoints): Remove.
1037 (target_supports_hardware_single_step): New macro.
1038 (target_can_do_hardware_single_step): Declare.
1039 * server.c (handle_query): Use target_supports_hardware_single_step
1040 instead of target_supports_conditional_breakpoints.
1041
1042 2015-09-15 Yao Qi <yao.qi@linaro.org>
1043
1044 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1045 function.
1046 (struct linux_target_ops the_low_target): Install
1047 aarch64_linux_siginfo_fixup.
1048
1049 2015-09-11 Don Breazeal <donb@codesourcery.com>
1050 Luis Machado <lgustavo@codesourcery.com>
1051
1052 * linux-low.c (linux_mourn): Static declaration.
1053 (linux_arch_setup): Move in front of
1054 handle_extended_wait.
1055 (linux_arch_setup_thread): New function.
1056 (handle_extended_wait): Handle exec events. Call
1057 linux_arch_setup_thread. Make event_lwp argument a
1058 pointer-to-a-pointer.
1059 (check_zombie_leaders): Do not check stopped threads.
1060 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1061 (linux_low_filter_event): Add lwp and thread for exec'ing
1062 non-leader thread if leader thread has been deleted.
1063 Refactor code into linux_arch_setup_thread and call it.
1064 Pass child lwp pointer by reference to handle_extended_wait.
1065 (linux_wait_for_event_filtered): Update comment.
1066 (linux_wait_1): Prevent clobbering exec event status.
1067 (linux_supports_exec_events): New function.
1068 (linux_target_ops) <supports_exec_events>: Initialize new member.
1069 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1070 new member.
1071 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1072 * server.c (report_exec_events): New global variable.
1073 (handle_query): Handle qSupported query for exec-events feature.
1074 (captured_main): Initialize report_exec_events.
1075 * server.h (report_exec_events): Declare new global variable.
1076 * target.h (struct target_ops) <supports_exec_events>: New
1077 member.
1078 (target_supports_exec_events): New macro.
1079 * win32-low.c (win32_target_ops) <supports_exec_events>:
1080 Initialize new member.
1081
1082 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1083
1084 * linux-low.c (linux_low_enable_btrace): Remove.
1085 (linux_target_ops): Replace linux_low_enable_btrace with
1086 linux_enable_btrace.
1087
1088 2015-09-03 Yao Qi <yao.qi@linaro.org>
1089
1090 * linux-aarch64-low.c (aarch64_insert_point): Call
1091 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1092 returns true.
1093
1094 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1095
1096 * linux-low.c (check_stopped_by_breakpoint): Use
1097 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1098
1099 2015-08-27 Pedro Alves <palves@redhat.com>
1100
1101 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1102
1103 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1104
1105 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1106 the XNEW-family equivalent.
1107 (compile_bytecodes): Likewise.
1108 * dll.c (loaded_dll): Likewise.
1109 * event-loop.c (append_callback_event): Likewise.
1110 (create_file_handler): Likewise.
1111 (create_file_event): Likewise.
1112 * hostio.c (handle_open): Likewise.
1113 * inferiors.c (add_thread): Likewise.
1114 (add_process): Likewise.
1115 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1116 * linux-arm-low.c (arm_new_process): Likewise.
1117 (arm_new_thread): Likewise.
1118 * linux-low.c (add_to_pid_list): Likewise.
1119 (linux_add_process): Likewise.
1120 (handle_extended_wait): Likewise.
1121 (add_lwp): Likewise.
1122 (enqueue_one_deferred_signal): Likewise.
1123 (enqueue_pending_signal): Likewise.
1124 (linux_resume_one_lwp_throw): Likewise.
1125 (linux_resume_one_thread): Likewise.
1126 (linux_read_memory): Likewise.
1127 (linux_write_memory): Likewise.
1128 * linux-mips-low.c (mips_linux_new_process): Likewise.
1129 (mips_linux_new_thread): Likewise.
1130 (mips_add_watchpoint): Likewise.
1131 * linux-x86-low.c (initialize_low_arch): Likewise.
1132 * lynx-low.c (lynx_add_process): Likewise.
1133 * mem-break.c (set_raw_breakpoint_at): Likewise.
1134 (set_breakpoint): Likewise.
1135 (add_condition_to_breakpoint): Likewise.
1136 (add_commands_to_breakpoint): Likewise.
1137 (clone_agent_expr): Likewise.
1138 (clone_one_breakpoint): Likewise.
1139 * regcache.c (new_register_cache): Likewise.
1140 * remote-utils.c (look_up_one_symbol): Likewise.
1141 * server.c (queue_stop_reply): Likewise.
1142 (start_inferior): Likewise.
1143 (queue_stop_reply_callback): Likewise.
1144 (handle_target_event): Likewise.
1145 * spu-low.c (fetch_ppc_memory): Likewise.
1146 (store_ppc_memory): Likewise.
1147 * target.c (set_target_ops): Likewise.
1148 * thread-db.c (thread_db_load_search): Likewise.
1149 (try_thread_db_load_1): Likewise.
1150 * tracepoint.c (add_tracepoint): Likewise.
1151 (add_tracepoint_action): Likewise.
1152 (create_trace_state_variable): Likewise.
1153 (cmd_qtdpsrc): Likewise.
1154 (cmd_qtro): Likewise.
1155 (add_while_stepping_state): Likewise.
1156 * win32-low.c (child_add_thread): Likewise.
1157 (get_image_name): Likewise.
1158
1159 2015-08-25 Yao Qi <yao.qi@linaro.org>
1160
1161 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1162
1163 2015-08-25 Yao Qi <yao.qi@linaro.org>
1164
1165 * Makefile.in (aarch64-linux.o): New rule.
1166 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1167 srv_tgtobj.
1168 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1169 (aarch64_init_debug_reg_state): Make it extern.
1170 (aarch64_linux_prepare_to_resume): Remove.
1171
1172 2015-08-25 Yao Qi <yao.qi@linaro.org>
1173
1174 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1175 lwp_arch_private_info and ptid_of_lwp.
1176
1177 2015-08-25 Yao Qi <yao.qi@linaro.org>
1178
1179 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1180 Find proc_info by find_process_pid. All callers updated.
1181
1182 2015-08-25 Yao Qi <yao.qi@linaro.org>
1183
1184 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1185 Remove.
1186 (debug_reg_change_callback): Remove.
1187 (aarch64_notify_debug_reg_change): Remove.
1188
1189 2015-08-25 Yao Qi <yao.qi@linaro.org>
1190
1191 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1192 Call current_lwp_ptid.
1193
1194 2015-08-25 Yao Qi <yao.qi@linaro.org>
1195
1196 * linux-aarch64-low.c (debug_reg_change_callback): Use
1197 debug_printf.
1198
1199 2015-08-25 Yao Qi <yao.qi@linaro.org>
1200
1201 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1202
1203 2015-08-25 Yao Qi <yao.qi@linaro.org>
1204
1205 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1206
1207 2015-08-25 Yao Qi <yao.qi@linaro.org>
1208
1209 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1210 the code.
1211
1212 2015-08-25 Yao Qi <yao.qi@linaro.org>
1213
1214 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1215 Remove.
1216 (debug_reg_change_callback): Remove argument entry and add argument
1217 lwp. Remove local variable thread. Don't print thread id in the
1218 debugging output. Don't check whether pid of thread equals to pid.
1219 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1220 iterate_over_lwps instead find_inferior.
1221
1222 2015-08-24 Pedro Alves <palves@redhat.com>
1223
1224 * inferiors.c (get_first_process): New function.
1225 * inferiors.h (get_first_process): New declaration.
1226 * remote-utils.c (read_ptid): Default to the first process in the
1227 list, instead of to the current thread's process.
1228
1229 2015-08-24 Pedro Alves <palves@redhat.com>
1230
1231 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1232 * event-loop.c: Likewise.
1233 * remote-utils.c: Likewise.
1234 * tracepoint.c: Likewise.
1235
1236 2015-08-24 Pedro Alves <palves@redhat.com>
1237
1238 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1239 ptid_get_lwp.
1240
1241 2015-08-21 Pedro Alves <palves@redhat.com>
1242
1243 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1244 instead of literal 1.
1245
1246 2015-08-21 Pedro Alves <palves@redhat.com>
1247
1248 * tdesc.c (default_description): Explicitly zero-initialize.
1249
1250 2015-08-21 Pedro Alves <palves@redhat.com>
1251
1252 PR gdb/18749
1253 * inferiors.c (remove_thread): Discard any pending stop reply for
1254 this thread.
1255 * server.c (remove_all_on_match_pid): Rename to ...
1256 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1257 instead of a pid.
1258 (discard_queued_stop_replies): Change parameter to a ptid. Now
1259 extern.
1260 (handle_v_kill, kill_inferior_callback, captured_main)
1261 (process_serial_event): Adjust.
1262 * server.h (discard_queued_stop_replies): Declare.
1263
1264 2015-08-21 Pedro Alves <palves@redhat.com>
1265
1266 * linux-low.c (wait_for_sigstop): Always switch to no thread
1267 selected if the previously current thread dies.
1268 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1269 process instead of the current thread's.
1270 * remote-utils.c (input_interrupt): Don't check if there's no
1271 current thread.
1272 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1273 current thread to the general thread fails, error out.
1274 (handle_qxfer_auxv, handle_qxfer_libraries)
1275 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1276 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1277 (handle_query): Check if there's a thread selected instead of
1278 checking whether there's any thread in the thread list.
1279 (handle_qxfer_threads, handle_qxfer_btrace)
1280 (handle_qxfer_btrace_conf): Don't error out early if there's no
1281 thread in the thread list.
1282 (handle_v_cont, myresume): Don't set the current thread to the
1283 continue thread.
1284 (process_serial_event) <Hg handling>: Also set thread_id if the
1285 previous general thread is still alive.
1286 (process_serial_event) <g/G handling>: If setting the current
1287 thread to the general thread fails, error out.
1288 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1289 thread's lwp instead of the current thread's.
1290 * target.c (set_desired_thread): If the desired thread was not
1291 found, leave the current thread pointing to NULL. Return an int
1292 (boolean) indicating success.
1293 * target.h (set_desired_thread): Change return type to int.
1294
1295 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1296
1297 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1298 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1299 #includes.
1300 (ps_get_thread_area): New function.
1301
1302 2015-08-19 Gary Benson <gbenson@redhat.com>
1303
1304 * hostio.c (handle_pread): Do not attempt to read more data
1305 than hostio_reply_with_data can fit in a packet.
1306
1307 2015-08-18 Joel Brobecker <brobecker@adacore.com>
1308
1309 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1310
1311 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1312
1313 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1314
1315 2015-08-06 Pedro Alves <palves@redhat.com>
1316
1317 * tracepoint.c (expr_eval_result): Now an int.
1318
1319 2015-08-06 Pedro Alves <palves@redhat.com>
1320
1321 * gdbthread.h (struct regcache): Forward declare.
1322 (struct thread_info) <regcache_data>: Now a struct regcache
1323 pointer.
1324 * inferiors.c (inferior_regcache_data)
1325 (set_inferior_regcache_data): Now work with struct regcache
1326 pointers.
1327 * inferiors.h (struct regcache): Forward declare.
1328 (inferior_regcache_data, set_inferior_regcache_data): Now work
1329 with struct regcache pointers.
1330 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1331 (free_register_cache_thread): Remove struct regcache pointer
1332 casts.
1333
1334 2015-08-06 Pedro Alves <palves@redhat.com>
1335
1336 * server.c (captured_main): On error, print the exception message
1337 to stderr, and if run_once is set, throw a quit.
1338
1339 2015-08-06 Pedro Alves <palves@redhat.com>
1340
1341 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1342 the current thread.
1343
1344 2015-08-06 Pedro Alves <palves@redhat.com>
1345
1346 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1347 reading beyond the passed in buffer length.
1348
1349 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1350
1351 * tracepoint.c (symbol_list) <required>: Remove.
1352
1353 2015-08-06 Pedro Alves <palves@redhat.com>
1354
1355 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1356 count if stopping and suspending threads.
1357 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1358 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1359 (linux_detach): Complete an ongoing step-over.
1360 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1361 throughout.
1362 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1363 (linux_wait_1): If passing a signal to the inferior after
1364 finishing a step-over, unsuspend and re-resume all lwps. If we
1365 see a single-step event but the thread should be continuing, don't
1366 pass the trap to gdb.
1367 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1368 internal_error instead of gdb_assert.
1369 (enqueue_pending_signal): New function.
1370 (check_ptrace_stopped_lwp_gone): Add debug output.
1371 (start_step_over): Use internal_error instead of gdb_assert.
1372 (complete_ongoing_step_over): New function.
1373 (linux_resume_one_thread): Don't resume a suspended thread.
1374 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1375 it stepping.
1376
1377 2015-08-06 Pedro Alves <palves@redhat.com>
1378
1379 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1380 (linux_thread_alive): Use lwp_is_marked_dead.
1381 (extended_event_reported): Delete.
1382 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1383 instead of extended_event_reported.
1384 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1385 as well.
1386 (lwp_is_marked_dead): New function.
1387 (lwp_running): Use lwp_is_marked_dead.
1388 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1389 comment.
1390
1391 2015-08-06 Pedro Alves <palves@redhat.com>
1392
1393 * linux-low.c (linux_wait_1): Move fork event output out of the
1394 !report_to_gdb check. Pass event_child->waitstatus to
1395 target_waitstatus_to_string instead of ourstatus.
1396
1397 2015-08-04 Yao Qi <yao.qi@linaro.org>
1398
1399 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1400 if current_thread is 32 bit.
1401
1402 2015-08-04 Yao Qi <yao.qi@linaro.org>
1403
1404 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1405 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1406 * server.c (extended_protocol): Remove "static".
1407 * server.h (extended_protocol): Declare it.
1408
1409 2015-08-04 Yao Qi <yao.qi@linaro.org>
1410
1411 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1412 both aarch64 and aarch32.
1413 (aarch64_set_pc): Likewise.
1414
1415 2015-08-04 Yao Qi <yao.qi@linaro.org>
1416
1417 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1418 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1419 arm-with-neon.xml to srv_xmlfiles.
1420 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1421 (is_64bit_tdesc): New function.
1422 (aarch64_linux_read_description): New function.
1423 (aarch64_arch_setup): Call aarch64_linux_read_description.
1424 (regs_info): Rename to regs_info_aarch64.
1425 (aarch64_regs_info): Return right regs_info.
1426 (initialize_low_arch): Call initialize_low_arch_aarch32.
1427
1428 2015-08-04 Yao Qi <yao.qi@linaro.org>
1429
1430 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1431 * linux-aarch32-low.c: New file.
1432 * linux-aarch32-low.h: New file.
1433 * linux-arm-low.c (arm_fill_gregset): Move it to
1434 linux-aarch32-low.c.
1435 (arm_store_gregset): Likewise.
1436 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1437 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1438 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1439 (regs_info): Rename to regs_info_arm.
1440 (arm_regs_info): Return regs_info_aarch32 if
1441 have_ptrace_getregset is 1 and target description is
1442 arm_with_neon or arm_with_vfpv3.
1443 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1444 Call initialize_low_arch_aarch32 instead.
1445
1446 2015-08-04 Yao Qi <yao.qi@linaro.org>
1447
1448 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1449 * linux-low.c: ... here.
1450 * linux-low.h (have_ptrace_getregset): Declare it.
1451
1452 2015-08-04 Pedro Alves <palves@redhat.com>
1453
1454 * thread-db.c (struct thread_db): Use new typedefs.
1455 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1456 CHK calls.
1457 (disable_thread_event_reporting): Cast result of dlsym to
1458 destination function pointer type.
1459 (thread_db_mourn): Use td_ta_delete_ftype.
1460
1461 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1462
1463 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1464 arch variant.
1465 (CDX_BREAKPOINT): Define for R2.
1466 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1467 (the_low_target): Add comments.
1468
1469 2015-07-30 Yao Qi <yao.qi@linaro.org>
1470
1471 * linux-arm-low.c (arm_hwcap): Remove it.
1472 (arm_read_description): New local variable arm_hwcap. Don't
1473 set arm_hwcap to zero.
1474
1475 2015-07-30 Yao Qi <yao.qi@linaro.org>
1476
1477 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1478 Use regcache->tdesc instead.
1479 (arm_store_wmmxregset): Likewise.
1480 (arm_fill_vfpregset): Likewise.
1481 (arm_store_vfpregset): Likewise.
1482
1483 2015-07-30 Yao Qi <yao.qi@linaro.org>
1484
1485 * linux-arm-low.c: Include arch/arm.h.
1486 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1487 (arm_store_gregset): Likewise.
1488
1489 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1490
1491 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1492 ptrace's 4th parameter.
1493
1494 2015-07-27 Yao Qi <yao.qi@linaro.org>
1495
1496 * configure.srv (case aarch64*-*-linux*): Don't set
1497 srv_linux_usrregs.
1498
1499 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1500
1501 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1502 sys/ptrace.h.
1503 * linux-arm-low.c: Likewise.
1504 * linux-cris-low.c: Likewise.
1505 * linux-crisv32-low.c: Likewise.
1506 * linux-low.c: Likewise.
1507 * linux-m68k-low.c: Likewise.
1508 * linux-mips-low.c: Likewise.
1509 * linux-nios2-low.c: Likewise.
1510 * linux-s390-low.c: Likewise.
1511 * linux-sparc-low.c: Likewise.
1512 * linux-tic6x-low.c: Likewise.
1513 * linux-tile-low.c: Likewise.
1514 * linux-x86-low.c: Likewise.
1515
1516 2015-07-24 Pedro Alves <palves@redhat.com>
1517
1518 * config.in: Regenerate.
1519 * configure: Regenerate.
1520
1521 2015-07-24 Pedro Alves <palves@redhat.com>
1522
1523 * acinclude.m4: Include ../ptrace.m4.
1524 * configure.ac: Call GDB_AC_PTRACE.
1525 * config.in, configure: Regenerate.
1526
1527 2015-07-24 Yao Qi <yao.qi@linaro.org>
1528
1529 * linux-low.c (linux_create_inferior): Remove setting to
1530 proc->priv->new_inferior.
1531 (linux_attach): Likewise.
1532 (linux_low_filter_event): Likewise.
1533 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1534
1535 2015-07-24 Yao Qi <yao.qi@linaro.org>
1536
1537 * linux-low.c (linux_arch_setup): New function.
1538 (linux_low_filter_event): If proc->tdesc is NULL and
1539 proc->attached is true, call the_low_target.arch_setup.
1540 Otherwise, keep status pending, and return.
1541 (linux_resume_one_lwp_throw): Don't call get_pc if
1542 thread->while_stepping isn't NULL. Don't call
1543 get_thread_regcache if proc->tdesc is NULL.
1544 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1545 (linux_target_ops): Install arch_setup.
1546 * server.c (start_inferior): Call the_target->arch_setup.
1547 * target.h (struct target_ops) <arch_setup>: New field.
1548 (target_arch_setup): New marco.
1549 * lynx-low.c (lynx_target_ops): Update.
1550 * nto-low.c (nto_target_ops): Update.
1551 * spu-low.c (spu_target_ops): Update.
1552 * win32-low.c (win32_target_ops): Update.
1553
1554 2015-07-24 Yao Qi <yao.qi@linaro.org>
1555
1556 * linux-low.c (linux_add_process): Don't set
1557 proc->priv->new_inferior.
1558 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1559 (linux_attach): Likewise.
1560
1561 2015-07-24 Yao Qi <yao.qi@linaro.org>
1562
1563 * server.c (start_inferior): Code refactor.
1564
1565 2015-07-24 Yao Qi <yao.qi@linaro.org>
1566
1567 * server.c (process_serial_event): Set general_thread.
1568
1569 2015-07-21 Yao Qi <yao.qi@linaro.org>
1570
1571 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1572 aarch64_linux_get_debug_reg_capacity.
1573
1574 2015-07-17 Yao Qi <yao.qi@linaro.org>
1575
1576 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1577 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1578 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1579 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1580 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1581 (AARCH64_HWP_ALIGNMENT): Likewise.
1582 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1583 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1584 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1585 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1586 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1587 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1588 (struct aarch64_debug_reg_state): Likewise.
1589 (struct arch_lwp_info): Likewise.
1590 (aarch64_align_watchpoint): Likewise.
1591 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1592 (aarch64_watchpoint_length): Likewise.
1593 (aarch64_point_encode_ctrl_reg): Likewise
1594 (aarch64_point_is_aligned): Likewise.
1595 (aarch64_align_watchpoint): Likewise.
1596 (aarch64_linux_set_debug_regs):
1597 (aarch64_dr_state_insert_one_point): Likewise.
1598 (aarch64_dr_state_remove_one_point): Likewise.
1599 (aarch64_handle_breakpoint): Likewise.
1600 (aarch64_handle_aligned_watchpoint): Likewise.
1601 (aarch64_handle_unaligned_watchpoint): Likewise.
1602 (aarch64_handle_watchpoint): Likewise.
1603
1604 2015-07-17 Yao Qi <yao.qi@linaro.org>
1605
1606 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1607 and don't aarch64_get_debug_reg_state. All callers update.
1608 (aarch64_handle_aligned_watchpoint): Likewise.
1609 (aarch64_handle_unaligned_watchpoint): Likewise.
1610 (aarch64_handle_watchpoint): Likewise.
1611 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1612 (aarch64_remove_point): Likewise.
1613
1614 2015-07-17 Yao Qi <yao.qi@linaro.org>
1615
1616 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1617 debug_printf.
1618 (aarch64_handle_unaligned_watchpoint): Likewise.
1619
1620 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1621
1622 Revert the previous 3 commits:
1623 Move gdb_regex* to common/
1624 Move linux_find_memory_regions_full & co.
1625 gdbserver build-id attribute generator
1626
1627 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1628 Jan Kratochvil <jan.kratochvil@redhat.com>
1629
1630 gdbserver build-id attribute generator.
1631 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1632 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1633 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1634 (find_phdr): New.
1635 (get_dynamic): Use find_pdhr to traverse program headers.
1636 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1637 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1638 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1639 (get_hex_build_id): New.
1640 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1641 to reply XML document.
1642
1643 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1644 Jan Kratochvil <jan.kratochvil@redhat.com>
1645
1646 * target.c: Include target/target-utils.h and fcntl.h.
1647 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1648 (target_fileio_read_stralloc): New functions.
1649
1650 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1651
1652 * Makefile.in (OBS): Add gdb_regex.o.
1653 (gdb_regex.o): New.
1654 * config.in: Rebuilt.
1655 * configure: Rebuilt.
1656
1657 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1658 Jan Kratochvil <jan.kratochvil@redhat.com>
1659
1660 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1661 * Makefile.in (OBS): Add target-utils.o.
1662 (linux-maps.o, target-utils.o): New.
1663 * configure.srv (srv_linux_obj): Add linux-maps.o.
1664
1665 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1666
1667 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1668 function, return 1.
1669 (the_low_target): Install it.
1670
1671 2015-07-14 Pedro Alves <palves@redhat.com>
1672
1673 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1674 Instead, ignore ECHILD, and throw an error for other errnos.
1675
1676 2015-07-10 Pedro Alves <palves@redhat.com>
1677
1678 * event-loop.c (struct callback_event) <data>: Change type to
1679 gdb_client_data instance instead of gdb_client_data pointer.
1680 (append_callback_event): Adjust.
1681
1682 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1683
1684 * linux-aarch64-low.c: Add comments for each linux_target_ops
1685 method. Remove comments already covered in target_ops and
1686 linux_target_ops definitions.
1687 (the_low_target): Add comments for each unimplemented method.
1688
1689 2015-07-09 Yao Qi <yao.qi@linaro.org>
1690
1691 * linux-aarch64-low.c (aarch64_regmap): Remove.
1692 (aarch64_usrregs_info): Remove.
1693 (regs_info): Set field usrregs to NULL.
1694
1695 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1696
1697 * linux-low.c: Include "rsp-low.h"
1698 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1699 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1700 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1701 (handle_btrace_enable_pt): New.
1702 (handle_btrace_general_set): Support "pt".
1703 (handle_btrace_conf_general_set): Support "pt:size".
1704
1705 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1706
1707 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1708 Z_PACKET_SW_BP.
1709
1710 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1711
1712 * linux-aarch64-low.c: Remove comment about endianness.
1713 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1714 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1715 memcmp.
1716
1717 2015-06-24 Gary Benson <gbenson@redhat.com>
1718
1719 * linux-i386-ipa.c (stdint.h): Do not include.
1720 * lynx-i386-low.c (stdint.h): Likewise.
1721 * lynx-ppc-low.c (stdint.h): Likewise.
1722 * mem-break.c (stdint.h): Likewise.
1723 * thread-db.c (stdint.h): Likewise.
1724 * tracepoint.c (stdint.h): Likewise.
1725 * win32-low.c (stdint.h): Likewise.
1726
1727 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1728
1729 * server.c (write_qxfer_response): Update call to
1730 remote_escape_output.
1731
1732 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1733 Jan Kratochvil <jan.kratochvil@redhat.com>
1734
1735 Merge multiple hex conversions.
1736 * gdbreplay.c (tohex): Rename to 'fromhex'.
1737 (logchar): Use fromhex.
1738
1739 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1740
1741 * server.c (handle_qxfer_libraries): Set `version' attribute for
1742 <library-list>.
1743
1744 2015-06-10 Gary Benson <gbenson@redhat.com>
1745
1746 * target.h (struct target_ops) <multifs_open>: New field.
1747 <multifs_unlink>: Likewise.
1748 <multifs_readlink>: Likewise.
1749 * linux-low.c (nat/linux-namespaces.h): New include.
1750 (linux_target_ops): Initialize the_target->multifs_open,
1751 the_target->multifs_unlink and the_target->multifs_readlink.
1752 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1753 * hostio.c (hostio_fs_pid): New static variable.
1754 (hostio_handle_new_gdb_connection): New function.
1755 (handle_setfs): Likewise.
1756 (handle_open): Use the_target->multifs_open as appropriate.
1757 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1758 (handle_readlink): Use the_target->multifs_readlink as
1759 appropriate.
1760 (handle_vFile): Handle vFile:setfs packets.
1761 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1762 after target_handle_new_gdb_connection.
1763
1764 2015-06-10 Gary Benson <gbenson@redhat.com>
1765
1766 * configure.ac (AC_CHECK_FUNCS): Add setns.
1767 * config.in: Regenerate.
1768 * configure: Likewise.
1769 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1770 (linux-namespaces.o): New rule.
1771 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1772
1773 2015-06-09 Gary Benson <gbenson@redhat.com>
1774
1775 * hostio.c (handle_open): Process mode argument with
1776 fileio_to_host_mode.
1777
1778 2015-06-01 Yao Qi <yao.qi@linaro.org>
1779
1780 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1781 * linux-x86-low.c: Likewise.
1782
1783 2015-05-28 Don Breazeal <donb@codesourcery.com>
1784
1785 * linux-low.c (handle_extended_wait): Initialize
1786 thread_info.last_resume_kind for new fork children.
1787
1788 2015-05-15 Pedro Alves <palves@redhat.com>
1789
1790 * target.h (target_handle_new_gdb_connection): Rewrite using if
1791 wrapped in do/while.
1792
1793 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1794
1795 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1796 * configure, config.in: Regenerate.
1797 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1798 Declare typedef.
1799
1800 2015-05-12 Don Breazeal <donb@codesourcery.com>
1801
1802 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1803 PTRACE_EVENT_VFORK_DONE.
1804 (linux_low_ptrace_options, extended_event_reported): Add vfork
1805 events.
1806 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1807 and "vforkdone" for RSP 'T' Stop Reply Packet.
1808 * server.h (report_vfork_events): Declare
1809 global variable.
1810
1811 2015-05-12 Don Breazeal <donb@codesourcery.com>
1812
1813 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1814 (the_low_target) <new_fork>: Initialize new member.
1815 * linux-arm-low.c (arm_new_fork): New function.
1816 (the_low_target) <new_fork>: Initialize new member.
1817 * linux-low.c (handle_extended_wait): Call new target function
1818 new_fork.
1819 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1820 * linux-mips-low.c (mips_add_watchpoint): New function
1821 extracted from mips_insert_point.
1822 (the_low_target) <new_fork>: Initialize new member.
1823 (mips_linux_new_fork): New function.
1824 (mips_insert_point): Call mips_add_watchpoint.
1825 * linux-x86-low.c (x86_linux_new_fork): New function.
1826 (the_low_target) <new_fork>: Initialize new member.
1827
1828 2015-05-12 Don Breazeal <donb@codesourcery.com>
1829
1830 * linux-low.c (handle_extended_wait): Implement return value,
1831 rename argument 'event_child' to 'event_lwp', handle
1832 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1833 (linux_low_ptrace_options): New function.
1834 (linux_low_filter_event): Call linux_low_ptrace_options,
1835 use different argument fo linux_enable_event_reporting,
1836 use return value from handle_extended_wait.
1837 (extended_event_reported): New function.
1838 (linux_wait_1): Call extended_event_reported and set
1839 status to report fork events.
1840 (linux_write_memory): Add pid to debug message.
1841 (reset_lwp_ptrace_options_callback): New function.
1842 (linux_handle_new_gdb_connection): New function.
1843 (linux_target_ops): Initialize new structure member.
1844 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1845 * lynx-low.c: Initialize new structure member.
1846 * remote-utils.c (prepare_resume_reply): Implement stop reason
1847 "fork" for "T" stop message.
1848 * server.c (handle_query): Call handle_new_gdb_connection.
1849 * server.h (report_fork_events): Declare global flag.
1850 * target.h (struct target_ops) <handle_new_gdb_connection>:
1851 New member.
1852 (target_handle_new_gdb_connection): New macro.
1853 * win32-low.c: Initialize new structure member.
1854
1855 2015-05-12 Don Breazeal <donb@codesourcery.com>
1856
1857 * mem-break.c (APPEND_TO_LIST): Define macro.
1858 (clone_agent_expr): New function.
1859 (clone_one_breakpoint): New function.
1860 (clone_all_breakpoints): New function.
1861 * mem-break.h: Declare new functions.
1862
1863 2015-05-12 Don Breazeal <donb@codesourcery.com>
1864
1865 * linux-low.c (linux_supports_fork_events): New function.
1866 (linux_supports_vfork_events): New function.
1867 (linux_target_ops): Initialize new structure members.
1868 (initialize_low): Call linux_check_ptrace_features.
1869 * lynx-low.c (lynx_target_ops): Initialize new structure
1870 members.
1871 * server.c (report_fork_events, report_vfork_events):
1872 New global flags.
1873 (handle_query): Add new features to qSupported packet and
1874 response.
1875 (captured_main): Initialize new global variables.
1876 * target.h (struct target_ops) <supports_fork_events>:
1877 New member.
1878 <supports_vfork_events>: New member.
1879 (target_supports_fork_events): New macro.
1880 (target_supports_vfork_events): New macro.
1881 * win32-low.c (win32_target_ops): Initialize new structure
1882 members.
1883
1884 2015-05-12 Gary Benson <gbenson@redhat.com>
1885
1886 * server.c (handle_qxfer_exec_file): Use current process
1887 if annex is empty.
1888
1889 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1890
1891 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1892 Remove HAVE_PTRACE_GETREGS conditionals.
1893 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1894 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1895
1896 2015-05-08 Yao Qi <yao.qi@linaro.org>
1897
1898 * linux-low.c (linux_supports_conditional_breakpoints): New
1899 function.
1900 (linux_target_ops): Install new target method.
1901 * lynx-low.c (lynx_target_ops): Install NULL hook for
1902 supports_conditional_breakpoints.
1903 * nto-low.c (nto_target_ops): Likewise.
1904 * spu-low.c (spu_target_ops): Likewise.
1905 * win32-low.c (win32_target_ops): Likewise.
1906 * server.c (handle_query): Check
1907 target_supports_conditional_breakpoints.
1908 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1909 New field.
1910 (target_supports_conditional_breakpoints): New macro.
1911
1912 2015-05-06 Pedro Alves <palves@redhat.com>
1913
1914 PR server/18081
1915 * server.c (start_inferior): If the process exits, mourn it.
1916
1917 2015-04-21 Gary Benson <gbenson@redhat.com>
1918
1919 * hostio.c (fileio_open_flags_to_host): Factored out to
1920 fileio_to_host_openflags in common/fileio.c. Single use
1921 updated.
1922
1923 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1924
1925 * linux-xtensa-low.c (xtensa_fill_gregset)
1926 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1927 XCHAL_HAVE_LOOP.
1928
1929 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1930
1931 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1932 (regs_info): Replace usrregs pointer with NULL.
1933
1934 2015-04-17 Gary Benson <gbenson@redhat.com>
1935
1936 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1937 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1938 * server.c (handle_qxfer_exec_file): New function.
1939 (qxfer_packets): Add exec-file entry.
1940 (handle_query): Report qXfer:exec-file:read as supported packet.
1941
1942 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1943
1944 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1945
1946 2015-04-09 Gary Benson <gbenson@redhat.com>
1947
1948 * hostio-errno.c (errno_to_fileio_error): Remove function.
1949 Update caller to use remote_fileio_to_fio_error.
1950
1951 2015-04-09 Yao Qi <yao.qi@linaro.org>
1952
1953 * linux-low.c (linux_insert_point): Call
1954 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1955 (linux_remove_point): Call remove_memory_breakpoint if type is
1956 raw_bkpt_type_sw.
1957 * linux-x86-low.c (x86_insert_point): Don't call
1958 insert_memory_breakpoint.
1959 (x86_remove_point): Don't call remove_memory_breakpoint.
1960
1961 2015-04-01 Pedro Alves <palves@redhat.com>
1962 Cleber Rosa <crosa@redhat.com>
1963
1964 * server.c (gdbserver_usage): Reorganize and extend the usage
1965 message.
1966
1967 2015-03-24 Pedro Alves <palves@redhat.com>
1968
1969 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1970 output. Also dump TRAP_TRACE.
1971 (linux_low_filter_event): In debug output, distinguish a
1972 resume_stop SIGSTOP from a delayed SIGSTOP.
1973
1974 2015-03-24 Gary Benson <gbenson@redhat.com>
1975
1976 * linux-x86-low.c (x86_linux_new_thread): Moved to
1977 nat/x86-linux.c.
1978 (x86_linux_prepare_to_resume): Likewise.
1979
1980 2015-03-24 Gary Benson <gbenson@redhat.com>
1981
1982 * Makefile.in (x86-linux-dregs.o): New rule.
1983 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1984 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1985 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1986 (x86_linux_dr_get): Likewise.
1987 (x86_linux_dr_set): Likewise.
1988 (update_debug_registers_callback): Likewise.
1989 (x86_linux_dr_set_addr): Likewise.
1990 (x86_linux_dr_get_addr): Likewise.
1991 (x86_linux_dr_set_control): Likewise.
1992 (x86_linux_dr_get_control): Likewise.
1993 (x86_linux_dr_get_status): Likewise.
1994 (x86_linux_update_debug_registers): Likewise.
1995
1996 2015-03-24 Gary Benson <gbenson@redhat.com>
1997
1998 * linux-x86-low.c (x86_linux_update_debug_registers):
1999 New function, factored out from...
2000 (x86_linux_prepare_to_resume): ...this.
2001
2002 2015-03-24 Gary Benson <gbenson@redhat.com>
2003
2004 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2005 (x86_linux_dr_set): Likewise.
2006 (update_debug_registers_callback): Likewise.
2007 (x86_linux_dr_set_addr): Likewise.
2008 (x86_linux_dr_get_addr): Likewise.
2009 (x86_linux_dr_set_control): Likewise.
2010 (x86_linux_dr_get_control): Likewise.
2011 (x86_linux_dr_get_status): Likewise.
2012 (x86_linux_prepare_to_resume): Likewise.
2013
2014 2015-03-24 Gary Benson <gbenson@redhat.com>
2015
2016 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2017 Use perror_with_name. Pass string through gettext.
2018 (x86_linux_dr_set): Likewise.
2019
2020 2015-03-24 Gary Benson <gbenson@redhat.com>
2021
2022 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2023 (x86_linux_dr_set_addr): ...this.
2024 (x86_dr_low_get_addr): Rename to...
2025 (x86_linux_dr_get_addr): ...this.
2026 (x86_dr_low_set_control): Rename to...
2027 (x86_linux_dr_set_control): ...this.
2028 (x86_dr_low_get_control): Rename to...
2029 (x86_linux_dr_get_control): ...this.
2030 (x86_dr_low_get_status): Rename to...
2031 (x86_linux_dr_get_status): ...this.
2032 (x86_dr_low): Update with new function names.
2033
2034 2015-03-24 Gary Benson <gbenson@redhat.com>
2035
2036 * Makefile.in (x86-linux.o): New rule.
2037 * configure.srv: Add x86-linux.o to relevant targets.
2038 * linux-low.c (lwp_set_arch_private_info): New function.
2039 (lwp_arch_private_info): Likewise.
2040 * linux-x86-low.c: Include nat/x86-linux.h.
2041 (arch_lwp_info): Removed structure.
2042 (update_debug_registers_callback):
2043 Use lwp_set_debug_registers_changed.
2044 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2045 and lwp_set_debug_registers_changed.
2046 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2047
2048 2015-03-24 Gary Benson <gbenson@redhat.com>
2049
2050 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2051 * linux-arm-low.c (arm_new_thread): Likewise.
2052 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2053 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2054 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2055 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2056
2057 2015-03-24 Gary Benson <gbenson@redhat.com>
2058
2059 * linux-low.c (ptid_of_lwp): New function.
2060 (lwp_is_stopped): Likewise.
2061 (lwp_stop_reason): Likewise.
2062 * linux-x86-low.c (update_debug_registers_callback):
2063 Use lwp_is_stopped.
2064 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2065 lwp_stop_reason.
2066
2067 2015-03-24 Gary Benson <gbenson@redhat.com>
2068
2069 * linux-low.h (linux_stop_lwp): Remove declaration.
2070
2071 2015-03-24 Gary Benson <gbenson@redhat.com>
2072
2073 * linux-low.h: Include nat/linux-nat.h.
2074 * linux-low.c (iterate_over_lwps_args): New structure.
2075 (iterate_over_lwps_filter): New function.
2076 (iterate_over_lwps): Likewise.
2077 * linux-x86-low.c (update_debug_registers_callback):
2078 Update signature to what iterate_over_lwps expects.
2079 Remove PID check that iterate_over_lwps now performs.
2080 (x86_dr_low_set_addr): Use iterate_over_lwps.
2081 (x86_dr_low_set_control): Likewise.
2082
2083 2015-03-24 Gary Benson <gbenson@redhat.com>
2084
2085 * linux-x86-low.c (x86_debug_reg_state): New function.
2086 (x86_linux_prepare_to_resume): Use the above.
2087
2088 2015-03-24 Gary Benson <gbenson@redhat.com>
2089
2090 * linux-low.c (current_lwp_ptid): New function.
2091 * linux-x86-low.c: Include nat/linux-nat.h.
2092 (x86_dr_low_get_addr): Use current_lwp_ptid.
2093 (x86_dr_low_get_control): Likewise.
2094 (x86_dr_low_get_status): Likewise.
2095
2096 2015-03-20 Pedro Alves <palves@redhat.com>
2097
2098 * tracepoint.c (cmd_qtstatus): Make "str" const.
2099
2100 2015-03-20 Pedro Alves <palves@redhat.com>
2101
2102 * server.c (handle_general_set): Make "req_str" const.
2103
2104 2015-03-19 Pedro Alves <palves@redhat.com>
2105
2106 * linux-low.c (linux_resume_one_lwp): Rename to ...
2107 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2108 instead call perror_with_name.
2109 (check_ptrace_stopped_lwp_gone): New function.
2110 (linux_resume_one_lwp): Reimplement as wrapper around
2111 linux_resume_one_lwp_throw that swallows errors if the LWP is
2112 gone.
2113
2114 2015-03-19 Pedro Alves <palves@redhat.com>
2115
2116 * linux-low.c (count_events_callback, select_event_lwp_callback):
2117 No longer check whether the thread has resume_stop as last resume
2118 kind.
2119
2120 2015-03-19 Pedro Alves <palves@redhat.com>
2121
2122 * linux-low.c (count_events_callback, select_event_lwp_callback):
2123 Use the lwp's status_pending_p field, not the thread's.
2124
2125 2015-03-19 Pedro Alves <palves@redhat.com>
2126
2127 * linux-low.c (select_event_lwp_callback): Update comments to
2128 no longer mention SIGTRAP.
2129
2130 2015-03-18 Gary Benson <gbenson@redhat.com>
2131
2132 * server.c (handle_query): Do not report vFile:fstat as supported.
2133
2134 2015-03-11 Gary Benson <gbenson@redhat.com>
2135
2136 * hostio.c (sys/types.h): New include.
2137 (sys/stat.h): Likewise.
2138 (common-remote-fileio.h): Likewise.
2139 (handle_fstat): New function.
2140 (handle_vFile): Handle vFile:fstat packets.
2141
2142 2015-03-11 Gary Benson <gbenson@redhat.com>
2143
2144 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2145 struct stat.st_blocks and struct stat.st_blksize.
2146 * configure: Regenerate.
2147 * config.in: Likewise.
2148 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2149 (OBS): Add common-remote-fileio.o.
2150 (common-remote-fileio.o): New rule.
2151
2152 2015-03-09 Pedro Alves <palves@redhat.com>
2153
2154 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2155 'struct sockaddr' pointer in 'accept' call.
2156
2157 2015-03-09 Pedro Alves <palves@redhat.com>
2158
2159 Revert:
2160 2015-03-07 Pedro Alves <palves@redhat.com>
2161 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2162 or <winsock2.h> here. Instead include "gdb_socket.h".
2163 (remote_open): Use union gdb_sockaddr_u.
2164 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2165 or <winsock2.h> here. Instead include "gdb_socket.h".
2166 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2167 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2168 or <sys/un.h>.
2169 (init_named_socket, gdb_agent_helper_thread): Use union
2170 gdb_sockaddr_u.
2171
2172 2015-03-07 Pedro Alves <palves@redhat.com>
2173
2174 * configure.ac (build_warnings): Move
2175 -Wdeclaration-after-statement to the C-specific set.
2176 * configure: Regenerate.
2177
2178 2015-03-07 Pedro Alves <palves@redhat.com>
2179
2180 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2181 or <winsock2.h> here. Instead include "gdb_socket.h".
2182 (remote_open): Use union gdb_sockaddr_u.
2183 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2184 or <winsock2.h> here. Instead include "gdb_socket.h".
2185 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2186 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2187 or <sys/un.h>.
2188 (init_named_socket, gdb_agent_helper_thread): Use union
2189 gdb_sockaddr_u.
2190
2191 2015-03-07 Pedro Alves <palves@redhat.com>
2192
2193 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2194 instead.
2195
2196 2015-03-06 Yao Qi <yao.qi@linaro.org>
2197
2198 * linux-aarch64-low.c (aarch64_insert_point): Use
2199 show_debug_regs as a boolean.
2200 (aarch64_remove_point): Likewise.
2201
2202 2015-03-05 Pedro Alves <palves@redhat.com>
2203
2204 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2205 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2206 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2207 * nto-low.c (nto_target_ops): Likewise.
2208 * spu-low.c (spu_target_ops): Likewise.
2209 * win32-low.c (win32_target_ops): Likewise.
2210
2211 2015-03-04 Pedro Alves <palves@redhat.com>
2212
2213 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2214 Decide whether a breakpoint triggered based on the SIGTRAP's
2215 siginfo.si_code.
2216 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2217 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2218 (linux_low_filter_event): Check for breakpoints before checking
2219 watchpoints.
2220 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2221 siginfo.si_code.
2222 (linux_stopped_by_sw_breakpoint)
2223 (linux_supports_stopped_by_sw_breakpoint)
2224 (linux_stopped_by_hw_breakpoint)
2225 (linux_supports_stopped_by_hw_breakpoint): New functions.
2226 (linux_target_ops): Install new target methods.
2227
2228 2015-03-04 Pedro Alves <palves@redhat.com>
2229
2230 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2231 * server.c (swbreak_feature, hwbreak_feature): New globals.
2232 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2233 (captured_main): Clear swbreak_feature and hwbreak_feature.
2234 * server.h (swbreak_feature, hwbreak_feature): Declare.
2235 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2236 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2237 supports_stopped_by_hw_breakpoint>: New fields.
2238 (target_supports_stopped_by_sw_breakpoint)
2239 (target_stopped_by_sw_breakpoint)
2240 (target_supports_stopped_by_hw_breakpoint)
2241 (target_stopped_by_hw_breakpoint): Declare.
2242
2243 2015-03-04 Pedro Alves <palves@redhat.com>
2244
2245 enum lwp_stop_reason -> enum target_stop_reason
2246 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2247 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2248 (linux_wait_1, stuck_in_jump_pad_callback)
2249 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2250 (linux_stopped_by_watchpoint):
2251 * linux-low.h (enum lwp_stop_reason): Delete.
2252 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2253 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2254
2255 2015-03-04 Yao Qi <yao.qi@linaro.org>
2256
2257 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2258
2259 2015-03-03 Gary Benson <gbenson@redhat.com>
2260
2261 * hostio.c (handle_vFile): Fix prefix lengths.
2262
2263 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2264
2265 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2266 ptr_bits.
2267
2268 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2269
2270 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2271 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2272 (clean): Add "rm -f" for above C files.
2273 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2274 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2275 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2276 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2277 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2278 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2279 (init_registers_s390x_vx_linux64)
2280 (init_registers_s390x_tevx_linux64)
2281 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2282 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2283 declarations.
2284 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2285 (s390_store_vxrs_high): New functions.
2286 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2287 NT_S390_VXRS_HIGH.
2288 (s390_arch_setup): Add logic for selecting one of the new target
2289 descriptions. Activate the new vector regsets if applicable.
2290 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2291 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2292 and init_registers_s390x_tevx_linux64.
2293
2294 2015-03-01 Pedro Alves <palves@redhat.com>
2295
2296 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2297 parameter.
2298
2299 2015-02-27 Pedro Alves <palves@redhat.com>
2300
2301 * linux-x86-low.c (u_debugreg_offset): New function.
2302 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2303
2304 2015-02-27 Pedro Alves <palves@redhat.com>
2305
2306 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2307 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2308 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2309 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2310 (ps_lsetfpregs, ps_getpid)
2311 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2312 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2313 (ps_lsetxregs, ps_plog): Declare.
2314
2315 2015-02-27 Pedro Alves <palves@redhat.com>
2316
2317 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2318 IP_AGENT_EXPORT_FUNC.
2319 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2320 IP_AGENT_EXPORT_FUNC.
2321 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2322 (IP_AGENT_EXPORT): Delete.
2323 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2324 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2325 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2326 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2327 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2328 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2329 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2330 (traceframe_read_count, traceframe_write_count)
2331 (traceframes_created, trace_state_variables, get_raw_reg)
2332 (get_trace_state_variable_value, set_trace_state_variable_value)
2333 (ust_loaded, helper_thread_id, cmd_buf): Use
2334 IPA_SYM_EXPORTED_NAME.
2335 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2336 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2337 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2338 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2339 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2340 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2341 EXTERN_C_PUSH/EXTERN_C_POP.
2342 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2343 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2344 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2345 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2346 (traceframe_write_count, traceframe_read_count)
2347 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2348 (about_to_request_buffer_space, get_trace_state_variable_value)
2349 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2350 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2351 EXTERN_C_PUSH/EXTERN_C_POP.
2352 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2353 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2354 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2355 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2356 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2357 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2358 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2359 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2360 Define.
2361 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2362 (IP_AGENT_EXPORT_VAR_DECL): Define.
2363 (tracing): Declare.
2364 (gdb_agent_get_raw_reg): Declare.
2365
2366 2015-02-27 Tom Tromey <tromey@redhat.com>
2367 Pedro Alves <palves@redhat.com>
2368
2369 Rename symbols whose names are reserved C++ keywords throughout.
2370
2371 2015-02-27 Pedro Alves <palves@redhat.com>
2372
2373 * Makefile.in (COMPILER): New, get it from autoconf.
2374 (CXX): Get from autoconf instead.
2375 (COMPILE.pre): Use COMPILER.
2376 (CC-LD): Rename to ...
2377 (CC_LD): ... this. Use COMPILER.
2378 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2379 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2380 * acinclude.m4: Include build-with-cxx.m4.
2381 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2382 Disable -Werror by default if building in C++ mode.
2383 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2384 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2385 the C++ compiler. Save/restore CXXFLAGS too.
2386 * configure: Regenerate.
2387
2388 2015-02-27 Pedro Alves <palves@redhat.com>
2389
2390 * acinclude.m4: Include libiberty.m4.
2391 * configure.ac: Call libiberty_INIT.
2392 * config.in, configure: Regenerate.
2393
2394 2015-02-26 Pedro Alves <palves@redhat.com>
2395
2396 * linux-low.c (linux_wait_1): When incrementing the PC past a
2397 program breakpoint always use the_low_target.breakpoint_len as
2398 increment, rather than the maximum between that and
2399 the_low_target.decr_pc_after_break.
2400
2401 2015-02-23 Pedro Alves <palves@redhat.com>
2402
2403 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2404 thread was doing a step-over; always adjust the PC if
2405 we stepped over a permanent breakpoint.
2406 (linux_wait_1): If we stepped over breakpoint that was on top of a
2407 permanent breakpoint, manually advance the PC past it.
2408
2409 2015-02-23 Pedro Alves <palves@redhat.com>
2410
2411 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2412 modes.
2413 (x86_fill_gregset, x86_store_gregset): Use it when handling
2414 $orig_eax.
2415
2416 2015-02-20 Pedro Alves <palves@redhat.com>
2417
2418 * thread-db.c: Include "nat/linux-procfs.h".
2419 (thread_db_init): Skip listing new threads if the kernel supports
2420 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2421
2422 2015-02-20 Pedro Alves <palves@redhat.com>
2423
2424 * linux-low.c (status_pending_p_callback): Use ptid_match.
2425
2426 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2427
2428 PR breakpoints/16812
2429 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2430 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2431 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2432
2433 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2434
2435 PR breakpoints/15956
2436 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2437
2438 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2439
2440 * linux-low.c (linux_low_btrace_conf): Print size.
2441 * server.c (handle_btrace_conf_general_set): New.
2442 (hanle_general_set): Call handle_btrace_conf_general_set.
2443 (handle_query): Report Qbtrace-conf:bts:size as supported.
2444
2445 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2446
2447 * linux-low.c (linux_low_enable_btrace): Update parameters.
2448 (linux_low_btrace_conf): New.
2449 (linux_target_ops)<to_btrace_conf>: Initialize.
2450 * server.c (current_btrace_conf): New.
2451 (handle_btrace_enable): Rename to ...
2452 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2453 to target_enable_btrace. Update comment. Update users.
2454 (handle_qxfer_btrace_conf): New.
2455 (qxfer_packets): Add btrace-conf entry.
2456 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2457 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2458 (target_ops)<read_btrace_conf>: New.
2459 (target_enable_btrace): Update parameters.
2460 (target_read_btrace_conf): New.
2461
2462 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2463
2464 * server.c (handle_btrace_general_set): Remove call to
2465 target_supports_btrace.
2466 (supported_btrace_packets): New.
2467 (handle_query): Call supported_btrace_packets.
2468 * target.h: include btrace-common.h.
2469 (btrace_target_info): Removed.
2470 (supports_btrace, target_supports_btrace): Update parameters.
2471
2472 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2473
2474 * Makefile.in (SFILES): Add common/btrace-common.c.
2475 (OBS): Add common/btrace-common.o.
2476 (btrace-common.o): Add build rules.
2477 * linux-low: Include btrace-common.h.
2478 (linux_low_read_btrace): Use struct btrace_data. Call
2479 btrace_data_init and btrace_data_fini.
2480
2481 2015-02-06 Pedro Alves <palves@redhat.com>
2482
2483 * thread-db.c (find_new_threads_callback): Add debug output.
2484
2485 2015-02-04 Pedro Alves <palves@redhat.com>
2486
2487 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2488 (resume_stopped_resumed_lwps): New function.
2489 (linux_wait_for_event_filtered): Use it.
2490
2491 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2492
2493 * Makefile.in (SFILES): Add linux-personality.c.
2494 (linux-personality.o): New rule.
2495 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2496 list of objects to be built.
2497 * linux-low.c: Include nat/linux-personality.h.
2498 (linux_create_inferior): Remove code to disable address space
2499 randomization (moved to ../nat/linux-personality.c). Create
2500 cleanup to disable address space randomization.
2501
2502 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2503
2504 * Makefile.in (posix-strerror.o): New rule.
2505 (mingw-strerror.o): Likewise.
2506 * configure: Regenerated.
2507 * configure.ac: Source file ../common/common.host. Initialize new
2508 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2509
2510 2015-01-14 Yao Qi <yao@codesourcery.com>
2511
2512 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2513 (ppc-linux.o): New rule.
2514 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2515 * configure.ac: AC_CHECK_FUNCS(getauxval).
2516 * config.in: Re-generated.
2517 * configure: Re-generated.
2518 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2519 ppc64_64bit_inferior_p
2520
2521 2015-01-14 Yao Qi <yao@codesourcery.com>
2522
2523 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2524 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2525 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2526 (PT_ORIG_R3, PT_TRAP): Likewise.
2527 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2528 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2529 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2530
2531 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2532
2533 * i387-fp.c (i387_cache_to_xsave): In look over
2534 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2535 zmmh_low_space field by use of zmmh_high_space.
2536
2537 2015-01-09 Pedro Alves <palves@redhat.com>
2538
2539 * linux-low.c (step_over_bkpt): Move higher up in the file.
2540 (handle_extended_wait): Don't store the stop_pc here.
2541 (get_stop_pc): Adjust comments and rename to ...
2542 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2543 stopped for a software breakpoint or hardware breakpoint.
2544 (thread_still_has_status_pending_p): New function.
2545 (status_pending_p_callback): Use
2546 thread_still_has_status_pending_p. If the event is no longer
2547 interesting, resume the LWP.
2548 (handle_tracepoints): Add assert.
2549 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2550 (wstatus_maybe_breakpoint): New function.
2551 (cancel_breakpoint): Delete function.
2552 (check_stopped_by_watchpoint): New function, factored out from
2553 linux_low_filter_event.
2554 (lp_status_maybe_breakpoint): Delete function.
2555 (linux_low_filter_event): Remove filter_ptid argument.
2556 Leave thread group exits pending here. Store the LWP's stop PC.
2557 Always leave events pending.
2558 (linux_wait_for_event_filtered): Pull all events out of the
2559 kernel, and leave them all pending.
2560 (count_events_callback, select_event_lwp_callback): Consider all
2561 events.
2562 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2563 (select_event_lwp): Only give preference to the stepping LWP in
2564 all-stop mode. Adjust comments.
2565 (ignore_event): New function.
2566 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2567 references to cancel_breakpoints. Adjust to renames. Also give
2568 equal priority to all LWPs that have had events in non-stop mode.
2569 If reporting a software breakpoint event, unadjust the LWP's PC.
2570 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2571 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2572 Adjust.
2573 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2574 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2575 (linux_stopped_by_watchpoint): Adjust.
2576 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2577 * linux-low.h (enum lwp_stop_reason): New.
2578 (struct lwp_info) <stop_pc>: Adjust comment.
2579 <stopped_by_watchpoint>: Delete field.
2580 <stop_reason>: New field.
2581 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2582 * mem-break.c (software_breakpoint_inserted_here)
2583 (hardware_breakpoint_inserted_here): New function.
2584 * mem-break.h (software_breakpoint_inserted_here)
2585 (hardware_breakpoint_inserted_here): Declare.
2586 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2587 (cancel_breakpoints): Delete.
2588 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2589 (upload_fast_traceframes): Remove references to
2590 cancel_breakpoints.
2591
2592 2015-01-09 Pedro Alves <palves@redhat.com>
2593
2594 * thread-db.c (find_new_threads_callback): Ignore thread if the
2595 kernel thread ID is -1.
2596
2597 2015-01-09 Pedro Alves <palves@redhat.com>
2598
2599 * linux-low.c (linux_attach_fail_reason_string): Move to
2600 nat/linux-ptrace.c, and rename.
2601 (linux_attach_lwp): Update comment.
2602 (attach_proc_task_lwp_callback): New function.
2603 (linux_attach): Adjust to rename and use
2604 linux_proc_attach_tgid_threads.
2605 (linux_attach_fail_reason_string): Delete declaration.
2606
2607 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2608
2609 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2610 * server.c (gdbserver_version): Likewise.
2611
2612 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2613
2614 * remote-utils.c: Include ctype.h.
2615 (input_interrupt): Explicitly handle the case when the char
2616 received is the NUL byte. Improve the printing of non-ASCII
2617 characters.
2618
2619 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2620
2621 * linux-low.c (linux_low_filter_event): Update call to
2622 linux_enable_event_reporting following the addition of
2623 a new parameter to that function.
2624
2625 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2626
2627 PR server/17457
2628 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2629 (AARCH64_FPCR_REGNO): Likewise.
2630 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2631 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2632 (aarch64_store_fpregset): Likewise.
2633
2634 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2635
2636 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2637 Remove FIXME comment about assumption about N.
2638
2639 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2640
2641 * configure.ac: If large-file support is disabled in GDBserver,
2642 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2643 * configure: Regenerate.
2644
2645 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2646
2647 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2648 warning upon ENODATA from ptrace.
2649 * linux-s390-low.c (s390_store_tdb): New.
2650 (s390_regsets): Add regset for NT_S390_TDB.
2651
2652 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2653
2654 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2655 without a fill_function.
2656 * linux-s390-low.c (s390_fill_last_break): Remove.
2657 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2658 (s390_arch_setup): Use regset's size instead of fill_function for
2659 loop end condition.
2660
2661 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2662
2663 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2664 the regset's store function when ptrace returned an error.
2665 * regcache.c (get_thread_regcache): Invalidate register cache
2666 before fetching inferior's registers.
2667
2668 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2669
2670 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2671 while-loop as for-loop.
2672 (regsets_store_inferior_registers): Likewise.
2673
2674 2014-11-28 Yao Qi <yao@codesourcery.com>
2675
2676 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2677 * config.in, configure: Re-generate.
2678 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2679 is defined.
2680
2681 2014-11-21 Yao Qi <yao@codesourcery.com>
2682
2683 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2684 (AC_CHECK_HEADERS): Remove malloc.h.
2685 * configure: Re-generated.
2686 * config.in: Re-generated.
2687 * server.h: Don't include alloca.h and malloc.h.
2688 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2689 Don't include malloc.h.
2690
2691 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2692
2693 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2694 corresponding ERRNO check in same block.
2695
2696 2014-11-12 Pedro Alves <palves@redhat.com>
2697
2698 * server.c (cont_thread): Update comment.
2699 (start_inferior, attach_inferior): No longer clear cont_thread.
2700 (handle_v_cont): No longer set cont_thread.
2701 (captured_main): Clear cont_thread each time a GDB connects.
2702
2703 2014-11-12 Pedro Alves <palves@redhat.com>
2704
2705 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2706 thread, and don't resume all threads if the Hc thread has exited.
2707
2708 2014-11-12 Pedro Alves <palves@redhat.com>
2709
2710 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2711 the process group instead of to a specific LWP.
2712
2713 2014-10-15 Pedro Alves <palves@redhat.com>
2714
2715 PR server/17487
2716 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2717 parameter.
2718 (arm_set_thread_context): Delete.
2719 (the_low_target): Adjust.
2720 * win32-i386-low.c (debug_registers_changed)
2721 (debug_registers_used): Delete.
2722 (update_debug_registers_callback): New function.
2723 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2724 needing to update their debug registers.
2725 (win32_get_current_dr): New function.
2726 (x86_dr_low_get_addr, x86_dr_low_get_control)
2727 (x86_dr_low_get_status): Fetch the debug register from the thread
2728 record's context.
2729 (i386_initial_stuff): Adjust.
2730 (i386_get_thread_context): Remove current_event parameter. Don't
2731 clear debug_registers_changed nor copy DR values to
2732 debug_reg_state.
2733 (i386_set_thread_context): Delete.
2734 (i386_prepare_to_resume): New function.
2735 (i386_thread_added): Mark the thread as needing to update irs
2736 debug registers.
2737 (the_low_target): Remove i386_set_thread_context and install
2738 i386_prepare_to_resume.
2739 * win32-low.c (win32_get_thread_context): Adjust.
2740 (win32_set_thread_context): Use SetThreadContext
2741 directly.
2742 (win32_prepare_to_resume): New function.
2743 (win32_require_context): New function, factored out from ...
2744 (thread_rec): ... this.
2745 (continue_one_thread): Call win32_prepare_to_resume on each thread
2746 we're about to continue.
2747 (win32_resume): Call win32_prepare_to_resume on the event thread.
2748 * win32-low.h (struct win32_thread_info)
2749 <debug_registers_changed>: New field.
2750 (struct win32_target_ops): Change prototype of set_thread_context,
2751 delete set_thread_context and add prepare_to_resume.
2752 (win32_require_context): New declaration.
2753
2754 2014-10-08 Gary Benson <gbenson@redhat.com>
2755
2756 * server.h: Do not include common-exceptions.h.
2757
2758 2014-10-08 Gary Benson <gbenson@redhat.com>
2759
2760 * server.h: Do not include cleanups.h.
2761
2762 2014-09-30 James Hogan <james.hogan@imgtec.com>
2763
2764 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2765 mips64-dsp-linux.c.
2766
2767 2014-09-23 Yao Qi <yao@codesourcery.com>
2768
2769 * linux-low.c (lp_status_maybe_breakpoint): New function.
2770 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2771 (count_events_callback): Likewise.
2772 (select_event_lwp_callback): Likewise.
2773 (cancel_breakpoints_callback): Likewise.
2774
2775 2014-09-19 Don Breazeal <donb@codesourcery.com>
2776
2777 * linux-low.c (handle_extended_wait): Call
2778 linux_ptrace_get_extended_event.
2779 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2780 linux_is_extended_waitstatus.
2781
2782 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2783
2784 * Makefile.in (CPPFLAGS): Define.
2785 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2786 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2787
2788 2014-09-16 Gary Benson <gbenson@redhat.com>
2789
2790 * inferiors.h (current_inferior): Renamed as...
2791 (current_thread): New variable. All uses updated.
2792 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2793 (maybe_move_out_of_jump_pad): Likewise.
2794 (cancel_breakpoint): Likewise.
2795 (linux_low_filter_event): Likewise.
2796 (wait_for_sigstop): Likewise.
2797 (linux_resume_one_lwp): Likewise.
2798 (need_step_over_p): Likewise.
2799 (start_step_over): Likewise.
2800 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2801 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2802 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2803 and save_inferior as saved_thread.
2804 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2805 saved_thread.
2806 (regcache_invalidate_thread): Likewise.
2807 * remote-utils.c (prepare_resume_reply): Likewise.
2808 * thread-db.c (thread_db_get_tls_address): Likewise.
2809 (disable_thread_event_reporting): Likewise.
2810 (remove_thread_event_breakpoints): Likewise.
2811 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2812 as saved_thread.
2813 * target.h (set_desired_inferior): Renamed as...
2814 (set_desired_thread): New declaration. All uses updated.
2815 * server.c (myresume): Updated comment to reference thread instead
2816 of inferior.
2817 (handle_serial_event): Likewise.
2818 (handle_target_event): Likewise.
2819
2820 2014-09-12 Tom Tromey <tromey@redhat.com>
2821 Gary Benson <gbenson@redhat.com>
2822
2823 * regcache.h: Include common-regcache.h.
2824 (regcache_read_pc): Don't declare.
2825 * regcache.c (get_thread_regcache_for_ptid): New function.
2826
2827 2014-09-11 Tom Tromey <tromey@redhat.com>
2828 Gary Benson <gbenson@redhat.com>
2829
2830 * symbol.c: New file.
2831 * Makefile.in (SFILES): Add symbol.c.
2832 (OBS): Add symbol.o.
2833
2834 2014-09-11 Gary Benson <gbenson@redhat.com>
2835
2836 * target.c (target_stop_ptid, target_continue_ptid): New
2837 functions.
2838
2839 2014-09-11 Tom Tromey <tromey@redhat.com>
2840 Gary Benson <gbenson@redhat.com>
2841
2842 * target.h: Include target/target.h.
2843 * target.c (target_read_memory, target_read_uint32)
2844 (target_write_memory): New functions.
2845
2846 2014-09-11 Gary Benson <gbenson@redhat.com>
2847
2848 * server.h (debug_hw_points): Don't declare.
2849 * server.c (debug_hw_points): Don't define. Replace all uses
2850 with show_debug_regs.
2851 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2852 all uses with show_debug_regs.
2853
2854 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2855
2856 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2857 endianness into account.
2858 (ppc_supply_ptrace_register): Likewise.
2859
2860 2014-09-03 James Hogan <james.hogan@imgtec.com>
2861
2862 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2863 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2864
2865 2014-09-03 Gary Benson <gbenson@redhat.com>
2866
2867 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2868 ALL_DEBUG_ADDRESS_REGISTERS.
2869
2870 2014-09-02 Gary Benson <gbenson@redhat.com>
2871
2872 * i386-low.h: Renamed as...
2873 * x86-low.h: New file. All type, function and variable name
2874 prefixes changed from "i386_" to "x86_". All references updated.
2875 * i386-low.c: Renamed as...
2876 * x86-low.c: New file. All type, function and variable name
2877 prefixes changed from "i386_" to "x86_". All references updated.
2878
2879 2014-09-02 Gary Benson <gbenson@redhat.com>
2880
2881 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2882 (x86_linux_new_thread): Likewise.
2883
2884 2014-08-29 Gary Benson <gbenson@redhat.com>
2885
2886 * server.h (setjmp.h): Do not include.
2887 (toplevel): Do not declare.
2888 (common-exceptions.h): Include.
2889 (cleanups.h): Likewise.
2890 * server.c (toplevel): Do not define.
2891 (exit_code): New static global.
2892 (detach_or_kill_for_exit_cleanup): New function.
2893 (main): New function. Original main renamed to...
2894 (captured_main): New function.
2895 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2896
2897 2014-08-29 Gary Benson <gbenson@redhat.com>
2898
2899 * Makefile.in (SFILES): Add common/common-exceptions.c.
2900 (OBS): Add common-exceptions.o.
2901 (common-exceptions.o): New rule.
2902 * utils.c (prepare_to_throw_exception): New function.
2903
2904 2014-08-29 Gary Benson <gbenson@redhat.com>
2905
2906 * config.in: Regenerate.
2907 * configure: Likewise.
2908
2909 2014-08-29 Gary Benson <gbenson@redhat.com>
2910
2911 * Makefile.in (SFILES): Add common/cleanups.c.
2912 (OBS): cleanups.o.
2913 (cleanups.o): New rule.
2914
2915 2014-08-29 Gary Benson <gbenson@redhat.com>
2916
2917 * utils.c (internal_vwarning): New function.
2918
2919 2014-08-28 Gary Benson <gbenson@redhat.com>
2920
2921 * utils.h (fatal): Remove declaration.
2922 * utils.c (fatal): Remove function.
2923
2924 2014-08-28 Gary Benson <gbenson@redhat.com>
2925
2926 * tracepoint.c (gdb_agent_init): Replace fatal with
2927 perror_with_name.
2928 (initialize_tracepoint): Likewise.
2929
2930 2014-08-28 Gary Benson <gbenson@redhat.com>
2931
2932 * remote-utils.c (remote_prepare): Replace fatal with error.
2933
2934 2014-08-28 Gary Benson <gbenson@redhat.com>
2935
2936 * linux-low.c (linux_async): Replace fatal with warning.
2937 Tidy up and return.
2938 (linux_start_non_stop): Return -1 if linux_async failed.
2939
2940 2014-08-28 Gary Benson <gbenson@redhat.com>
2941
2942 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2943 gdb_assert.
2944 (i386_dr_low_get_addr): Remove vague comment.
2945 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2946 gdb_assert.
2947
2948 2014-08-28 Gary Benson <gbenson@redhat.com>
2949
2950 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2951 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2952 internal_error.
2953 (linux_resume_one_lwp): Likewise.
2954 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2955 gdb_assert.
2956 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2957 with internal_error.
2958 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2959 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2960 (find_register_by_name): Replace fatal with internal_error.
2961 (find_regno): Likewise.
2962 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2963 * thread-db.c (thread_db_create_event): Likewise.
2964 (thread_db_load_search): Likewise.
2965 (try_thread_db_load_1): Likewise.
2966 * tracepoint.c (get_jump_space_head): Replace fatal with
2967 internal_error.
2968 (claim_trampoline_space): Likewise.
2969 (have_fast_tracepoint_trampoline_buffer): Likewise.
2970 (cmd_qtstart): Likewise.
2971 (stop_tracing): Likewise.
2972 (fast_tracepoint_collecting): Likewise.
2973 (target_malloc): Likewise.
2974 (download_tracepoint): Likewise.
2975 (download_trace_state_variables): Replace check with gdb_assert.
2976 (upload_fast_traceframes): Replace fatal with internal_error.
2977
2978 2014-08-19 Tom Tromey <tromey@redhat.com>
2979 Gary Benson <gbenson@redhat.com>
2980
2981 * Makefile.in (SFILES): Add common/common-debug.c.
2982 (OBS): Add common-debug.o.
2983 (common-debug.o): New rule.
2984 * debug.h (debug_printf): Don't declare.
2985 * debug.c (debug_printf): Renamed and rewritten as...
2986 (debug_vprintf): New function.
2987
2988 2014-08-19 Gary Benson <gbenson@redhat.com>
2989
2990 * utils.h: Do not include print-utils.h.
2991
2992 2014-08-19 Tom Tromey <tromey@redhat.com>
2993 Gary Benson <gbenson@redhat.com>
2994
2995 * server.h: Add static assertion.
2996 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2997
2998 2014-08-19 Tom Tromey <tromey@redhat.com>
2999 Gary Benson <gbenson@redhat.com>
3000
3001 * Makefile.in (SFILES): Add common/errors.c.
3002 (OBS): Add errors.o.
3003 (IPA_OBS): Add errors-ipa.o.
3004 (errors.o): New rule.
3005 (errors-ipa.o): Likewise.
3006 * utils.h (perror_with_name, error, warning): Don't declare.
3007 * utils.c (warning): Renamed and rewritten as...
3008 (vwarning): New function.
3009 (error): Renamed and rewritten as...
3010 (verror): New function.
3011 (internal_error): Renamed and rewritten as...
3012 (internal_verror): New function.
3013
3014 2014-08-07 Gary Benson <gbenson@redhat.com>
3015
3016 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3017 * configure: Regenerate.
3018 * config.in: Likewise.
3019 * server.h: Do not include errno.h.
3020 * event-loop.c: Likewise.
3021 * hostio-errno.c: Likewise.
3022 * linux-low.c: Likewise.
3023 * remote-utils.c: Likewise.
3024 * spu-low.c: Likewise.
3025 * utils.c: Likewise.
3026 * gdbreplay.c: Unconditionally include errno.h.
3027
3028 2014-08-07 Gary Benson <gbenson@redhat.com>
3029
3030 * server.h: Do not include string.h.
3031 * event-loop.c: Likewise.
3032 * linux-low.c: Likewise.
3033 * regcache.c: Likewise.
3034 * remote-utils.c: Likewise.
3035 * spu-low.c: Likewise.
3036 * utils.c: Likewise.
3037
3038 2014-08-07 Gary Benson <gbenson@redhat.com>
3039
3040 * server.h: Do not include gdb_assert.h.
3041
3042 2014-08-07 Gary Benson <gbenson@redhat.com>
3043
3044 * server.h: Do not include common-utils.h.
3045
3046 2014-08-07 Gary Benson <gbenson@redhat.com>
3047
3048 * server.h: Do not include ptid.h.
3049 * notif.h: Likewise.
3050
3051 2014-08-07 Gary Benson <gbenson@redhat.com>
3052
3053 * server.h: Do not include gdb_locale.h.
3054
3055 2014-08-07 Gary Benson <gbenson@redhat.com>
3056
3057 * server.h: Do not include gdb/signals.h.
3058 * win32-low.c: Likewise.
3059
3060 2014-08-07 Gary Benson <gbenson@redhat.com>
3061
3062 * server.h: Do not include pathmax.h.
3063
3064 2014-08-07 Gary Benson <gbenson@redhat.com>
3065
3066 * server.h: Do not include libiberty.h.
3067 * linux-bfin-low.c: Likewise.
3068
3069 2014-08-07 Gary Benson <gbenson@redhat.com>
3070
3071 * server.h: Do not include ansidecl.h.
3072
3073 2014-08-07 Gary Benson <gbenson@redhat.com>
3074
3075 * linux-x86-low.c: Do not include stddef.h.
3076 * lynx-ppc-low.c: Likewise.
3077 * tracepoint.c: Likewise.
3078
3079 2014-08-07 Gary Benson <gbenson@redhat.com>
3080
3081 * server.h: Do not include stdarg.h.
3082 * nto-low.c: Likewise.
3083
3084 2014-08-07 Gary Benson <gbenson@redhat.com>
3085
3086 * server.h: Do not include stdlib.h.
3087 * inferiors.c: Likewise.
3088 * linux-low.c: Likewise.
3089 * regcache.c: Likewise.
3090 * spu-low.c: Likewise.
3091 * tracepoint.c: Likewise.
3092 * utils.c: Likewise.
3093
3094 2014-08-07 Gary Benson <gbenson@redhat.com>
3095
3096 * server.h: Do not include stdio.h.
3097 * linux-low.c: Likewise.
3098 * remote-utils.c: Likewise.
3099 * spu-low.c: Likewise.
3100 * utils.c: Likewise.
3101 * wincecompat.c: Likewise.
3102
3103 2014-08-06 Gary Benson <gbenson@redhat.com>
3104
3105 * regcache.c (init_register_cache): Move conditionals inside if.
3106
3107 2014-08-06 Gary Benson <gbenson@redhat.com>
3108
3109 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3110
3111 2014-07-31 Gary Benson <gbenson@redhat.com>
3112
3113 * ax.h: Do not include server.h.
3114 * gdbthread.h: Likewise.
3115 * lynx-low.h: Likewise.
3116 * notif.h: Likewise.
3117
3118 2014-07-30 Gary Benson <gbenson@redhat.com>
3119
3120 * server.h: Include common-defs.h.
3121 Do not include config.h or build-gnulib-gdbserver/config.h.
3122
3123 2014-07-30 Gary Benson <gbenson@redhat.com>
3124
3125 * hostio-errno.c: Move server.h to top of includes list.
3126 * inferiors.c: Likewise.
3127 * linux-x86-low.c: Likewise.
3128 * notif.c: Include server.h.
3129
3130 2014-07-24 Tom Tromey <tromey@redhat.com>
3131 Gary Benson <gbenson@redhat.com>
3132
3133 * server.h (CORE_ADDR): Now unsigned.
3134
3135 2014-07-16 Pedro Alves <palves@redhat.com>
3136
3137 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3138
3139 2014-07-15 Pedro Alves <palves@redhat.com>
3140
3141 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3142 copy.
3143
3144 2014-07-11 Pedro Alves <palves@redhat.com>
3145
3146 * linux-low.c (kill_wait_lwp): New function, based on
3147 kill_one_lwp_callback, but use my_waitpid directly.
3148 (kill_one_lwp_callback, linux_kill): Use it.
3149
3150 2014-06-23 Pedro Alves <palves@redhat.com>
3151
3152 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3153 before setting DR0..DR3.
3154
3155 2014-06-20 Gary Benson <gbenson@redhat.com>
3156
3157 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3158 * configure: Regenerated.
3159 * config.in: Likewise.
3160
3161 2014-06-20 Gary Benson <gbenson@redhat.com>
3162
3163 * Makefile.in (SFILES): Update locations for files moved
3164 from common to nat.
3165 (object file files): Reordered.
3166
3167 2014-06-20 Gary Benson <gbenson@redhat.com>
3168
3169 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3170 (i386_dr_low_set_addr): Likewise.
3171 (i386_dr_low_get_addr): Likewise.
3172 (i386_dr_low_can_set_control): Likewise.
3173 (i386_dr_low_set_control): Likewise.
3174 (i386_dr_low_get_control): Likewise.
3175 (i386_dr_low_get_status): Likewise.
3176 (i386_get_debug_register_length): Likewise.
3177 * linux-x86-low.c (i386_dr_low_set_addr):
3178 Changed signature. Made static.
3179 (i386_dr_low_get_addr): Likewise.
3180 (i386_dr_low_set_control): Likewise.
3181 (i386_dr_low_get_control): Likewise.
3182 (i386_dr_low_get_status): Likewise.
3183 (i386_dr_low): New global variable.
3184 * win32-i386-low.c (i386_dr_low_set_addr):
3185 Changed signature. Made static.
3186 (i386_dr_low_get_addr): Likewise.
3187 (i386_dr_low_set_control): Likewise.
3188 (i386_dr_low_get_control): Likewise.
3189 (i386_dr_low_get_status): Likewise.
3190 (i386_dr_low): New global variable.
3191
3192 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3193
3194 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3195 * Makefile.in (AR, AR_FLAGS): Define.
3196 * configure: Regenerate.
3197
3198 2014-06-19 Gary Benson <gbenson@redhat.com>
3199
3200 * Makefile.in (i386-dregs.o): New rule.
3201 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3202 * i386-low.c (target.h): Remove include.
3203 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3204 (DR_CONTROL_SHIFT): Likewise.
3205 (DR_CONTROL_SIZE): Likewise.
3206 (DR_RW_EXECUTE): Likewise.
3207 (DR_RW_WRITE): Likewise.
3208 (DR_RW_READ): Likewise.
3209 (DR_RW_IORW): Likewise.
3210 (DR_LEN_1): Likewise.
3211 (DR_LEN_2): Likewise.
3212 (DR_LEN_4): Likewise.
3213 (DR_LEN_8): Likewise.
3214 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3215 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3216 (DR_ENABLE_SIZE): Likewise.
3217 (DR_LOCAL_SLOWDOWN): Likewise.
3218 (DR_GLOBAL_SLOWDOWN): Likewise.
3219 (DR_CONTROL_RESERVED): Likewise.
3220 (I386_DR_CONTROL_MASK): Likewise.
3221 (I386_DR_VACANT): Likewise.
3222 (I386_DR_LOCAL_ENABLE): Likewise.
3223 (I386_DR_GLOBAL_ENABLE): Likewise.
3224 (I386_DR_DISABLE): Likewise.
3225 (I386_DR_SET_RW_LEN): Likewise.
3226 (I386_DR_GET_RW_LEN): Likewise.
3227 (I386_DR_WATCH_HIT): Likewise.
3228 (i386_wp_op_t): Likewise.
3229 (i386_show_dr): Likewise.
3230 (i386_length_and_rw_bits): Likewise.
3231 (i386_insert_aligned_watchpoint): Likewise.
3232 (i386_remove_aligned_watchpoint): Likewise.
3233 (i386_handle_nonaligned_watchpoint): Likewise.
3234 i386_update_inferior_debug_regs(): Likewise.
3235 (i386_dr_insert_watchpoint): Likewise.
3236 (i386_dr_remove_watchpoint): Likewise.
3237 (i386_dr_region_ok_for_watchpoint): Likewise.
3238 (i386_dr_stopped_data_address): Likewise.
3239 (i386_dr_stopped_by_watchpoint): Likewise.
3240
3241 2014-06-19 Gary Benson <gbenson@redhat.com>
3242
3243 * i386-low.c (i386_dr_show): Renamed to
3244 i386_show_dr and made static. All uses updated.
3245 (i386_dr_length_and_rw_bits): Renamed to
3246 i386_length_and_rw_bits and made static.
3247 All uses updated.
3248 (i386_dr_insert_aligned_watchpoint): Renamed to
3249 i386_insert_aligned_watchpoint and made static.
3250 All uses updated.
3251 (i386_dr_remove_aligned_watchpoint): Renamed to
3252 i386_remove_aligned_watchpoint and made static.
3253 All uses updated.
3254 (i386_dr_update_inferior_debug_regs): Renamed to
3255 i386_update_inferior_debug_regs and made static.
3256 All uses updated.
3257
3258 2014-06-18 Gary Benson <gbenson@redhat.com>
3259
3260 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3261 (i386_dr_low_can_set_control): Likewise.
3262 (i386_get_debug_register_length): Likewise.
3263 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3264 (i386_dr_low_can_set_control): Likewise.
3265 (i386_get_debug_register_length): Likewise.
3266
3267 2014-06-17 Gary Benson <gbenson@redhat.com>
3268
3269 * i386-low.h (i386-dregs.h): New include.
3270 (DR_FIRSTADDR): Now in i386-dregs.h.
3271 (DR_LASTADDR): Likewise.
3272 (DR_NADDR): Likewise.
3273 (DR_STATUS): Likewise.
3274 (DR_CONTROL): Likewise.
3275 (i386_debug_reg_state): Likewise.
3276 (i386_dr_insert_watchpoint): Likewise.
3277 (i386_dr_remove_watchpoint): Likewise.
3278 (i386_dr_region_ok_for_watchpoint): Likewise.
3279 (i386_dr_stopped_data_address): Likewise.
3280 (i386_dr_stopped_by_watchpoint): Likewise.
3281 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3282
3283 2014-06-18 Gary Benson <gbenson@redhat.com>
3284
3285 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3286 i386_dr_insert_watchpoint.
3287 (i386_low_remove_watchpoint): Renamed to
3288 i386_dr_remove_watchpoint.
3289 (i386_low_region_ok_for_watchpoint): Renamed to
3290 i386_dr_region_ok_for_watchpoint.
3291 (i386_low_stopped_data_address): Renamed to
3292 i386_dr_stopped_data_address.
3293 (i386_low_stopped_by_watchpoint): Renamed to
3294 i386_dr_stopped_by_watchpoint.
3295 * i386-low.c (i386_show_dr): Renamed to
3296 i386_dr_show and made nonstatic. All uses updated.
3297 (i386_length_and_rw_bits): Renamed to
3298 i386_dr_length_and_rw_bits and made nonstatic.
3299 All uses updated.
3300 (i386_insert_aligned_watchpoint): Renamed to
3301 i386_dr_insert_aligned_watchpoint and made nonstatic.
3302 All uses updated.
3303 (i386_remove_aligned_watchpoint): Renamed to
3304 i386_dr_remove_aligned_watchpoint and made nonstatic.
3305 All uses updated.
3306 (i386_update_inferior_debug_regs): Renamed to
3307 i386_dr_update_inferior_debug_regs and made nonstatic.
3308 All uses updated.
3309 (i386_low_insert_watchpoint): Renamed to
3310 i386_dr_insert_watchpoint. All uses updated.
3311 (i386_low_remove_watchpoint): Renamed to
3312 i386_dr_remove_watchpoint. All uses updated.
3313 (i386_low_region_ok_for_watchpoint): Renamed to
3314 i386_dr_region_ok_for_watchpoint. All uses updated.
3315 (i386_low_stopped_data_address): Renamed to
3316 i386_dr_stopped_data_address. All uses updated.
3317 (i386_low_stopped_by_watchpoint): Renamed to
3318 i386_dr_stopped_by_watchpoint. All uses updated.
3319
3320 2014-06-18 Gary Benson <gbenson@redhat.com>
3321
3322 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3323 (i386_dr_low_can_set_control): Likewise.
3324 (i386_insert_aligned_watchpoint): New check.
3325
3326 2014-06-18 Gary Benson <gbenson@redhat.com>
3327
3328 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3329 Renamed to state.
3330
3331 2014-06-18 Gary Benson <gbenson@redhat.com>
3332
3333 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3334 instead of fatal and error.
3335 (i386_handle_nonaligned_watchpoint): Likewise.
3336
3337 2014-06-18 Gary Benson <gbenson@redhat.com>
3338
3339 * i386-low.c (i386_get_debug_register_length): New macro.
3340 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3341 (i386_show_dr): Use debug_printf instead of fprintf. Use
3342 phex to format values.
3343
3344 2014-06-18 Gary Benson <gbenson@redhat.com>
3345
3346 * i386-low.h: Comment changes.
3347 * i386-low.c: Likewise.
3348
3349 2014-06-18 Gary Benson <gbenson@redhat.com>
3350
3351 * i386-low.c: Whitespace changes.
3352
3353 2014-06-12 Tom Tromey <tromey@redhat.com>
3354
3355 * utils.c (freeargv): Remove.
3356
3357 2014-06-12 Tom Tromey <tromey@redhat.com>
3358
3359 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3360 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3361 (parse_debug_format_options): Likewise.
3362 (gdbserver_usage): Likewise.
3363 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3364 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3365 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3366 against libiberty.
3367 ($(LIBGNU)): Depend on libiberty.
3368 (all-lib): Recurse into all subdirs.
3369 (install-only): Invoke "install" target in subdirs.
3370 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3371 targets.
3372 * configure: Rebuild.
3373 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3374 for vasprintf, vsnprintf, or gettimeofday.
3375 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3376 srv_tgtobj.
3377
3378 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3379
3380 * development.sh: Delete.
3381 * Makefile.in (config.status): Adjust dependency on development.sh.
3382 * configure.ac: Adjust development.sh source call.
3383 * configure: Regenerate.
3384
3385 2014-06-02 Pedro Alves <palves@redhat.com>
3386
3387 * ax.c (gdb_free_agent_expr): New function.
3388 * ax.h (gdb_free_agent_expr): New declaration.
3389 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3390 list.
3391 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3392 static.
3393 (clear_breakpoint_conditions_and_commands): New function.
3394 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3395 (clear_breakpoint_conditions_and_commands): New declaration.
3396
3397 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3398
3399 * linux-aarch64-low.c (asm/ptrace.h): Include.
3400
3401 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3402
3403 Fix TLS access for -static -pthread.
3404 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3405 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3406 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3407
3408 2014-05-20 Pedro Alves <palves@redhat.com>
3409
3410 * linux-aarch64-low.c (aarch64_insert_point)
3411 (aarch64_remove_point): No longer check whether the type is
3412 supported here. Adjust to new interface.
3413 (the_low_target): Install aarch64_supports_z_point_type as
3414 supports_z_point_type method.
3415 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3416 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3417 instead of a Z packet char. Adjust.
3418 (arm_supports_z_point_type): New function.
3419 (arm_insert_point, arm_remove_point): Adjust to new interface.
3420 (the_low_target): Install arm_supports_z_point_type.
3421 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3422 (cris_insert_point, cris_remove_point): Adjust to new interface.
3423 Don't check whether the type is supported here.
3424 (the_low_target): Install cris_supports_z_point_type.
3425 * linux-low.c (linux_supports_z_point_type): New function.
3426 (linux_insert_point, linux_remove_point): Adjust to new interface.
3427 * linux-low.h (struct linux_target_ops) <insert_point,
3428 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3429 raw_breakpoint pointer parameter.
3430 <supports_z_point_type>: New method.
3431 * linux-mips-low.c (mips_supports_z_point_type): New function.
3432 (mips_insert_point, mips_remove_point): Adjust to new interface.
3433 Use mips_supports_z_point_type.
3434 (the_low_target): Install mips_supports_z_point_type.
3435 * linux-ppc-low.c (the_low_target): Install NULL as
3436 supports_z_point_type method.
3437 * linux-s390-low.c (the_low_target): Install NULL as
3438 supports_z_point_type method.
3439 * linux-sparc-low.c (the_low_target): Install NULL as
3440 supports_z_point_type method.
3441 * linux-x86-low.c (x86_supports_z_point_type): New function.
3442 (x86_insert_point): Adjust to new insert_point interface. Use
3443 insert_memory_breakpoint. Adjust to new
3444 i386_low_insert_watchpoint interface.
3445 (x86_remove_point): Adjust to remove_point interface. Use
3446 remove_memory_breakpoint. Adjust to new
3447 i386_low_remove_watchpoint interface.
3448 (the_low_target): Install x86_supports_z_point_type.
3449 * lynx-low.c (lynx_target_ops): Install NULL as
3450 supports_z_point_type callback.
3451 * nto-low.c (nto_supports_z_point_type): New.
3452 (nto_insert_point, nto_remove_point): Adjust to new interface.
3453 (nto_target_ops): Install nto_supports_z_point_type.
3454 * mem-break.c: Adjust intro comment.
3455 (struct raw_breakpoint) <raw_type, size>: New fields.
3456 <inserted>: Update comment.
3457 <shlib_disabled>: Delete field.
3458 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3459 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3460 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3461 (raw_bkpt_type_to_target_hw_bp_type): New function.
3462 (find_enabled_raw_code_breakpoint_at): New function.
3463 (find_raw_breakpoint_at): New type and size parameters. Use them.
3464 (insert_memory_breakpoint): New function, based off
3465 set_raw_breakpoint_at.
3466 (remove_memory_breakpoint): New function.
3467 (set_raw_breakpoint_at): Reimplement.
3468 (set_breakpoint): New, based on set_breakpoint_at.
3469 (set_breakpoint_at): Reimplement.
3470 (delete_raw_breakpoint): Go through the_target->remove_point
3471 instead of assuming memory breakpoints.
3472 (find_gdb_breakpoint_at): Delete.
3473 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3474 (find_gdb_breakpoint): New function.
3475 (set_gdb_breakpoint_at): Delete.
3476 (z_type_supported): New function.
3477 (set_gdb_breakpoint_1): New function, loosely based off
3478 set_gdb_breakpoint_at.
3479 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3480 (delete_gdb_breakpoint_at): Delete.
3481 (delete_gdb_breakpoint_1): New function, loosely based off
3482 delete_gdb_breakpoint_at.
3483 (delete_gdb_breakpoint): New function.
3484 (clear_gdb_breakpoint_conditions): Rename to ...
3485 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3486 breakpoint.
3487 (add_condition_to_breakpoint): Make static.
3488 (add_breakpoint_condition): Take a struct breakpoint pointer
3489 instead of an address. Adjust.
3490 (gdb_condition_true_at_breakpoint): Rename to ...
3491 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3492 z_type parameter.
3493 (gdb_condition_true_at_breakpoint): Reimplement.
3494 (add_breakpoint_commands): Take a struct breakpoint pointer
3495 instead of an address. Adjust.
3496 (gdb_no_commands_at_breakpoint): Rename to ...
3497 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3498 parameter. Return true if no breakpoint was found. Change debug
3499 output.
3500 (gdb_no_commands_at_breakpoint): Reimplement.
3501 (run_breakpoint_commands): Rename to ...
3502 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3503 and change return type to boolean.
3504 (run_breakpoint_commands): New function.
3505 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3506 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3507 breakpoint. Go through the_target->remove_point instead of
3508 assuming memory breakpoint.
3509 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3510 software and hardware breakpoints.
3511 (reinsert_raw_breakpoint): Go through the_target->insert_point
3512 instead of assuming memory breakpoint.
3513 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3514 software and hardware breakpoints.
3515 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3516 Check both software and hardware breakpoints.
3517 (validate_inserted_breakpoint): Assert the breakpoint is a
3518 software breakpoint. Set the inserted flag to -1 instead of
3519 setting shlib_disabled.
3520 (delete_disabled_breakpoints): Adjust.
3521 (validate_breakpoints): Only validate software breakpoints.
3522 Adjust to inserted flag change.
3523 (check_mem_read, check_mem_write): Skip breakpoint types other
3524 than software breakpoints. Adjust to inserted flag change.
3525 * mem-break.h (enum raw_bkpt_type): New enum.
3526 (raw_breakpoint, struct process_info): Forward declare.
3527 (Z_packet_to_target_hw_bp_type): Delete declaration.
3528 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3529 (set_gdb_breakpoint, delete_gdb_breakpoint)
3530 (clear_breakpoint_conditions): New declarations.
3531 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3532 (breakpoint_inserted_here): Update comment.
3533 (add_breakpoint_condition, add_breakpoint_commands): Replace
3534 address parameter with a breakpoint pointer parameter.
3535 (gdb_breakpoint_here): Update comment.
3536 (delete_gdb_breakpoint_at): Delete.
3537 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3538 * server.c (process_point_options): Take a struct breakpoint
3539 pointer instead of an address. Adjust.
3540 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3541 delete_gdb_breakpoint.
3542 * spu-low.c (spu_target_ops): Install NULL as
3543 supports_z_point_type method.
3544 * target.h: Include mem-break.h.
3545 (struct target_ops) <prepare_to_access_memory>: Update comment.
3546 <supports_z_point_type>: New field.
3547 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3548 instead of a char. Also take a raw breakpoint pointer.
3549 * win32-arm-low.c (the_low_target): Install NULL as
3550 supports_z_point_type.
3551 * win32-i386-low.c (i386_supports_z_point_type): New function.
3552 (i386_insert_point, i386_remove_point): Adjust to new interface.
3553 (the_low_target): Install i386_supports_z_point_type.
3554 * win32-low.c (win32_supports_z_point_type): New function.
3555 (win32_insert_point, win32_remove_point): Adjust to new interface.
3556 (win32_target_ops): Install win32_supports_z_point_type.
3557 * win32-low.h (struct win32_target_ops):
3558 <supports_z_point_type>: New method.
3559 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3560 instead of a char. Also take a raw breakpoint pointer.
3561
3562 2014-05-20 Pedro Alves <palves@redhat.com>
3563
3564 * mem-break.h: Include break-common.h.
3565 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3566 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3567 (Z_packet_to_target_hw_bp_type): New declaration.
3568 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3569 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3570 (Z_PACKET_ACCESS_WP): Delete macros.
3571 (Z_packet_to_hw_type): Delete function.
3572 * i386-low.h: Don't include break-common.h here.
3573 (Z_packet_to_hw_type): Delete declaration.
3574 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3575 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3576 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3577 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3578 * linux-aarch64-low.c: Don't include break-common.h here.
3579 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3580 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3581 (Z_packet_to_target_hw_bp_type): Delete function.
3582 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3583 function.
3584 (mips_insert_point, mips_remove_point): Use
3585 Z_packet_to_target_hw_bp_type.
3586
3587 2014-05-20 Pedro Alves <palves@redhat.com>
3588
3589 * linux-aarch64-low.c: Include break-common.h.
3590 (enum target_point_type): Delete.
3591 (Z_packet_to_point_type): Rename to ...
3592 (Z_packet_to_target_hw_bp_type): ... this, and return a
3593 target_hw_bp_type instead.
3594 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3595 instead of an enum target_point_type.
3596 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3597 breakpoint type.
3598 (aarch64_dr_state_insert_one_point)
3599 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3600 (aarch64_handle_aligned_watchpoint)
3601 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3602 Take an enum target_hw_bp_type instead of an enum
3603 target_point_type.
3604 (aarch64_supports_z_point_type): New function.
3605 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3606 use Z_packet_to_target_hw_bp_type.
3607
3608 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3609
3610 * configure.ac: Only use -Werror by default when DEVELOPMENT
3611 is true.
3612 * configure: Regenerate.
3613
3614 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3615
3616 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3617 * linux-x86-low.c (X86_64_USER_REGS): New.
3618 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3619
3620 2014-04-28 Yao Qi <yao@codesourcery.com>
3621
3622 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3623 name.
3624
3625 2014-04-25 Pedro Alves <palves@redhat.com>
3626
3627 PR server/16255
3628 * linux-low.c (linux_attach_fail_reason_string): New function.
3629 (linux_attach_lwp): Delete.
3630 (linux_attach_lwp_1): Rename to ...
3631 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3632 argument. Remove "initial" parameter. Return int instead of
3633 void. Don't error or warn here.
3634 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3635 failure to attach to the tgid. Call warning when failing to
3636 attach to an lwp.
3637 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3638 argument. Remove "initial" parameter. Return int instead of
3639 void. Don't error or warn here.
3640 (linux_attach_fail_reason_string): New declaration.
3641 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3642 interface change. Use linux_attach_fail_reason_string.
3643
3644 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3645 Walfred Tedeschi <walfred.tedeschi@intel.com>
3646
3647 * Makefile.in: Added rules to handle new files
3648 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3649 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3650 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3651 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3652 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3653 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3654 x32-avx512-linux.o.
3655 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3656 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3657 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3658 i386/x32-avx512.xml.
3659 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3660 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3661 i386/x32-avx512-linux.xml.
3662 * i387-fp.c (num_avx512_k_registers): New constant for number
3663 of K registers.
3664 (num_avx512_zmmh_low_registers): New constant for number of
3665 lower ZMM registers (0-15).
3666 (num_avx512_zmmh_high_registers): New constant for number of
3667 higher ZMM registers (16-31).
3668 (num_avx512_ymmh_registers): New contant for number of higher
3669 YMM registers (ymm16-31 added by avx521 on x86_64).
3670 (num_avx512_xmm_registers): New constant for number of higher
3671 XMM registers (xmm16-31 added by AVX512 on x86_64).
3672 (struct i387_xsave): Add space for AVX512 registers.
3673 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3674 Add code to handle AVX512 registers.
3675 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3676 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3677 prototypei from generated file.
3678 (tdesc_amd64_avx512_linux): Likewise.
3679 (init_registers_x32_avx512_linux): Likewise.
3680 (tdesc_x32_avx512_linux): Likewise.
3681 (init_registers_i386_avx512_linux): Likewise.
3682 (tdesc_i386_avx512_linux): Likewise.
3683 (x86_64_regmap): Add AVX512 registers.
3684 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3685 mask.
3686 (initialize_low_arch): Add code to initialize AVX512 registers.
3687
3688 2014-04-23 Pedro Alves <palves@redhat.com>
3689
3690 * mem-break.c (find_gdb_breakpoint_at): Make static.
3691 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3692
3693 2014-04-23 Pedro Alves <palves@redhat.com>
3694
3695 * i386-low.c: Don't include break-common.h here.
3696 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3697 prototype to take target_hw_bp_type as argument instead of a Z
3698 packet char.
3699 * i386-low.h: Include break-common.h here.
3700 (Z_packet_to_hw_type): Declare.
3701 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3702 prototypes.
3703 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3704 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3705 (x86_remove_point): Convert the packet number to a
3706 target_hw_bp_type before calling i386_low_remove_watchpoint.
3707 * win32-i386-low.c (i386_insert_point): Convert the packet number
3708 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3709 (i386_remove_point): Convert the packet number to a
3710 target_hw_bp_type before calling i386_low_remove_watchpoint.
3711
3712 2014-04-23 Pedro Alves <palves@redhat.com>
3713
3714 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3715
3716 2014-04-10 Pedro Alves <palves@redhat.com>
3717
3718 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3719 Check if the condition or command is NULL before checking if the
3720 breakpoint is known. On success, return true.
3721 * mem-break.h (add_breakpoint_condition): Document return.
3722 (add_breakpoint_commands): Add describing comment.
3723 * server.c (skip_to_semicolon): New function.
3724 (process_point_options): Use it.
3725
3726 2014-04-09 Pedro Alves <palves@redhat.com>
3727
3728 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3729 to lwpid_of.
3730
3731 2014-02-27 Pedro Alves <palves@redhat.com>
3732
3733 PR 12702
3734 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3735 macros.
3736 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3737 output.
3738 (last_thread_of_process_p): Take a PID argument instead of a
3739 thread pointer.
3740 (linux_wait_for_lwp): Delete.
3741 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3742 functions.
3743 (linux_low_filter_event): New function, party factored out from
3744 linux_wait_for_event.
3745 (linux_wait_for_event): Rename to ...
3746 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3747 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3748 sigsuspend. Check for zombie leaders.
3749 (linux_wait_for_event): Reimplement as wrapper around
3750 linux_wait_for_event_filtered.
3751 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3752 a normal or signal exit is seen, it's the whole process exiting.
3753 (wait_for_sigstop): No longer a for_each_inferior callback.
3754 Rewrite on top of linux_wait_for_event_filtered.
3755 (stop_all_lwps): Call wait_for_sigstop directly.
3756 * server.c (resume, handle_target_event): Handle
3757 TARGET_WAITKIND_NO_RESUMED.
3758
3759 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3760
3761 * win32-low.c (psapi_get_dll_name,
3762 * win32_CreateToolhelp32Snapshot): Delete.
3763 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3764 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3765 Delete.
3766 (handle_load_dll): Add function description.
3767 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3768
3769 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3770
3771 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3772 Add comment.
3773 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3774 base address when calling win32_add_one_solib.
3775 (handle_load_dll): Delete local variable load_addr.
3776 Remove 0x1000 offset applied to DLL base address when calling
3777 win32_add_one_solib.
3778 (handle_unload_dll): Add comment.
3779
3780 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3781
3782 * win32-low.c (win32_add_all_dlls): Renames
3783 win32_ensure_ntdll_loaded. Rewrite function documentation.
3784 Adjust implementation to always load all DLLs.
3785 Add 0x1000 offset to DLL base address when calling
3786 win32_add_one_solib.
3787 (child_initialization_done): New static global.
3788 (do_initial_child_stuff): Set child_initialization_done to
3789 zero during child initialization, and 1 after. Replace call
3790 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3791 Add comment.
3792 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3793 (handle_unload_dll): Add function documentation.
3794 (get_child_debug_event): Ignore load and unload DLL events
3795 during child initialization.
3796
3797 2014-02-20 Doug Evans <dje@google.com>
3798
3799 Remove global all_lwps.
3800 * inferiors.h (ptid_of): Move here from linux-low.h.
3801 (pid_of, lwpid_of): Ditto.
3802 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3803 parameter is a struct thread_info * now.
3804 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3805 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3806 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3807 directly.
3808 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3809 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3810 * linux-arm-low.c (update_registers_callback): Update, "entry"
3811 parameter is a struct thread_info * now.
3812 Fetch lwpid from current_inferior directly.
3813 (arm_insert_point): Pass &all_threads to find_inferior instead of
3814 &all_lwps.
3815 (arm_remove_point): Ditto.
3816 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3817 (arm_prepare_to_resume): Fetch pid from thread.
3818 (arm_read_description): Fetch lwpid from current_inferior directly.
3819 * linux-low.c (all_lwps): Delete.
3820 (delete_lwp): Delete call to remove_inferior.
3821 (handle_extended_wait): Fetch lwpid from thread.
3822 (add_lwp): Don't set lwp->entry.id. Remove call to
3823 add_inferior_to_list.
3824 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3825 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3826 (kill_one_lwp_callback): Ditto.
3827 (linux_kill): Don't dereference NULL pointer.
3828 Fetch ptid,lwpid from thread.
3829 (get_detach_signal): Fetch ptid from thread.
3830 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3831 Simplify call to regcache_invalidate_thread.
3832 (delete_lwp_callback): Update, "entry" parameter is a
3833 struct thread_info * now. Fetch pid from thread.
3834 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3835 (status_pending_p_callback): Update, "entry" parameter is a
3836 struct thread_info * now. Fetch ptid from thread.
3837 (find_lwp_pid): Update, "entry" parameter is a
3838 struct thread_info * now.
3839 (linux_wait_for_lwp): Fetch pid from thread.
3840 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3841 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3842 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3843 (dequeue_one_deferred_signal): Ditto.
3844 (cancel_breakpoint): Fetch ptid from current_inferior.
3845 (linux_wait_for_event): Pass &all_threads to find_inferior,
3846 not &all_lwps. Fetch ptid, lwpid from thread.
3847 (count_events_callback): Update, "entry" parameter is a
3848 struct thread_info * now.
3849 (select_singlestep_lwp_callback): Ditto.
3850 (select_event_lwp_callback): Ditto.
3851 (cancel_breakpoints_callback): Ditto.
3852 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3853 not &all_lwps.
3854 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3855 (unsuspend_one_lwp): Update, "entry" parameter is a
3856 struct thread_info * now.
3857 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3858 not &all_lwps.
3859 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3860 Fetch lwpid from thread, not lwp.
3861 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3862 Pass &all_threads to find_inferior, not &all_lwps.
3863 (send_sigstop): Fetch lwpid from thread, not lwp.
3864 (send_sigstop_callback): Update, "entry" parameter is a
3865 struct thread_info * now.
3866 (suspend_and_send_sigstop_callback): Ditto.
3867 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3868 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3869 struct thread_info * now.
3870 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3871 from thread, lwp.
3872 (lwp_running): Update, "entry" parameter is a
3873 struct thread_info * now.
3874 (stop_all_lwps): Fetch ptid from thread.
3875 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3876 (linux_resume_one_lwp): Fetch lwpid from thread.
3877 (linux_set_resume_request): Update, "entry" parameter is a
3878 struct thread_info * now. Fetch pid, lwpid from thread.
3879 (resume_status_pending_p): Update, "entry" parameter is a
3880 struct thread_info * now.
3881 (need_step_over_p): Ditto. Fetch lwpid from thread.
3882 (start_step_over): Fetch lwpid from thread.
3883 (linux_resume_one_thread): Update, "entry" parameter is a
3884 struct thread_info * now. Fetch lwpid from thread.
3885 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3886 (proceed_one_lwp): Update, "entry" parameter is a
3887 struct thread_info * now. Fetch lwpid from thread.
3888 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3889 struct thread_info * now.
3890 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3891 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3892 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3893 directly.
3894 (regsets_store_inferior_registers): Ditto.
3895 (fetch_register, store_register): Ditto.
3896 (linux_read_memory, linux_write_memory): Ditto.
3897 (linux_request_interrupt): Ditto.
3898 (linux_read_auxv): Ditto.
3899 (linux_xfer_siginfo): Ditto.
3900 (linux_qxfer_spu): Ditto.
3901 (linux_qxfer_libraries_svr4): Ditto.
3902 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3903 moved to inferiors.h.
3904 (get_lwp): Delete.
3905 (get_thread_lwp): Update.
3906 (struct lwp_info): Delete member "entry". Simplify comment for
3907 member "thread".
3908 (all_lwps): Delete.
3909 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3910 current_inferior directly.
3911 (update_watch_registers_callback): Update, "entry" parameter is a
3912 struct thread_info * now. Fetch pid from thread.
3913 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3914 (mips_insert_point): Fetch lwpid from current_inferior.
3915 Pass &all_threads to find_inferior, not &all_lwps.
3916 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3917 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3918 directly.
3919 (mips_stopped_data_address): Ditto.
3920 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3921 directly.
3922 * linux-tile-low.c (tile_arch_setup): Ditto.
3923 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3924 (update_debug_registers_callback): Update, "entry" parameter is a
3925 struct thread_info * now. Fetch pid from thread.
3926 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3927 Pass &all_threads to find_inferior, not &all_lwps.
3928 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3929 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3930 Pass &all_threads to find_inferior, not &all_lwps.
3931 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3932 (i386_dr_low_get_status): Ditto.
3933 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3934 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3935 (x86_linux_read_description): Ditto.
3936 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3937
3938 2014-02-20 Doug Evans <dje@google.com>
3939
3940 * inferiors.c (get_first_inferior): Fix buglet.
3941
3942 2014-02-19 Doug Evans <dje@google.com>
3943
3944 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3945 * inferiors.c (add_thread): Change result type to struct thread_info *.
3946 All callers updated.
3947 (add_lwp): Call add_thread here instead of in callers.
3948 All callers updated.
3949 * linux-low.h (get_lwp_thread): Rewrite.
3950 (struct lwp_info): New member "thread".
3951
3952 2014-02-19 Doug Evans <dje@google.com>
3953
3954 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3955 All callers updated.
3956
3957 2014-02-19 Doug Evans <dje@google.com>
3958
3959 * inferiors.c (add_thread): Fix whitespace.
3960
3961 2014-02-19 Doug Evans <dje@google.com>
3962
3963 * dll.c (clear_dlls): Replace accessing list implemention details
3964 with API function.
3965 * gdbthread.h (get_first_thread): Declare.
3966 * inferiors.c (for_each_inferior_with_data): New function.
3967 (get_first_thread): New function.
3968 (find_thread_ptid): Simplify.
3969 (get_first_inferior): New function.
3970 (clear_list): Delete.
3971 (one_inferior_p): New function.
3972 (clear_inferior_list): New function.
3973 (clear_inferiors): Update.
3974 * inferiors.h (for_each_inferior_with_data): Declare.
3975 (clear_inferior_list): Declare.
3976 (one_inferior_p): Declare.
3977 (get_first_inferior): Declare.
3978 * linux-low.c (linux_wait_for_event): Replace accessing list
3979 implemention details with API function.
3980 * server.c (target_running): Ditto.
3981 (accumulate_file_name_length): New function.
3982 (emit_dll_description): New function.
3983 (handle_qxfer_libraries): Replace accessing list implemention
3984 details with API function.
3985 (handle_qxfer_threads_worker): New function.
3986 (handle_qxfer_threads_proper): Replace accessing list implemention
3987 details with API function.
3988 (handle_query): Ditto.
3989 (visit_actioned_threads_callback_ftype): New typedef.
3990 (visit_actioned_threads_data): New struct.
3991 (visit_actioned_threads): Rewrite to be find_inferior callback.
3992 (resume): Call find_inferior.
3993 (handle_status): Replace accessing list implemention
3994 details with API function.
3995 (process_serial_event): Replace accessing list implemention details
3996 with API function.
3997 * target.c (set_desired_inferior): Replace accessing list implemention
3998 details with API function.
3999 * tracepoint.c (same_process_p): New function.
4000 (gdb_agent_about_to_close): Replace accessing list implemention
4001 details with API function.
4002 * win32-low.c (child_delete_thread): Replace accessing list
4003 implemention details with API function.
4004 (match_dll_by_basename): New function.
4005 (dll_is_loaded_by_basename): New function.
4006 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4007 details call to dll_is_loaded_by_basename.
4008
4009 2014-02-19 Doug Evans <dje@google.com>
4010
4011 * dll.h (struct dll_info): Add comment.
4012 * gdbthread.h (struct thread_info): Add comment.
4013 (current_ptid): Simplify.
4014 * inferiors.c (add_process): Update.
4015 (remove_process): Update.
4016 * inferiors.h (struct process_info): Rename member "head" to "entry".
4017 * linux-low.c (delete_lwp): Update.
4018 (add_lwp): Update.
4019 (last_thread_of_process_p): Update.
4020 (kill_one_lwp_callback, linux_kill): Update.
4021 (status_pending_p_callback): Update.
4022 (wait_for_sigstop): Update. Simplify read of ptid.
4023 (start_step_over): Update.
4024 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4025 (get_lwp_thread): Update.
4026 (struct lwp_info): Rename member "head" to "entry".
4027 * regcache.h (inferior_list_entry): Delete.
4028 * server.c (kill_inferior_callback): Update.
4029 (detach_or_kill_inferior_callback): Update.
4030 (print_started_pid): Update.
4031 (print_attached_pid): Update.
4032 (process_serial_event): Simplify read of ptid.
4033 * thread-db.c (thread_db_create_event): Update.
4034 (thread_db_get_tls_address): Update.
4035 * win32-low.c (current_inferior_ptid): Simplify.
4036
4037 2014-02-19 Tom Tromey <tromey@redhat.com>
4038
4039 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4040 argument.
4041 (target_supports_btrace): Update.
4042
4043 2014-02-14 Yao Qi <yao@codesourcery.com>
4044
4045 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4046 (rsp-low-ipa.o): New target.
4047
4048 2014-02-12 Tom Tromey <tromey@redhat.com>
4049
4050 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4051 convert_ascii_to_int.
4052 * regcache.c (registers_to_string): Likewise.
4053 * remote-utils.c (decode_M_packet): Likewise.
4054 * server.c (process_serial_event): Likewise.
4055
4056 2014-02-12 Tom Tromey <tromey@redhat.com>
4057
4058 * server.c (handle_query, handle_v_run): Use hex2bin, not
4059 unhexify.
4060 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4061
4062 2014-02-12 Tom Tromey <tromey@redhat.com>
4063
4064 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4065 convert_int_to_ascii.
4066 * regcache.c (registers_to_string, collect_register_as_string):
4067 Likewise.
4068 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4069 Likewise.
4070 * server.c (process_serial_event): Likewise.
4071 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4072 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4073
4074 2014-02-12 Tom Tromey <tromey@redhat.com>
4075
4076 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4077 bin2hex, not hexify.
4078 * tracepoint.c (cmd_qtstatus): Likewise.
4079
4080 2014-02-12 Tom Tromey <tromey@redhat.com>
4081
4082 * remote-utils.c (monitor_output): Pass explicit length to
4083 hexify.
4084
4085 2014-02-12 Tom Tromey <tromey@redhat.com>
4086
4087 * tracepoint.c: Include rsp-low.h.
4088 * server.c: Include rsp-low.h.
4089 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4090 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4091 declare.
4092 * remote-utils.c: Include rsp-low.h.
4093 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4094 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4095 (convert_int_to_ascii, convert_ascii_to_int): Move to
4096 common/rsp-low.c.
4097 * regcache.c: Include rsp-low.h.
4098 * ax.c: Include rsp-low.h.
4099 * Makefile.in (SFILES): Add common/rsp-low.c.
4100 (OBS): Add rsp-low.o.
4101 (rsp-low.o): New target.
4102
4103 2014-02-12 Tom Tromey <tromey@redhat.com>
4104
4105 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4106 Include print-utils.h.
4107 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4108 (plongest, thirty_two, phex_nz): Remove.
4109 * Makefile.in (SFILES): Add common/print-utils.c.
4110 (OBS): Add print-utils.o.
4111 (print-utils-ipa.o): New target.
4112 (print-utils.o): New target.
4113 (IPA_OBJS): Add print-utils-ipa.o.
4114
4115 2014-02-06 Tom Tromey <tromey@redhat.com>
4116
4117 * Makefile.in (SFILES): Fix indentation.
4118
4119 2014-02-05 Doug Evans <dje@google.com>
4120
4121 * linux-low.c (linux_wait_for_event): Improve comment.
4122 (linux_wait_1): Keep current_inferior in sync with event_child.
4123
4124 2014-01-22 Doug Evans <dje@google.com>
4125
4126 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4127
4128 2014-01-22 Doug Evans <dje@google.com>
4129
4130 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4131 * configure: Regenerate.
4132 * config.in: Regenerate.
4133 * Makefile.in (SFILES): Add debug.c.
4134 (OBS): Add debug.o.
4135 * debug.c: New file.
4136 * debug.h: New file.
4137 * linux-aarch64-low.c (*): Update all debugging printfs to use
4138 debug_printf instead of fprintf.
4139 * linux-arm-low.c (*): Ditto.
4140 * linux-cris-low.c (*): Ditto.
4141 * linux-crisv32-low.c (*): Ditto.
4142 * linux-m32r-low.c (*): Ditto.
4143 * linux-sparc-low.c (*): Ditto.
4144 * linux-x86.c (*): Ditto.
4145 * linux-low.c (*): Ditto.
4146 (linux_wait_1): Add calls to debug_enter, debug_exit.
4147 (linux_wait): Remove redundant debugging printf.
4148 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4149 (linux_resume, unstop_all_lwps): Ditto.
4150 * mem-break.c (*): Update all debugging printfs to use
4151 debug_printf instead of fprintf.
4152 * remote-utils.c (*): Ditto.
4153 * thread-db.c (*): Ditto.
4154 * server.c #include <ctype.h>, "gdb_vecs.h".
4155 (debug_threads): Moved to debug.c.
4156 (*): Update all debugging printfs to use debug_printf instead of
4157 fprintf.
4158 (start_inferior): Replace call to fflush with call to debug_flush.
4159 (monitor_show_help): Mention set debug-format.
4160 (parse_debug_format_options): New function.
4161 (handle_monitor_command): Handle "monitor set debug-format".
4162 (gdbserver_usage): Mention --debug-format.
4163 (main): Parse --debug-format.
4164 * server.h (debug_threads): Declaration moved to debug.h.
4165 #include "debug.h".
4166 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4167 trace_debug_1 that uses debug_printf.
4168 (tracepoint_look_up_symbols): Update all debugging printfs to use
4169 debug_printf instead of fprintf.
4170
4171 2014-01-20 Baruch Siach <baruch@tkos.co.il>
4172
4173 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4174 sys/ptrace.h.
4175
4176 2014-01-17 Pedro Alves <palves@redhat.com>
4177
4178 PR build/16445
4179 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4180 defined after including gdb_proc_service.h.
4181
4182 2014-01-16 Doug Evans <dje@google.com>
4183
4184 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4185 (match_dll): Use it.
4186
4187 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4188
4189 * target.h (target_ops) <read_btrace>: Change parameters and
4190 return type to allow error reporting.
4191 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4192 trace reading errors on.
4193 * linux-low.c (linux_low_read_btrace): Pass trace reading
4194 errors on.
4195 (linux_low_disable_btrace): New.
4196
4197 2014-01-15 Doug Evans <dje@google.com>
4198
4199 * inferiors.c (thread_id_to_gdb_id): Delete.
4200 * inferiors.h (thread_id_to_gdb_id): Delete.
4201
4202 2014-01-13 Eli Zaretskii <eliz@gnu.org>
4203
4204 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4205 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4206 versions.
4207
4208 2014-01-08 Pedro Alves <palves@redhat.com>
4209
4210 * server.c (handle_status): Don't discard previous queued stop
4211 replies or thread's pending status here.
4212 (main) <disconnection>: Do it here instead.
4213
4214 2014-01-08 Pedro Alves <palves@redhat.com>
4215
4216 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4217 * server.c (visit_actioned_threads, handle_pending_status): New
4218 function.
4219 (handle_v_cont): Factor out parts to ...
4220 (resume): ... this new function. If in all-stop, and a thread
4221 being resumed has a pending status, report it without actually
4222 resuming.
4223 (myresume): Adjust to use the new 'resume' function.
4224 (clear_pending_status_callback, set_pending_status_callback)
4225 (find_status_pending_thread_callback): New functions.
4226 (handle_status): Handle the case of multiple threads having
4227 interesting statuses to report. Report threads' real last signal
4228 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4229 with an interesting thread to report the status for, instead of
4230 always reporting the status of the first thread.
4231
4232 2014-01-01 Joel Brobecker <brobecker@adacore.com>
4233
4234 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4235 * gdbreplay.c (gdbreplay_version): Likewise.
4236
4237 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4238
4239 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4240 iov.iov_len with the real length in use.
4241
4242 2013-12-13 Joel Brobecker <brobecker@adacore.com>
4243
4244 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4245 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4246 for all targets that use win32-low.c.
4247 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4248 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4249
4250 2013-12-13 Pedro Alves <palves@redhat.com>
4251
4252 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4253 if equal to TARGET_WAITKIND_LOADED.
4254 * win32-low.c (cached_status): New static global.
4255 (win32_wait): Add declaration.
4256 (do_initial_child_stuff): Flush all initial pending debug events
4257 up to the initial breakpoint.
4258 (win32_wait): If CACHED_STATUS was set, return that instead
4259 of doing a real wait. Remove the code resuming the execution
4260 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4261 during the initial phase. Also remove the code changing
4262 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4263 TARGET_WAITKIND_STOPPED.
4264
4265 2013-12-11 Yao Qi <yao@codesourcery.com>
4266
4267 * notif.c (handle_notif_ack): Return 0 if no notification
4268 matches.
4269
4270 2013-11-20 Doug Evans <dje@google.com>
4271
4272 * linux-low.c (linux_set_resume_request): Fix comment.
4273
4274 2013-11-20 Doug Evans <dje@google.com>
4275
4276 * linux-low.c (resume_status_pending_p): Tweak comment.
4277
4278 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4279
4280 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4281 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4282 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4283 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4284 (srv_amd64_regobj): Add amd64-mpx.o.
4285 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4286 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4287 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4288 * i387-fp.c (num_pl_bnd_register) Added constant.
4289 (num_pl_bnd_cfg_registers) Added constant.
4290 (struct i387_xsave) Added reserved area and MPX fields.
4291 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4292 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4293 function.
4294 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4295 (init_registers_amd64_mpx_linux): Declare new function.
4296 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4297 (x86_64_regmap): Add MPX registers.
4298 (x86_linux_read_description): Add MPX case.
4299 (initialize_low_arch): Initialize MPX targets.
4300
4301 2013-11-18 Tom Tromey <tromey@redhat.com>
4302
4303 * configure: Rebuild.
4304 * configure.ac: Don't check for stdlib.h.
4305 * gdbreplay.c: Unconditionally include stdlib.h.
4306
4307 2013-11-18 Tom Tromey <tromey@redhat.com>
4308
4309 * config.in: Rebuild.
4310 * configure: Rebuild.
4311 * configure.ac: Don't use AC_HEADER_DIRENT.
4312
4313 2013-11-18 Tom Tromey <tromey@redhat.com>
4314
4315 * server.h: Don't check HAVE_STRING_H.
4316 * gdbreplay.c: Don't check HAVE_STRING_H.
4317 * configure: Rebuild.
4318
4319 2013-11-18 Tom Tromey <tromey@redhat.com>
4320
4321 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4322 LIBGNU.
4323
4324 2013-11-08 Tom Tromey <tromey@redhat.com>
4325
4326 * configure, config.in: Rebuild.
4327 * configure.ac: Remove unused configury.
4328
4329 2013-11-08 Tom Tromey <tromey@redhat.com>
4330
4331 * acinclude.m4: Include common.m4, codeset.m4.
4332 * configure, config.in: Rebuild.
4333 * configure.ac: Use GDB_AC_COMMON.
4334
4335 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4336
4337 * linux-s390-low.c (HWCAP_S390_TE): New define.
4338 (s390_arch_setup): Consider the TE field in the HWCAP for
4339 determining 'have_regset_tdb'.
4340
4341 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4342
4343 PR gdb/16014
4344 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4345 call to sizeof.
4346
4347 2013-10-02 Pedro Alves <palves@redhat.com>
4348
4349 * server.c (process_serial_event): Don't output "GDBserver
4350 exiting" if GDB is connected through stdio.
4351 * target.c (mywait): Likewise, be silent if GDB is connected
4352 through stdio.
4353
4354 2013-10-01 Joel Brobecker <brobecker@adacore.com>
4355
4356 * lynx-low.c (lynx_add_threads_after_attach): New function.
4357 (lynx_attach): Remove call to add_thread. Add call to
4358 lynx_add_threads_after_attach instead.
4359
4360 2013-09-28 Mike Frysinger <vapier@gentoo.org>
4361
4362 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4363 * config.in, configure: Regenerated.
4364
4365 2013-09-18 Yao Qi <yao@codesourcery.com>
4366
4367 PR server/15959
4368 * server.c (start_inferior): Clear 'resume_info'.
4369
4370 2013-09-16 Jiong Wang <jiwang@tilera.com>
4371
4372 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4373 for each register.
4374
4375 2013-09-16 Jiong Wang <jiwang@tilera.com>
4376
4377 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4378 linux-tile-low.o to srv_tgtobj.
4379
4380 2013-09-16 Will Newton <will.newton@linaro.org>
4381
4382 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4383 out regs.
4384
4385 2013-09-06 Pedro Alves <palves@redhat.com>
4386
4387 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4388 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4389 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4390 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4391 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4392 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4393
4394 2013-09-06 Pedro Alves <palves@redhat.com>
4395
4396 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4397 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4398
4399 2013-09-06 Pedro Alves <palves@redhat.com>
4400
4401 * linux-amd64-ipa.c: Include tracepoint.h.
4402 * linux-i386-ipa.c: Include tracepoint.h.
4403
4404 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4405
4406 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4407 (ps_get_thread_area): New function.
4408
4409 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4410
4411 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4412 (initialize_low_arch): Call init_registers_crisv32 rather than
4413 init_register_crisv32.
4414
4415 2013-09-05 Pedro Alves <palves@redhat.com>
4416
4417 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4418 to ...
4419 * hostio.h: ... this new file.
4420 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4421 win32-low.c: Include hostio.h.
4422
4423 2013-09-05 Pedro Alves <palves@redhat.com>
4424
4425 * server.h (gdb_client_data, handler_func, callback_handler_func)
4426 (delete_file_handler, add_file_handler, append_callback_event)
4427 (delete_callback_event, start_event_loop, initialize_event_loop):
4428 Move to event-loop.h and include it.
4429 * event-loop.h: New file.
4430
4431 2013-09-05 Pedro Alves <palves@redhat.com>
4432
4433 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4434 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4435 (loaded_dll, unloaded_dll): Move to ...
4436 * dll.h: ... this new file.
4437 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4438
4439 2013-09-05 Pedro Alves <palves@redhat.com>
4440
4441 * server.h (current_process, get_thread_process, all_processes)
4442 (add_inferior_to_list, for_each_inferior, current_inferior)
4443 (remove_inferior, add_process, remove_process, find_process_pid)
4444 (have_started_inferiors_p, have_attached_inferiors_p)
4445 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4446 (clear_inferiors, find_inferior, find_inferior_id)
4447 (inferior_target_data, set_inferior_target_data)
4448 (inferior_regcache_data, set_inferior_regcache_data): Move to
4449 inferiors.h, and include it.
4450 * inferiors.h: New file.
4451
4452 2013-09-05 Pedro Alves <palves@redhat.com>
4453
4454 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4455 Move ...
4456 * ax.h: ... here.
4457
4458 2013-09-05 Pedro Alves <palves@redhat.com>
4459
4460 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4461 tracepoint.h.
4462 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4463 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4464 (handle_tracepoint_general_set, handle_tracepoint_query)
4465 (tracepoint_finished_step, tracepoint_was_hit)
4466 (release_while_stepping_state_list, current_traceframe)
4467 (in_readonly_region, traceframe_read_mem)
4468 (fetch_traceframe_registers, traceframe_read_sdata)
4469 (traceframe_read_info, struct fast_tpoint_collect_status)
4470 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4471 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4472 (supply_fast_tracepoint_registers)
4473 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4474 (ipa_tdesc, claim_trampoline_space)
4475 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4476 (agent_mem_read, agent_get_trace_state_variable_value)
4477 (agent_set_trace_state_variable_value, agent_tsv_read)
4478 (agent_mem_read_string, get_raw_reg_func_addr)
4479 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4480 * tracepoint.h: ... this new file.
4481
4482 2013-09-05 Pedro Alves <palves@redhat.com>
4483
4484 * server.h (perror_with_name, error, fatal, warning, paddress)
4485 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4486 include it.
4487 * utils.h: New file.
4488
4489 2013-09-05 Pedro Alves <palves@redhat.com>
4490
4491 * server.h (remote_debug, noack_mode, transport_is_reliable)
4492 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4493 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4494 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4495 (write_enn, initialize_async_io, enable_async_io)
4496 (disable_async_io, check_remote_input_interrupt_request)
4497 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4498 (dead_thread_notify, prepare_resume_reply)
4499 (decode_address_to_semicolon, decode_address, decode_m_packet)
4500 (decode_M_packet, decode_X_packet, decode_xfer_write)
4501 (decode_search_memory_packet, unhexify, hexify)
4502 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4503 (look_up_one_symbol, relocate_instruction)
4504 (monitor_output): Move to remote-utils.h, and include it.
4505 * remote-utils.h: New file.
4506
4507 2013-09-05 Pedro Alves <palves@redhat.com>
4508
4509 * server.h (_): Delete.
4510
4511 2013-09-02 Pedro Alves <palves@redhat.com>
4512
4513 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4514 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4515 allocated.
4516 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4517
4518 2013-09-02 Pierre Muller <muller@sourceware.org>
4519
4520 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4521 or WriteProcessMemory complete successfully and handle
4522 ERROR_PARTIAL_COPY error.
4523
4524 2013-09-02 Pedro Alves <palves@redhat.com>
4525
4526 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4527 error instead of EIO.
4528
4529 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4530
4531 PR server/15604
4532 * linux-low.c: Include filestuff.h.
4533 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4534 * lynx-low.c: Include filestuff.h.
4535 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4536 * server.c: Include filestuff.h.
4537 (main): Call notice_open_fds.
4538 * spu-low.c: Include filestuff.h.
4539 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4540
4541 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4542
4543 * Makefile.in: Explain why ../target and ../nat are not
4544 listed as include file search paths.
4545 (linux-waitpid.o): New object file rule.
4546 * configure.srv (srv_native_linux_obj): New variable.
4547 Replace all occurrences of linux native object files with
4548 $srv_native_linux_obj.
4549 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4550 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4551 (linux_enable_event_reporting): Remove declaration.
4552 (my_waitpid): Moved to common/linux-waitpid.c.
4553 (linux_wait_for_event): Pass ptid when calling
4554 linux_enable_event_reporting.
4555 (linux_supports_tracefork_flag): Remove.
4556 (linux_enable_event_reporting): Likewise.
4557 (linux_tracefork_grandchild): Remove.
4558 (STACK_SIZE): Moved to common/linux-ptrace.c.
4559 (linux_tracefork_child): Remove.
4560 (linux_test_for_tracefork): Remove.
4561 (linux_look_up_symbols): Call linux_supports_traceclone.
4562 (initialize_low): Remove call to linux_test_for_tracefork.
4563 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4564 common/linux-ptrace.h.
4565 (PTRACE_TYPE_ARG4): Likewise.
4566 Include linux-ptrace.h.
4567
4568 2013-08-21 Pedro Alves <palves@redhat.com>
4569
4570 * config.in: Renegerate.
4571
4572 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4573
4574 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4575 (SFILES): Remove $(srcdir)/common/target-common.c and
4576 add $(srcdir)/target/waitstatus.c.
4577 (OBS): Remove target-common.o and add waitstatus.o.
4578 (server_h): Remove $(srcdir)/../common/target-common.h and
4579 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4580 and $(srcdir)/../target/waitstatus.h.
4581 (target-common.o): Remove.
4582 (waitstatus.o): New target object file.
4583 * target.h: Do not include target-common.h and
4584 include target/resume.h, target/wait.h and
4585 target/waitstatus.h.
4586
4587 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4588
4589 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4590 to PTRACE_TYPE_ARG3.
4591 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4592 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4593 PTRACE_TYPE_ARG4.
4594 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4595 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4596
4597 2013-07-27 Jie Zhang <jie@codesourcery.com>
4598 Daniel Jacobowitz <dan@codesourcery.com>
4599 Yao Qi <yao@codesourcery.com>
4600
4601 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4602 (mips-linux-watch.o): New rule.
4603 (mips_linux_watch_h): New variable.
4604 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4605 srv_tgtobj.
4606 * linux-mips-low.c: Include mips-linux-watch.h.
4607 (struct arch_process_info, struct arch_lwp_info): New.
4608 (update_watch_registers_callback): New function.
4609 (mips_linux_new_process, mips_linux_new_thread) New functions.
4610 (mips_linux_prepare_to_resume, mips_insert_point): New
4611 functions.
4612 (mips_remove_point, mips_stopped_by_watchpoint): New
4613 functions.
4614 (rsp_bp_type_to_target_hw_bp_type): New function.
4615 (mips_stopped_data_address): New function.
4616 (the_low_target): Add watchpoint support functions.
4617
4618 2013-07-27 Yao Qi <yao@codesourcery.com>
4619
4620 * i386-low.c: Include break-common.h.
4621 (enum target_hw_bp_type): Remove.
4622
4623 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4624
4625 * Makefile.in (SFILES): /common/target-common.c.
4626 (OBS): Add target-common.o.
4627 (server_h): Add $(srcdir)/../common/target-common.h.
4628 (target-common.o): New target.
4629 * server.c (queue_stop_reply_callback): Free
4630 status string after use.
4631 * target.c (target_waitstatus_to_string): Remove.
4632 * target.h: Include target-common.h.
4633 (resume_kind): Likewise.
4634 (target_waitkind): Likewise.
4635 (target_waitstatus): Likewise.
4636 (TARGET_WNOHANG): Likewise.
4637
4638 2013-07-04 Yao Qi <yao@codesourcery.com>
4639
4640 * Makefile.in (host_alias): Use @host_noncanonical@.
4641 (target_alias): Use @target_noncanonical@.
4642 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4643 ACX_NONCANONICAL_HOST.
4644 * configure: Regenerated.
4645
4646 Revert:
4647 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4648
4649 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4650 * configure: Rebuild.
4651 * Makefile.in (version_host, version_target): Get from configure.
4652 (version.c): Use $(version_host) and $(version_target).
4653
4654 2013-07-03 Pedro Alves <palves@redhat.com>
4655
4656 * Makefile.in (config.status): Depend on development.sh.
4657 * acinclude.m4: Include libmcheck.m4.
4658 * configure: Regenerate.
4659
4660 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4661
4662 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4663 attribute inside the parentheses.
4664 (winapi_DebugSetProcessKillOnExit): Ditto.
4665 (winapi_DebugBreakProcess): Ditto.
4666 (winapi_GenerateConsoleCtrlEvent): Ditto.
4667
4668 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4669
4670 * notif.h (notif_event): Add a dummy member to avoid compiler
4671 errors.
4672
4673 2013-07-01 Pedro Alves <palves@redhat.com>
4674
4675 * hostio.c (HOSTIO_PATH_MAX): Define.
4676 (require_filename, handle_open, handle_unlink, handle_readlink):
4677 Use it.
4678
4679 2013-07-01 Pedro Alves <palves@redhat.com>
4680
4681 * server.h: Include "pathmax.h".
4682 * linux-low.c: Don't include sys/param.h.
4683 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4684 MAXPATHLEN.
4685 * win32-low.c: Don't include sys/param.h.
4686 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4687
4688 2013-07-01 Pedro Alves <palves@redhat.com>
4689
4690 * event-loop.c: Don't check HAVE_UNISTD_H before including
4691 <unistd.h>.
4692 * gdbreplay.c: Likewise.
4693 * remote-utils.c: Likewise.
4694 * server.c: Likewise.
4695 * configure.ac: Don't check for unistd.h.
4696 * configure: Regenerate.
4697
4698 2013-06-28 Tom Tromey <tromey@redhat.com>
4699
4700 * Makefile.in (version.c): Use version.in, not
4701 common/version.in.
4702
4703 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4704
4705 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4706 * configure: Rebuild.
4707 * Makefile.in (version_host, version_target): Get from configure.
4708 (version.c): Use $(version_host) and $(version_target).
4709
4710 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4711
4712 Fix trace-status to output user name without trailing colon.
4713 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4714
4715 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4716
4717 Fix trace-status to output proper start-time and stop-time.
4718 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4719 output start time and stop time in hex as gdb expects.
4720
4721 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4722
4723 * tracepoint.c (build_traceframe_info_xml): Output trace state
4724 variables present in the trace buffer.
4725
4726 2013-06-24 Tom Tromey <tromey@redhat.com>
4727
4728 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4729 create-version.sh.
4730 (version.o): Remove.
4731 * gdbreplay.c: Include version.h.
4732 (version, host_name): Don't declare.
4733 * server.h: Include version.h.
4734 (version, host_name): Don't declare.
4735
4736 2013-06-12 Pedro Alves <palves@redhat.com>
4737
4738 * linux-x86-low.c (linux_is_elf64): Delete global.
4739 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4740 with local linux_pid_exe_is_elf_64_file use.
4741
4742 2013-06-11 Pedro Alves <palves@redhat.com>
4743
4744 * linux-low.c (regset_disabled, disable_regset): New functions.
4745 (regsets_fetch_inferior_registers)
4746 (regsets_store_inferior_registers): Use them.
4747 (initialize_regsets_info); Don't allocate the disabled_regsets
4748 array here.
4749 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4750 comment.
4751
4752 2013-06-11 Pedro Alves <palves@redhat.com>
4753
4754 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4755 xmalloc.
4756
4757 2013-06-11 Pedro Alves <palves@redhat.com>
4758
4759 * linux-x86-low.c (initialize_low_arch): Call
4760 init_registers_x32_avx_linux.
4761
4762 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4763
4764 Fix compatibility with Android Bionic.
4765 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4766 it is not empty.
4767
4768 2013-06-07 Pedro Alves <palves@redhat.com>
4769
4770 PR server/14823
4771 * Makefile.in (OBS): Add tdesc.o.
4772 (IPA_OBJS): Add tdesc-ipa.o.
4773 (tdesc-ipa.o): New rule.
4774 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4775 interface.
4776 * linux-low.c (new_inferior): Delete.
4777 (disabled_regsets, num_regsets): Delete.
4778 (linux_add_process): Adjust to set the new per-process
4779 new_inferior flag.
4780 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4781 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4782 was a stop. When calling arch_setup, switch the current inferior
4783 to the thread that got an event.
4784 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4785 (regsets_fetch_inferior_registers)
4786 (regsets_store_inferior_registers): New regsets_info parameter.
4787 Adjust to use it.
4788 (linux_register_in_regsets): New regs_info parameter. Adjust to
4789 use it.
4790 (register_addr, fetch_register, store_register): New usrregs_info
4791 parameter. Adjust to use it.
4792 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4793 parameter regs_info. Adjust to use it.
4794 (linux_fetch_registers): Get the current inferior's regs_info, and
4795 adjust to use it.
4796 (linux_store_registers): Ditto.
4797 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4798 (initialize_low): Don't initialize the target_regsets here. Call
4799 initialize_low_arch.
4800 * linux-low.h (target_regsets): Delete declaration.
4801 (struct regsets_info): New.
4802 (struct usrregs_info): New.
4803 (struct regs_info): New.
4804 (struct process_info_private) <new_inferior>: New field.
4805 (struct linux_target_ops): Delete the num_regs, regmap, and
4806 regset_bitmap fields. New field regs_info.
4807 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4808 * i387-fp.c (num_xmm_registers): Delete.
4809 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4810 calls to new interface.
4811 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4812 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4813 Infer the number of xmm registers from the regcache's target
4814 description.
4815 * i387-fp.h (num_xmm_registers): Delete.
4816 * inferiors.c (add_thread): Don't install the thread's regcache
4817 here.
4818 * proc-service.c (gregset_info): Fetch the current inferior's
4819 regs_info. Adjust to use it.
4820 * regcache.c: Include tdesc.h.
4821 (register_bytes, reg_defs, num_registers)
4822 (gdbserver_expedite_regs): Delete.
4823 (get_thread_regcache): If the thread doesn't have a regcache yet,
4824 create one, instead of aborting gdbserver.
4825 (regcache_invalidate_one): Rename to ...
4826 (regcache_invalidate_thread): ... this.
4827 (regcache_invalidate_one): New.
4828 (regcache_invalidate): Only invalidate registers of the current
4829 process.
4830 (init_register_cache): Add target_desc parameter, and use it.
4831 (new_register_cache): Ditto. Assert the target description has a
4832 non zero registers_size.
4833 (regcache_cpy): Add assertions. Adjust.
4834 (realloc_register_cache, set_register_cache): Delete.
4835 (registers_to_string, registers_from_string): Adjust.
4836 (find_register_by_name, find_regno, find_register_by_number)
4837 (register_cache_size): Add target_desc parameter, and use it.
4838 (free_register_cache_thread, free_register_cache_thread_one)
4839 (regcache_release, register_cache_size): New.
4840 (register_size): Add target_desc parameter, and use it.
4841 (register_data, supply_register, supply_register_zeroed)
4842 (supply_regblock, supply_register_by_name, collect_register)
4843 (collect_register_as_string, collect_register_by_name): Adjust.
4844 * regcache.h (struct target_desc): Forward declare.
4845 (struct regcache) <tdesc>: New field.
4846 (init_register_cache, new_register_cache): Add target_desc
4847 parameter.
4848 (regcache_invalidate_thread): Declare.
4849 (regcache_invalidate_one): Delete declaration.
4850 (regcache_release): Declare.
4851 (find_register_by_number, register_cache_size, register_size)
4852 (find_regno): Add target_desc parameter.
4853 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4854 declarations.
4855 * remote-utils.c: Include tdesc.h.
4856 (outreg, prepare_resume_reply): Adjust.
4857 * server.c: Include tdesc.h.
4858 (gdbserver_xmltarget): Delete declaration.
4859 (get_features_xml, process_serial_event): Adjust.
4860 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4861 declare.
4862 (struct process_info) <tdesc>: New field.
4863 (ipa_tdesc): Declare.
4864 * tdesc.c: New file.
4865 * tdesc.h: New file.
4866 * tracepoint.c: Include tdesc.h.
4867 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4868 (get_context_regcache): Adjust to pass ipa_tdesc down.
4869 (do_action_at_tracepoint): Adjust to get the register cache size
4870 from the context regcache's description.
4871 (traceframe_walk_blocks): Adjust to get the register cache size
4872 from the current trace frame's description.
4873 (traceframe_get_pc): Adjust to get current trace frame's
4874 description and pass it down.
4875 (gdb_collect): Adjust to get the register cache size from the
4876 IPA's description.
4877 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4878 (gdbserver_xmltarget): Delete.
4879 (initialize_low_tracepoint): Set the ipa's target description.
4880 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4881 (initialize_low_tracepoint): Set the ipa's target description.
4882 * linux-x86-low.c: Include tdesc.h.
4883 [__x86_64__] (is_64bit_tdesc): New.
4884 (ps_get_thread_area, x86_get_thread_area): Use it.
4885 (i386_cannot_store_register): Rename to ...
4886 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4887 (i386_cannot_fetch_register): Rename to ...
4888 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4889 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4890 to new interface.
4891 (target_regsets): Rename to ...
4892 (x86_regsets): ... this.
4893 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4894 interface.
4895 (x86_siginfo_fixup): Use is_64bit_tdesc.
4896 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4897 (tdesc_x32_avx_linux, tdesc_x32_linux)
4898 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4899 Declare.
4900 (x86_linux_update_xmltarget): Delete.
4901 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4902 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4903 (AMD64_LINUX_USER64_CS): New.
4904 (x86_linux_read_description): New, based on
4905 x86_linux_update_xmltarget.
4906 (same_process_callback): New.
4907 (x86_arch_setup_process_callback): New.
4908 (x86_linux_update_xmltarget): New.
4909 (x86_regsets_info): New.
4910 (amd64_linux_regs_info): New.
4911 (i386_linux_usrregs_info): New.
4912 (i386_linux_regs_info): New.
4913 (x86_linux_regs_info): New.
4914 (x86_arch_setup): Reimplement.
4915 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4916 (x86_emit_ops): Ditto.
4917 (the_low_target): Adjust. Install x86_linux_regs_info,
4918 x86_cannot_fetch_register, and x86_cannot_store_register.
4919 (initialize_low_arch): New.
4920 * linux-ia64-low.c (tdesc_ia64): Declare.
4921 (ia64_fetch_register): Adjust.
4922 (ia64_usrregs_info, regs_info): New globals.
4923 (ia64_regs_info): New function.
4924 (the_low_target): Adjust.
4925 (initialize_low_arch): New function.
4926 * linux-sparc-low.c (tdesc_sparc64): Declare.
4927 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4928 Adjust.
4929 (sparc_arch_setup): New function.
4930 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4931 (the_low_target): Adjust.
4932 (initialize_low_arch): New function.
4933 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4934 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4935 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4936 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4937 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4938 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4939 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4940 (tdesc_powerpc_isa205_vsx64l): Declare.
4941 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4942 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4943 (ppc_set_pc, ppc_get_hwcap): Adjust.
4944 (ppc_usrregs_info): Forward declare.
4945 (!__powerpc64__) ppc_regmap_adjusted: New global.
4946 (ppc_arch_setup): Adjust to the current process'es target
4947 description.
4948 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4949 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4950 (ppc_store_evrregset): Adjust.
4951 (target_regsets): Rename to ...
4952 (ppc_regsets): ... this, and make static.
4953 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4954 (ppc_regs_info): New function.
4955 (the_low_target): Adjust.
4956 (initialize_low_arch): New function.
4957 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4958 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4959 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4960 (tdesc_s390x_linux64v2): Declare.
4961 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4962 (s390_fill_gregset, s390_store_last_break): Adjust.
4963 (target_regsets): Rename to ...
4964 (s390_regsets): ... this, and make static.
4965 (s390_get_pc, s390_set_pc): Adjust.
4966 (s390_get_hwcap): New target_desc parameter, and use it.
4967 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4968 (s390_arch_setup): Adjust to set the current process'es target
4969 description. Don't adjust the regmap.
4970 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4971 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4972 (regs_info_3264): New globals.
4973 (s390_regs_info): New function.
4974 (the_low_target): Adjust.
4975 (initialize_low_arch): New function.
4976 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4977 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4978 [__mips64] (init_registers_mips_linux)
4979 (init_registers_mips_dsp_linux): Delete defines.
4980 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4981 (have_dsp): New global.
4982 (mips_read_description): New, based on mips_arch_setup.
4983 (mips_arch_setup): Reimplement.
4984 (get_usrregs_info): New function.
4985 (mips_cannot_fetch_register, mips_cannot_store_register)
4986 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4987 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4988 (target_regsets): Rename to ...
4989 (mips_regsets): ... this, and make static.
4990 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4991 (dsp_regs_info, regs_info): New globals.
4992 (mips_regs_info): New function.
4993 (the_low_target): Adjust.
4994 (initialize_low_arch): New function.
4995 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4996 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4997 Declare.
4998 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4999 (arm_read_description): New, with bits factored from
5000 arm_arch_setup.
5001 (arm_arch_setup): Reimplement.
5002 (target_regsets): Rename to ...
5003 (arm_regsets): ... this, and make static.
5004 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5005 (arm_regs_info): New function.
5006 (the_low_target): Adjust.
5007 (initialize_low_arch): New function.
5008 * linux-m68k-low.c (tdesc_m68k): Declare.
5009 (target_regsets): Rename to ...
5010 (m68k_regsets): ... this, and make static.
5011 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5012 (m68k_regs_info): New function.
5013 (m68k_arch_setup): New function.
5014 (the_low_target): Adjust.
5015 (initialize_low_arch): New function.
5016 * linux-sh-low.c (tdesc_sharch): Declare.
5017 (target_regsets): Rename to ...
5018 (sh_regsets): ... this, and make static.
5019 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5020 (sh_regs_info, sh_arch_setup): New functions.
5021 (the_low_target): Adjust.
5022 (initialize_low_arch): New function.
5023 * linux-bfin-low.c (tdesc_bfin): Declare.
5024 (bfin_arch_setup): New function.
5025 (bfin_usrregs_info, regs_info): New globals.
5026 (bfin_regs_info): New function.
5027 (the_low_target): Adjust.
5028 (initialize_low_arch): New function.
5029 * linux-cris-low.c (tdesc_cris): Declare.
5030 (cris_arch_setup): New function.
5031 (cris_usrregs_info, regs_info): New globals.
5032 (cris_regs_info): New function.
5033 (the_low_target): Adjust.
5034 (initialize_low_arch): New function.
5035 * linux-cris-low.c (tdesc_crisv32): Declare.
5036 (cris_arch_setup): New function.
5037 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5038 (cris_regs_info): New function.
5039 (the_low_target): Adjust.
5040 (initialize_low_arch): New function.
5041 * linux-m32r-low.c (tdesc_m32r): Declare.
5042 (m32r_arch_setup): New function.
5043 (m32r_usrregs_info, regs_info): New globals.
5044 (m32r_regs_info): Adjust.
5045 (initialize_low_arch): New function.
5046 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5047 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5048 (tic6x_usrregs_info): Forward declare.
5049 (tic6x_read_description): New function, based on ...
5050 (tic6x_arch_setup): ... this. Reimplement.
5051 (target_regsets): Rename to ...
5052 (tic6x_regsets): ... this, and make static.
5053 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5054 (tic6x_regs_info): New function.
5055 (the_low_target): Adjust.
5056 (initialize_low_arch): New function.
5057 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5058 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5059 (target_regsets): Rename to ...
5060 (xtensa_regsets): ... this, and make static.
5061 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5062 globals.
5063 (xtensa_arch_setup, xtensa_regs_info): New functions.
5064 (the_low_target): Adjust.
5065 (initialize_low_arch): New function.
5066 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5067 (nios2_arch_setup): Set the current process'es tdesc.
5068 (target_regsets): Rename to ...
5069 (nios2_regsets): ... this.
5070 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5071 (nios2_regs_info): New function.
5072 (the_low_target): Adjust.
5073 (initialize_low_arch): New function.
5074 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5075 (aarch64_arch_setup): Set the current process'es tdesc.
5076 (target_regsets): Rename to ...
5077 (aarch64_regsets): ... this.
5078 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5079 (aarch64_regs_info): New function.
5080 (the_low_target): Adjust.
5081 (initialize_low_arch): New function.
5082 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5083 globals.
5084 (target_regsets): Rename to ...
5085 (tile_regsets): ... this.
5086 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5087 (tile_regs_info): New function.
5088 (tile_arch_setup): Set the current process'es tdesc.
5089 (the_low_target): Adjust.
5090 (initialize_low_arch): New function.
5091 * spu-low.c (tdesc_spu): Declare.
5092 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5093 * win32-arm-low.c (tdesc_arm): Declare.
5094 (arm_arch_setup): New function.
5095 (the_low_target): Install arm_arch_setup instead of
5096 init_registers_arm.
5097 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5098 (init_windows_x86): Rename to ...
5099 (i386_arch_setup): ... this. Set `win32_tdesc'.
5100 (the_low_target): Adjust.
5101 * win32-low.c (win32_tdesc): New global.
5102 (child_add_thread): Don't create the thread cache here.
5103 (do_initial_child_stuff): Set the new process'es tdesc.
5104 * win32-low.h (struct target_desc): Forward declare.
5105 (win32_tdesc): Declare.
5106 * lynx-i386-low.c (tdesc_i386): Declare global.
5107 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5108 * lynx-low.c (lynx_tdesc): New global.
5109 (lynx_add_process): Set the new process'es tdesc.
5110 * lynx-low.h (struct target_desc): Forward declare.
5111 (lynx_tdesc): Declare global.
5112 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5113 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5114 * nto-low.c (nto_tdesc): New global.
5115 (do_attach): Set the new process'es tdesc.
5116 * nto-low.h (struct target_desc): Forward declare.
5117 (nto_tdesc): Declare.
5118 * nto-x86-low.c (tdesc_i386): Declare.
5119 (nto_x86_arch_setup): Set `nto_tdesc'.
5120
5121 2013-06-04 Gary Benson <gbenson@redhat.com>
5122
5123 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5124 to qSupported response when appropriate.
5125 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5126 with nonzero-length annex.
5127 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5128 arguments supplied in annex.
5129
5130 2013-05-31 Doug Evans <dje@google.com>
5131
5132 PR server/15594
5133 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5134 64 bits in 64-cross-32 environment.
5135
5136 2013-05-28 Pedro Alves <palves@redhat.com>
5137
5138 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5139 (aarch64-without-fpu.c): Delete rule.
5140 * configure.srv (aarch64*-*-linux*): Remove references to
5141 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5142 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5143 declaration.
5144
5145 2013-05-24 Pedro Alves <palves@redhat.com>
5146
5147 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5148 instead of strchr/decode_address. Error if the range isn't split
5149 with a ','. Don't assume there's be a ':' in the action.
5150
5151 2013-05-23 Yao Qi <yao@codesourcery.com>
5152 Pedro Alves <palves@redhat.com>
5153
5154 * linux-low.c (lwp_in_step_range): New function.
5155 (linux_wait_1): If the thread was range stepping and stopped
5156 outside the stepping range, report the stop to GDB. Otherwise,
5157 continue stepping. Add range stepping debug output.
5158 (linux_set_resume_request): Copy the step range from the resume
5159 request to the lwp.
5160 (linux_supports_range_stepping): New.
5161 (linux_target_ops) <supports_range_stepping>: Set to
5162 linux_supports_range_stepping.
5163 * linux-low.h (struct linux_target_ops)
5164 <supports_range_stepping>: New field.
5165 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5166 * linux-x86-low.c (x86_supports_range_stepping): New.
5167 (the_low_target) <supports_range_stepping>: Set to
5168 x86_supports_range_stepping.
5169 * server.c (handle_v_cont): Handle 'r' action.
5170 (handle_v_requests): Append ";r" if the target supports range
5171 stepping.
5172 * target.h (struct thread_resume) <step_range_start,
5173 step_range_end>: New fields.
5174 (struct target_ops) <supports_range_stepping>:
5175 New field.
5176 (target_supports_range_stepping): New macro.
5177
5178 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5179
5180 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5181 confusion in comment.
5182
5183 2013-05-17 Joel Brobecker <brobecker@adacore.com>
5184
5185 * lynx-low.c (struct process_info_private): New type.
5186 (lynx_add_process): New function.
5187 (lynx_create_inferior, lynx_attach): Replace calls to
5188 add_process by calls to lynx_add_process.
5189 (lynx_resume): If PTID is null, then try using
5190 current_process()->private->last_wait_event_ptid.
5191 Add comments.
5192 (lynx_clear_inferiors): Delete. The contents of that function
5193 has been inlined in lynx_mourn;
5194 (lynx_wait_1): Save the ptid in the process's private data.
5195 (lynx_mourn): Free the process' private data. Replace call
5196 to lynx_clear_inferiors by call to clear_inferiors.
5197
5198 2013-05-17 Yao Qi <yao@codesourcery.com>
5199
5200 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5201 the right place.
5202
5203 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
5204
5205 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5206 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5207 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5208 PT_TEXT_END_ADDR guards. Update comments.
5209 (linux_target_op) <read_offsets>: Conditionally define to
5210 linux_read_offsets if the target is UCLIBC and if it defines
5211 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5212
5213 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5214 Andrew Jenner <andrew@codesourcery.com>
5215
5216 * Makefile.in (SFILES): Add linux-nios2-low.c.
5217 (clean): Add action to delete nios2-linux.c.
5218 (nios2-linux.c): New rule.
5219 * configure.srv: Add nios2*-*-linux*.
5220 * linux-nios2-low.c: New.
5221
5222 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5223
5224 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5225
5226 2013-04-25 Hui Zhu <hui@codesourcery.com>
5227
5228 PR gdb/15186
5229 * ax.c (ax_printf): Add fflush.
5230
5231 2013-04-22 Tom Tromey <tromey@redhat.com>
5232
5233 * Makefile.in (SFILES): Add filestuff.c.
5234 (OBS): Add filestuff.o.
5235 (filestuff.o): New target.
5236 * config.in, configure: Rebuild.
5237 * configure.ac: Check for fdwalk, pipe2.
5238
5239 2013-04-17 Pedro Alves <palves@redhat.com>
5240
5241 * configure.ac (USE_THREAD_DB): Delete variable.
5242 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5243 Don't AC_SUBST USE_THREAD_DB.
5244 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5245 * config.in, configure: Regenerate.
5246
5247 2013-04-16 Pedro Alves <palves@redhat.com>
5248
5249 * linux-low.h (struct lwp_info) <thread_known>: Move under
5250 the USE_THREAD_DB #ifdef.
5251
5252 2013-04-16 Pedro Alves <palves@redhat.com>
5253
5254 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5255 (linux-low.o): Delete rule.
5256 * linux-low.h: Always include "gdb_thread_db.h" instead of
5257 conditionally including thread_db.h.
5258 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5259 HAVE_THREAD_DB_H.
5260
5261 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5262
5263 * Makefile.in (install-only): Fix make install regression.
5264
5265 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5266
5267 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5268 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5269 installation.
5270 * gdbserver.1: Remove.
5271
5272 2013-03-22 Pedro Alves <palves@redhat.com>
5273
5274 * linux-low.c (handle_extended_wait): Don't call
5275 linux_enable_event_reporting.
5276
5277 2013-03-15 Tony Theodore <tonyt@logyst.com>
5278
5279 PR build/9098:
5280 * Makefile.in (SHELL): Use @SHELL@.
5281
5282 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5283
5284 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5285 compiler warning.
5286
5287 2013-03-13 Joel Brobecker <brobecker@adacore.com>
5288
5289 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5290 Remove extraneous NULL element.
5291
5292 2013-03-13 Yao Qi <yao@codesourcery.com>
5293
5294 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5295 'V' block in trace frame.
5296
5297 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5298
5299 * target.h (struct target_ops): Add btrace ops.
5300 (target_supports_btrace): New macro.
5301 (target_enable_btrace): New macro.
5302 (target_disable_btrace): New macro.
5303 (target_read_btrace): New macro.
5304 * gdbthread.h (struct thread_info): Add btrace field.
5305 * server.c: Include btrace-common.h.
5306 (handle_btrace_general_set): New function.
5307 (handle_btrace_enable): New function.
5308 (handle_btrace_disable): New function.
5309 (handle_general_set): Call handle_btrace_general_set.
5310 (handle_qxfer_btrace): New function.
5311 (struct qxfer qxfer_packets[]): Add btrace entry.
5312 * inferiors.c (remove_thread): Disable btrace.
5313 * linux-low: Include linux-btrace.h.
5314 (linux_low_enable_btrace): New function.
5315 (linux_low_read_btrace): New function.
5316 (linux_target_ops): Add btrace ops.
5317 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5318 Add srv_linux_btrace=yes.
5319 (x86_64-*-linux*): Add linux-btrace.o.
5320 Add srv_linux_btrace=yes.
5321 * configure.ac: Define HAVE_LINUX_BTRACE.
5322 * config.in: Regenerated.
5323 * configure: Regenerated.
5324
5325 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5326
5327 * server.c (handle_qxfer): Preserve error message if -3 is
5328 returned.
5329 (qxfer): Document the -3 return value.
5330
5331 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5332
5333 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5334 (linux_btrace_h): New variable.
5335 (linux-btrace.o): New rule.
5336
5337 2013-03-08 Stan Shebs <stan@codesourcery.com>
5338 Hafiz Abid Qadeer <abidh@codesourcery.com>
5339
5340 * tracepoint.c (trace_buffer_size): New global.
5341 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5342 (init_trace_buffer): Change to one-argument function. Allocate
5343 trace buffer memory.
5344 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5345 handle QTBuffer:size packet.
5346 (cmd_bigqtbuffer_size): New function.
5347 (initialize_tracepoint): Call init_trace_buffer with
5348 DEFAULT_TRACE_BUFFER_SIZE.
5349 * server.c (handle_query): Add QTBuffer:size in the
5350 supported packets.
5351
5352 2013-03-07 Yao Qi <yao@codesourcery.com>
5353
5354 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5355 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5356 of -1.
5357 (cmd_qtsp): Adjust condition. Do post increment.
5358 Set cur_action and cur_step_action back to 0.
5359
5360 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5361
5362 PR server/15236
5363 * linux-low.c (linux_write_memory): Return early success if LEN is
5364 zero.
5365
5366 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
5367
5368 * configure.srv: Add x86_64-*-cygwin* as target.
5369
5370 2013-02-28 Tom Tromey <tromey@redhat.com>
5371
5372 * configure.ac: Invoke AC_SYS_LARGEFILE.
5373 * configure, config.in: Rebuild.
5374
5375 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5376
5377 * win32-low.c: Throughout, fix format strings and casts of
5378 printf-like functions to avoid type related warnings on all
5379 platforms.
5380 (get_child_debug_event): Print dwDebugEventCode as hex since
5381 that's how it's usually documented.
5382
5383 2013-02-28 Yao Qi <yao@codesourcery.com>
5384
5385 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5386 pulongest.
5387
5388 2013-02-27 Jiong Wang <jiwang@tilera.com>
5389
5390 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5391 (reg-tilegx32.c): New rule.
5392 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5393 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5394 different register info initializer according to elf class.
5395 (init_registers_tilgx32): New function. The tilegx32 register info
5396 initializer.
5397 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5398 (tile_store_gregset): Likewise.
5399
5400 2013-02-27 Yao Qi <yao@codesourcery.com>
5401
5402 * server.c (process_point_options): Print debug message when
5403 debug_threads is true.
5404
5405 2013-02-26 Yao Qi <yao@codesourcery.com>
5406
5407 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5408
5409 2013-02-19 Pedro Alves <palves@redhat.com>
5410 Kai Tietz <ktietz@redhat.com>
5411
5412 PR gdb/15161
5413
5414 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5415 instead of strtoul to extract address from packet.
5416 (process_serial_event) <'z'>: Likewise.
5417
5418 2013-02-18 Yao Qi <yao@codesourcery.com>
5419
5420 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5421
5422 2013-02-14 Pedro Alves <palves@redhat.com>
5423
5424 Plug memory leak.
5425
5426 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5427 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5428
5429 2013-02-14 Pedro Alves <palves@redhat.com>
5430
5431 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5432
5433 2013-02-14 Pedro Alves <palves@redhat.com>
5434
5435 * tracepoint.c (save_string): Delete.
5436 (add_tracepoint_action): Use savestring instead of save_string.
5437
5438 2013-02-12 Pedro Alves <palves@redhat.com>
5439
5440 * linux-xtensa-low.c: Ditto.
5441 * xtensa-xtregs.c: Ditto.
5442
5443 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5444
5445 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5446 thread_db.
5447
5448 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5449
5450 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5451 aarch64_num_wp_regs and aarch64_num_bp_regs to
5452 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5453
5454 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5455
5456 * linux-aarch64-low.c (ps_get_thread_area): Replace
5457 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5458
5459 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5460 Marcus Shawcroft <marcus.shawcroft@arm.com>
5461 Nigel Stephens <nigel.stephens@arm.com>
5462 Yufeng Zhang <yufeng.zhang@arm.com>
5463
5464 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5465 (aarch64.c, aarch64-without-fpu.c): New targets.
5466 * configure.srv (aarch64*-*-linux*): New.
5467 * linux-aarch64-low.c: New file.
5468
5469 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5470
5471 * linux-low.c (handle_extended_wait, linux_create_inferior)
5472 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5473 (dequeue_one_deferred_signal, linux_resume_one_thread)
5474 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5475 (linux_tracefork_grandchild, linux_test_for_tracefork)
5476 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5477 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5478 where the argument is 0.
5479
5480 2013-01-25 Yao Qi <yao@codesourcery.com>
5481
5482 * event-loop.c: Include "queue.h".
5483 (gdb_event_p): New typedef.
5484 (struct gdb_event) <next_event>: Remove.
5485 (event_queue): Change to QUEUE(gdb_event_p).
5486 (async_queue_event): Remove.
5487 (gdb_event_xfree): New.
5488 (initialize_event_loop): New.
5489 (process_event): Use API from QUEUE.
5490 (wait_for_event): Likewise.
5491 * server.c (main): Call initialize_event_loop.
5492 * server.h (initialize_event_loop): Declare.
5493
5494 2013-01-18 Yao Qi <yao@codesourcery.com>
5495
5496 * ax.h (struct eval_agent_expr_context): New.
5497 (gdb_eval_agent_expr): Update declaration.
5498 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5499 TFRAME. Add new argument CTX.
5500 * server.h (struct eval_agent_expr_context): Declare.
5501 (agent_mem_read, agent_tsv_read): Update declaration.
5502 (agent_mem_read_string): Likewise.
5503 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5504 (add_traceframe_block): Add new argument TPOINT.
5505 Increase TPOINT->traceframe_usage.
5506 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5507 eval_tracepoint_agent_expr.
5508 (condition_true_at_tracepoint): Likewise.
5509 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5510 (agent_mem_read_string, agent_tsv_read): Likewise.
5511
5512 2013-01-16 Yao Qi <yao@codesourcery.com>
5513
5514 * linux-low.c (linux_resume_one_lwp): Don't check
5515 'lwp->bp_reinsert != 0'.
5516
5517 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5518 Pedro Alves <palves@redhat.com>
5519
5520 * lynx-low.c (ptrace_request_to_str): Define a temporary
5521 macro and use it to simplify this function's implementation.
5522
5523 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5524
5525 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5526 sets errno.
5527
5528 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5529
5530 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5531
5532 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5533
5534 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5535
5536 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5537
5538 * lynx-low.c (lynx_resume): Use the resume_info parameter
5539 to determine the ptid for the lynx_ptrace call, unless
5540 it is equal to minus_one_ptid, in which case we use the
5541 ptid of the current_inferior.
5542 (lynx_wait_1): After having received a thread create/exit
5543 event, resume the inferior's execution using the signaling
5544 thread's ptid, rather than the old ptid.
5545
5546 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5547
5548 * lynx-low.c (lynx_resume): Delete variable ret.
5549
5550 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5551
5552 * gdbreplay.c (gdbreplay_version): Update copyright year.
5553 * server.c (gdbserver_version): Likewise.
5554
5555 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5556
5557 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5558 new thread.
5559
5560 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5561
5562 * lynx-low.c (ptrace_request_to_str): Add handling for
5563 PTRACE_GETTRACESIG.
5564
5565 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5566
5567 * lynx-low.c (lynx_attach): Delete variable new_process.
5568
5569 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5570
5571 * lynx-low.c (lynx_create_inferior): Delete variable
5572 new_process.
5573
5574 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5575
5576 * lynx-low.c (ptrace_request_to_str): Do not handle
5577 PTRACE_GETTHREADLIST if this macro does not exist.
5578
5579 2012-12-15 Yao Qi <yao@codesourcery.com>
5580
5581 * Makefile.in (OBS): Add notif.o.
5582 * notif.c, notif.h: New.
5583 * server.c: Include "notif.h".
5584 (struct vstop_notif) <next>: Remove.
5585 <base>: New field.
5586 (queue_stop_reply): Update.
5587 (push_event, send_next_stop_reply): Remove.
5588 (discard_queued_stop_replies): Update.
5589 (notif_stop): New variable.
5590 (handle_v_stopped): Remove.
5591 (handle_v_requests): Don't call handle_v_stopped. Call
5592 handle_ack_notif instead.
5593 (queue_stop_reply_callback): Call notif_event_enque instead
5594 of queue_stop_reply.
5595 (handle_status): Don't call send_next_stop_reply, call
5596 notif_write_event instead.
5597 (kill_inferior_callback): Likewise.
5598 (detach_or_kill_inferior_callback): Likewise.
5599 (main): Call initialize_notif.
5600 (process_serial_event): Call QUEUE_is_empty.
5601 (handle_target_event): Call notif_push instead of push event.
5602 * server.h (push_event): Remove declaration.
5603
5604 2012-12-10 Tom Tromey <tromey@redhat.com>
5605
5606 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5607 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5608 macros.
5609 (.c.o): Rewrite.
5610 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5611 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5612 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5613 (amd64-linux-ipa.o, ax.o): Rewrite.
5614 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5615 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5616 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5617 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5618 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5619 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5620 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5621 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5622 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5623 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5624 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5625 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5626 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5627 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5628 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5629 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5630 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5631 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5632 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5633 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5634 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5635 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5636 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5637 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5638 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5639 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5640 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5641 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5642 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5643 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5644 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5645 (reg-tilegx.o): Remove.
5646 (all_object_files): New macro.
5647 Include .deps files.
5648 * aclocal.m4, configure: Rebuild.
5649 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5650 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5651 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5652
5653 2012-12-05 Tom Tromey <tromey@redhat.com>
5654
5655 PR gdb/14917:
5656 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5657
5658 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5659
5660 * configure.ac: Check for linux/perf_event.h.
5661 * config.in: Regenerated.
5662 * configure: Regenerated.
5663
5664 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5665
5666 * hostio.c (handle_readlink): Decrease buffer size
5667 parameter passed to readlink by one byte.
5668
5669 2012-11-26 Yao Qi <yao@codesourcery.com>
5670
5671 * configure.ac (build_warnings): Append '-Wempty-body'.
5672 * configure: Regenerated.
5673 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5674 body.
5675
5676 2012-11-15 Pierre Muller <muller@sourceware.org>
5677
5678 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5679 * config.in: Regenerate.
5680 * configure: Regenerate.
5681 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5682 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5683 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5684 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5685 header.
5686 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5687 instead of <sys/wait.h> header.
5688 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5689
5690 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5691
5692 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5693 (various make rules): Remove -DGDBSERVER
5694
5695 2012-11-09 Yao Qi <yao@codesourcery.com>
5696
5697 * spu-low.c (current_ptid): Move it to ..
5698 * gdbthread.h: ... here. New.
5699 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5700 * server.c (myresume, process_serial_event): Likewise.
5701 * thread-db.c (thread_db_find_new_threads): Likewise.
5702 * tracepoint.c (run_inferior_command): Likewise.
5703
5704 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5705
5706 * server.c (handle_search_memory_1): Include access length in
5707 warning message.
5708
5709 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5710
5711 * linux-crisv32-low.c: Fix compile errors.
5712
5713 2012-09-04 Yao Qi <yao@codesourcery.com>
5714
5715 * tracepoint.c (cmd_qtsv): Adjust debug message.
5716 Don't check CUR_TPOINT.
5717
5718 2012-08-28 Yao Qi <yao@codesourcery.com>
5719
5720 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5721 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5722 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5723 Remove declarations of xmalloc, xreallloc, xstrdup and
5724 freeargv.
5725 * Makefile.in (libiberty_h): New.
5726 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5727 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5728
5729 2012-08-23 Yao Qi <yao@codesourcery.com>
5730
5731 * server.h: Remove declaration of 'xsnprintf'.
5732
5733 2012-08-22 Keith Seitz <keiths@redhat.com>
5734
5735 * server.h: Include build-gnulib-gbserver/config.h.
5736 * gdbreplay.c: Likewise.
5737
5738 2012-08-08 Doug Evans <dje@google.com>
5739
5740 * Makefile.in (SFILES): Add gdb_vecs.c.
5741 (OBS): Add gdb_vecs.o.
5742 (gdb_vecs_h, host_defs_h): New variables.
5743 (thread-db.o): Add $(gdb_vecs_h) dependency.
5744 (gdb_vecs.o): New rule.
5745 * thread-db.c: #include "gdb_vecs.h".
5746 (thread_db_load_search): Use a vector to iterate over path elements.
5747 Handle text appearing after "$pdir".
5748
5749 * configure.ac: Add check for strstr.
5750 * config.in: Regenerate.
5751 * configure: Regenerate.
5752
5753 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5754
5755 * hostio.c (handle_pread): If pread fails, fall back to attempting
5756 lseek/read.
5757 (handle_pwrite): Likewise for pwrite.
5758
5759 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5760
5761 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5762 between unsupported TYPE and unimplementable ADDR/LEN combination.
5763 (arm_insert_point): Act on new return value.
5764
5765 2012-07-31 Pedro Alves <palves@redhat.com>
5766
5767 * server.c (process_point_options): Only skip tokens if we find
5768 one that is unrecognized. Don't treat 'X' specially while
5769 skipping unrecognized tokens.
5770
5771 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5772
5773 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5774 to 4-byte-align HW breakpoint addresses for Thumb.
5775
5776 2012-07-27 Yao Qi <yao@codesourcery.com>
5777
5778 PR remote/14161.
5779
5780 * server.h: Declare gdb_agent_about_to_close.
5781 * target.c (kill_inferior): Include "agent.h".
5782 New. Send command 'kill'.
5783 * target.h (kill_inferior): Removed macro.
5784 * tracepoint.c (gdb_agent_about_to_close): New.
5785 (gdb_agent_helper_thread): Handle command 'close'.
5786 Wait endlessly until the inferior stops.
5787 Install gdb_agent_remove_socket to atexit hook.
5788 (agent_socket_name): New static variable.
5789 (gdb_agent_socket_init): Replace local variable 'name' with
5790 'agent_socket_name'.
5791 (gdb_agent_remove_socket): New.
5792
5793 2012-07-27 Yao Qi <yao@codesourcery.com>
5794
5795 * server.c (process_point_options): Stop at 'X' when parsing.
5796
5797 2012-07-19 Michael Eager <eager@eagercon.com>
5798
5799 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5800 to hw_execute.
5801 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5802 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5803 hardware breakpoint.
5804
5805 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5806
5807 * gdbserver/linux-low.c (initialize_low): Call
5808 linux_ptrace_init_warnings.
5809
5810 2012-07-02 Doug Evans <dje@google.com>
5811
5812 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5813 pointer to int.
5814
5815 2012-07-02 Stan Shebs <stan@codesourcery.com>
5816
5817 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5818 (ax.o): Add it to build rule.
5819 (ax-ipa.o): Ditto.
5820 (OBS): Add format.o.
5821 (IPA_OBS): Add format.o.
5822 * server.c (handle_query): Claim support for breakpoint commands.
5823 (process_point_options): Add command case.
5824 (process_serial_event): Leave running if there are printfs in
5825 effect.
5826 * mem-break.h (any_persistent_commands): Declare.
5827 (add_breakpoint_commands): Declare.
5828 (gdb_no_commands_at_breakpoint): Declare.
5829 (run_breakpoint_commands): Declare.
5830 * mem-break.c (struct point_command_list): New struct.
5831 (struct breakpoint): New field command_list.
5832 (any_persistent_commands): New function.
5833 (add_commands_to_breakpoint): New function.
5834 (add_breakpoint_commands): New function.
5835 (gdb_no_commands_at_breakpoint): New function.
5836 (run_breakpoint_commands): New function.
5837 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5838 locally.
5839 * ax.c: Include format.h.
5840 (ax_printf): New function.
5841 (gdb_eval_agent_expr): Add printf opcode.
5842
5843 2012-06-13 Yao Qi <yao@codesourcery.com>
5844
5845 * server.c (start_inferior): Remove duplicated writes to fields
5846 'last_resume_kind' and 'last_status' of 'current_inferior'.
5847
5848 2012-06-12 Yao Qi <yao@codesourcery.com>
5849 Pedro Alves <palves@redhat.com>
5850
5851 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5852 comment.
5853 * server.c (handle_v_cont): Extend comment.
5854
5855 2012-06-11 Yao Qi <yao@codesourcery.com>
5856
5857 * linux-low.c (linux_attach): Add 'static'.
5858
5859 2012-06-06 Yao Qi <yao@codesourcery.com>
5860
5861 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5862
5863 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5864
5865 Fix gcc -flto compilation warning.
5866 * server.c (main): Make variable multi_mode and attach volatile.
5867
5868 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5869
5870 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5871 if the platform doesn't know about it.
5872
5873 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5874
5875 * Makefile.in (SFILES): Add linux-tile-low.c.
5876 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5877 * configure.srv: Handle tilegx-*-linux*.
5878 * linux-tile-low.c: New file.
5879
5880 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5881
5882 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5883
5884 2012-05-24 Pedro Alves <palves@redhat.com>
5885
5886 PR gdb/7205
5887
5888 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5889
5890 2012-05-24 Pedro Alves <palves@redhat.com>
5891
5892 PR gdb/7205
5893
5894 Replace target_signal with gdb_signal throughout.
5895
5896 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5897
5898 * linux-low.c (linux_store_registers): Avoid the copying sequence
5899 when no data has been retrieved by ptrace.
5900
5901 2012-05-22 Will Deacon <will.deacon@arm.com>
5902
5903 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5904 Include asm/ptrace.h.
5905 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5906 already defined.
5907
5908 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5909
5910 * linux-low.c (linux_store_registers): Don't re-retrieve data
5911 with ptrace that has already been obtained from /proc. Always
5912 copy any data retrieved with ptrace to the buffer supplied.
5913
5914 2012-05-11 Yao Qi <yao@codesourcery.com>
5915 Pedro Alves <palves@redhat.com>
5916
5917 * linux-low.c (enum stopping_threads_kind): New.
5918 (stopping_threads): Change type to `enum stopping_threads_kind'.
5919 (handle_extended_wait): If stopping and suspending threads, leave
5920 the new_lwp suspended too.
5921 (linux_wait_for_event): Adjust.
5922 (stop_all_lwps): Set `stopping_threads' to
5923 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5924 whether we're suspending threads or just stopping them. Assert no
5925 recursion happens.
5926
5927 2012-04-29 Yao Qi <yao@codesourcery.com>
5928
5929 * server.h: Move some code to ...
5930 * gdbthread.h: ... here. New.
5931 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5932 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5933 (nto-low.o, win32-low.o): Likewise.
5934 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5935 * regcache.c, remote-utils.c, server.c: Likewise.
5936 * target.c, tracepoint.c, win32-low.c: Likewise.
5937
5938 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5939
5940 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5941 (PTRACE_ARG4_TYPE): Likewise.
5942 (PTRACE_XFER_TYPE): Likewise.
5943 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5944 ptrace to PTRACE_ARG3_TYPE.
5945 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5946 (PTRACE_ARG4_TYPE): Likewise.
5947 (PTRACE_XFER_TYPE): Likewise.
5948 (linux_detach_one_lwp): Cast fourth argument of
5949 ptrace to long then PTRACE_ARG4_TYPE.
5950 (regsets_fetch_inferior_registers): Cast third argument of
5951 ptrace to long then PTRACE_ARG3_TYPE.
5952 (regsets_store_inferior_registers): Likewise.
5953
5954 2012-04-20 Pedro Alves <palves@redhat.com>
5955
5956 * configure: Regenerate.
5957
5958 2012-04-19 Pedro Alves <palves@redhat.com>
5959
5960 * Makefile.in (GNULIB_BUILDDIR): New.
5961 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5962 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5963 (all, install-only, uninstall, clean-info, all-lib, clean): No
5964 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5965 (maintainer-clean realclean distclean): Use subdir_do.
5966 (subdir_do): New.
5967 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5968 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5969 * acinclude.m4: Include acx_configure_dir.m4.
5970 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5971 calls. Call AC_PROG_RANLIB. Configure gnulib using
5972 ACX_CONFIGURE_DIR.
5973 (GNULIB): New.
5974 (GNULIB_STDINT_H): Adjust.
5975 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5976 * gdbreplay.c: Include build-gnulib/config.h.
5977 * server.h: Likewise.
5978 * aclocal.m4: Regenerate.
5979 * config.in: Regenerate.
5980 * configure: Regenerate.
5981
5982 2012-04-19 Pedro Alves <palves@redhat.com>
5983
5984 * Makefile.in (LIBGNU, INCGNU): Adjust.
5985 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5986 (all, install-only, uninstall, clean-info, all-lib, clean)
5987 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5988 * configure.ac: Adjust AC_OUTPUT output.
5989 * aclocal.m4: Regenerate.
5990 * configure: Regenerate.
5991
5992 2012-04-19 Pedro Alves <palves@redhat.com>
5993
5994 * Makefile.in (generated_files): New.
5995 (server_h): Remove the explicit dependency on config.h, and depend
5996 on $generated_files.
5997
5998 2012-04-19 Pedro Alves <palves@redhat.com>
5999
6000 * Makefile.in (INCGNU): Add -Ignulib.
6001
6002 2012-04-19 Pedro Alves <palves@redhat.com>
6003
6004 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6005 (INCGNU): ... this, and spell out -I here.
6006 (GNULIB_LIB): Rename to ...
6007 (LIBGNU): ... this.
6008 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6009
6010 2012-04-19 Pedro Alves <palves@redhat.com>
6011
6012 * config.in: Regenerate.
6013
6014 2012-04-19 Pedro Alves <palves@redhat.com>
6015
6016 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6017 * server.h (memmem): Remove declaration.
6018 * config.in: Regenerate.
6019 * configure: Regenerate.
6020
6021 2012-04-19 Yao Qi <yao@codesourcery.com>
6022
6023 * Makefile.in (SFILES): Add common/vec.c.
6024 (OBS): Add vec.o.
6025 (vec.o): New rule.
6026
6027 2012-04-19 Yao Qi <yao@codesourcery.com>
6028
6029 * remote-utils.c (prepare_resume_reply): Replace with macro
6030 target_core_of_thread.
6031 * server.c (handle_qxfer_threads_proper): Likewise.
6032 * target.h (traget_core_of_thread): New macro.
6033
6034 2012-04-18 Pedro Alves <palves@redhat.com>
6035
6036 * aclocal.m4: Regenerate.
6037 * configure: Regenerate.
6038
6039 2012-04-16 Yao Qi <yao@codesourcery.com>
6040
6041 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6042 duplicated on address.
6043
6044 2012-04-16 Yao Qi <yao@codesourcery.com>
6045
6046 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6047 (struct tracepoint_action_ops) <send>: New field.
6048 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6049 (agent_expr_send, x_tracepoint_action_send): New.
6050 (l_tracepoint_action_send): New.
6051 (cmd_qtdp): Download and install tracepoint
6052 according to `use_agent'.
6053 (run_inferior_command): Add one more parameter `len'.
6054 Update callers.
6055 (tracepoint_send_agent): New.
6056 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6057
6058 2012-04-16 Yao Qi <yao@codesourcery.com>
6059
6060 * tracepoint.c (download_tracepoints): Moved to ...
6061 (cmd_qtstart): ... here.
6062
6063 2012-04-14 Yao Qi <yao@codesourcery.com>
6064
6065 * tracepoint.c: Include inttypes.h.
6066 (struct collect_memory_action): Use sized types.
6067 (struct tracepoint): Likewise.
6068 (cmd_qtdp, stop_tracing): Update print specifiers.
6069 (cmd_qtp, response_tracepoint): Likewise.
6070 (collect_data_at_tracepoint): Likewise.
6071 (collect_data_at_step): Likewise.
6072
6073 2012-04-14 Yao Qi <yao@codesourcery.com>
6074
6075 Import gnulib module inttypes.
6076 * aclocal.m4, config.in, configure: Regenerated.
6077
6078 2012-04-14 Yao Qi <yao@codesourcery.com>
6079
6080 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6081 Makefile and config.status at last.
6082
6083 2012-04-13 Yao Qi <yao@codesourcery.com>
6084
6085 * tracepoint.c: Include stdint.h unconditionally.
6086
6087 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6088
6089 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6090 on BFD_HAVE_SYS_PROCFS_TYPE.
6091 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6092 * configure: Regenerate.
6093 * config.in: Likewise.
6094
6095 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6096
6097 * Makefile.in (clean): Also remove x32.c x32-linux.c
6098 x32-avx.c x32-avx-linux.c.
6099 (x32.o): New target.
6100 (x32.c): Likewise.
6101 (x32-linux.o): Likewise.
6102 (x32-linux.c): Likewise.
6103 (x32-avx.o): Likewise.
6104 (x32-avx.c): Likewise.
6105 (x32-avx-linux.o): Likewise.
6106 (x32-avx-linux.c): Likewise.
6107
6108 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6109 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6110 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6111 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6112 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6113 i386/x32-avx-linux.xml.
6114
6115 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6116 (init_registers_x32_avx_linux): Likwise.
6117 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6118 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6119
6120 2012-04-13 Pedro Alves <palves@redhat.com>
6121
6122 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6123 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6124 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6125 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6126 the sub-make.
6127
6128 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6129
6130 * linux-x86-low.c (compat_x32_clock_t): New.
6131 (compat_x32_siginfo_t): Likewise.
6132 (compat_x32_siginfo_from_siginfo): Likewise.
6133 (siginfo_from_compat_x32_siginfo): Likewise.
6134 (linux_is_elf64): Likewise.
6135 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6136 and siginfo_from_compat_x32_siginfo for x32.
6137 (x86_arch_setup): Set linux_is_elf64.
6138
6139 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6140
6141 PR gdb/13969
6142 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6143 e_machine field.
6144 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6145 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6146 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6147 compatible with process.
6148
6149 2012-04-12 Yao Qi <yao@codesourcery.com>
6150
6151 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6152 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6153 (install-only, install-info, clean): Handle sub dir gnulib.
6154 (all-lib, am--refresh): New targets.
6155 (memmem.o): Remove target.
6156 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6157 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6158 (AC_REPLACE_FUNCS): Remove memmem.
6159 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6160 (AC_OUTPUT): Generate Makefile in gnulib/.
6161 * aclocal.m4, config.in, configure: Regenerated.
6162
6163 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6164
6165 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6166
6167 2012-04-05 Pedro Alves <palves@redhat.com>
6168
6169 -Werror=strict-aliasing
6170
6171 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6172 pointer.
6173
6174 2012-04-04 Pedro Alves <palves@redhat.com>
6175
6176 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6177 (sparc_store_gregset_from_stack, sparc_store_gregset)
6178 (sparc_breakpoint_at): Fix formatting.
6179
6180 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6181
6182 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6183 are available.
6184 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6185 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6186 * config.in: Regenerate.
6187 * configure: Likewise.
6188
6189 2012-03-29 Pedro Alves <palves@redhat.com>
6190
6191 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6192 Correct ptrace arguments.
6193
6194 2012-03-28 Pedro Alves <palves@redhat.com>
6195
6196 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6197 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6198 (IA64_FR1_REGNUM): New defines.
6199 (ia64_fetch_register): New.
6200 (the_low_target): Install it.
6201 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6202 field.
6203 * linux-low.c (linux_fetch_registers): Try the
6204 the_low_target.fetch_register hook first.
6205
6206 * linux-arm-low.c (the_low_target): Adjust.
6207 * linux-bfin-low.c (the_low_target): Adjust.
6208 * linux-cris-low.c (the_low_target): Adjust.
6209 * linux-crisv32-low.c (the_low_target): Adjust.
6210 * linux-m32r-low.c (the_low_target): Adjust.
6211 * linux-m68k-low.c (the_low_target): Adjust.
6212 * linux-mips-low.c (the_low_target): Adjust.
6213 * linux-ppc-low.c (the_low_target): Adjust.
6214 * linux-s390-low.c (the_low_target): Adjust.
6215 * linux-sh-low.c (the_low_target): Adjust.
6216 * linux-sparc-low.c (the_low_target): Adjust.
6217 * linux-tic6x-low.c (the_low_target): Adjust.
6218 * linux-x86-low.c (the_low_target): Adjust.
6219 * linux-xtensa-low.c (the_low_target): Adjust.
6220
6221 2012-03-26 Pedro Alves <palves@redhat.com>
6222
6223 * server.c (handle_qxfer_libraries): Don't bail early if
6224 the_target->qxfer_libraries_svr4 is not NULL.
6225
6226 2012-03-26 Pedro Alves <palves@redhat.com>
6227
6228 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6229
6230 2012-03-23 Pedro Alves <palves@redhat.com>
6231
6232 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6233 "library-list-svr4" element's start tag when the the DSO list is
6234 empty.
6235
6236 2012-03-23 Pedro Alves <palves@redhat.com>
6237
6238 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6239 a variable whose type size is the same as the inferior's pointer
6240 size.
6241
6242 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6243
6244 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6245 struct siginfo.
6246 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6247 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6248 * linux-low.h: Include <signal.h>.
6249 (struct siginfo): Remove forward declaration.
6250 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6251 struct siginfo.
6252
6253 2012-03-21 Mike Frysinger <vapier@gentoo.org>
6254
6255 * .gitignore: Ignore more files.
6256
6257 2012-03-19 Pedro Alves <palves@redhat.com>
6258 Jan Kratochvil <jan.kratochvil@redhat.com>
6259
6260 * server.c (cont_thread, general_thread): Add describing comments.
6261 (start_inferior): Clear `cont_thread'.
6262 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6263 of a process.
6264
6265 2012-03-15 Yao Qi <yao@codesourcery.com>
6266
6267 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6268 handling to ...
6269 (cmd_qtdp): ... here.
6270
6271 2012-03-15 Yao Qi <yao@codesourcery.com>
6272
6273 * tracepoint.c (struct tracepoint_action_ops): New.
6274 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6275 (m_tracepoint_action_download): New.
6276 (r_tracepoint_action_download): New.
6277 (x_tracepoint_action_download): New.
6278 (l_tracepoint_action_download): New.
6279 (add_tracepoint_action): Install `action->ops' according type.
6280 (download_tracepoint_1): Move code `download' function pointer
6281 of various tracepoint_action_ops.
6282
6283 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6284
6285 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6286 linux_ptrace_attach_warnings.
6287
6288 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6289
6290 * Makefile.in (linux-ptrace.o): New.
6291 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6292 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6293 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6294 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6295 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6296 of these targets.
6297 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6298
6299 2012-03-08 Yao Qi <yao@codesourcery.com>
6300 Pedro Alves <palves@redhat.com>
6301
6302 Fix PR server/13392.
6303 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6304 offset of JMP insn.
6305 * tracepoint.c (remove_tracepoint): New.
6306 (cmd_qtdp): Call remove_tracepoint when failed to install.
6307
6308 2012-03-07 Pedro Alves <palves@redhat.com>
6309
6310 * linux-low.c (get_detach_signal): New.
6311 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6312 Pass on pending signals to PTRACE_DETACH. Check the result of the
6313 ptrace call.
6314 * server.c (program_signals, program_signals_p): New.
6315 (handle_general_set): Handle QProgramSignals.
6316 * server.h (program_signals, program_signals_p): Declare.
6317
6318 2012-03-05 Pedro Alves <palves@redhat.com>
6319 Jan Kratochvil <jan.kratochvil@redhat.com>
6320
6321 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6322 New comment why.
6323
6324 2012-03-03 Yao Qi <yao@codesourcery.com>
6325
6326 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6327 agent_look_up_symbols.
6328
6329 2012-03-03 Yao Qi <yao@codesourcery.com>
6330
6331 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6332 (linux-x86-low.o): Likewise.
6333 * server.h: Remove in_process_agent_loaded.
6334 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6335 common/agent.c.
6336 Update callers.
6337
6338 2012-03-03 Yao Qi <yao@codesourcery.com>
6339
6340 * tracepoint.c (gdb_agent_capability): New global.
6341 (in_process_agent_loaded_ust): Renamed to
6342 `in_process_agent_supports_ust'.
6343 Update callers.
6344 (in_process_agent_supports_ust): Call agent_capability_check.
6345 (clear_installed_tracepoints): Assert that agent supports
6346 agent.
6347
6348 2012-03-03 Yao Qi <yao@codesourcery.com>
6349
6350 * linux-low.c (linux_supports_agent): New.
6351 (linux_target_ops): Initialize field `supports_agent' with
6352 linux_supports_agent.
6353 * target.h (struct target_ops) <supports_agent>: New.
6354 (target_supports_agent): New macro.
6355 * server.c (handle_general_set): Handle packet 'QAgent'.
6356 (handle_query): Send `QAgent+'.
6357 * Makefile.in (server.o): Depends on agent.h.
6358
6359 2012-03-03 Yao Qi <yao@codesourcery.com>
6360
6361 * Makefile.in (OBS): Add agent.o.
6362 Add new rule for agent.o.
6363 Track dependence of tracepoint.c on agent.h.
6364 * tracepoint.c (run_inferior_command_1):
6365 (run_inferior_command): Call agent_run_command.
6366 (gdb_ust_connect_sync_socket): Deleted. Move it to
6367 common/agent.c.
6368 (resume_thread, stop_thread): Likewise.
6369 (gdb_ust_socket_init): Renamed to ...
6370 (gdb_agent_socket_init): ... New.
6371 (gdb_ust_thread): Renamed to ...
6372 (gdb_agent_helper_thread): ... New.
6373 (gdb_ust_init): Move some code to ...
6374 (gdb_agent_init): ... here. New.
6375 [HAVE_UST]: Call gdb_ust_init.
6376 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6377 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6378 * config.in, configure: Regenerated.
6379
6380 2012-03-02 Pedro Alves <palves@redhat.com>
6381
6382 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6383 * linux-low.c (struct simple_pid_list): New.
6384 (stopped_pids): New a struct simple_pid_list pointer.
6385 (add_to_pid_list, pull_pid_from_list): New.
6386 (handle_extended_wait): Don't assume the first signal new children
6387 report is SIGSTOP. Adjust call to pull_pid_from_list.
6388 (linux_wait_for_lwp): Adjust.
6389
6390 2012-03-02 Yao Qi <yao@codesourcery.com>
6391
6392 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6393 debug log.
6394
6395 2012-03-02 Yao Qi <yao@codesourcery.com>
6396
6397 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6398 `stop_pc' and `tpoint'. Update caller.
6399
6400 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6401
6402 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6403 * linux-low.c (use_linux_regsets): New macro.
6404 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6405 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6406 (linux_register_in_regsets): New function.
6407 (usr_fetch_inferior_registers): Skip registers covered by
6408 regsets.
6409 (usr_store_inferior_registers): Likewise.
6410 (usr_fetch_inferior_registers): New macro.
6411 (usr_store_inferior_registers): Likewise.
6412 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6413 (linux_store_registers): Likewise.
6414 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6415 prototype.
6416 (init_registers_mips64_dsp_linux): Likewise.
6417 (init_registers_mips_linux): New macro.
6418 (init_registers_mips_dsp_linux): Likewise.
6419 (mips_dsp_num_regs): Likewise.
6420 (DSP_BASE, DSP_CONTROL): New fallback macros.
6421 (mips_base_regs): New macro.
6422 (mips_regmap): Use it. Fix the size.
6423 (mips_dsp_regmap): New variable.
6424 (mips_dsp_regset_bitmap): Likewise.
6425 (mips_arch_setup): New function.
6426 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6427 than mips_regmap.
6428 (mips_cannot_store_register): Likewise.
6429 (the_low_target): Update .arch_setup, .num_regs and .regmap
6430 initializers. Add .regset_bitmap initializer.
6431 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6432 initializer.
6433 * linux-bfin-low.c (the_low_target): Likewise.
6434 * linux-cris-low.c (the_low_target): Likewise.
6435 * linux-crisv32-low.c (the_low_target): Likewise.
6436 * linux-ia64-low.c (the_low_target): Likewise.
6437 * linux-m32r-low.c (the_low_target): Likewise.
6438 * linux-m68k-low.c (the_low_target): Likewise.
6439 * linux-ppc-low.c (the_low_target): Likewise.
6440 * linux-s390-low.c (the_low_target): Likewise.
6441 * linux-sh-low.c (the_low_target): Likewise.
6442 * linux-sparc-low.c (the_low_target): Likewise.
6443 * linux-tic6x-low.c (the_low_target): Likewise.
6444 * linux-x86-low.c (the_low_target): Likewise.
6445 * linux-xtensa-low.c (the_low_target): Likewise.
6446 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6447 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6448 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6449 srv_xmlfiles.
6450 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6451 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6452
6453 2012-02-29 Yao Qi <yao@codesourcery.com>
6454 Pedro Alves <palves@redhat.com>
6455
6456 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6457 `step_over_finished' is true.
6458
6459 2012-02-27 Pedro Alves <palves@redhat.com>
6460
6461 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6462 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6463
6464 2012-02-27 Pedro Alves <palves@redhat.com>
6465
6466 PR server/9684
6467 * linux-low.c (pid_is_stopped): New.
6468 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6469
6470 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6471
6472 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6473 of conditions.
6474
6475 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6476
6477 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6478
6479 2012-02-24 Luis Machado <lgustavo@codesourcery>
6480
6481 * server.c (handle_query): Advertise support for target-side
6482 breakpoint condition evaluation.
6483 (process_point_options): New function.
6484 (process_serial_event): When inserting a breakpoint, check for
6485 a target-side condition that should be evaluated.
6486
6487 * mem-break.c: Include regcache.h and ax.h.
6488 (point_cond_list_t): New data structure.
6489 (breakpoint) <cond_list>: New field.
6490 (find_gdb_breakpoint_at): Make non-static.
6491 (delete_gdb_breakpoint_at): Clear any target-side
6492 conditions.
6493 (clear_gdb_breakpoint_conditions): New function.
6494 (add_condition_to_breakpoint): Likewise.
6495 (add_breakpoint_condition): Likewise.
6496 (gdb_condition_true_at_breakpoint): Likewise.
6497 (gdb_breakpoint_here): Return result directly instead
6498 of going through a local variable.
6499
6500 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6501 (clear_gdb_breakpoint_conditions): Likewise.
6502 (add_breakpoint_condition): Likewise.
6503 (gdb_condition_true_at_breakpoint): Likewise.
6504
6505 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6506 (need_step_over_p): Take target-side breakpoint condition into
6507 consideration.
6508
6509 2012-02-24 Luis Machado <lgustavo@codesourcery>
6510
6511 * server.h: Include tracepoint.h.
6512 (agent_mem_read, agent_get_trace_state_variable_value,
6513 agent_set_trace_state_variable_value,
6514 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6515 get_set_tsv_func_addr): New prototypes.
6516
6517 * ax.h: New include file.
6518 * ax.c: New source file.
6519
6520 * tracepoint.c: Include ax.h.
6521 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6522 agent_expr, eval_result_type): Move to ax.h.
6523 (parse_agent_expr): Rename to ...
6524 (gdb_parse_agent_expr): ... this, make it non-static and move
6525 to ax.h.
6526 (unparse_agent_expr) Rename to ...
6527 (gdb_unparse_agent_expr): ... this, make it non-static and move
6528 to ax.h.
6529 (eval_agent_expr): Rename to ...
6530 (eval_tracepoint_agent_expr): ... this.
6531 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6532 forward declarations.
6533 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6534 (agent_get_trace_state_variable_value): New function.
6535 (agent_set_trace_state_variable_value): New function.
6536 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6537 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6538 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6539 (condition_true_at_tracepoint): Likewise.
6540 (parse_agent_expr): Rename to ...
6541 (gdb_parse_agent_expr): ... this and move to ax.c.
6542 (unparse_agent_expr): Rename to ...
6543 (gdb_unparse_agent_expr): ... this and move to ax.c.
6544 (gdb_agent_op_name): Move to ax.c.
6545 (eval_agent_expr): Rename to ...
6546 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6547 and move to ax.c.
6548 (eval_tracepoint_agent_expr): New function.
6549 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6550 non-static.
6551 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6552 ax.c.
6553 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6554 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6555 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6556 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6557 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6558 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6559 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6560 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6561 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6562 (compile_bytecodes): Remove forward declaration.
6563 (is_goto_target): Move to ax.c.
6564 (compile_bytecodes): Move to ax.c and call
6565 agent_get_trace_state_variable_value (...) and
6566 agent_set_trace_state_variable_value (...).
6567
6568 * Makefile.in: Update ax.c and IPA dependencies.
6569
6570 2012-02-24 Pedro Alves <palves@redhat.com>
6571
6572 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6573 (cmd_bigqtbuffer_circular): ... this. Only handle
6574 'QTBuffer:circular:'.
6575 (handle_tracepoint_general_set): Adjust.
6576
6577 2012-02-16 Yao Qi <yao@codesourcery.com>
6578
6579 * inferiors.c: Move code to ...
6580 * dll.c: .... here. New.
6581 * server.h: Declare clear_dlls.
6582 * Makefile.in (SFILES): Add dll.c.
6583 (OBS): Add dll.o
6584 (dll.o): New rule.
6585
6586 2012-02-11 Yao Qi <yao@codesourcery.com>
6587
6588 * server.c: (handle_monitor_command): Add a new parameter
6589 `own_buf'.
6590 (handle_query): Update caller.
6591
6592 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6593
6594 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6595 * configure, config.in: Regenerate.
6596 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6597 is not defined.
6598
6599 2012-02-02 Pedro Alves <palves@redhat.com>
6600
6601 Try SIGKILL first, then PTRACE_KILL.
6602 * linux-low.c (linux_kill_one_lwp): New.
6603 (linux_kill_one_lwp): Rename to ...
6604 (kill_one_lwp_callback): ... this. Use the new
6605 linux_kill_one_lwp.
6606
6607 2012-02-02 Pedro Alves <palves@redhat.com>
6608
6609 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6610 inferior.
6611
6612 2012-01-27 Pedro Alves <palves@redhat.com>
6613
6614 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6615 (elf_64_file_p): Make static.
6616 (linux_pid_exe_is_elf_64_file): New.
6617 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6618 Delete declarations.
6619 (linux_pid_exe_is_elf_64_file): Declare.
6620 * linux-x86-low.c (x86_arch_setup): Use
6621 linux_pid_exe_is_elf_64_file.
6622
6623 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6624
6625 * linux-low.c (linux_wait_for_event_1): Rename to ...
6626 (linux_wait_for_event): ... here and merge it with former
6627 linux_wait_for_event - new variable wait_ptid, use it.
6628 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6629
6630 2012-01-23 Pedro Alves <palves@redhat.com>
6631
6632 * server.c (main): Avoid yet another case of infinite loop while
6633 detaching/killing after a longjmp.
6634
6635 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6636
6637 Code cleanup.
6638 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6639
6640 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6641
6642 * hostio.c (handle_readlink): New function.
6643 (handle_vFile): Call it to handle "vFile:readlink" packets.
6644
6645 2012-01-20 Pedro Alves <palves@redhat.com>
6646 Ulrich Weigand <ulrich.weigand@linaro.org>
6647
6648 * server.c (handle_v_requests): Only support vAttach and vRun to
6649 start multiple processes when in extended protocol mode.
6650
6651 2012-01-17 Pedro Alves <palves@redhat.com>
6652
6653 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6654 memalign plus mprotect to allocate the scratch buffer.
6655
6656 2012-01-13 Pedro Alves <palves@redhat.com>
6657
6658 * server.c (attach_inferior): Clear `cont_thread'.
6659
6660 2012-01-13 Pedro Alves <palves@redhat.com>
6661
6662 * server.c (main): Avoid infinite loop while detaching/killing
6663 after a longjmp.
6664
6665 2012-01-09 Doug Evans <dje@google.com>
6666
6667 * server.c (start_inferior): Set last_ptid in --wrapper case.
6668
6669 2012-01-06 Yao Qi <yao@codesourcery.com>
6670
6671 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6672 defined.
6673 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6674
6675 2012-01-04 Yao Qi <yao@codesourcery.com>
6676
6677 * tracepoint.c (cmd_qtdp): Print debug message
6678 for static tracepoint.
6679
6680 2012-01-04 Yao Qi <yao@codesourcery.com>
6681
6682 * tracepoint.c (trace_vdebug): Differentiate debug message
6683 between gdbserver and IPA.
6684
6685 2012-01-03 Yao Qi <yao@codesourcery.com>
6686
6687 * tracepoint.c (tracepoint_was_hit): Don't collect for
6688 static tracepoint.
6689
6690 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6691
6692 * terminal.h: Reformat copyright header.
6693
6694 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6695
6696 * server.c (gdbserver_version): Update copyright year.
6697 * gdbreplay.c (gdbreplay_version): Likewise.
6698
6699 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6700
6701 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6702
6703 Revert:
6704 2011-12-18 Hui Zhu <teawater@gmail.com>
6705 * linux-low.c (linux_create_inferior): Save return value to ret.
6706
6707 2011-12-18 Hui Zhu <teawater@gmail.com>
6708
6709 * linux-low.c (linux_create_inferior): Save return value to ret.
6710
6711 2011-12-16 Doug Evans <dje@google.com>
6712
6713 * linux-low.c (linux_create_inferior): If stdio connection,
6714 redirect stdin from /dev/null, stdout to stderr.
6715 * remote-utils.c (remote_is_stdio): New static global.
6716 (remote_connection_is_stdio): New function.
6717 (remote_prepare): Handle stdio connection.
6718 (remote_open): Ditto.
6719 (remote_close): Don't close stdin for stdio connections.
6720 (read_prim,write_prim): New functions. Replace all calls to
6721 read/write to these.
6722 * server.c (main): Watch for "-" argument. Move call to
6723 remote_prepare before start_inferior.
6724 * server.h (STDIO_CONNECTION_NAME): New macro.
6725 (remote_connection_is_stdio): Declare.
6726
6727 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6728 in debugging output.
6729
6730 2011-12-15 Yao Qi <yao@codesourcery.com>
6731
6732 * tracepoint.c: Include sys/syscall.h.
6733 (gdb_ust_thread): Remove preprocessor conditional.
6734
6735 2011-12-14 Pedro Alves <pedro@codesourcery.com>
6736
6737 * linux-low.c (linux_detach_one_lwp): Call
6738 the_low_target.prepare_to_resume before detaching.
6739
6740 2011-12-14 Yao Qi <yao@codesourcery.com>
6741
6742 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6743 of write.
6744
6745 2011-12-14 Yao Qi <yao@codesourcery.com>
6746
6747 * i386-low.c (i386_low_stopped_data_address): Initialize local
6748 variable `control'.
6749
6750 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6751
6752 PR remote/13492
6753
6754 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6755 DR_CONTROL unless necessary. Extend comments.
6756 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6757 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6758
6759 2011-12-13 Yao Qi <yao@codesourcery.com>
6760
6761 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6762 macros.
6763 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6764
6765 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6766
6767 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6768 Print new debug message for such case.
6769
6770 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6771
6772 Fix overlapping memcpy.
6773 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6774 the read_inferior_memory transfer.
6775 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6776 write_inferior_memory transfer.
6777 (set_fast_tracepoint_jump): New variable buf. Use it for the
6778 read_inferior_memory and write_inferior_memory transfers.
6779 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6780 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6781 Use it for the write_inferior_memory transfer.
6782 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6783 buffers.
6784
6785 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6786
6787 * linux-low.c (fetch_register, store_register): Make code
6788 consistent, fix formatting.
6789
6790 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6791
6792 * linux-low.c (usr_store_inferior_registers): Factor out code
6793 to handle individual registers into...
6794 (store_register): ... this new function.
6795
6796 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6797
6798 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6799 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6800 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6801 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6802 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6803 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6804 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6805 (srv_xmlfiles): Add new XML files.
6806
6807 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6808 and <sys/uio.h>.
6809 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6810 (init_registers_s390_linux32v1): Add prototype.
6811 (init_registers_s390_linux32v2): Likewise.
6812 (init_registers_s390_linux64v1): Likewise.
6813 (init_registers_s390_linux64v2): Likewise.
6814 (init_registers_s390x_linux64v1): Likewise.
6815 (init_registers_s390x_linux64v2): Likewise.
6816 (s390_num_regs): Increment to 52.
6817 (s390_regmap): Add orig_r2 register.
6818 (s390_num_regs_3264): Increment to 68.
6819 (s390_regmap_3264): Add orig_r2 register.
6820 (s390_collect_ptrace_register): Handle orig_r2 register.
6821 (s390_supply_ptrace_register): Likewise.
6822 (s390_fill_last_break): New function.
6823 (s390_store_last_break): Likewise.
6824 (s390_fill_system_call): New function.
6825 (s390_store_system_call): Likewise.
6826 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6827 register sets.
6828 (s390_check_regset): New function.
6829 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6830 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6831 Update target_regsets for available register sets.
6832
6833 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6834 Jan Kratochvil <jan.kratochvil@redhat.com>
6835
6836 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6837 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6838 New.
6839 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6840 * linux-low.h (struct process_info_private): New member r_debug.
6841 * server.c (handle_qxfer_libraries): Call
6842 the_target->qxfer_libraries_svr4.
6843 (handle_qxfer_libraries_svr4): New function.
6844 (qxfer_packets): New entry "libraries-svr4".
6845 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6846 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6847 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6848 PACKET_qXfer_libraries_svr4.
6849
6850 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6851
6852 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6853 PSW address/mask between 8-byte and 16-byte formats.
6854 (s390_supply_ptrace_register): Likewise.
6855 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6856 basic addressing mode bit.
6857
6858 2011-11-24 Stan Shebs <stan@codesourcery.com>
6859
6860 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6861
6862 2011-11-17 Stan Shebs <stan@codesourcery.com>
6863
6864 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6865 (tracing_start_time): New global.
6866 (tracing_stop_time): New global.
6867 (tracing_user_name): New global.
6868 (tracing_notes): New global.
6869 (tracing_stop_note): New global.
6870 (cmd_qtstart): Set traceframe_usage, start_time.
6871 (stop_tracing): Set stop_time.
6872 (cmd_qtstatus): Report additional status.
6873 (cmd_qtp): New function.
6874 (handle_tracepoint_query): Call it.
6875 (cmd_qtnotes): New function.
6876 (handle_tracepoint_general_set): Call it.
6877 (get_timestamp): Rename from tsv_get_timestamp.
6878
6879 2011-11-14 Stan Shebs <stan@codesourcery.com>
6880 Kwok Cheung Yeung <kcy@codesourcery.com>
6881
6882 * linux-x86-low.c (small_jump_insn): New.
6883 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6884 trampoline and error message, build a trampoline and issue a small
6885 jump instruction to it.
6886 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6887 trampoline and error message.
6888 (x86_get_min_fast_tracepoint_insn_len): New.
6889 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6890 * linux-low.h (struct linux_target_ops): Add arguments to
6891 install_fast_tracepoint_jump_pad operation, add new operation.
6892 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6893 arguments.
6894 (linux_get_min_fast_tracepoint_insn_len): New function.
6895 (linux_target_op): Add new operation.
6896 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6897 (gdb_trampoline_buffer_end): Ditto.
6898 (gdb_trampoline_buffer_error): Ditto.
6899 (struct ipa_sym_addresses): Add fields for new IPA variables.
6900 (symbol_list): Add entries for new IPA variables.
6901 (struct tracepoint): Add fields to hold the address range of the
6902 trampoline used by the tracepoint.
6903 (trampoline_buffer_head): New static variable.
6904 (trampoline_buffer_tail): Ditto.
6905 (claim_trampoline_space): New function.
6906 (have_fast_tracepoint_trampoline_buffer): New function.
6907 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6908 structure.
6909 (install_fast_tracepoint): Ditto, also add error buffer argument.
6910 (cmd_qtminftpilen): New function.
6911 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6912 (fast_tracepoint_from_trampoline_address): New function.
6913 (fast_tracepoint_collecting): Handle trampoline as part of jump
6914 pad space.
6915 (set_trampoline_buffer_space): New function.
6916 (initialize_tracepoint): Initialize new IPA variables.
6917 * target.h (struct target_ops): Add arguments to
6918 install_fast_tracepoint_jump_pad operation, add new
6919 get_min_fast_tracepoint_insn_len operation.
6920 (target_get_min_fast_tracepoint_insn_len): New.
6921 (install_fast_tracepoint_jump_pad): Add arguments.
6922 * server.h (IPA_BUFSIZ): Define.
6923 * linux-i386-ipa.c: Include extra header files.
6924 (initialize_fast_tracepoint_trampoline_buffer): New function.
6925 (initialize_low_tracepoint): Call it.
6926 * server.h (set_trampoline_buffer_space): Declare.
6927 (claim_trampoline_space): Ditto.
6928 (have_fast_tracepoint_trampoline_buffer): Ditto.
6929
6930 2011-11-14 Yao Qi <yao@codesourcery.com>
6931
6932 * server.c (handle_query): Handle InstallInTrace for qSupported.
6933 * tracepoint.c (add_tracepoint): Sort list.
6934 (install_tracepoint, download_tracepoint): New.
6935 (cmd_qtdp): Call them to install and download tracepoints.
6936 (sort_tracepoints): Removed.
6937 (cmd_qtstart): Update.
6938
6939 2011-11-14 Yao Qi <yao@codesourcery.com>
6940
6941 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6942 * mem-break.h: Declare.
6943 * tracepoint.c (cmd_qtstart): Move some code to ...
6944 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6945 New.
6946 (download_tracepoints): Move some code to ...
6947 (download_tracepoint_1): ... here. New.
6948
6949 2011-11-08 Yao Qi <yao@codesourcery.com>
6950
6951 * remote-utils.c (relocate_instruction): A comment fix.
6952
6953 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6954
6955 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6956 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6957 dr_status_mirror and dr_control_mirror from debug_reg_state.
6958 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6959 (i386_initial_stuff): Remove use of deleted globals.
6960 (i386_get_thread_context, i386_set_thread_context,
6961 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6962 from debug_reg_state.
6963
6964 2011-11-05 Yao Qi <yao@codesourcery.com>
6965
6966 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6967 address as TPOINT's.
6968
6969 2011-11-02 Stan Shebs <stan@codesourcery.com>
6970
6971 * tracepoint.c (agent_mem_read_string): New function.
6972 (eval_agent_expr): Call it for tracenz.
6973 * server.c (handle_query): Report support for tracenz.
6974
6975 2011-11-02 Yao Qi <yao@codesourcery.com>
6976
6977 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6978
6979 2011-11-02 Yao Qi <yao@codesourcery.com>
6980
6981 * target.h: Fix a typo in comment.
6982
6983 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6984
6985 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6986 clobber the breakpoints' shadows with fast tracepoint jumps.
6987 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6988 * target.c (write_inferior_memory): Also pass MYADDR down to
6989 check_mem_write.
6990
6991 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6992
6993 * configure.ac: Check support for personality routine.
6994 * configure: Regenerate.
6995 * config.in: Likewise.
6996 * linux-low.c: Include <sys/personality.h>.
6997 Define ADDR_NO_RANDOMIZE if necessary.
6998 (linux_create_inferior): Disable address space randomization when
6999 forking inferior, if requested.
7000 (linux_supports_disable_randomization): New function.
7001 (linux_target_ops): Install it.
7002 * server.h (disable_randomization): Declare.
7003 * server.c (disable_randomization): New global variable.
7004 (handle_general_set): Handle QDisableRandomization.
7005 (handle_query): Likewise for qSupported.
7006 (main): Support --disable-randomization and --no-disable-randomization
7007 command line arguments.
7008 * target.h (struct target_ops): Add supports_disable_randomization.
7009 (target_supports_disable_randomization): New macro.
7010
7011 2011-09-29 Mike Frysinger <vapier@gentoo.org>
7012
7013 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7014 ifdef check.
7015 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7016 [!PT_GETDSBT] (target_loadmap): New definition.
7017 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7018 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7019 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7020 and PT_GETDSBT to LINUX_LOADMAP.
7021 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7022 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7023
7024 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7025
7026 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7027 (arm_linux_hwbp_cap): New static variable.
7028 (arm_linux_get_hwbp_cap): Replace by ...
7029 (arm_linux_init_hwbp_cap): ... this new function.
7030 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7031 (arm_linux_get_hw_watchpoint_count): Likewise.
7032 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7033 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7034 (arm_prepare_to_resume): Use perror_with_name instead of error.
7035
7036 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7037
7038 * linux-arm-low.c: Include <signal.h>.
7039 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7040 (struct arm_linux_hwbp_cap): New data type.
7041 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7042 (struct arm_linux_hw_breakpoint): New data type.
7043 (MAX_BPTS, MAX_WPTS): Define.
7044 (struct arch_process_info, struct arch_lwp_info): New data types.
7045 (arm_linux_get_hwbp_cap): New function.
7046 (arm_linux_get_hw_breakpoint_count): Likewise.
7047 (arm_linux_get_hw_watchpoint_count): Likewise.
7048 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7049 (arm_hwbp_control_initialize): Likewise.
7050 (arm_hwbp_control_is_enabled): Likewise.
7051 (arm_hwbp_control_is_initialized): Likewise.
7052 (arm_hwbp_control_disable): Likewise.
7053 (arm_linux_hw_breakpoint_equal): Likewise.
7054 (arm_linux_hw_point_initialize): Likewise.
7055 (struct update_registers_data): New data structure.
7056 (update_registers_callback: New function.
7057 (arm_insert_point): Likewise.
7058 (arm_remove_point): Likewise.
7059 (arm_stopped_by_watchpoint): Likewise.
7060 (arm_stopped_data_address): Likewise.
7061 (arm_new_process): Likewise.
7062 (arm_new_thread): Likewise.
7063 (arm_prepare_to_resume): Likewise.
7064 (the_low_target): Register arm_insert_point, arm_remove_point,
7065 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7066 arm_new_thread, and arm_prepare_to_resume.
7067
7068 2011-09-15 Stan Shebs <stan@codesourcery.com>
7069
7070 * server.h (struct emit_ops): Add compare-goto fields.
7071 * tracepoint.c (gdb_agent_op_sizes): New table.
7072 (emit_eq_goto): New function.
7073 (emit_ne_goto): New function.
7074 (emit_lt_goto): New function.
7075 (emit_le_goto): New function.
7076 (emit_gt_goto): New function.
7077 (emit_ge_goto): New function.
7078 (is_goto_target): New function.
7079 (compile_bytecodes): Recognize special cases of compare-goto
7080 combinations and call specialized emitters for them.
7081 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7082 (amd64_emit_ne_goto): New function.
7083 (amd64_emit_lt_goto): New function.
7084 (amd64_emit_le_goto): New function.
7085 (amd64_emit_gt_goto): New function.
7086 (amd64_emit_ge_goto): New function.
7087 (amd64_emit_ops): Add the new functions.
7088 (i386_emit_eq_goto): New function.
7089 (i386_emit_ne_goto): New function.
7090 (i386_emit_lt_goto): New function.
7091 (i386_emit_le_goto): New function.
7092 (i386_emit_gt_goto): New function.
7093 (i386_emit_ge_goto): New function.
7094 (i386_emit_ops): Add the new functions.
7095
7096 2011-09-08 Stan Shebs <stan@codesourcery.com>
7097
7098 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7099 (i386_emit_epilogue): Restore %ebx.
7100
7101 2011-08-31 Jie Zhang <jzhang918@gmail.com>
7102
7103 * server.c (step_thread): Remove definition.
7104 (process_serial_event): Don't handle Hs.
7105 * server.h (step_thread): Remove declaration.
7106 * target.c (set_desired_inferior): Remove use of step_thread.
7107
7108 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7109
7110 * linux-low.c: Include linux-procfs.h.
7111 (linux_attach_lwp_1): Update comments.
7112 (linux_attach): Scan for existing threads when attaching to a
7113 process that is the tgid.
7114 * Makefile.in: Update dependencies.
7115
7116 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
7117
7118 * configure.srv: Add linux-procfs.o dependencies.
7119
7120 2011-08-14 Yao Qi <yao@codesourcery.com>
7121
7122 * target.h (struct target_ops): Fix indent.
7123 * win32-low.c (win32_target_ops): Fix comment.
7124
7125 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
7126 Yao Qi <yao@codesourcery.com>
7127
7128 * Makefile.in (clean): Remove tic6x-*.c files.
7129 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7130 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7131 (tic6x-c64xp-linux.c): Likewise.
7132 * configure.srv: Add support for tic6x-*-uclinux.
7133 * linux-tic6x-low.c: New.
7134 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7135
7136 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
7137 Yao Qi <yao@codesourcery.com>
7138
7139 * target.h (struct target_ops): Add read_loadmap.
7140 * linux-low.c (struct target_loadseg): New type.
7141 (struct target_loadmap): New type.
7142 (linux_read_loadmap): New function.
7143 (linux_target_ops): Add linux_read_loadmap.
7144 * server.c (handle_query): Support qXfer:fdpic:read packet.
7145 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7146 to NULL.
7147
7148 2011-08-05 Eli Zaretskii <eliz@gnu.org>
7149
7150 * win32-low.c: Include <stdint.h>.
7151
7152 2011-07-22 Pedro Alves <pedro@codesourcery.com>
7153
7154 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7155 to the inferior here.
7156 (i386_remove_aligned_watchpoint): Ditto.
7157 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7158 fit part of the watchpoint in the debug registers.
7159 (i386_update_inferior_debug_regs): New.
7160 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7161 registers, and only update the inferior on success.
7162 (i386_low_remove_watchpoint): Ditto.
7163
7164 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7165
7166 * linux-low.c (compare_ints, unique, list_threads, show_process,
7167 linux_core_of_thread): Delete.
7168 (linux_target_ops): Change linux_core_of_thread to
7169 linux_common_core_of_thread.
7170 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7171 * utils.c (malloc_failure): Change type of argument.
7172 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7173 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7174 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7175 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7176 (IPA_OBJS): Add common-utils-ipa.o.
7177 (ptid_h, linux_osdata_h): New macros.
7178 (server_h): Add common/common-utils.h, common/xml-utils.h,
7179 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7180 common/ptid.h.
7181 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7182 ptid.o, buffer.o): New rules.
7183 (linux-low.o): Add common/linux-osdata.h as a dependency.
7184 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7185 * configure.ac: Add AC_HEADER_DIRENT check.
7186 * config.in: Regenerate.
7187 * configure: Regenerate.
7188 * remote-utils.c (xml_escape_text): Delete.
7189 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7190 buffer_xml_printf): Move to common/buffer.c.
7191 * server.c (main): Remove call to initialize_inferiors.
7192 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7193 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7194 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7195 internal_error, gdb_assert, gdb_assert_fail): Delete.
7196 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7197 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7198 common/buffer.h.
7199 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7200 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7201 initialize_inferiors): Delete.
7202
7203 2011-07-20 Pedro Alves <pedro@codesourcery.com>
7204
7205 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7206 symbol error.
7207
7208 2011-05-31 Pedro Alves <pedro@codesourcery.com>
7209
7210 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7211 assertion.
7212 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7213
7214 2011-05-26 Yao Qi <yao@codesourcery.com>
7215
7216 * Makefile.in (thread-db.o): Track dependence to
7217 common/gdb_thread_db.h.
7218 * thread-db.c: include gdb_thread_db.h from right place.
7219
7220 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7221
7222 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7223 __FILE__ and __LINE__ to internal_error.
7224
7225 2011-05-13 Doug Evans <dje@google.com>
7226
7227 * thread-db.c (try_thread_db_load_from_sdir): New function.
7228 (try_thread_db_load_from_dir): New function.
7229 (thread_db_load_search): Handle $sdir, ignore $pdir.
7230 Remove trying of system directories if search of
7231 libthread-db-search-path fails, that is now done via $sdir.
7232
7233 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7234
7235 * server.c (handle_query): Add EnableDisableTracepoints to the list
7236 of supported features.
7237 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7238 tracepoints.
7239 (cmd_qtenable_disable): New.
7240 (cmd_qtstart): Install tracepoints even if disabled.
7241 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7242 receiving a QTEnable or QTDisable packet.
7243 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7244 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7245 tracepoints.
7246 (gdb_probe): Skip data collection if static tracepoint is disabled.
7247
7248 2011-05-10 Doug Evans <dje@google.com>
7249
7250 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7251
7252 2011-05-04 Doug Evans <dje@google.com>
7253
7254 * linux-low.c (linux_join): Skip process lookup.
7255 * spu-low.c (spu_join): Ditto.
7256 * server.c (join_inferiors_callback): Delete.
7257 (process_serial_event): For 'D' packet (detach) call join_inferior
7258 directly.
7259
7260 2011-05-04 Joseph Myers <joseph@codesourcery.com>
7261
7262 * README: Don't mention xscale*-*-linux*.
7263 * configure.srv (xscale*-*-linux*): Don't handle target.
7264
7265 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7266
7267 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7268 casting pointers.
7269 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7270 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7271 (i386_emit_void_call_2): Likewise.
7272
7273 2011-04-26 Yao Qi <yao@codesourcery.com>
7274
7275 * linux-low.c: Move common macros to linux-ptrace.h.
7276 Include linux-ptrace.h.
7277 * Makefile.in (linux_ptrace_h): New.
7278 (linux-low.o): Depends on linux-ptrace.h.
7279
7280 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7281
7282 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7283 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7284 (remote_prepare): New function with most of the TCP code from ...
7285 (remote_open): ... here. Detect PORT here unconditionally. Move also
7286 setting transport_is_reliable.
7287 * server.c (run_once): New variable.
7288 (gdbserver_usage): Document it.
7289 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7290 the first run if RUN_ONCE.
7291 * server.h (run_once, remote_prepare): New declarations.
7292
7293 2011-04-19 Tom Tromey <tromey@redhat.com>
7294
7295 * win32-low.c (handle_load_dll): Remove duplicate "the".
7296
7297 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7298
7299 Remove support for old Cygwin 1.5 versions.
7300 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7301 function to avoid warning.
7302 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7303 warning.
7304
7305 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7306
7307 * gdbserver/server.h (Macro _): Define it if not available.
7308
7309 2011-03-14 Michael Snyder <msnyder@vmware.com>
7310
7311 * hostio.c (handle_close): Remove unnecessary null test.
7312
7313 2011-03-10 Joel Brobecker <brobecker@adacore.com>
7314
7315 * Makefile.in (maintainer-clean realclean distclean): Remove
7316 "make ... subdir_do" command.
7317
7318 2011-03-10 Michael Snyder <msnyder@vmware.com>
7319
7320 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7321
7322 * server.c (handle_v_run): Free alloced buffer on early return.
7323
7324 2011-03-09 Yao Qi <yao@codesourcery.com>
7325
7326 Revert:
7327 2011-03-04 Yao Qi <yao@codesourcery.com>
7328
7329 * Makefile.in: Remove GNU make feature --directory.
7330
7331 2011-03-05 Yao Qi <yao@codesourcery.com>
7332
7333 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7334 (subdir_do): New make target. Copied from gdb/Makefile.
7335 (maintainer-clean, realclean, distclean, clean): Call corresponding
7336 make targets in common/Makefile.
7337
7338 2011-02-11 Yao Qi <yao@codesourcery.com>
7339
7340 * configure.ac: Call AC_PROG_RANLIB.
7341 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7342 * configure: Regenerate.
7343
7344 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7345
7346 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7347
7348 2011-03-06 Yao Qi <yao@codesourcery.com>
7349
7350 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7351
7352 2011-03-05 Yao Qi <yao@codesourcery.com>
7353
7354 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7355 (subdir_do): New make target. Copied from gdb/Makefile.
7356 (maintainer-clean, realclean, distclean, clean): Call corresponding
7357 make targets in common/Makefile.
7358
7359 2011-03-04 Yao Qi <yao@codesourcery.com>
7360
7361 * Makefile.in: Remove GNU make feature --directory.
7362
7363 2011-03-04 Michael Snyder <msnyder@vmware.com>
7364
7365 * server.c (queue_stop_reply): Call xmalloc not malloc.
7366
7367 2011-03-02 Michael Snyder <msnyder@vmware.com>
7368
7369 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7370
7371 2011-02-28 Michael Snyder <msnyder@vmware.com>
7372
7373 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7374 (cmd_qtframe): Ditto.
7375 (cmd_qtbuffer): Ditto.
7376 (cmd_bigqtbuffer): Ditto.
7377
7378 * utils.c (decimal2str): Initialize 'width' to nine, then
7379 don't mess with it.
7380
7381 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7382
7383 * hostio.c (require_data): Free *data, not data.
7384
7385 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7386
7387 * hostio.c (require_data): Use free, not xfree.
7388
7389 2011-02-27 Michael Snyder <msnyder@vmware.com>
7390
7391 * server.c (handle_query): Discard unused value.
7392
7393 * hostio.c (require_data): Free malloc memory before returning
7394 error.
7395
7396 2011-02-26 Michael Snyder <msnyder@vmware.com>
7397
7398 * linux-low.c (list_threads): Call closedir for dirent.
7399
7400 2011-02-27 Michael Snyder <msnyder@vmware.com>
7401
7402 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7403 a case statement falls through.
7404
7405 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7406
7407 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7408 in comparison.
7409
7410 2011-02-26 Michael Snyder <msnyder@vmware.com>
7411
7412 * utils.c (decimal2str): Eliminate dead code and dead param.
7413 (pulongest): Drop dead param from call to decimal2str.
7414 (plongest): Ditto.
7415
7416 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7417
7418 Revert the following patch (not approved yet):
7419 2011-02-21 Hui Zhu <teawater@gmail.com>
7420 * tracepoint.c (tp_printf): New function.
7421 (eval_agent_expr): Handle gdb_agent_op_printf.
7422
7423 2011-02-21 Hui Zhu <teawater@gmail.com>
7424
7425 * tracepoint.c (tp_printf): New function.
7426 (eval_agent_expr): Handle gdb_agent_op_printf.
7427
7428 2011-02-18 Tom Tromey <tromey@redhat.com>
7429
7430 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7431 (tracepoint.o): Likewise.
7432 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7433 (gdb_agent_op_names): Likewise.
7434
7435 2011-02-18 Tom Tromey <tromey@redhat.com>
7436
7437 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7438 gdb_agent_op_rot>: New constants.
7439 (gdb_agent_op_names): Add pick and roll.
7440 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7441 cases.
7442
7443 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7444
7445 * aclocal.m4: Regenerated with aclocal-1.11.1.
7446
7447 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7448
7449 * server.c (handle_qxfer_traceframe_info): New.
7450 (qxfer_packets): Register "traceframe-info".
7451 (handle_query): Report support for qXfer:traceframe-info:read+.
7452 * tracepoint.c (match_blocktype): New.
7453 (traceframe_find_block_type): Rename to ...
7454 (traceframe_walk_blocks): ... this. Add callback filter argument,
7455 and use it.
7456 (traceframe_find_block_type): New, reimplemented on top of
7457 traceframe_walk_blocks.
7458 (build_traceframe_info_xml): New.
7459 (traceframe_read_info): New.
7460 * server.h (traceframe_read_info): Declare.
7461
7462 2011-02-11 Yao Qi <yao@codesourcery.com>
7463
7464 * configure.ac: Call AC_PROG_RANLIB.
7465 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7466 * configure: Regenerate.
7467
7468 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7469
7470 * server.c (gdb_read_memory): Change return semantics to allow
7471 partial transfers.
7472 (handle_search_memory_1): Adjust.
7473 (process_serial_event) <'m' packet>: Handle partial transfers.
7474 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7475
7476 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7477
7478 * regcache.c (init_register_cache): Initialize
7479 regcache->register_status.
7480 (free_register_cache): Release regcache->register_status.
7481 (regcache_cpy): Copy register_status.
7482 (registers_to_string): Print 'x's for unavailable registers.
7483 (supply_register): Mark the register's status valid or
7484 unavailable, depending on whether a buffer was passed in or not.
7485 (supply_register_zeroed): New.
7486 (supply_regblock): Mark the registers' status valid or
7487 unavailable, depending on whether a buffer was passed in or not.
7488 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7489 (struct regcache): New `register_status' field.
7490 (supply_register_zeroed): Declare.
7491 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7492 supply_register_zeroed, rather than passing a NULL buffer to
7493 supply_register.
7494 * tracepoint.c (fetch_traceframe_registers): Update comment.
7495
7496 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7497
7498 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7499 buffer explicit.
7500
7501 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7502
7503 * server.h (decode_xfer_write): Change prototype.
7504 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7505 and don't extract the annex here.
7506 * server.c (decode_xfer_read): Remove `annex' parameter,
7507 and don't extract the annex here.
7508 (decode_xfer): New.
7509 (struct qxfer): New.
7510 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7511 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7512 (handle_qxfer_statictrace): New functions, abstracted out from
7513 handle_query, and made to use the struct qxfer interface.
7514 (handle_threads_qxfer_proper): Rename to ...
7515 (handle_qxfer_threads_proper): ... this.
7516 (handle_threads_qxfer): Rename to ...
7517 (handle_qxfer_threads): ... this. Adjust.
7518 (qxfer_packets): New array.
7519 (handle_qxfer): New function.
7520 (handle_query): Use handle_qxfer.
7521
7522 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7523
7524 * gdbreplay.c: Shorten lines of >= 80 columns.
7525 * linux-low.c: Ditto.
7526 * linux-ppc-low.c: Ditto.
7527 * linux-s390-low.c: Ditto.
7528 * linux-sparc-low.c: Ditto.
7529 * linux-x86-low.c: Ditto.
7530 * linux-xtensa-low.c: Ditto.
7531 * mem-break.c: Ditto.
7532 * nto-low.c: Ditto.
7533 * regcache.h: Ditto.
7534 * remote-utils.c: Ditto.
7535 * server.c: Ditto.
7536 * server.h: Ditto.
7537 * thread-db.c: Ditto.
7538 * tracepoint.c: Ditto.
7539 * utils.c: Ditto.
7540 * win32-low.h: Ditto.
7541
7542 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7543
7544 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7545 update.
7546
7547 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7548
7549 * server.c (gdbserver_version): Update copyright year in version
7550 output.
7551 * gdbreplay.c (gdbreplay_version): Ditto.
7552
7553 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7554
7555 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7556 * linux-bfin-low.c: New file.
7557 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7558 PT_DATA_ADDR for BFIN targets.
7559 * Makefile.in (SFILES): Add linux-bfin-low.c.
7560 (clean): Remove reg-bfin.c.
7561 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7562 * README: Mention supported Blackfin targets.
7563
7564 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7565
7566 * .gitignore: New file.
7567
7568 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7569
7570 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7571
7572 2010-10-22 Jie Zhang <jie@codesourcery.com>
7573
7574 * Makefile.in: Add FLAGS_TO_PASS variable.
7575 (install): Remove dependency of install-only and recursively
7576 invoke make for install-only.
7577
7578 2010-10-04 Doug Evans <dje@google.com>
7579
7580 * Makefile.in (uninstall): Use $(DESTDIR).
7581
7582 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7583
7584 PR gdb/11842
7585
7586 * linux-x86-low.c (compat_siginfo_from_siginfo)
7587 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7588 si_code is < 0. Check for si_code == SI_TIMER before checking for
7589 si_code < 0.
7590
7591 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7592
7593 * lynx-i386-low.c: New file.
7594 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7595
7596 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7597
7598 * lynx-low.c (ptrace_request_to_str): Remove handling for
7599 request values that have been removed in LynxOS 5.x.
7600
7601 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7602
7603 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7604 <ptrace.h>
7605
7606 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7607
7608 * configure.ac: Add --enable-inprocess-agent option.
7609 * configure: Rebuilt.
7610
7611 2010-09-06 Yao Qi <yao@codesourcery.com>
7612
7613 * linux-low.c (linux_kill): Remove unused variable.
7614 (linux_stabilize_threads): Likewise.
7615 * server.c (start_inferior): Likewise.
7616 (queue_stop_reply_callback): Likewise.
7617 * tracepoint.c (do_action_at_tracepoint): Likewise.
7618
7619 2010-09-06 Yao Qi <yao@codesourcery.com>
7620
7621 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7622 on return.
7623
7624 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7625
7626 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7627
7628 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7629
7630 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7631 "$(IPA_DEPFILES)".
7632
7633 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7634
7635 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7636 gdbserver/lynx-ppc-low.c: New files.
7637 * Makefile.in (lynx_low_h): New variable.
7638 (lynx-low.o, lynx-ppc-low.o): New rules.
7639 * configure.ac: On LynxOS, link with -lnetinet.
7640 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7641 * configure: regenerate.
7642
7643 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7644
7645 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7646 * configure.ac: Add check for vasprintf and vsnprintf.
7647 * configure, config.in: Regenerate.
7648 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7649
7650 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7651
7652 * gdbreplay.c: Move include of alloca.h up, next to include of
7653 malloc.h.
7654 * server.h: Add include of malloc.h.
7655 * mem-break.c: Remove include of malloc.h.
7656 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7657
7658 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7659
7660 * Makefile.in (memmem.o): Build with -Wno-error.
7661
7662 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7663
7664 * utils.c (xsnprintf): Make non-static.
7665 * server.h: Add xsnprintf declaration.
7666 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7667 replace calls to snprintf by calls to xsnprintf throughout.
7668
7669 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7670
7671 * configure.ac: Add configure check for alloca.
7672 * configure, config.in: Regenerate.
7673 * server.h: Include alloca.h if it exists.
7674 * gdbreplay.c: Include alloca.h if it exists.
7675
7676 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7677
7678 * linux-low.c (__SIGRTMIN): Define if not already defined.
7679 (linux_create_inferior): Check for __ANDROID__ rather than
7680 __SIGRTMIN.
7681 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7682 are already deferred.
7683 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7684 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7685 stopped and already has a pending signal to report.
7686 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7687 a pending signal to report or is moving out of a jump pad.
7688 (linux_init_signals): Check for __ANDROID__ rather than
7689 __SIGRTMIN.
7690
7691 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7692
7693 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7694 debug_threads check. Avoid a linear search when not doing debug
7695 output.
7696
7697 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7698
7699 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7700 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7701 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7702 (process_event): Change local fd's type to gdb_fildes_t.
7703 (create_file_handler): Adjust prototype.
7704 (delete_file_handler): Adjust prototype.
7705 (handle_file_event): Adjust prototype. Use pfildes.
7706 (create_file_event): Adjsut prototype.
7707 * remote-utils.c (remote_desc, listen_desc): Change type to
7708 gdb_fildes_t.
7709 * server.h: New gdb_fildes_t typedef.
7710 [USE_WIN32API]: Include winsock2.h.
7711 (delete_file_handler, add_file_handler): Adjust prototypes.
7712 (pfildes): Declare.
7713 * utils.c (pfildes): New.
7714
7715 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7716
7717 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7718 * configure: Regenerate.
7719
7720 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7721
7722 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7723 (linux_done_accessing_memory): ... this.
7724 (linux_target_ops): Adjust.
7725 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7726 * nto-low.c (nto_target_ops): Adjust comment.
7727 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7728 * spu-low.c (spu_target_ops): Adjust comment.
7729 * target.h (target_ops): Rename unprepare_to_access_memory field
7730 to done_accessing_memory.
7731 (unprepare_to_access_memory): Rename to ...
7732 (done_accessing_memory): ... this.
7733
7734 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7735
7736 * linux-low.c (linux_prepare_to_access_memory): New.
7737 (linux_unprepare_to_access_memory): New.
7738 (linux_target_ops): Install them.
7739 * server.c (read_memory): Rename to ...
7740 (gdb_read_memory): ... this. Use
7741 prepare_to_access_memory/prepare_to_access_memory.
7742 (write_memory): Rename to ...
7743 (gdb_write_memory): ... this. Use
7744 prepare_to_access_memory/prepare_to_access_memory.
7745 (handle_search_memory_1): Adjust.
7746 (process_serial_event): Adjust.
7747 * target.h (struct target_ops): New fields
7748 prepare_to_access_memory and unprepare_to_access_memory.
7749 (prepare_to_access_memory, unprepare_to_access_memory): New.
7750 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7751 prepare_to_access_memory/prepare_to_access_memory.
7752 * nto-low.c (nto_target_ops): Adjust.
7753 * spu-low.c (spu_target_ops): Adjust.
7754 * win32-low.c (win32_target_ops): Adjust.
7755
7756 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7757
7758 * Makefile.in (WARN_CFLAGS): Get it from configure.
7759 (WERROR_CFLAGS): New.
7760 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7761 * configure.ac: Introduce --enable-werror, which adds -Werror to
7762 the compiler command line. Enabled by default. Disable with
7763 --disable-werror. Add -Wdeclaration-after-statement
7764 Wpointer-arith and -Wformat-nonliteral to warning flags.
7765 * configure: Regenerate.
7766
7767 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7768
7769 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7770
7771 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7772
7773 * gdbreplay.c (remote_error): New.
7774 (gdbchar): New.
7775 (expect): Use gdbchar. Check for error reading from GDB.
7776 Clarify sync error output.
7777 (play): Check for errors writing to GDB.
7778 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7779 * remote-utils.c (getpkt): Check for errors writing to the remote
7780 descriptor.
7781
7782 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7783
7784 * linux-low.c (linux_wait_1): Move non-debugging code out of
7785 `debug_threads' control.
7786
7787 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7788
7789 * linux-low.c (linux_wait_1): Don't set last_status here.
7790 * server.c (push_event, queue_stop_reply_callback): Assert we're
7791 not pushing a TARGET_WAITKIND_IGNORE event.
7792 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7793 (myresume, handle_target_event): Set the thread's last_resume_kind
7794 and last_status from the target returned status.
7795
7796 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7797
7798 PR threads/10729
7799
7800 * linux-x86-low.c (update_debug_registers_callback): New.
7801 (i386_dr_low_set_addr): Use it.
7802 (i386_dr_low_get_addr): New.
7803 (i386_dr_low_set_control): Use update_debug_registers_callback.
7804 (i386_dr_low_get_control): New.
7805 (i386_dr_low_get_status): Adjust.
7806 * linux-low.c (linux_stop_lwp): New.
7807 * linux-low.h (linux_stop_lwp): Declare.
7808
7809 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7810 argument instead of a i386_debug_reg_state.
7811 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7812 a i386_debug_reg_state.
7813 (i386_insert_aligned_watchpoint): Adjust.
7814 (i386_remove_aligned_watchpoint): Adjust.
7815 (i386_low_stopped_data_address): Read the debug registers from the
7816 inferior instead of from the mirrors.
7817 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7818 (i386_dr_low_get_addr): Declare.
7819 (i386_dr_low_get_control): Declare.
7820 (i386_dr_low_get_status): Change prototype.
7821
7822 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7823 (i386_dr_low_get_addr): New.
7824 (i386_dr_low_get_control): New.
7825 (i386_dr_low_get_status): Adjust prototype. Return
7826 dr_status_mirror.
7827 (i386_initial_stuff): Clear dr_status_mirror and
7828 dr_control_mirror.
7829 (i386_get_thread_context): Adjust.
7830 (i386_set_thread_context): Adjust.
7831 (i386_thread_added): Adjust.
7832
7833 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7834
7835 * linux-low.h (linux_thread_area): Delete declaration.
7836
7837 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7838
7839 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7840 after its termination.
7841
7842 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7843
7844 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7845 (gdb_wants_all_stopped): Delete.
7846 (linux_wait_1): Don't call them.
7847 * server.c (handle_v_cont): Tag all threads as want-stopped.
7848 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7849 stopped as "client-wants-stopped".
7850
7851 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7852
7853 * Makefile.in (signals_h): New.
7854 (server_h): Depend on it.
7855 (server.o): Don't depend on $(signals_def).
7856 (signals.o): Depend on $(signals_def).
7857
7858 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7859
7860 * Makefile.in (signals_def): New.
7861 (server_h): Append include/gdb/signals.h and signals_def.
7862 (server.o): Append signals_def.
7863
7864 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7865
7866 * server.c (handle_target_event): Use target_signal_to_host for
7867 resume_info.sig initialization.
7868 * target.h (struct thread_resume) <sig>: New comment.
7869
7870 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7871
7872 * server.c (handle_query): strcpy() the returned string from paddress()
7873 instead of sprintf().
7874 * utils.c (paddress): Return phex_nz().
7875
7876 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7877
7878 * server.c (handle_v_cont): Call mourn_inferior if process
7879 just exited.
7880 (myresume): Likewise.
7881
7882 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7883
7884 Static tracepoints, and integration with UST.
7885
7886 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7887 * mem-break.c (uninsert_all_breakpoints)
7888 (reinsert_all_breakpoints): New.
7889 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7890 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7891 (gdb_agent_ust_loaded, helper_thread_id)
7892 (gdb_agent_helper_thread_id): New macros.
7893 (struct ipa_sym_addresses): Add addr_ust_loaded,
7894 addr_helper_thread_id, addr_cmd_buf.
7895 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7896 (in_process_agent_loaded_ust): New.
7897 (write_e_ust_not_loaded): New.
7898 (maybe_write_ipa_ust_not_loaded): New.
7899 (struct collect_static_trace_data_action): New.
7900 (enum tracepoint_type) <static_tracepoint>: New.
7901 (struct tracepoint) <handle>: Mention static tracepoints.
7902 (struct static_tracepoint_ctx): New.
7903 (CMD_BUF_SIZE): New.
7904 (add_tracepoint_action): Handle static tracepoint actions.
7905 (unprobe_marker_at): New.
7906 (clear_installed_tracepoints): Handle static tracepoints.
7907 (cmd_qtdp): Handle static tracepoints.
7908 (probe_marker_at): New.
7909 (cmd_qtstart): Handle static tracepoints.
7910 (response_tracepoint): Handle static tracepoints.
7911 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7912 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7913 (get_context_regcache): Handle static tracepoints.
7914 (do_action_at_tracepoint): Handle static tracepoint actions.
7915 (traceframe_find_block_type): Handle static trace data blocks.
7916 (traceframe_read_sdata): New.
7917 (download_tracepoints): Download static tracepoint actions.
7918 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7919 (GDB_PROBE_NAME): New.
7920 (ust_ops): New.
7921 (GET_UST_SYM): New.
7922 (USTF): New.
7923 (dlsym_ust): New.
7924 (ust_marker_to_static_tracepoint): New.
7925 (gdb_probe): New.
7926 (collect_ust_data_at_tracepoint): New.
7927 (gdb_ust_probe): New.
7928 (UNIX_PATH_MAX, SOCK_DIR): New.
7929 (gdb_ust_connect_sync_socket): New.
7930 (resume_thread, stop_thread): New.
7931 (run_inferior_command): New.
7932 (init_named_socket): New.
7933 (gdb_ust_socket_init): New.
7934 (cstr_to_hexstr): New.
7935 (next_st): New.
7936 (first_marker, next_marker): New.
7937 (response_ust_marker): New.
7938 (cmd_qtfstm, cmd_qtsstm): New.
7939 (unprobe_marker_at, probe_marker_at): New.
7940 (cmd_qtstmat, gdb_ust_thread): New.
7941 (gdb_ust_init): New.
7942 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7943 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7944 (ST_REGENTRY): New.
7945 (x86_64_st_collect_regmap): New.
7946 (X86_64_NUM_ST_COLLECT_GREGS): New.
7947 (AMD64_RIP_REGNUM): New.
7948 (supply_static_tracepoint_registers): New.
7949 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7950 (ST_REGENTRY): New.
7951 (i386_st_collect_regmap): New.
7952 (i386_NUM_ST_COLLECT_GREGS): New.
7953 (supply_static_tracepoint_registers): New.
7954 * server.c (handle_query): Handle qXfer:statictrace:read.
7955 <qSupported>: Report support for StaticTracepoints, and
7956 qXfer:statictrace:read features.
7957 * server.h (traceframe_read_sdata)
7958 (supply_static_tracepoint_registers): Declare.
7959 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7960 (unpack_varlen_hex): Include in IPA build.
7961 * Makefile.in (ustlibs, ustinc): New.
7962 (IPA_OBJS): Add remote-utils-ipa.o.
7963 ($(IPA_LIB)): Link -ldl and -lpthread.
7964 (UST_CFLAGS): New.
7965 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7966 * config.in, configure: Regenerate.
7967
7968 2010-06-20 Ian Lance Taylor <iant@google.com>
7969 Pedro Alves <pedro@codesourcery.com>
7970
7971 * linux-x86-low.c (always_true): Delete.
7972 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7973 trying to fool the compiler with always_true.
7974
7975 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7976
7977 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7978 conditions in gdbserver.
7979
7980 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7981
7982 * spu-low.c (spu_read_memory): Wrap around local store limit.
7983 (spu_write_memory): Likewise.
7984
7985 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7986
7987 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7988 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7989 LONGEST uses.
7990 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7991 uses.
7992 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7993 uses with LONGEST uses.
7994
7995 2010-06-14 Stan Shebs <stan@codesourcery.com>
7996 Pedro Alves <pedro@codesourcery.com>
7997
7998 Bytecode compiler.
7999
8000 * linux-x86-low.c: Include limits.h.
8001 (add_insns): New.
8002 (always_true): New.
8003 (EMIT_ASM): New.
8004 (EMIT_ASM32): New.
8005 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8006 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8007 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8008 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8009 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8010 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8011 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8012 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8013 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8014 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8015 (amd64_emit_void_call_2): New.
8016 (amd64_emit_ops): New.
8017 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8018 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8019 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8020 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8021 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8022 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8023 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8024 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8025 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8026 (i386_emit_stack_adjust, i386_emit_int_call_1)
8027 (i386_emit_void_call_2): New.
8028 (i386_emit_ops): New.
8029 (x86_emit_ops): New.
8030 (the_low_target): Install x86_emit_ops.
8031 * server.h (struct emit_ops): New.
8032 (get_raw_reg_func_addr): Declare.
8033 (current_insn_ptr, emit_error): Declare.
8034 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8035 (set_trace_state_variable_value): New defines.
8036 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8037 addr_get_trace_state_variable_value and
8038 addr_set_trace_state_variable_value.
8039 (symbol_list): New fields for get_raw_reg,
8040 get_trace_state_variable_value and set_trace_state_variable_value.
8041 (condfn): New typedef.
8042 (struct tracepoint): New field `compiled_cond'.
8043 (do_action_at_tracepoint): Clear compiled_cond.
8044 (get_trace_state_variable_value, set_trace_state_variable_value):
8045 Export in the IPA.
8046 (condition_true_at_tracepoint): If there's a compiled condition,
8047 run that.
8048 (current_insn_ptr, emit_error): New globals.
8049 (struct bytecode_address): New.
8050 (get_raw_reg_func_addr): New.
8051 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8052 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8053 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8054 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8055 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8056 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8057 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8058 (compile_tracepoint_condition, compile_bytecodes): New.
8059 * target.h (emit_ops): Forward declare.
8060 (struct target_ops): New field emit_ops.
8061 (target_emit_ops): New.
8062 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8063 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8064 * linux-low.c (linux_emit_ops): New.
8065 (linux_target_ops): Install it.
8066 * linux-low.h (struct linux_target_ops): New field emit_ops.
8067
8068 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8069
8070 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8071 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8072
8073 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8074 Stan Shebs <stan@codesourcery.com>
8075
8076 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8077 (all): Depend on $(extra_libraries).
8078 (install-only): Install the IPA.
8079 (IPA_OBJS, IPA_LIB): New.
8080 (clean): Remove the IPA lib.
8081 (IPAGENT_CFLAGS): New.
8082 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8083 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8084 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8085 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8086 * configure.ac: Check for atomic builtins support in the compiler.
8087 (IPA_DEPFILES, extra_libraries): Define.
8088 * configure.srv (ipa_obj): Add description.
8089 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8090 (i[34567]86-*-linux*): Set ipa_obj.
8091 (x86_64-*-linux*): Set ipa_obj.
8092 * linux-low.c (stabilizing_threads): New.
8093 (supports_fast_tracepoints): New.
8094 (linux_detach): Stabilize threads before detaching.
8095 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8096 the lwp is either not stabilizing, or is moving out of a jump pad.
8097 (linux_fast_tracepoint_collecting): New.
8098 (maybe_move_out_of_jump_pad): New.
8099 (enqueue_one_deferred_signal): New.
8100 (dequeue_one_deferred_signal): New.
8101 (linux_wait_for_event_1): If moving out of a jump pad, defer
8102 pending signals to later.
8103 (linux_stabilize_threads): New.
8104 (linux_wait_1): Check if threads need moving out of jump pads, and
8105 do it if so.
8106 (stuck_in_jump_pad_callback): New.
8107 (move_out_of_jump_pad_callback): New.
8108 (lwp_running): New.
8109 (linux_resume_one_lwp): Handle moving out of jump pads.
8110 (linux_set_resume_request): Dequeue deferred signals.
8111 (need_step_over_p): Also step over fast tracepoint jumps.
8112 (start_step_over): Also uninsert fast tracepoint jumps.
8113 (finish_step_over): Also reinsert fast tracepoint jumps.
8114 (linux_install_fast_tracepoint_jump): New.
8115 (linux_target_ops): Install linux_stabilize_threads and
8116 linux_install_fast_tracepoint_jump_pad.
8117 * linux-low.h (linux_target_ops) <get_thread_area,
8118 install_fast_tracepoint_jump_pad>: New fields.
8119 (struct lwp_info) <collecting_fast_tracepoint,
8120 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8121 (linux_get_thread_area): Declare.
8122 * linux-x86-low.c (jump_insn): New.
8123 (x86_get_thread_area): New.
8124 (append_insns): New.
8125 (push_opcode): New.
8126 (amd64_install_fast_tracepoint_jump_pad): New.
8127 (i386_install_fast_tracepoint_jump_pad): New.
8128 (x86_install_fast_tracepoint_jump_pad): New.
8129 (the_low_target): Install x86_get_thread_area and
8130 x86_install_fast_tracepoint_jump_pad.
8131 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8132 (struct fast_tracepoint_jump): New.
8133 (fast_tracepoint_jump_insn): New.
8134 (fast_tracepoint_jump_shadow): New.
8135 (find_fast_tracepoint_jump_at): New.
8136 (fast_tracepoint_jump_here): New.
8137 (delete_fast_tracepoint_jump): New.
8138 (set_fast_tracepoint_jump): New.
8139 (uninsert_fast_tracepoint_jumps_at): New.
8140 (reinsert_fast_tracepoint_jumps_at): New.
8141 (set_breakpoint_at): Use write_inferior_memory.
8142 (uninsert_raw_breakpoint): Use write_inferior_memory.
8143 (check_mem_read): Mask out fast tracepoint jumps.
8144 (check_mem_write): Mask out fast tracepoint jumps.
8145 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8146 (set_fast_tracepoint_jump): Declare.
8147 (delete_fast_tracepoint_jump)
8148 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8149 (reinsert_fast_tracepoint_jumps_at): Declare.
8150 * regcache.c: Don't compile many functions when building the
8151 in-process agent library.
8152 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8153 the register buffer in the heap.
8154 (free_register_cache): If the register buffer isn't owned by the
8155 regcache, don't free it.
8156 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8157 pre-existing register caches.
8158 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8159 type.
8160 (convert_ascii_to_int): : Constify `from' parameter type.
8161 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8162 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8163 the needed buffer in-place.
8164 (relocate_instruction): New.
8165 * server.c (handle_query) <qSymbols>: If the target supports
8166 tracepoints, give it a chance of looking up symbols. Report
8167 support for fast tracepoints.
8168 (handle_status): Stabilize threads.
8169 (process_serial_event): Adjust.
8170 * server.h (struct fast_tracepoint_jump): Forward declare.
8171 (struct process_info) <fast_tracepoint_jumps>: New field.
8172 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8173 (decode_X_packet, decode_M_packet): Adjust.
8174 (relocate_instruction): Declare.
8175 (in_process_agent_loaded): Declare.
8176 (tracepoint_look_up_symbols): Declare.
8177 (struct fast_tpoint_collect_status): Declare.
8178 (fast_tracepoint_collecting): Declare.
8179 (force_unlock_trace_buffer): Declare.
8180 (handle_tracepoint_bkpts): Declare.
8181 (initialize_low_tracepoint)
8182 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8183 * target.h (struct target_ops) <stabilize_threads,
8184 install_fast_tracepoint_jump_pad>: New fields.
8185 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8186 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8187 [HAVE_STDINT_H]: Include stdint.h.
8188 (trace_debug_1): Rename to ...
8189 (trace_vdebug): ... this.
8190 (trace_debug): Rename to ...
8191 (trace_debug_1): ... this. Add `level' parameter.
8192 (trace_debug): New.
8193 (ATTR_USED, ATTR_NOINLINE): New.
8194 (IP_AGENT_EXPORT): New.
8195 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8196 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8197 (about_to_request_buffer_space, trace_buffer_is_full)
8198 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8199 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8200 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8201 (traceframe_write_count, traceframes_created)
8202 (trace_state_variables)
8203 New renaming defines.
8204 (struct ipa_sym_addresses): New.
8205 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8206 (symbol_list): New.
8207 (ipa_sym_addrs): New.
8208 (all_tracepoint_symbols_looked_up): New.
8209 (in_process_agent_loaded): New.
8210 (write_e_ipa_not_loaded): New.
8211 (maybe_write_ipa_not_loaded): New.
8212 (tracepoint_look_up_symbols): New.
8213 (debug_threads) [IN_PROCESS_AGENT]: New.
8214 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8215 (UNKNOWN_SIDE_EFFECTS): New.
8216 (stop_tracing): New.
8217 (flush_trace_buffer): New.
8218 (stop_tracing_bkpt): New.
8219 (flush_trace_buffer_bkpt): New.
8220 (read_inferior_integer): New.
8221 (read_inferior_uinteger): New.
8222 (read_inferior_data_pointer): New.
8223 (write_inferior_data_pointer): New.
8224 (write_inferior_integer): New.
8225 (write_inferior_uinteger): New.
8226 (struct collect_static_trace_data_action): Delete.
8227 (enum tracepoint_type): New.
8228 (struct tracepoint) <type>: New field `type'.
8229 <actions_str, step_actions, step_actions_str>: Only include in
8230 GDBserver.
8231 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8232 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8233 (tracepoints): Use IP_AGENT_EXPORT.
8234 (last_tracepoint): Don't include in the IPA.
8235 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8236 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8237 (alloced_trace_state_variables): New.
8238 (trace_state_variables): Use IP_AGENT_EXPORT.
8239 (traceframe_t): Delete unused variable.
8240 (circular_trace_buffer): Don't include in the IPA.
8241 (trace_buffer_start): Delete.
8242 (struct trace_buffer_control): New.
8243 (trace_buffer_free): Delete.
8244 (struct ipa_trace_buffer_control): New.
8245 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8246 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8247 New.
8248 (trace_buffer_ctrl): New.
8249 (TRACE_BUFFER_CTRL_CURR): New.
8250 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8251 Reimplement as macros.
8252 (trace_buffer_wrap): Delete.
8253 (traceframe_write_count, traceframe_read_count)
8254 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8255 (struct tracepoint_hit_ctx) <type>: New field.
8256 (struct fast_tracepoint_ctx): New.
8257 (memory_barrier): New.
8258 (cmpxchg): New.
8259 (record_tracepoint_error): Update atomically in the IPA.
8260 (clear_inferior_trace_buffer): New.
8261 (about_to_request_buffer_space): New.
8262 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8263 updating the same buffer.
8264 (add_tracepoint): Default the tracepoint's type to trap
8265 tracepoint, and orig_size to -1.
8266 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8267 internal variables.
8268 (create_trace_state_variable): New parameter `gdb'. Handle it.
8269 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8270 (cmd_qtdp): Handle fast tracepoints.
8271 (cmd_qtdv): Adjust.
8272 (max_jump_pad_size): New.
8273 (gdb_jump_pad_head): New.
8274 (get_jump_space_head): New.
8275 (claim_jump_space): New.
8276 (sort_tracepoints): New.
8277 (MAX_JUMP_SIZE): New.
8278 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8279 IPA.
8280 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8281 support. Upload fast traceframes, and delete internal IPA
8282 breakpoints.
8283 (stop_tracing_handler): New.
8284 (flush_trace_buffer_handler): New.
8285 (cmd_qtstop): Upload fast tracepoints.
8286 (response_tracepoint): Handle fast tracepoints.
8287 (tracepoint_finished_step): Upload fast traceframes. Set the
8288 tracepoint hit context's tracepoint type.
8289 (handle_tracepoint_bkpts): New.
8290 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8291 type. Add comment about fast tracepoints.
8292 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8293 non-existing action_str field.
8294 (get_context_regcache): Handle fast tracepoints.
8295 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8296 to the regcache.
8297 (fast_tracepoint_from_jump_pad_address): New.
8298 (fast_tracepoint_from_ipa_tpoint_address): New.
8299 (collecting_t): New.
8300 (force_unlock_trace_buffer): New.
8301 (fast_tracepoint_collecting): New.
8302 (collecting): New.
8303 (gdb_collect): New.
8304 (write_inferior_data_ptr): New.
8305 (target_tp_heap): New.
8306 (target_malloc): New.
8307 (download_agent_expr): New.
8308 (UALIGN): New.
8309 (download_tracepoints): New.
8310 (download_trace_state_variables): New.
8311 (upload_fast_traceframes): New.
8312 (IPA_FIRST_TRACEFRAME): New.
8313 (IPA_NEXT_TRACEFRAME_1): New.
8314 (IPA_NEXT_TRACEFRAME): New.
8315 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8316 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8317 (gdb_jump_pad_buffer_end): New.
8318 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8319 (initialize_tracepoint): Adjust.
8320 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8321 buffer. Initialize the low module.
8322 * utils.c (PREFIX, TOOLNAME): New.
8323 (malloc_failure): Use PREFIX.
8324 (error): In the IPA, an error causes an exit.
8325 (fatal, warning): Use PREFIX.
8326 (internal_error): Use TOOLNAME.
8327 (NUMCELLS): Increase to 10.
8328 * configure, config.in: Regenerate.
8329
8330 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8331
8332 * server.c (handle_query) <qSupported>: Do two passes over the
8333 qSupported string to avoid nesting strtok.
8334
8335 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8336
8337 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8338 (CDEPS): New.
8339 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8340 -Wl,--dynamic-list.
8341 * configure: Regenerate.
8342 * proc-service.list: New.
8343
8344 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8345
8346 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8347 New comment.
8348
8349 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8350
8351 * gdbreplay.c (remote_open): Check error return from socket() call by
8352 its equality to -1 not by it being negative.
8353 * remote-utils.c (remote_open): Likewise.
8354
8355 2010-05-23 Pedro Alves <pedro@codesourcery.com>
8356
8357 * config.h: Regenerate.
8358
8359 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8360
8361 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8362 doesn't provide PTRACE_GET_THREAD_AREA.
8363
8364 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8365
8366 * linux-m68k-low.c: Include <asm/ptrace.h>
8367 (ps_get_thread_area): Implement.
8368
8369 2010-05-03 Doug Evans <dje@google.com>
8370
8371 * event-loop.c (struct callback_event): New struct.
8372 (callback_list): New global.
8373 (append_callback_event, delete_callback_event): New functions.
8374 (process_callback): New function.
8375 (start_event_loop): Call it.
8376 * remote-utils.c (NOT_SCHEDULED): Define.
8377 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8378 moved out of readchar.
8379 (readchar): Rewrite. Call reschedule before returning.
8380 (reset_readchar): New function.
8381 (remote_close): Call it.
8382 (process_remaining, reschedule): New functions.
8383 * server.h (callback_handler_func): New typedef.
8384 (append_callback_event, delete_callback_event): Declare.
8385
8386 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8387
8388 * proc-service.c (ps_pglobal_lookup): Use
8389 thread_db_look_up_one_symbol.
8390 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8391 parameter. Use it instead of all_symbols_looked_up.
8392 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8393 field.
8394 (all_symbols_looked_up): Don't declare.
8395 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8396 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8397 field.
8398 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8399 Set all_symbols_looked_up here.
8400 (thread_db_look_up_one_symbol): New.
8401 (thread_db_get_tls_address): Adjust.
8402 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8403 thread_db object on the heap, and tentatively set it in the
8404 process structure.
8405 (thread_db_init): Don't set all_symbols_looked_up here.
8406 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8407
8408 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8409
8410 * linux-low.c (linux_kill, linux_detach): Adjust.
8411 (status_pending_p_callback): Remove redundant statement. Check
8412 for !TARGET_WAITIKIND_IGNORE, instead of
8413 TARGET_WAITKIND_STOPPED.
8414 (handle_tracepoints): Make sure LWP is locked. Adjust.
8415 (linux_wait_for_event_1): Adjust.
8416 (linux_cancel_breakpoints): New.
8417 (unsuspend_one_lwp): New.
8418 (unsuspend_all_lwps): New.
8419 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8420 (send_sigstop_callback): Change return type to int, add new
8421 `except' parameter and handle it.
8422 (suspend_and_send_sigstop_callback): New.
8423 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8424 pass them down. If SUSPEND, also increment the lwp's suspend
8425 count.
8426 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8427 (need_step_over_p): Don't consider suspended LWPs.
8428 (start_step_over): Adjust.
8429 (proceed_one_lwp): Change return type to int, add new `except'
8430 parameter and handle it.
8431 (unsuspend_and_proceed_one_lwp): New.
8432 (proceed_all_lwps): Use find_inferior instead of
8433 for_each_inferior.
8434 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8435 also decrement the suspend count of LWPs. Pass `except' down,
8436 instead of hacking its suspend count.
8437 (linux_pause_all): Add `freeze' parameter. Adjust.
8438 (linux_unpause_all): New.
8439 (linux_target_ops): Install linux_unpause_all.
8440 * server.c (handle_status): Adjust.
8441 * target.h (struct target_ops): New fields `unpause_all' and
8442 `cancel_breakpoints'. Add new parameter to `pause_all'.
8443 (pause_all): Add new `freeze' parameter.
8444 (unpause_all): New.
8445 (cancel_breakpoints): New.
8446 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8447 cancel breakpoints.
8448 (cmd_qtstart): Pause threads.
8449 (stop_tracing): Pause threads, and cancel breakpoints.
8450 * win32-low.c (win32_target_ops): Adjust.
8451
8452 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8453
8454 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8455 the inferior right away from here...
8456 (linux_wait_1): ... to here, and adjust to check the thread's
8457 last_resume_kind instead of the lwp's step or stop_expected flags.
8458
8459 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8460
8461 * README: Use consistent `GDB' and `GDBserver' spellings.
8462
8463 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8464
8465 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8466 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8467 (linux_detach_one_lwp): Assume the lwp is stopped.
8468 (any_thread_of): Delete.
8469 (linux_detach): Stop all lwps here. Don't blindly delete all
8470 breakpoints.
8471 (delete_lwp_callback): New.
8472 (linux_mourn): Delete all lwps of the process that is gone.
8473 (linux_wait_1): Don't delete the last lwp of the process here.
8474 * mem-break.h (mark_breakpoints_out): Declare.
8475 * mem-break.c (mark_breakpoints_out): New.
8476 (free_all_breakpoints): Use it.
8477 * server.c (handle_target_event): If the process is gone, mark
8478 breakpoints out.
8479 * thread-db.c (struct thread_db) <create_bp>: New field.
8480 (thread_db_enable_reporting): Fix prototype. Store a thread event
8481 breakpoint reference in the thread_db struct.
8482 (thread_db_load_search): Clear the thread_db object.
8483 (try_thread_db_load_1): Ditto.
8484 (switch_to_process): New.
8485 (disable_thread_event_reporting): Use it.
8486 (remove_thread_event_breakpoints): New.
8487 (thread_db_detach, thread_db_mourn): Use it.
8488
8489 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8490
8491 * linux-low.c (linux_enable_event_reporting): New.
8492 (linux_wait_for_event_1, handle_extended_wait): Use it.
8493
8494 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8495
8496 * linux-low.c (linux_kill_one_lwp, linux_kill)
8497 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8498 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8499 SIGSTOP even if the LWP is stopped.
8500 (send_sigstop_callback): New.
8501 (stop_all_lwps): Use send_sigstop_callback instead.
8502 (linux_resume_one_thread): Adjust.
8503 (proceed_one_lwp): Still proceed an LWP that the client has
8504 requested to stop, if we haven't reported it as stopped yet. Make
8505 sure that LWPs the client want stopped, have a pending SIGSTOP.
8506
8507 2010-04-26 Doug Evans <dje@google.com>
8508
8509 * server.c (handle_general_set): Make static.
8510
8511 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8512 Print received char after testing for error/eof instead of before.
8513 (input_interrupt): Tweak comment.
8514
8515 2010-04-23 Doug Evans <dje@google.com>
8516
8517 * server.c (start_inferior): Print inferior argv if --debug.
8518
8519 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8520
8521 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8522 * nto-x86-low.c: Include server.h
8523
8524 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8525
8526 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8527 be consistent with other sources of this directory.
8528 (init_registers_amd64): Correct name of source file of this function
8529 in the comment.
8530
8531 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8532
8533 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8534 64-bit executables.
8535
8536 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8537
8538 * win32-i386-low.c: Add 64-bit support.
8539 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8540 (init_registers_amd64): Declare.
8541 (mappings): Add 64-bit version of array.
8542 (init_windows_x86): New function.
8543 (the_low_target): Change init_arch field to init_windows_x86.
8544
8545 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8546
8547 * win32-low.c: Adapt to support also 64-bit architecture.
8548 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8549 (get_image_name): Use SIZE_T type for local variable `done'.
8550 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8551 (toolhelp_get_dll_name): Idem.
8552 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8553 Use uintptr_t typecast to avoid warning.
8554 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8555 (handle_exception): Use phex_nz to avoid warning.
8556 (win32_wait): Remove unused local variable `process'.
8557
8558 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8559
8560 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8561 `amd64-avx.o'.
8562
8563 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8564
8565 * configure.ac: Use `ws2_32' library for srv_mingw.
8566 * configure: Regenerate.
8567 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8568 * remote-utils.c: Likewise.
8569
8570 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8571
8572 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8573 if __x86_64__ is defined.
8574
8575 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8576
8577 * configure: Regenerate.
8578
8579 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8580
8581 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8582 * target.h (target_ops): New get_tib_address field.
8583 * win32-low.h (win32_thread_info): Add thread_local_base field.
8584 * win32-low.c (child_add_thread): Add tlb argument.
8585 Set thread_local_base field to TLB.
8586 (get_child_debug_event): Adapt to child_add_thread change.
8587 (win32_get_tib_address): New function.
8588 (win32_target_ops): Set get_tib_address field to
8589 win32_get_tib_address.
8590 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8591
8592 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8593
8594 * linux-low.c (linux_mourn): Also remove the process.
8595 * server.c (handle_target_event): Don't remove the process here.
8596 * nto-low.c (nto_mourn): New.
8597 (nto_target_ops): Install it.
8598 * spu-low.c (spu_mourn): New.
8599 (spu_target_ops): Install it.
8600 * win32-low.c (win32_mourn): New.
8601 (win32_target_ops): Install it.
8602
8603 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8604
8605 * server.h (buffer_xml_printf): Remove redundant `;'.
8606
8607 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8608
8609 * regcache.c (set_register_cache): Invalidate regcaches before
8610 changing the register cache layout.
8611 (regcache_invalidate_one): Allow a NULL regcache.
8612 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8613 regcaches before changing the register cache layout or the target
8614 regsets.
8615
8616 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8617
8618 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8619 variable warning on Linux/x86-64.
8620
8621 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8622
8623 GDBserver disconnected tracing support.
8624
8625 * linux-low.c (linux_remove_process): Delete.
8626 (add_lwp): Don't set last_resume_kind here.
8627 (linux_kill): Use `mourn'.
8628 (linux_detach): Use `thread_db_detach', and `mourn'.
8629 (linux_mourn): New.
8630 (linux_attach_lwp_1): Adjust comment.
8631 (linux_attach): last_resume_kind moved the thread_info; adjust.
8632 (status_pending_p_callback): Adjust.
8633 (linux_wait_for_event_1): Adjust.
8634 (count_events_callback, select_singlestep_lwp_callback)
8635 (select_event_lwp_callback, cancel_breakpoints_callback)
8636 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8637 (proceed_one_lwp): Adjust.
8638 (linux_async): Add debug output.
8639 (linux_thread_stopped): New.
8640 (linux_pause_all): New.
8641 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8642 linux_pause_all.
8643 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8644 (thread_db_free): Delete declaration.
8645 (thread_db_detach, thread_db_mourn): Declare.
8646 * thread-db.c (thread_db_init): Use thread_db_mourn.
8647 (thread_db_free): Delete, split in two.
8648 (disable_thread_event_reporting): New.
8649 (thread_db_detach): New.
8650 (thread_db_mourn): New.
8651
8652 * server.h (struct thread_info) <last_resume_kind>: New field.
8653 <attached>: Add comment.
8654 <gdb_detached>: New field.
8655 (handler_func): Change return type to int.
8656 (handle_serial_event, handle_target_event): Ditto.
8657 (gdb_connected): Declare.
8658 (tracing): Delete.
8659 (disconnected_tracing): Declare.
8660 (stop_tracing): Declare.
8661
8662 * server.c (handle_query) <qSupported>: Report support for
8663 disconnected tracing.
8664 (queue_stop_reply_callback): Account for running threads.
8665 (gdb_wants_thread_stopped): New.
8666 (gdb_wants_all_threads_stopped): New.
8667 (gdb_reattached_process): New.
8668 (handle_status): Clear the `gdb_detached' flag of all processes.
8669 In all-stop, stop all threads.
8670 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8671 (process_serial_event): If the remote connection breaks, or if an
8672 exit was forced with "monitor exit", force an event loop exit.
8673 Handle disconnected tracing on detach.
8674 (handle_serial_event): Adjust.
8675 (handle_target_event): If GDB isn't connected, forward events back
8676 to the inferior, unless the last process exited, in which case,
8677 exit gdbserver. Adjust interface.
8678
8679 * remote-utils.c (remote_open): Don't block in accept. Instead
8680 register an event loop source on the listen socket file
8681 descriptor. Refactor bits into ...
8682 (listen_desc): ... this new global.
8683 (gdb_connected): ... this new function.
8684 (enable_async_notification): ... this new function.
8685 (handle_accept_event): ... this new function.
8686 (remote_close): Clear remote_desc.
8687
8688 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8689
8690 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8691 New fields.
8692 (mourn_inferior): Define.
8693 (target_process_qsupported): Avoid the dangling else problem.
8694 (thread_stopped): Define.
8695 (pause_all): Define.
8696 (target_waitstatus_to_string): Declare.
8697 * target.c (target_waitstatus_to_string): New.
8698
8699 * tracepoint.c (tracing): Make extern.
8700 (disconnected_tracing): New.
8701 (stop_tracing): Make extern. Handle tracing stops due to GDB
8702 disconnecting.
8703 (cmd_qtdisconnected): New.
8704 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8705 (handle_tracepoint_general_set): Handle QTDisconnected.
8706
8707 * event-loop.c (event_handler_func): Change return type to int.
8708 (process_event): Bail out if the event handler wants the event
8709 loop to stop.
8710 (handle_file_event): Ditto.
8711 (start_event_loop): Bail out if the event handler wants the event
8712 loop to stop.
8713
8714 * nto-low.c (nto_target_ops): Adjust.
8715 * spu-low.c (spu_wait): Don't remove the process here.
8716 (spu_target_ops): Adjust.
8717 * win32-low.c (win32_wait): Don't remove the process here.
8718 (win32_target_ops): Adjust.
8719
8720 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8721
8722 * regcache.c (realloc_register_cache): Invalidate inferior's
8723 regcache before recreating it.
8724
8725 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8726
8727 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8728
8729 2010-04-09 Stan Shebs <stan@codesourcery.com>
8730 Pedro Alves <pedro@codesourcery.com>
8731
8732 * server.h (LONGEST): New.
8733 (struct thread_info) <while_stepping>: New field.
8734 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8735 Declare.
8736 (initialize_tracepoint, handle_tracepoint_general_set)
8737 (handle_tracepoint_query, tracepoint_finished_step)
8738 (tracepoint_was_hit, release_while_stepping_state_list):
8739 (current_traceframe): Declare.
8740 * server.c (handle_general_set): Handle tracepoint packets.
8741 (read_memory): New.
8742 (write_memory): New.
8743 (handle_search_memory_1): Use read_memory.
8744 (handle_query): Report support for conditional tracepoints, trace
8745 state variables, and tracepoint sources. Handle tracepoint
8746 queries.
8747 (main): Initialize the tracepoints module.
8748 (process_serial_event): Handle traceframe reads/writes.
8749
8750 * linux-low.c (handle_tracepoints): New.
8751 (linux_wait_1): Call it.
8752 (linux_resume_one_lwp): Handle while-stepping.
8753 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8754 (linux_target_ops): Install them.
8755 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8756 New field.
8757 * linux-x86-low.c (x86_supports_tracepoints): New.
8758 (the_low_target). Install it.
8759
8760 * mem-break.h (delete_breakpoint): Declare.
8761 * mem-break.c (delete_breakpoint): Make external.
8762
8763 * target.h (struct target_ops): Add `supports_tracepoints',
8764 `read_pc', and `write_pc' fields.
8765 (target_supports_tracepoints): Define.
8766 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8767 (phex_nz): New.
8768
8769 * regcache.h (struct regcache) <registers_owned>: New field.
8770 (init_register_cache, regcache_cpy): Declare.
8771 (regcache_read_pc, regcache_write_pc): Declare.
8772 (register_cache_size): Declare.
8773 (supply_regblock): Declare.
8774 * regcache.c (init_register_cache): New.
8775 (new_register_cache): Use it.
8776 (regcache_cpy): New.
8777 (register_cache_size): New.
8778 (supply_regblock): New.
8779 (regcache_read_pc, regcache_write_pc): New.
8780
8781 * tracepoint.c: New.
8782
8783 * Makefile.in (OBS): Add tracepoint.o.
8784 (tracepoint.o): New rule.
8785
8786 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8787
8788 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8789 (i386-mmx.o): New.
8790 (i386-mmx.c): Likewise.
8791 (i386-mmx-linux.o): Likewise.
8792 (i386-mmx-linux.c): Likewise.
8793
8794 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8795 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8796 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8797 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8798
8799 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8800 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8801 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8802
8803 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8804
8805 * Makefile.in (clean): Updated.
8806 (i386-avx.o): New.
8807 (i386-avx.c): Likewise.
8808 (i386-avx-linux.o): Likewise.
8809 (i386-avx-linux.c): Likewise.
8810 (amd64-avx.o): Likewise.
8811 (amd64-avx.c): Likewise.
8812 (amd64-avx-linux.o): Likewise.
8813 (amd64-avx-linux.c): Likewise.
8814
8815 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8816 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8817 (srv_amd64_regobj): Add amd64-avx.o.
8818 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8819 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8820 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8821 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8822 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8823 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8824 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8825
8826 * i387-fp.c: Include "i386-xstate.h".
8827 (i387_xsave): New.
8828 (i387_cache_to_xsave): Likewise.
8829 (i387_xsave_to_cache): Likewise.
8830 (x86_xcr0): Likewise.
8831
8832 * i387-fp.h (i387_cache_to_xsave): Likewise.
8833 (i387_xsave_to_cache): Likewise.
8834 (x86_xcr0): Likewise.
8835
8836 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8837 * linux-crisv32-low.c (target_regsets): Likewise.
8838 * linux-m68k-low.c (target_regsets): Likewise.
8839 * linux-mips-low.c (target_regsets): Likewise.
8840 * linux-ppc-low.c (target_regsets): Likewise.
8841 * linux-s390-low.c (target_regsets): Likewise.
8842 * linux-sh-low.c (target_regsets): Likewise.
8843 * linux-sparc-low.c (target_regsets): Likewise.
8844 * linux-xtensa-low.c (target_regsets): Likewise.
8845
8846 * linux-low.c: Include <sys/uio.h>.
8847 (regsets_fetch_inferior_registers): Support nt_type.
8848 (regsets_store_inferior_registers): Likewise.
8849 (linux_process_qsupported): New.
8850 (linux_target_ops): Add linux_process_qsupported.
8851
8852 * linux-low.h (regset_info): Add nt_type.
8853 (linux_target_ops): Add process_qsupported.
8854
8855 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8856 and <sys/uio.h>.
8857 (init_registers_i386_avx_linux): New.
8858 (init_registers_amd64_avx_linux): Likewise.
8859 (xmltarget_i386_linux_no_xml): Likewise.
8860 (xmltarget_amd64_linux_no_xml): Likewise.
8861 (PTRACE_GETREGSET): Likewise.
8862 (PTRACE_SETREGSET): Likewise.
8863 (x86_fill_xstateregset): Likewise.
8864 (x86_store_xstateregset): Likewise.
8865 (use_xml): Likewise.
8866 (x86_linux_update_xmltarget): Likewise.
8867 (x86_linux_process_qsupported): Likewise.
8868 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8869 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8870 init_registers_i386_linux here. Call
8871 x86_linux_update_xmltarget.
8872 (the_low_target): Add x86_linux_process_qsupported.
8873
8874 * server.c (handle_query): Call target_process_qsupported.
8875
8876 * target.h (target_ops): Add process_qsupported.
8877 (target_process_qsupported): New.
8878
8879 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8880
8881 * inferiors.c (add_thread): Set last_status kind to
8882 TARGET_WAITKIND_IGNORE.
8883 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8884 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8885 (linux_wait_1): Move `thread' local definition to block that uses
8886 it. Don't NULL initialize `event_child'.
8887 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8888 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8889 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8890
8891 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8892
8893 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8894 an extended waitstatus, or by a watchpoint.
8895 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8896 thread was stepping or has been stopped by a watchpoint.
8897
8898 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8899
8900 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8901 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8902 of another, then delete the previous, and validate all
8903 breakpoints.
8904 (validate_inserted_breakpoint): New.
8905 (delete_disabled_breakpoints): New.
8906 (validate_breakpoints): New.
8907 (check_mem_read): Validate breakpoints before trusting their
8908 shadow. Delete disabled breakpoints.
8909 (check_mem_write): Validate breakpoints before trusting they
8910 should be inserted. Delete disabled breakpoints.
8911 * mem-break.h (validate_breakpoints):
8912 * server.c (handle_query): Validate breakpoints when we see a
8913 qSymbol query.
8914
8915 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8916
8917 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8918 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8919 if we could tell there's a GDB breakpoint at stop_pc.
8920 (need_step_over_p): Don't do a step over if we find a GDB
8921 breakpoint at the resume PC.
8922
8923 * mem-break.c (struct raw_breakpoint): New.
8924 (enum bkpt_type): New type `gdb_breakpoint'.
8925 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8926 fields. New field `raw'.
8927 (find_raw_breakpoint_at): New.
8928 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8929 breakpoint instead.
8930 (set_breakpoint_at): Adjust.
8931 (delete_raw_breakpoint): New.
8932 (release_breakpoint): New.
8933 (delete_breakpoint): Rename to...
8934 (delete_breakpoint_1): ... this. Add proc parameter. Use
8935 release_breakpoint. Return ENOENT.
8936 (delete_breakpoint): Reimplement.
8937 (find_breakpoint_at): Delete.
8938 (find_gdb_breakpoint_at): New.
8939 (delete_breakpoint_at): Delete.
8940 (set_gdb_breakpoint_at): New.
8941 (delete_gdb_breakpoint_at): New.
8942 (gdb_breakpoint_here): New.
8943 (set_reinsert_breakpoint): Use release_breakpoint.
8944 (uninsert_breakpoint): Rename to ...
8945 (uninsert_raw_breakpoint): ... this.
8946 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8947 (reinsert_raw_breakpoint): Change parameter type to
8948 raw_breakpoint.
8949 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8950 instead.
8951 (check_breakpoints): Adjust. Use release_breakpoint.
8952 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8953 (breakpoint_inserted_here): Ditto.
8954 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8955 Don't trust the breakpoint's shadow if it is not inserted.
8956 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8957 (delete_all_breakpoints): Adjust.
8958 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8959 use delete_breakpoint_1.
8960
8961 * mem-break.h (breakpoints_supported): Delete declaration.
8962 (set_gdb_breakpoint_at): Declare.
8963 (gdb_breakpoint_here): Declare.
8964 (delete_breakpoint_at): Delete.
8965 (delete_gdb_breakpoint_at): Declare.
8966
8967 * server.h (struct raw_breakpoint): Forward declare.
8968 (struct process_info): New field `raw_breakpoints'.
8969
8970 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8971 breakpoints.
8972
8973 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8974
8975 * linux-low.c (status_pending_p_callback): Fix comment.
8976 (linux_wait_for_event_1): Move most of the internal breakpoint
8977 handling from here...
8978 (linux_wait_1): ... to here.
8979 (count_events_callback): New.
8980 (select_singlestep_lwp_callback): New.
8981 (select_event_lwp_callback): New.
8982 (cancel_breakpoints_callback): New.
8983 (select_event_lwp): New.
8984 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8985 priority to all LWPs that have had events that should be reported
8986 to the client. Cancel breakpoints when about to reporting the
8987 event to the client, not while stopping lwps. No longer cancel
8988 finished single-steps here.
8989 (cancel_finished_single_step): Delete.
8990 (cancel_finished_single_steps): Delete.
8991
8992 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8993
8994 * mem-break.c (enum bkpt_type): New.
8995 (struct breakpoint): New field `type'.
8996 (set_breakpoint_at): Change return type to struct breakpoint
8997 pointer. Set type to `other_breakpoint' by default.
8998 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8999 in the breakpoint list.
9000 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9001 (reinsert_breakpoint): Rename to ...
9002 (reinsert_raw_breakpoint): ... this.
9003 (reinsert_breakpoints_at): Adjust.
9004 * mem-break.h (struct breakpoint): Declare.
9005 (set_breakpoint_at): Change return type to struct breakpoint
9006 pointer.
9007
9008 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9009
9010 * server.c (handle_query): Assign, not compare.
9011
9012 2010-03-24 Pedro Alves <pedro@codesourcery.com>
9013
9014 Teach linux gdbserver to step-over-breakpoints.
9015
9016 * linux-low.c (can_hardware_single_step): New.
9017 (supports_breakpoints): New.
9018 (handle_extended_wait): If stopping threads, read the stop pc of
9019 the new cloned LWP.
9020 (get_pc): New.
9021 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9022 low target doesn't support retrieving the PC.
9023 (add_lwp): Set last_resume_kind to resume_continue.
9024 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9025 (linux_attach): Don't clear stop_expected. Set the lwp's
9026 last_resume_kind to resume_stop.
9027 (linux_detach_one_lwp): Don't check for removed breakpoints.
9028 (check_removed_breakpoint): Delete.
9029 (status_pending_p): Rename to ...
9030 (status_pending_p_callback): ... this. Don't check for removed
9031 breakpoints. Don't consider threads that are stopped from GDB's
9032 perspective.
9033 (linux_wait_for_lwp): Always read the stop_pc here.
9034 (cancel_breakpoint): New.
9035 (step_over_bkpt): New global.
9036 (linux_wait_for_event_1): Implement stepping over breakpoints.
9037 (gdb_wants_lwp_stopped): New.
9038 (gdb_wants_all_stopped): New.
9039 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9040 single-step traps here. Store the thread's last reported target
9041 wait status.
9042 (send_sigstop): Don't clear stop_expected. Always set it,
9043 instead.
9044 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9045 (cancel_finished_single_step): New.
9046 (cancel_finished_single_steps): New.
9047 (wait_for_sigstop): Don't cancel finished single-step traps here.
9048 (linux_resume_one_lwp): Don't check for removed breakpoints.
9049 Don't set `step' on non-hardware step archs.
9050 (linux_set_resume_request): Ignore resume_stop requests if already
9051 stopping or stopped. Set the lwp's last_resume_kind.
9052 (resume_status_pending_p): Don't check for removed breakpoints.
9053 (need_step_over_p): New.
9054 (start_step_over): New.
9055 (finish_step_over): New.
9056 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9057 requests. Clear the thread's last reported target waitstatus.
9058 Don't use the `suspended' flag. Don't consider pending breakpoints.
9059 (linux_resume): Start a step-over if necessary.
9060 (proceed_one_lwp): New.
9061 (proceed_all_lwps): New.
9062 (unstop_all_lwps): New.
9063 * linux-low.h (struct lwp_info): Rewrite comment for the
9064 `suspended' flag. Add the `stop_pc' field. Delete the
9065 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9066 Add `'last_resume_kind' and `need_step_over' fields.
9067 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9068 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9069 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9070 (set_raw_breakpoint_at): New.
9071 (set_breakpoint_at): Rewrite to use it.
9072 (reinsert_breakpoint_handler): Delete.
9073 (set_reinsert_breakpoint): New.
9074 (reinsert_breakpoint_by_bp): Delete.
9075 (delete_reinsert_breakpoints): New.
9076 (uninsert_breakpoint): Rewrite.
9077 (uninsert_breakpoints_at): New.
9078 (reinsert_breakpoint): Rewrite.
9079 (reinsert_breakpoints_at): New.
9080 (check_breakpoints): Rewrite.
9081 (breakpoint_here): New.
9082 (breakpoint_inserted_here): New.
9083 (check_mem_read): Adjust.
9084 * mem-break.h (breakpoints_supported, breakpoint_here)
9085 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9086 (reinsert_breakpoint_by_bp): Delete declaration.
9087 (delete_reinsert_breakpoints): Declare.
9088 (reinsert_breakpoint): Delete declaration.
9089 (reinsert_breakpoints_at): Declare.
9090 (uninsert_breakpoint): Delete declaration.
9091 (uninsert_breakpoints_at): Declare.
9092 (check_breakpoints): Adjust prototype.
9093 * server.h: Adjust include order.
9094 (struct thread_info): Declare here. Add a `last_status' field.
9095
9096 2010-03-23 Michael Snyder <msnyder@vmware.com>
9097
9098 * server.c (crc32): New function.
9099 (handle_query): Add handling for 'qCRC:' request.
9100
9101 2010-03-23 Pedro Alves <pedro@codesourcery.com>
9102
9103 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9104 lwp had been stopped by a watchpoint.
9105
9106 2010-03-16 Pedro Alves <pedro@codesourcery.com>
9107
9108 * server.h (internal_error): Declare.
9109 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9110 * utils.c (internal_error): New function.
9111
9112 2010-03-15 Andreas Schwab <schwab@redhat.com>
9113
9114 * configure.srv: Fix typo setting srv_regobj.
9115
9116 2010-03-15 Pedro Alves <pedro@codesourcery.com>
9117
9118 * linux-low.c (fetch_register): Avoid passing a non string literal
9119 format to `error'.
9120 (usr_store_inferior_registers): Ditto.
9121
9122 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9123
9124 * linux-low.c (linux_write_memory): Bail out early if peeking
9125 memory failed.
9126
9127 2010-03-14 Pedro Alves <pedro@codesourcery.com>
9128
9129 * linux-low.h (struct lwp_info): New fields
9130 `stopped_by_watchpoint' and `stopped_data_address'.
9131 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9132 here, and cache them in the lwp object.
9133 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9134 directly.
9135 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9136 field.
9137 (linux_stopped_by_watchpoint): Rewrite.
9138 (linux_stopped_data_address): Rewrite.
9139
9140 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
9141
9142 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9143 switching the current inferior, not before.
9144
9145 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9146
9147 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9148 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9149 i386-linux.c and amd64-linux.c.
9150 (reg-i386.o): Removed.
9151 (reg-i386.c): Likewise.
9152 (reg-i386-linux.o): Likewise.
9153 (reg-i386-linux.c): Likewise.
9154 (reg-x86-64.o): Likewise.
9155 (reg-x86-64.c): Likewise.
9156 (reg-x86-64-linux.o): Likewise.
9157 (reg-x86-64-linux.c): Likewise.
9158 (i386.o): New.
9159 (i386.c): Likewise.
9160 (i386-linux.o): Likewise.
9161 (i386-linux.c): Likewise.
9162 (amd64.o): Likewise.
9163 (amd64.c): Likewise.
9164 (amd64-linux.o): Likewise.
9165 (amd64-linux.c): Likewise.
9166
9167 * configure.srv (srv_i386_regobj): New.
9168 (srv_i386_linux_regobj): Likewise.
9169 (srv_amd64_regobj): Likewise.
9170 (srv_amd64_linux_regobj): Likewise.
9171 (srv_i386_32bit_xmlfiles): Likewise.
9172 (srv_i386_64bit_xmlfiles): Likewise.
9173 (srv_i386_xmlfiles): Likewise.
9174 (srv_amd64_xmlfiles): Likewise.
9175 (srv_i386_linux_xmlfiles): Likewise.
9176 (srv_amd64_linux_xmlfiles): Likewise.
9177 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9178 srv_xmlfiles to $srv_i386_xmlfiles.
9179 (i[34567]86-*-mingw32ce*): Likewise.
9180 (i[34567]86-*-mingw*): Likewise.
9181 (i[34567]86-*-nto*): Likewise.
9182 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9183 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9184 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9185 (x86_64-*-linux*): Likewise.
9186
9187 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9188 (init_registers_amd64_linux): New.
9189 (x86_arch_setup): Replace init_registers_x86_64_linux with
9190 init_registers_amd64_linux.
9191
9192 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9193
9194 * configure.ac: Check for libdl. If it is not available link against
9195 static libthread_db.
9196 * configure: Regenerate.
9197
9198 2010-02-22 Pedro Alves <pedro@codesourcery.com>
9199
9200 PR9605
9201
9202 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9203 handing a read watchpoint.
9204 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9205
9206 2010-02-12 Doug Evans <dje@google.com>
9207
9208 * linux-low.c (linux_supports_tracefork_flag): Document.
9209 (linux_look_up_symbols): Add comment.
9210
9211 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9212
9213 * regcache.c (supply_register): Clear regcache if buf is NULL.
9214
9215 2010-02-02 Nicolas Roche <roche@sourceware.org>
9216 Joel Brobecker <brobecker@adacore.com>
9217
9218 * inferiors.c (find_inferior): Add function documentation.
9219 (unloaded_dll): Handle the case where the unloaded dll has not
9220 been previously registered in the dll list.
9221
9222 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9223
9224 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9225 (thumb2_breakpoint): New.
9226 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9227
9228 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9229
9230 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9231 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9232 breakpoints.
9233
9234 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9235
9236 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9237
9238 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9239
9240 * linux-s390-low.c (s390_collect_ptrace_register)
9241 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9242
9243 2010-01-21 Doug Evans <dje@google.com>
9244
9245 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9246 (PTRACE_ARG4_TYPE): New macro.
9247 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9248 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9249 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9250 (usr_store_inferior_registers): Ditto.
9251 (linux_read_memory, linux_write_memory): Ditto.
9252 (linux_test_for_tracefork): Ditto.
9253
9254 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9255 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9256
9257 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9258
9259 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9260 target.
9261
9262 2010-01-21 Pedro Alves <pedro@codesourcery.com>
9263
9264 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9265 prototype to take a regcache. Adjust.
9266
9267 2010-01-20 Pedro Alves <pedro@codesourcery.com>
9268
9269 * regcache.h (struct thread_info): Forward declare.
9270 (struct regcache): New.
9271 (new_register_cache): Adjust prototype.
9272 (get_thread_regcache): Declare.
9273 (free_register_cache): Adjust prototype.
9274 (registers_to_string, registers_from_string): Ditto.
9275 (supply_register, supply_register_by_name, collect_register)
9276 (collect_register_as_string, collect_register_by_name): Ditto.
9277 * regcache.c (struct inferior_regcache_data): Delete.
9278 (get_regcache): Rename to ...
9279 (get_thread_regcache): ... this. Adjust. Switch inferior before
9280 fetching registers.
9281 (regcache_invalidate_one): Adjust.
9282 (regcache_invalidate): Fix prototype.
9283 (new_register_cache): Return the new register cache.
9284 (free_register_cache): Change prototype.
9285 (realloc_register_cache): Adjust.
9286 (registers_to_string): Change prototype to take a regcache. Adjust.
9287 (registers_from_string): Ditto.
9288 (register_data): Ditto.
9289 (supply_register): Ditto.
9290 (supply_register_by_name): Ditto.
9291 (collect_register): Ditto.
9292 (collect_register_as_string): Ditto.
9293 (collect_register_by_name): Ditto.
9294 * server.c (process_serial_event): Adjust.
9295 * linux-low.h (regset_fill_func, regset_store_func): Change
9296 prototype.
9297 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9298 Change prototype.
9299 * linux-low.c (get_stop_pc): Adjust.
9300 (check_removed_breakpoint): Adjust.
9301 (linux_wait_for_event): Adjust.
9302 (linux_resume_one_lwp): Adjust.
9303 (fetch_register): Add regcache parameter. Adjust.
9304 (usr_store_inferior_registers): Ditto.
9305 (regsets_fetch_inferior_registers): Ditto.
9306 (regsets_store_inferior_registers): Ditto.
9307 (linux_fetch_registers, linux_store_registers): Ditto.
9308 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9309 regcache. Adjust.
9310 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9311 Ditto.
9312 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9313 prototype to take a regcache.
9314 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9315 * remote-utils.c (convert_ascii_to_int, outreg)
9316 (prepare_resume_reply): Change prototype to take a regcache.
9317 Adjust.
9318 * target.h (struct target_ops) <fetch_registers, store_registers>:
9319 Change prototype to take a regcache.
9320 (fetch_inferior_registers, store_inferior_registers): Change
9321 prototype to take a regcache. Adjust.
9322 * proc-service.c (ps_lgetregs): Adjust.
9323 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9324 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9325 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9326 take a regcache. Adjust.
9327 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9328 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9329 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9330 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9331 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9332 (cris_cannot_fetch_register):
9333 (cris_breakpoint_at): Change prototype to take a regcache.
9334 Adjust.
9335 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9336 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9337 to take a regcache. Adjust.
9338 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9339 Adjust.
9340 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9341 take a regcache. Adjust.
9342 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9343 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9344 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9345 * linux-mips-low.c (mips_get_pc):
9346 (mips_set_pc): Change prototype to take a regcache. Adjust.
9347 (mips_reinsert_addr): Adjust.
9348 (mips_collect_register): Change prototype to take a regcache.
9349 Adjust.
9350 (mips_supply_register):
9351 (mips_collect_register_32bit, mips_supply_register_32bit)
9352 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9353 (mips_store_fpregset): Ditto.
9354 * linux-ppc-low.c (ppc_supply_ptrace_register)
9355 (ppc_supply_ptrace_register): Ditto.
9356 (parse_spufs_run): Adjust.
9357 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9358 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9359 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9360 take a regcache. Adjust.
9361 * linux-s390-low.c (s390_collect_ptrace_register)
9362 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9363 (s390_set_pc): Change prototype to take a regcache. Adjust.
9364 (s390_arch_setup): Adjust.
9365 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9366 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9367 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9368 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9369 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9370 regcache. Adjust.
9371 (sparc_breakpoint_at): Adjust.
9372 * linux-xtensa-low.c (xtensa_fill_gregset):
9373 (xtensa_store_gregset):
9374 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9375 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9376 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9377 prototype to take a regcache. Adjust.
9378 * win32-arm-low.c (arm_fetch_inferior_register)
9379 (arm_store_inferior_register): Change prototype to take a
9380 regcache. Adjust.
9381 * win32-i386-low.c (i386_fetch_inferior_register)
9382 (i386_store_inferior_register): Change prototype to take a
9383 regcache. Adjust.
9384 * win32-low.c (child_fetch_inferior_registers)
9385 (child_store_inferior_registers): Change prototype to take a
9386 regcache. Adjust.
9387 (win32_wait): Adjust.
9388 (win32_fetch_inferior_registers): Change prototype to take a
9389 regcache. Adjust.
9390 (win32_store_inferior_registers): Adjust.
9391 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9392 store_inferior_register>: Change prototype to take a regcache.
9393
9394 2010-01-20 Doug Evans <dje@google.com>
9395
9396 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9397 #ifdef.
9398 (linux_wait_for_event1, linux_init_signals): Ditto.
9399 (W_STOPCODE): Provide definition if missing.
9400
9401 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9402
9403 * linux-low.c (linux_core_of_thread): New.
9404 (compare_ints, show_process, list_threads): New.
9405 (linux_qxfer_osdata): Report threads and cores.
9406 (linux_target_op): Register linux_core_of_thread.
9407 * remote-utils.c (prepare_resume_reply): Report the core.
9408 (buffer_xml_printf): Support %d specifier.
9409 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9410 New.
9411 (handle_query): Handle qXfer:threads. Announce availability
9412 thereof.
9413 * target.h (struct target_ops): New field core_of_thread.
9414
9415 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9416
9417 * Makefile.in (clean): Remove new generated files.
9418 (reg-s390.o, reg-s390.c): Remove rules.
9419 (reg-s390x.o, reg-s390x.c): Likewise.
9420 (s390-linux32.o, s390-linux32.c): Add rules.
9421 (s390-linux64.o, s390-linux64.c): Likewise.
9422 (s390x-linux64.o, s390x-linux64.c): Likewise.
9423 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9424 * linux-s390-low.c: Include <elf.h>.
9425 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9426 (init_registers_s390): Remove prototype.
9427 (init_registers_s390x): Likewise.
9428 (init_registers_s390_linux32): Add prototype.
9429 (init_registers_s390_linux64): Likewise.
9430 (init_registers_s390x_linux64): Likewise.
9431 (s390_num_regs_3264): New define.
9432 (s390_regmap_3264): New global variable.
9433 (s390_cannot_fetch_register): Remove obsolete check.
9434 (s390_cannot_store_register): Likewise.
9435 (s390_collect_ptrace_register): Handle upper/lower register halves.
9436 (s390_supply_ptrace_register): Likewise.
9437 (s390_fill_gregset): Update to register number changes.
9438 (s390_get_hwcap): New routine.
9439 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9440 Install appropriate regmap and register set.
9441
9442 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9443
9444 * server.c (gdbserver_version): Update copyright year to 2010.
9445 * gdbreplay.c (gdbreplay_version): Likewise.
9446
9447 2009-12-28 Doug Evans <dje@google.com>
9448
9449 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9450 elf/external.h. Include <elf.h> instead but only if necessary.
9451
9452 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9453
9454 * linux-low.c (linux_remove_process): Remove `detaching'
9455 parameter. Don't release/detach from thread_db here.
9456 (linux_kill): Release/detach from thread_db here, ...
9457 (linux_detach): ... and here, before actually detaching.
9458 (linux_wait_1): ... and here, when a process exits.
9459 * thread-db.c (any_thread_of): New.
9460 (thread_db_free): Switch the current inferior to a thread of the
9461 passed in process.
9462
9463 2009-12-21 Doug Evans <dje@google.com>
9464
9465 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9466
9467 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9468 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9469 warning ifndef __NR_tkill. Move setting of errno there too.
9470 Delete unnecessary resetting of errno after syscall.
9471 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9472
9473 * configure.ac: Check for dladdr.
9474 * config.in: Regenerate.
9475 * configure: Regenerate.
9476 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9477 (try_thread_db_load): Update.
9478
9479 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9480
9481 2009-12-18 Doug Evans <dje@google.com>
9482
9483 * event-loop.c: Include unistd.h if it exists.
9484
9485 * linux-low.c (my_waitpid): Move definition away from being in
9486 between linux_tracefork_child/linux_test_for_tracefork.
9487
9488 * gdb_proc_service.h (psaddr_t): Fix type.
9489 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9490 signature to match glibc.
9491
9492 2009-12-16 Doug Evans <dje@google.com>
9493
9494 * linux-low.c (linux_read_memory): Fix argument to read.
9495
9496 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9497
9498 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9499 events, don't leave current_inferior pointing at null.
9500
9501 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9502
9503 * win32-low.c (LOG): Delete.
9504 (OUTMSG): Output to stderr.
9505 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9506 on compile time LOG macro.
9507 (win32_wait): Fix debug output.
9508
9509 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9510
9511 * win32-low.c (win32_add_one_solib): If the dll name is
9512 "ntdll.dll", prepend the system directory to the dll path.
9513
9514 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9515
9516 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9517
9518 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9519 Vladimir Prus <vladimir@codesourcery.com>
9520
9521 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9522 * configure.ac: Check for __mcoldfire__ and set
9523 gdb_cv_m68k_is_coldfire.
9524 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9525 reg-cf.o and reg-m68k.o.
9526 * configure: Regenerated.
9527
9528 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9529
9530 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9531 Pass it to thread_db_free.
9532 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9533 proper `detaching' argument to linux_remove_process.
9534 * linux-low.h (thread_db_free): Add `detaching' parameter.
9535 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9536 to thread_db_free.
9537 (thread_db_free): Add `detaching' parameter. Only
9538 call td_ta_clear_event if detaching from process.
9539
9540 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9541
9542 * thread-db.c (thread_db_free): Fix typo.
9543
9544 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9545
9546 PR gdb/10838
9547 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9548
9549 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9550
9551 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9552 with an i686 compiler.
9553 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9554 needed.
9555 * configure: Rebuilt.
9556
9557 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9558
9559 PR gdb/10783
9560
9561 * server.c (handle_search_memory_1): Correct read_addr initialization
9562 in loop for searching subsequent chunks.
9563
9564 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9565
9566 * configure.ac: New --with-libthread-db option.
9567 * thread-db.c: Allow direct dependence on libthread_db.
9568 (thread_db_free): Adjust.
9569 * config.in: Regenerate.
9570 * configure: Likewise.
9571
9572 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9573
9574 PR gdb/10757
9575 * thread-db.c (attach_thread): New function.
9576 (maybe_attach_thread): Return success/failure.
9577 (find_new_threads_callback): Adjust.
9578 (thread_db_find_new_threads): Loop until no new threads.
9579
9580 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9581
9582 * proc-service.c (ps_lgetregs): Formatting.
9583
9584 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9585
9586 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9587 * configure.ac: Adjust.
9588 * linux-low.h (struct process_info_private): Move members to struct
9589 thread_db.
9590 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9591 * linux-low.c (linux_remove_process): Adjust.
9592 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9593 * server.c (handle_query): Move code ...
9594 (handle_monitor_command): ... here. New function.
9595 * target.h (struct target_ops): New member.
9596 * thread-db.c (struct thread_db): New.
9597 (libthread_db_search_path): New variable.
9598 (thread_db_create_event, thread_db_enable_reporting)
9599 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9600 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9601 (try_thread_db_load_1, dladdr_to_soname): New functions.
9602 (try_thread_db_load, thread_db_load_search): New functions.
9603 (thread_db_init): Search for libthread_db.
9604 (thread_db_free): New function.
9605 (thread_db_handle_monitor_command): Likewise.
9606 * config.in: Regenerate.
9607 * configure: Regenerate.
9608
9609 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9610
9611 * spu-low.c (spu_kill): Wait for inferior to terminate.
9612 Call clear_inferiors.
9613 (spu_detach): Call clear_inferiors.
9614
9615 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9616
9617 * aclocal.m4: Regenerate.
9618 * config.in: Likewise.
9619 * configure: Likewise.
9620
9621 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9622
9623 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9624 (parse_spufs_run): New function.
9625 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9626 (ppc_breakpoint_at): Handle SPU breakpoints.
9627
9628 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9629
9630 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9631 (SPUFS_MAGIC): Define.
9632 (spu_enumerate_spu_ids): New function.
9633 (linux_qxfer_spu): New function.
9634 (linux_target_ops): Install linux_qxfer_spu.
9635
9636 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9637
9638 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9639 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9640 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9641 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9642 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9643 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9644 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9645 (init_registers_powerpc_cell32l): Add prototype.
9646 (init_registers_powerpc_cell64l): Likewise.
9647 (ppc_arch_setup): Detect Cell/B.E. architecture.
9648
9649 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9650
9651 * Makefile.in (datarootdir): New variable.
9652
9653 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9654
9655 * linux-low.c (linux_write_memory): Update debugging output.
9656 * Makefile.in (clean): Add new descriptions.
9657 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9658 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9659 * configure.srv: Add new files for arm*-*-linux*.
9660 * linux-arm-low.c: Add new declarations.
9661 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9662 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9663 (HWCAP_VFPv3D16): New.
9664 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9665 instead of __IWMMXT__.
9666 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9667 (arm_arch_setup): New.
9668 (target_regsets): Remove #ifdef. Add VFP regset.
9669 (the_low_target): Use arm_arch_setup.
9670
9671 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9672
9673 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9674 the main thread again.
9675
9676 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9677
9678 Adding Neutrino gdbserver.
9679 * configure: Regenerated.
9680 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9681 * configure.srv (i[34567]86-*-nto*): New target.
9682 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9683 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9684 (nto_comctrl) [__QNX__]: New function.
9685 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9686
9687 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9688
9689 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9690 srv_tgtobj.
9691
9692 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9693 Pedro Alves <pedro@codesourcery.com>
9694
9695 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9696 don't support CONTEXT_EXTENDED_REGISTERS.
9697 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9698 (the_low_target): Install them.
9699 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9700 failing with ERROR_PIPE_NOT_CONNECTED.
9701
9702 2009-06-30 Doug Evans <dje@google.com>
9703 Pierre Muller <muller@ics.u-strasbg.fr>
9704
9705 Add h/w watchpoint support to x86-linux, win32-i386.
9706 * Makefile.in (SFILES): Add i386-low.c
9707 (i386_low_h): Define.
9708 (i386-low.o): Add dependencies.
9709 (linux-x86-low.o): Add i386-low.h dependency.
9710 (win32-i386-low.o): Ditto.
9711 * i386-low.c: New file.
9712 * i386-low.h: New file.
9713 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9714 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9715 * linux-low.c (linux_add_process): Initialize arch_private.
9716 (linux_remove_process): Free arch_private.
9717 (add_lwp): Initialize arch_private.
9718 (delete_lwp): Free arch_private.
9719 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9720 provided.
9721 * linux-low.h (process_info_private): New member arch_private.
9722 (lwp_info): New member arch_private.
9723 (linux_target_ops): New members new_process, new_thread,
9724 prepare_to_resume.
9725 (ptid_of): New macro.
9726 * linux-x86-low.c: Include stddef.h, i386-low.h.
9727 (arch_process_info): New struct.
9728 (arch_lwp_info): New struct.
9729 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9730 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9731 (i386_dr_low_get_status): New function.
9732 (x86_insert_point, x86_remove_point): New functions.
9733 (x86_stopped_by_watchpoint): New function.
9734 (x86_stopped_data_address): New function.
9735 (x86_linux_new_process, x86_linux_new_thread): New functions.
9736 (x86_linux_prepare_to_resume): New function.
9737 (the_low_target): Add entries for insert_point, remove_point,
9738 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9739 prepare_to_resume.
9740 * server.c (debug_hw_points): New global.
9741 (monitor_show_help): Document set debug-hw-points.
9742 (handle_query): Process "set debug-hw-points".
9743 * server.h (debug_hw_points): Declare.
9744 (paddress): Declare.
9745 * utils.c (NUMCELLS, CELLSIZE): New macros.
9746 (get_sell, xsnprintf, paddress): New functions.
9747 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9748 remove_point, stopped_by_watchpoint, stopped_data_address.
9749 * win32-i386-low.c: Include i386-low.h.
9750 (debug_reg_state): Replaces dr.
9751 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9752 (i386_dr_low_get_status): New function.
9753 (i386_insert_point, i386_remove_point): New functions.
9754 (i386_stopped_by_watchpoint): New function.
9755 (i386_stopped_data_address): New function.
9756 (i386_initial_stuff): Update.
9757 (get_thread_context,set_thread_context,i386_thread_added): Update.
9758 (the_low_target): Add entries for insert_point,
9759 remove_point, stopped_by_watchpoint, stopped_data_address.
9760 * win32-low.c (win32_insert_watchpoint): New function.
9761 (win32_remove_watchpoint): New function.
9762 (win32_stopped_by_watchpoint): New function.
9763 (win32_stopped_data_address): New function.
9764 (win32_target_ops): Add entries for insert_watchpoint,
9765 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9766 * win32-low.h (win32_target_ops): New members insert_point,
9767 remove_point, stopped_by_watchpoint, stopped_data_address.
9768
9769 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9770
9771 * server.c (process_serial_event): Re-return unsupported, not
9772 error, if the type isn't recognized. Re-allow supporting only
9773 insert or remove packets. Also call require_running for
9774 breakpoints. Add missing break statement to default case. Tidy.
9775 * target.h (struct target_ops): Rename insert_watchpoint to
9776 insert_point, and remove_watchpoint to remove_point.
9777
9778 * linux-low.h (struct linux_target_ops): Likewise.
9779 * linux-low.c (linux_insert_watchpoint): Rename to ...
9780 (linux_insert_point): ... this. Adjust.
9781 (linux_remove_watchpoint): Rename to ...
9782 (linux_remove_point): ... this. Adjust.
9783 (linux_target_ops): Adjust.
9784 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9785 (cris_insert_point): ... this.
9786 (cris_remove_watchpoint): Rename to ...
9787 (cris_remove_point): ... this.
9788 (the_low_target): Adjust.
9789
9790 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9791
9792 * server.c (handle_v_kill): Pass signal_pid to
9793 kill_inferior if multi_process is zero.
9794
9795 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9796
9797 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9798 * target.h (target_ops): Comment for *_watchpoint to make it clear
9799 the functions can get types '0' and '1'.
9800
9801 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9802
9803 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9804 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9805 * regcache.c (get_regcache): Likewise.
9806 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9807 * win32-low.c (child_fetch_inferior_registers): Remove check for
9808 regno 0.
9809
9810 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9811 Pedro Alves <pedro@codesourcery.com>
9812
9813 * target.h (struct target_ops) <supports_multi_process>: New
9814 callback.
9815 (target_supports_multi_process): New.
9816 * server.c (handle_query): Even if GDB reports support, only
9817 enable multi-process if the target also supports it. Report
9818 multi-process support only if the target backend supports it.
9819 * linux-low.c (linux_supports_multi_process): New function.
9820 (linux_target_ops): Install it as target_supports_multi_process
9821 callback.
9822
9823 2009-05-24 Doug Evans <dje@google.com>
9824
9825 Global renaming of find_thread_pid to find_thread_ptid.
9826 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9827 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9828 All callers updated.
9829
9830 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9831 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9832 directly.
9833
9834 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9835 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9836 (linux_resume_one_lwp): Ditto.
9837
9838 2009-05-23 Doug Evans <dje@google.com>
9839
9840 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9841 from struct inferior_list_entry * to struct lwp_info *.
9842 All callers updated.
9843
9844 2009-05-13 Doug Evans <dje@google.com>
9845
9846 * linux-x86-low.c: Don't include assert.h.
9847 (x86_siginfo_fixup): Use fatal, not assert.
9848 (x86_arch_setup): Fix comment.
9849
9850 2009-05-12 Doug Evans <dje@google.com>
9851
9852 Biarch support for i386/amd64 gdbserver.
9853 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9854 Add linux-x86-low.c.
9855 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9856 (linux-x86-low.o): Add.
9857 * linux-x86-64-low.c: Delete.
9858 * linux-i386-low.c: Delete.
9859 * linux-x86-low.c: New file.
9860 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9861 linux-x86-low.o.
9862 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9863 linux-x86-low.o.
9864 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9865 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9866 (linux_child_pid_to_exec_file): New function.
9867 (elf_64_header_p, elf_64_file_p): New functions.
9868 (siginfo_fixup): New function.
9869 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9870 give target a chance to convert layout.
9871 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9872 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9873
9874 2009-05-07 Doug Evans <dje@google.com>
9875
9876 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9877 (regsets_store_inferior_registers): Ditto.
9878
9879 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9880
9881 PR server/10048
9882
9883 * linux-low.c (must_set_ptrace_flags): Delete.
9884 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9885 of the global.
9886 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9887 `lwp->must_set_ptrace_flags' instead.
9888 (linux_wait_for_event_1): Set ptrace options here.
9889 (linux_wait_1): ... not here.
9890
9891 2009-04-30 Doug Evans <dje@google.com>
9892
9893 * inferiors.c (started_inferior_callback): New function.
9894 (attached_inferior_callback): New function.
9895 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9896 * server.c (print_started_pid, print_attached_pid): New functions.
9897 (detach_or_kill_for_exit): New function.
9898 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9899 * server.h (have_started_inferiors_p): Declare.
9900 (have_attached_inferiors_p): Declare.
9901
9902 * inferiors.c (remove_process): Fix memory leak, free process.
9903 * linux-low.c (linux_remove_process): New function.
9904 (linux_kill): Call it instead of remove_process.
9905 (linux_detach, linux_wait_1): Ditto.
9906
9907 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9908
9909 * configure.srv: Add x86 Windows CE target.
9910
9911 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9912
9913 * inferiors.c (get_thread_process): Make global.
9914 * server.h (get_thread_process): Add prototype.
9915 * thread-db.c (find_one_thread): Use get_thread_process
9916 instead of current_process.
9917 (thread_db_get_tls_address): Do not crash if called when
9918 thread layer is not yet initialized.
9919
9920 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9921
9922 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9923 * spu-low.c (current_tid): Rename to ...
9924 (current_ptid): ... this.
9925 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9926 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9927 ptid_get_lwp (current_ptid) instead of current_tid.
9928 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9929 instead of current_tid. Use find_process_pid to verify pid
9930 argument is valid. Pass proper argument to remove_process.
9931 (spu_thread_alive): Compare current_ptid instead of current_tid.
9932 (spu_resume): Likewise.
9933
9934 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9935
9936 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9937 variable.
9938
9939 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9940
9941 Implement the multiprocess extensions, and add linux multiprocess
9942 support.
9943
9944 * server.h (ULONGEST): Declare.
9945 (struct ptid, ptid_t): New.
9946 (minus_one_ptid, null_ptid): Declare.
9947 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9948 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9949 (struct inferior_list_entry): Change `id' type from unsigned from
9950 to ptid_t.
9951 (struct sym_cache, struct breakpoint, struct
9952 process_info_private): Forward declare.
9953 (struct process_info): Declare.
9954 (current_process): Declare.
9955 (all_processes): Declare.
9956 (initialize_inferiors): Declare.
9957 (add_thread): Adjust to use ptid_t.
9958 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9959 (add_process, remove_process, find_thread_pid): Declare.
9960 (find_inferior_id): Adjust to use ptid_t.
9961 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9962 (multi_process): Declare.
9963 (push_event): Adjust to use ptid_t.
9964 (read_ptid, write_ptid): Declare.
9965 (prepare_resume_reply): Adjust to use ptid_t.
9966 (clear_symbol_cache): Declare.
9967 * inferiors.c (all_processes): New.
9968 (null_ptid, minus_one_ptid): New.
9969 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9970 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9971 (add_thread): Change unsigned long to ptid. Remove gdb_id
9972 parameter. Adjust.
9973 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9974 (gdb_id_to_thread): Rename to ...
9975 (find_thread_pid): ... this. Change unsigned long to ptid.
9976 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9977 (loaded_dll, pull_pid_from_list): Adjust.
9978 (add_process, remove_process, find_process_pid)
9979 (get_thread_process, current_process, initialize_inferiors): New.
9980 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9981 (struct target_waitstatus) <related_pid>: Ditto.
9982 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9983 return type to int.
9984 (struct target_ops) <join>: Add `pid' argument.
9985 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9986 (struct target_ops) <wait>: Add `ptid' field. Change return type
9987 to ptid.
9988 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9989 (mywait): Add `ptid' argument. Change return type to ptid_t.
9990 (target_pid_to_str): Declare.
9991 * target.c (set_desired_inferior): Adjust to use ptids.
9992 (mywait): Add new `ptid' argument. Adjust.
9993 (target_pid_to_str): New.
9994 * mem-break.h (free_all_breakpoints): Declare.
9995 * mem-break.c (breakpoints): Delelete.
9996 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9997 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9998 to use per-process breakpoint list.
9999 (free_all_breakpoints): New.
10000 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10001 (symbol_cache, all_symbols_looked_up): Delete.
10002 (hexchars): New.
10003 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10004 read_ptid): New.
10005 (prepare_resume_reply): Change ptid argument's type from unsigned
10006 long to ptid_t. Adjust. Implement W;process and X;process.
10007 (free_sym_cache, clear_symbol_cache): New.
10008 (look_up_one_symbol): Adjust to per-process symbol cache. *
10009 * server.c (cont_thread, general_thread, step_thread): Change type
10010 to ptid_t.
10011 (attached): Delete.
10012 (multi_process): New.
10013 (last_ptid): Change type to ptid_t.
10014 (struct vstop_notif) <ptid>: Change type to ptid_t.
10015 (queue_stop_reply, push_event): Change `ptid' argument's type to
10016 ptid_t.
10017 (discard_queued_stop_replies): Add `pid' argument.
10018 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10019 changes. Don't reference the `attached' global.
10020 (attach_inferior): Adjust to mywait interface changes.
10021 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10022 features. Handle and report "multiprocess+". Handle
10023 "qAttached:PID".
10024 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10025 changes.
10026 (handle_v_kill): New.
10027 (handle_v_stopped): Adjust to use target_pid_to_str.
10028 (handle_v_requests): Allow multiple attaches and runs when
10029 multiprocess extensions are in effect. Handle "vKill".
10030 (myresume): Adjust to use ptids.
10031 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10032 (handle_status): Adjust to discard_queued_stop_replies interface
10033 change.
10034 (first_thread_of, kill_inferior_callback)
10035 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10036 (main): Call initialize_inferiors. Adjust to use ptids, killing
10037 and detaching from all inferiors. Handle multiprocess packet
10038 variants.
10039 * linux-low.h: Include gdb_proc_service.h.
10040 (struct process_info_private): New.
10041 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10042 <lwpid_of>: Use ptid_get_lwp.
10043 (get_lwp_thread): Adjust.
10044 (struct lwp_info): Add `dead' member.
10045 (find_lwp_pid): Declare.
10046 * linux-low.c (thread_db_active): Delete.
10047 (new_inferior): Adjust comment.
10048 (inferior_pid): Delete.
10049 (linux_add_process): New.
10050 (handle_extended_wait): Adjust.
10051 (add_lwp): Change unsigned long to ptid.
10052 (linux_create_inferior): Add process to processes table. Adjust
10053 to use ptids. Don't set new_inferior here.
10054 (linux_attach_lwp): Rename to ...
10055 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10056 it. Adjust to use ptids.
10057 (linux_attach_lwp): New.
10058 (linux_attach): Add process to processes table. Don't set
10059 new_inferior here.
10060 (struct counter): New.
10061 (second_thread_of_pid_p, last_thread_of_process_p): New.
10062 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10063 multiple processes.
10064 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10065 processes. Remove process from process table.
10066 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10067 to multiple processes.
10068 (any_thread_of): New.
10069 (linux_detach): Add `pid' argument, and handle it. Remove process
10070 from processes table.
10071 (linux_join): Add `pid' argument. Handle it.
10072 (linux_thread_alive): Change unsighed long argument to ptid_t.
10073 Consider dead lwps as not being alive.
10074 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10075 threads we're not interested in.
10076 (same_lwp, find_lwp_pid): New.
10077 (linux_wait_for_lwp): Change `pid' argument's type from int to
10078 ptid_t. Adjust.
10079 (linux_wait_for_event): Rename to ...
10080 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10081 from int to ptid_t. Adjust.
10082 (linux_wait_for_event): New.
10083 (linux_wait_1): Add `ptid' argument. Change return type to
10084 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10085 that exit from the process table.
10086 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10087 Adjust.
10088 (mark_lwp_dead): New.
10089 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10090 stopping all threads, mark its main lwp as dead.
10091 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10092 ptids.
10093 (fetch_register, usr_store_inferior_registers)
10094 (regsets_fetch_inferior_registers)
10095 (regsets_store_inferior_registers, linux_read_memory)
10096 (linux_write_memory): Inline `inferior_pid'.
10097 (linux_look_up_symbols): Adjust to use per-process
10098 `thread_db_active'.
10099 (linux_request_interrupt): Adjust to use ptids.
10100 (linux_read_auxv): Inline `inferior_pid'.
10101 (initialize_low): Don't reference thread_db_active.
10102 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10103 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10104 (ps_getpid): Return the pid of the current inferior.
10105 * thread-db.c (proc_handle, thread_agent): Delete.
10106 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10107 per-process data.
10108 (find_one_thread): Change argument type to ptid_t. Adjust to
10109 per-process data.
10110 (maybe_attach_thread): Adjust to per-process data and ptids.
10111 (thread_db_find_new_threads): Ditto.
10112 (thread_db_init): Ditto.
10113 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10114 processes table. Adjust to use ptids.
10115 (spu_kill, spu_detach): Adjust interface. Remove process from
10116 processes table.
10117 (spu_join, spu_thread_alive): Adjust interface.
10118 (spu_wait): Adjust interface. Remove process from processes
10119 table. Adjust to use ptids.
10120 * win32-low.c (current_inferior_tid): Delete.
10121 (current_inferior_ptid): New.
10122 (debug_event_ptid): New.
10123 (thread_rec): Take a ptid. Adjust.
10124 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10125 (child_delete_thread): Ditto.
10126 (do_initial_child_stuff): Add `attached' argument. Add process to
10127 processes table.
10128 (child_fetch_inferior_registers, child_store_inferior_registers):
10129 Adjust.
10130 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10131 (win32_attach): Pass 1 to do_initial_child_stuff.
10132 (win32_kill): Adjust interface. Remove process from processes
10133 table.
10134 (win32_detach): Ditto.
10135 (win32_join): Adjust interface.
10136 (win32_thread_alive): Take a ptid.
10137 (win32_resume): Adjust to use ptids.
10138 (get_child_debug_event): Ditto.
10139 (win32_wait): Adjust interface. Remove exiting process from
10140 processes table.
10141
10142 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10143
10144 Non-stop mode support.
10145
10146 * server.h (non_stop): Declare.
10147 (gdb_client_data, handler_func): Declare.
10148 (delete_file_handler, add_file_handler, start_event_loop):
10149 Declare.
10150 (handle_serial_event, handle_target_event, push_event)
10151 (putpkt_notif): Declare.
10152 * target.h (enum resume_kind): New.
10153 (struct thread_resume): Replace `step' field by `kind' field.
10154 (TARGET_WNOHANG): Define.
10155 (struct target_ops) <wait>: Add `options' argument.
10156 <supports_non_stop, async, start_non_stop>: New fields.
10157 (target_supports_non_stop, target_async): New.
10158 (start_non_stop): Declare.
10159 (mywait): Add `options' argument.
10160 * target.c (mywait): Add `options' argument. Print child exit
10161 notifications here.
10162 (start_non_stop): New.
10163 * server.c (non_stop, own_buf, mem_buf): New globals.
10164 (struct vstop_notif): New.
10165 (notif_queue): New global.
10166 (queue_stop_reply, push_event, discard_queued_stop_replies)
10167 (send_next_stop_reply): New.
10168 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10169 interface changes.
10170 (attach_inferior): In non-stop mode, don't wait for the target
10171 here.
10172 (handle_general_set): Handle QNonStop.
10173 (handle_query): When handling qC, return the current general
10174 thread, instead of the first thread of the list.
10175 (handle_query): If the backend supports non-stop mode, include
10176 QNonStop+ in the qSupported query response.
10177 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10178 and non-stop mode.
10179 (handle_v_attach, handle_v_run): Handle non-stop mode.
10180 (handle_v_stopped): New.
10181 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10182 (myresume): Adjust to use resume_kind. Handle non-stop.
10183 (queue_stop_reply_callback): New.
10184 (handle_status): Handle non-stop mode.
10185 (main): Clear non_stop flag on reconnection. Use the event-loop.
10186 Refactor serial protocol handling from here ...
10187 (process_serial_event): ... to this new function. When GDB
10188 selects any thread, select one here. In non-stop mode, wait until
10189 GDB acks all pending events before exiting.
10190 (handle_serial_event, handle_target_event): New.
10191 * remote-utils.c (remote_open): Install remote_desc in the event
10192 loop.
10193 (remote_close): Remove remote_desc from the event loop.
10194 (putpkt_binary): Rename to...
10195 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10196 (putpkt_binary): New as wrapper around putpkt_binary_1.
10197 (putpkt_notif): New.
10198 (prepare_resume_reply): In non-stop mode, don't change the
10199 general_thread.
10200 * event-loop.c: New.
10201 * Makefile.in (OBJ): Add event-loop.o.
10202 (event-loop.o): New rule.
10203
10204 * linux-low.h (pid_of): Moved here.
10205 (lwpid_of): New.
10206 (get_lwp_thread): Use lwpid_of.
10207 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10208 * linux-low.c (pid_of): Delete.
10209 (inferior_pid): Use lwpid_of.
10210 (linux_event_pipe): New.
10211 (target_is_async_p): New.
10212 (delete_lwp): New.
10213 (handle_extended_wait): Use lwpid_of.
10214 (add_lwp): Don't set lwpid field.
10215 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10216 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10217 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10218 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10219 first. Adjust to linux_wait_for_event interface changes. Use
10220 lwpid_of.
10221 (linux_detach): Don't delete the main lwp here.
10222 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10223 (status_pending_p): Don't consider explicitly suspended lwps.
10224 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10225 pointer. Add OPTIONS argument. Change return type to int. Use
10226 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10227 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10228 pointer. Add status pointer argument. Return a pid instead of a
10229 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10230 changes. In non-stop mode, don't switch to a random thread.
10231 (linux_wait): Rename to...
10232 (linux_wait_1): ... this. Add target_options argument, and handle
10233 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10234 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10235 clean exit and signal exit code. Don't stop all threads in
10236 non-stop mode. In all-stop mode, only stop all threads when
10237 reporting a stop to GDB. Handle explicit thread stop requests.
10238 (async_file_flush, async_file_mark): New.
10239 (linux_wait): New.
10240 (send_sigstop): Use lwpid_of.
10241 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10242 interface changes. In non-stop mode, don't switch to a random
10243 thread.
10244 (linux_resume_one_lwp): Use lwpid_of.
10245 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10246 (linux_resume_one_thread): ... this. Handle resume_stop. In
10247 non-stop mode, don't look for pending flag in all threads.
10248 (resume_status_pending_p): Don't consider explicitly suspended
10249 threads.
10250 (my_waitpid): Reimplement. Emulate __WALL.
10251 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10252 Use lwpid_of.
10253 (sigchld_handler, linux_supports_non_stop, linux_async)
10254 (linux_start_non_stop): New.
10255 (linux_target_ops): Register linux_supports_non_stop, linux_async
10256 and linux_start_non_stop.
10257 (initialize_low): Install SIGCHLD handler.
10258 * thread-db.c (thread_db_create_event, find_one_thread)
10259 (thread_db_get_tls_address): Use lwpid_of.
10260 * win32-low.c (win32_detach): Adjust to use resume_kind.
10261 (win32_wait): Add `options' argument.
10262 * spu-low.c (spu_resume): Adjust to use resume_kind.
10263 (spu_wait): Add `options' argument.
10264
10265 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10266
10267 Decouple target code from remote protocol.
10268
10269 * target.h (enum target_waitkind): New.
10270 (struct target_waitstatus): New.
10271 (struct target_ops) <wait>: Return an unsigned long. Take a
10272 target_waitstatus pointer instead of a char pointer.
10273 (mywait): Likewise.
10274 * target.c (mywait): Change prototype to return an unsigned long.
10275 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10276 * server.h (thread_from_wait, old_thread_from_wait): Delete
10277 declarations.
10278 (prepare_resume_reply): Change prototype to take a
10279 target_waitstatus.
10280 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10281 (last_status, last_ptid): New.
10282 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10283 pid instead of a signal.
10284 (attach_inferior): Remove "status" and "signal" parameters.
10285 Adjust.
10286 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10287 not as an address.
10288 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10289 (handle_v_requests, myresume): Remove "status" and "signal"
10290 parameters. Adjust.
10291 (handle_status): New.
10292 (main): Delete local `status'. Adjust.
10293 * remote-utils.c: Include target.h.
10294 (prepare_resume_reply): Change prototype to take a
10295 target_waitstatus. Adjust.
10296
10297 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10298 interface.
10299 * spu-low.c (spu_wait): Adjust.
10300 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10301 Delete.
10302 (win32_wait): Adjust.
10303
10304 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10305
10306 * target.h (struct thread_resume): Delete leave_stopped member.
10307 (struct target_ops): Add a `n' argument to the `resume' callback.
10308 * server.c (start_inferior): Adjust.
10309 (handle_v_cont, myresume): Adjust.
10310 * linux-low.c (check_removed_breakpoint): Adjust to resume
10311 interface change, and to removed leave_stopped field.
10312 (resume_ptr): Delete.
10313 (struct thread_resume_array): New.
10314 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10315 resume interface change.
10316 (linux_continue_one_thread, linux_queue_one_thread)
10317 (resume_status_pending_p): Check if the resume field is NULL
10318 instead of checking the leave_stopped member.
10319 (linux_resume): Adjust to the target resume interface change.
10320 * spu-low.c (spu_resume): Adjust to the target resume interface
10321 change.
10322 * win32-low.c (win32_detach, win32_resume): Ditto.
10323
10324 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10325
10326 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10327 flag.
10328 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10329 pending.
10330 (linux_continue_one_thread): Only preserve the stepping flag if
10331 there's a pending breakpoint.
10332
10333 2009-03-31 Pedro Alves <pedro@codesourcery.com>
10334
10335 * server.c (main): After the inferior having exited, call
10336 remote_close before exiting gdbserver.
10337
10338 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10339
10340 Fix size of FPSCR in Power 7 processors.
10341 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10342 (PPC_FEATURE_HAS_DFP): New #define.
10343 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10344 size of the FPSCR.
10345
10346 2009-03-23 Pedro Alves <pedro@codesourcery.com>
10347
10348 * server.c (handle_query) Whitespace and formatting.
10349
10350 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10351
10352 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10353 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10354 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10355 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10356 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10357 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10358 Makefile.in, configure.ac: Fix whitespace throughout.
10359 * configure: Regenerate.
10360
10361 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10362
10363 * inferiors.c (find_inferior): Make it safe for the callback
10364 function to delete the currently iterated inferior.
10365
10366 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10367
10368 * Makefile.in (linuw_low_h): Move higher.
10369 (thread-db.o): Depend on $(linux_low_h).
10370
10371 2009-03-17 Pedro Alves <pedro@codesourcery.com>
10372
10373 Rename "process" to "lwp" throughout.
10374
10375 * linux-low.c (all_processes): Rename to...
10376 (all_lwps): ... this.
10377 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10378 (add_process): Rename to ...
10379 (add_lwp): ... this. Adjust.
10380 (linux_create_inferior): Adjust.
10381 (linux_attach_lwp): Adjust.
10382 (linux_attach): Adjust.
10383 (linux_kill_one_process): Rename to ...
10384 (linux_kill_one_lwp): ... this. Adjust.
10385 (linux_kill): Adjust.
10386 (linux_detach_one_process): Rename to ...
10387 (linux_detach_one_lwp): ... this. Adjust.
10388 (linux_detach): Adjust.
10389 (check_removed_breakpoint): Adjust.
10390 (status_pending_p): Adjust.
10391 (linux_wait_for_process): Rename to ...
10392 (linux_wait_for_lwp): ... this. Adjust.
10393 (linux_wait_for_event): Adjust.
10394 (send_sigstop): Adjust.
10395 (wait_for_sigstop): Adjust.
10396 (stop_all_processes): Rename to ...
10397 (stop_all_lwps): ... this.
10398 (linux_resume_one_process): Rename to ...
10399 (linux_resume_one_lwp): ... this. Adjust.
10400 (linux_set_resume_request, linux_continue_one_thread)
10401 (linux_queue_one_thread, resume_status_pending_p)
10402 (usr_store_inferior_registers, regsets_store_inferior_registers)
10403 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10404 Adjust.
10405 * linux-low.h (get_process): Rename to ...
10406 (get_lwp): ... this. Adjust.
10407 (get_thread_process): Rename to ...
10408 (get_thread_lwp): ... this. Adjust.
10409 (get_process_thread): Rename to ...
10410 (get_lwp_thread): ... this. Adjust.
10411 (struct process_info): Rename to ...
10412 (struct lwp_info): ... this.
10413 (all_processes): Rename to ...
10414 (all_lwps): ... this.
10415 * proc-service.c (ps_lgetregs): Adjust.
10416 * thread-db.c (thread_db_create_event, find_one_thread)
10417 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10418
10419 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10420
10421 * server.c (handle_query): Handle "qAttached".
10422
10423 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10424
10425 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10426 GPLv3, update license URL.
10427
10428 2009-03-01 Doug Evans <dje@google.com>
10429
10430 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10431 (server_h): Add gdb_signals.h.
10432 (signals.o): Update.
10433 * server.h (target_signal_from_host,target_signal_to_host_p)
10434 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10435
10436 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10437
10438 * remote-utils.c (getpkt): Also generate remote-debug
10439 information if noack_mode is set.
10440
10441 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10442
10443 * server.c (handle_query): Report qXfer:siginfo:read and
10444 qXfer:siginfo:write as supported and handle them.
10445 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10446 * linux-low.c (linux_xfer_siginfo): New.
10447 (linux_target_ops): Set it.
10448
10449 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10450
10451 * server.c (gdbserver_usage): Mention --remote-debug.
10452 (main): Accept '--remote-debug' switch.
10453
10454 2009-01-18 Doug Evans <dje@google.com>
10455
10456 * regcache.c (new_register_cache): No need to check result of xcalloc.
10457 * server.c (handle_search_memory): Back out calls to xmalloc,
10458 result is checked and error is returned to user upon failure.
10459 (handle_query): Ditto. Add more checks for result of malloc.
10460 (handle_v_cont): Check result of malloc, report error back to
10461 user upon failure.
10462 (handle_v_run): Ditto. Call freeargv.
10463 * server.h (freeargv): Declare.
10464 * utils.c (freeargv): New fn.
10465
10466 2009-01-15 Doug Evans <dje@google.com>
10467
10468 * gdbreplay.c (perror_with_name): Make arg const char *.
10469 * server.h (target_signal_to_name): Make return type const char *.
10470 * thread-db.c (thread_db_err_str): Make return type const char *.
10471 * utils.c (perror_with_name): Make arg const char *.
10472
10473 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10474
10475 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10476 when handling a EXIT_PROCESS_DEBUG_EVENT.
10477
10478 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10479
10480 * gdbreplay.c (gdbreplay_version): Update copyright year.
10481 * server.c (gdbserver_version): Likewise.
10482
10483 2009-01-05 Doug Evans <dje@google.com>
10484
10485 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10486 (handle_extended_wait): Improve comment.
10487
10488 2008-12-13 Doug Evans <dje@google.com>
10489
10490 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10491 * server.h (ATTR_MALLOC): New macro.
10492 (xmalloc,xcalloc,xstrdup): Declare.
10493 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10494 * inferiors.c: Ditto.
10495 * linux-low.c: Ditto.
10496 * mem-break.c: Ditto.
10497 * regcache.c: Ditto.
10498 * remote-utils.c: Ditto.
10499 * server.c: Ditto.
10500 * target.c: Ditto.
10501 * win32-low.c: Ditto.
10502
10503 2008-12-12 Doug Evans <dje@google.com>
10504
10505 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10506 in debugging printf.
10507
10508 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10509
10510 2008-12-09 Doug Evans <dje@google.com>
10511
10512 * linux-low.h (struct process_info): Delete member tid, unused.
10513 * thread-db.c (find_one_thread): Update.
10514 (maybe_attach_thread): Update.
10515
10516 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10517
10518 * target.h (struct target_ops): Add qxfer_osdata member.
10519 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10520 and dirent.h.
10521 (linux_qxfer_osdata): New functions.
10522 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10523 callback.
10524 * server.c (handle_query): Handle "qXfer:osdata:read:".
10525 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10526 (buffer_xml_printf): New functions.
10527 * server.h (struct buffer): New.
10528 (buffer_grow_str, buffer_grow_str0): New macros.
10529 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10530 (buffer_xml_printf): Declare.
10531
10532 2008-11-24 Doug Evans <dje@google.com>
10533
10534 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10535
10536 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10537
10538 * server.c (handle_v_run): Always use the supplied argument list.
10539
10540 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10541
10542 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10543 (xtensa_regmap_table): Add entry for scompare1.
10544
10545 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10546
10547 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10548 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10549 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10550 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10551 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10552 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10553 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10554 XML target descriptions.
10555 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10556 when inferior is running on an ISA 2.05 or later processor. Add
10557 special case to return offset for full 64-bit slot of FPSCR when
10558 in 32-bits.
10559
10560 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10561
10562 * Makefile.in (SFILES, clean): Added sparc64 files.
10563 (reg-sparc64.o, reg-sparc64.c): New.
10564 * configure.srv (sparc*-*-linux*): New configuration.
10565 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10566 syscall arguments for SPARC.
10567 (regsets_store_inferior_registers): Likewise.
10568 * linux-sparc-low.c: New file.
10569
10570 2008-10-21 Doug Evans <dje@google.com>
10571
10572 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10573 (READLINE_DIR,READLINE_DEP): Delete.
10574 (INTERNAL_CFLAGS): Update.
10575 (LINTFLAGS): Update.
10576
10577 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10578
10579 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10580 whole argv from the last run, not just argv[0].
10581
10582 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10583
10584 * regcache.c (new_register_cache): Return NULL if the register
10585 cache size isn't known yet.
10586 (free_register_cache): Avoid dereferencing a NULL regcache.
10587
10588 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10589
10590 * configure.srv: Merge MIPS and MIPS64.
10591
10592 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10593
10594 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10595
10596 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10597
10598 * Makefile.in: Add required vsx dependencies.
10599
10600 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10601 Declare init_registers_powerpc_vsx32l.
10602 Declare init_registers_powerpc_vsx64l.
10603 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10604 (ppc_arch_setup): Check for VSX in hwcap.
10605 (ppc_fill_vsxregset): New function.
10606 (ppc_store_vsxregset): New function.
10607 Add new VSX entry in regset_info target_regsets.
10608
10609 * configure.srv: Add new VSX dependencies.
10610
10611 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10612
10613 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10614 (remote_open): Set or clear transport_is_reliable.
10615 (putpkt_binary): Don't expect acks in noack mode.
10616 (getpkt): Don't send ack/nac in noack mode.
10617 * server.c (handle_general_set): Handle QStartNoAckMode.
10618 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10619 qSupported.
10620 (main): Reset noack_mode on every connection.
10621 * server.h (noack_mode): Declare.
10622
10623 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10624
10625 * Makefile.in (GDBREPLAY_OBS): New variable.
10626 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10627
10628 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10629 Daniel Jacobowitz <dan@codesourcery.com>
10630
10631 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10632 (usr_store_inferior_registers): Likewise.
10633 (regsets_store_inferior_registers): Likewise.
10634
10635 2008-07-31 Rolf Jansen <rj@surtec.com>
10636 Pedro Alves <pedro@codesourcery.com>
10637
10638 * configure.ac: Check for memmem declaration.
10639 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10640 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10641 (disable_packet_qfThreadInfo): Unconditionally compile.
10642 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10643 * configure, config.in: Regenerate.
10644
10645 2008-07-28 Doug Kwan <dougkwan@google.com>
10646
10647 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10648 (linux_write_memory): Remove declaration of errno.
10649
10650 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10651
10652 * linux-low.c (handle_extended_wait): Do not use "status"
10653 variable uninitialized.
10654
10655 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10656
10657 * server.c (handle_v_attach): Inhibit reporting dll changes.
10658
10659 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10660
10661 * remote-utils.c (prepare_resume_reply): If requested, don't
10662 output "thread:TID" in the T stop reply.
10663
10664 * server.c (disable_packet_vCont, disable_packet_Tthread)
10665 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10666 (handle_query): If requested, disable support for qC, qfThreadInfo
10667 and qsThreadInfo.
10668 (handle_v_requests): If requested, disable support for vCont.
10669 (gdbserver_show_disableable): New.
10670 (main): Handle --disable-packet and --disable-packet=LIST.
10671
10672 * server.h (disable_packet_vCont, disable_packet_Tthread)
10673 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10674
10675 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10676
10677 * server.c (gdbserver_usage): Mention --version.
10678
10679 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10680
10681 * Makefile.in (gdbreplay.o): New rule.
10682
10683 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10684
10685 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10686 message, not gdbserver.
10687
10688 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10689 Nathan Sidwell <nathan@codesourcery.com>
10690 Joseph Myers <joseph@codesourcery.com>
10691
10692 * acinclude.m4: Include ../../config/acx.m4.
10693 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10694 * configure, config.in: Regenerate.
10695 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10696 * server.c (gdbserver_version): Print PKGVERSION.
10697 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10698 (main): Adjust gdbserver_usage calls.
10699 * gdbreplay.c (version, host_name): Add declarations.
10700 (gdbreplay_version, gdbreplay_usage): New.
10701 (main): Accept --version and --help options.
10702
10703 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10704
10705 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10706 (arm_breakpoint_at): Handle Thumb.
10707 (the_low_target): Add comment.
10708
10709 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10710
10711 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10712
10713 2008-05-09 Doug Evans <dje@google.com>
10714
10715 * server.h (decode_search_memory_packet): Declare.
10716 * remote-utils.c (decode_search_memory_packet): New fn.
10717 * server.c (handle_search_memory_1): New fn.
10718 (handle_search_memory): New fn.
10719 (handle_query): Process qSearch:memory packets.
10720
10721 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10722
10723 * regcache.c (registers_length): Remove.
10724 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10725 full register packet.
10726 * regcache.h (registers_length): Remove prototype.
10727 * server.h (PBUFSIZ): Define to 16384.
10728
10729 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10730
10731 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10732 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10733 powerpc-64l.o, and powerpc-altivec64l.o.
10734 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10735 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10736 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10737 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10738 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10739 to srv_xmlfiles.
10740
10741 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10742 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10743 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10744 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10745 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10746 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10747 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10748 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10749 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10750 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10751 (clean): Update.
10752
10753 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10754 (init_registers_powerpc_32l): ... this new prototype.
10755 (init_registers_powerpc_32): Remove, replace by ...
10756 (init_registers_powerpc_altivec32l): ... this new prototype.
10757 (init_registers_powerpc_e500): Remove, replace by ...
10758 (init_registers_powerpc_e500l): ... this new prototype.
10759 (init_registers_ppc64): Remove, replace by ...
10760 (init_registers_powerpc_64l): ... this new prototype.
10761 (init_registers_powerpc_64): Remove, replace by ...
10762 (init_registers_powerpc_altivec64l): ... this new prototype.
10763 (ppc_num_regs): Set to 73.
10764 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10765 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10766 (ppc_cannot_store_register): Handle orig_r3 and trap.
10767 (ppc_arch_setup): Update init_registers_... calls.
10768 (ppc_fill_gregset): Handle orig_r3 and trap.
10769
10770 * inferiors.c (clear_inferiors): Reset current_inferior.
10771
10772 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10773
10774 * acinclude.m4: Add override.m4.
10775 * configure: Regenerate.
10776
10777 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10778
10779 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10780 initial call to init_register_ppc64.
10781
10782 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10783
10784 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10785 single powerpc*-*-linux* case.
10786 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10787
10788 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10789
10790 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10791 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10792 from reg_xmlfiles.
10793 * linux-ppc-low.c: Include <elf.h>.
10794 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10795 (ppc_hwcap): New global variable.
10796 (ppc_regmap): Remove __SPE__ #ifdef sections.
10797 (ppc_regmap_e500): New global variable.
10798 (ppc_cannot_store_register): Update __SPE__ special case.
10799 (ppc_get_hwcap): New function.
10800 (ppc_arch_setup): Use it to determine whether inferior supports
10801 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10802 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10803 Do not access registers if target does not support AltiVec.
10804 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10805 Do not access registers if target does not support SPE.
10806 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10807
10808 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10809
10810 * linux-low.c (disabled_regsets, num_regsets): New.
10811 (use_regsets_p): Delete.
10812 (linux_wait_for_process): Clear disabled_regsets.
10813 (regsets_fetch_inferior_registers): Check and set it.
10814 (regsets_store_inferior_registers): Likewise.
10815 (linux_fetch_registers, linux_store_registers): Do not use
10816 use_regsets_p.
10817 (initialize_low): Allocate disabled_regsets.
10818
10819 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10820
10821 * Makefile.in (LIBOBJS): New.
10822 (OBS): Use LIBOBJS.
10823 (memmem.o): New rule.
10824 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10825 * configure: Regenerated.
10826
10827 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10828
10829 * server.c (handle_query): Never return "unsupported" for
10830 qXfer:features:read queries.
10831
10832 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10833
10834 * server.c (get_features_xml): Fix inverted condition.
10835 (handle_query): Always support qXfer:feature:read.
10836
10837 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10838
10839 * server.c (wrapper_argv): New.
10840 (start_inferior): Handle wrapper_argv. If set, expect an extra
10841 trap.
10842 (gdbserver_usage): Document --wrapper.
10843 (main): Parse --wrapper.
10844
10845 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10846
10847 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10848 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10849 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10850 (ppc_set_pc): Likewise.
10851 (ppc_arch_setup): New function.
10852 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10853 of collect_register.
10854 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10855
10856 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10857
10858 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10859 instead of linux-ppc64-low.o.
10860 * linux-ppc64-low.c: Remove file.
10861 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10862 (linux-ppc64-low.o): Remove rule.
10863
10864 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10865 (init_registers_powerpc_64): Likewise.
10866 (ppc_regmap): Conditionally define depending on __powerpc64__.
10867 (ppc_cannot_store_register): Do not special-case "fpscr" when
10868 compiled on __powerpc64__.
10869 (ppc_collect_ptrace_register): New function.
10870 (ppc_supply_ptrace_register): New function.
10871 (ppc_breakpoint): Change type to "unsigned int".
10872 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10873 (the_low_target): Conditionally provide initializers for the
10874 arch_setup member depending on __powerpc64__. Install
10875 collect_ptrace_register and supply_ptrace_register members.
10876
10877 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10878
10879 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10880 * server.c (gdbserver_xmltarget): Define.
10881 (get_features_xml): Use it to replace "target.xml" and arch_string.
10882
10883 * configure.srv: Remove srv_xmltarget. Add XML files that were
10884 mentioned there to srv_xmlfiles instead. Remove conditional tests
10885 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10886 srv_xmlfiles and srv_regobj to include all possible choices.
10887 * configure.ac (srv_xmltarget): Remove.
10888 (srv_xmlfiles): Do not add "target.xml".
10889 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10890 checks for supplementary target information.
10891 * configure: Regenerate.
10892 * Makefile.in (XML_TARGET): Remove.
10893 (target.xml): Remove rule.
10894 (clean): Do not clean up target.xml.
10895 (.PRECIOUS): Do not mention target.xml.
10896
10897 * target.h (struct target_ops): Remove arch_string member.
10898 * linux-low.c (linux_arch_string): Remove.
10899 (linux_target_ops): Remove arch_string initializer.
10900 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10901 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10902 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10903 * spu-low.c (spu_arch_string): Remove.
10904 (spu_target_ops): Remove arch_string initializer.
10905 * win32-low.c (win32_arch_string): Remove.
10906 (win32_target_ops): Remove arch_string initializer.
10907 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10908 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10909 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10910
10911 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10912
10913 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10914 by collect_ptrace_register and supply_ptrace_register hooks.
10915 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10916 instead of checking for the_low_target.left_pad_xfer.
10917 (usr_store_inferior_registers): Use collect_ptrace_register callback
10918 instead of checking for the_low_target.left_pad_xfer.
10919
10920 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10921 (s390_supply_ptrace_register): Likewise.
10922 (s390_fill_gregset): Call s390_collect_ptrace_register.
10923 (the_low_target): Update.
10924
10925 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10926 (ppc_supply_ptrace_register): Likewise.
10927 (the_low_target): Update.
10928
10929 * linux-i386-low.c (the_low_target): Update.
10930 * linux-x86-64-low.c (the_low_target): Update.
10931
10932 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10933
10934 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10935 reg-s390.o and reg-s390x.o.
10936
10937 * linux-low.c (new_inferior): New global variable.
10938 (linux_create_inferior, linux_attach): Set it.
10939 (linux_wait_for_process): Call the_low_target.arch_setup after the
10940 target has stopped for the first time.
10941 (initialize_low): Do not call the_low_target.arch_setup.
10942
10943 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10944 (s390_set_pc): Likewise.
10945 (s390_arch_setup): New function.
10946 (the_low_target): Use s390_arch_setup as arch_setup routine.
10947
10948 * regcache.c (realloc_register_cache): New function.
10949 (set_register_cache): Call it for each existing regcache.
10950
10951 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10952
10953 * server.h (init_registers): Remove prototype.
10954
10955 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10956 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10957 instead of init_registers ().
10958 * linux-arm-low.c (init_registers_arm): Add prototype.
10959 (init_registers_arm_with_iwmmxt): Likewise.
10960 (the_low_target): Add initializer for arch_setup field.
10961 * linux-cris-low.c (init_registers_cris): Add prototype.
10962 (the_low_target): Add initializer for arch_setup field.
10963 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10964 (the_low_target): Add initializer for arch_setup field.
10965 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10966 (the_low_target): Add initializer for arch_setup field.
10967 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10968 (the_low_target): Add initializer for arch_setup field.
10969 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10970 (the_low_target): Add initializer for arch_setup field.
10971 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10972 (the_low_target): Add initializer for arch_setup field.
10973 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10974 (init_registers_mips64_linux): Likewise.
10975 (the_low_target): Add initializer for arch_setup field.
10976 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10977 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10978 (the_low_target): Add initializer for arch_setup field.
10979 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10980 (init_registers_powerpc_64): Likewise.
10981 (the_low_target): Add initializer for arch_setup field.
10982 * linux-s390-low.c (init_registers_s390): Add prototype.
10983 (init_registers_s390x): Likewise.
10984 (the_low_target): Add initializer for arch_setup field.
10985 * linux-sh-low.c (init_registers_sh): Add prototype.
10986 (the_low_target): Add initializer for arch_setup field.
10987 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10988 (the_low_target): Add initializer for arch_setup field.
10989 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10990 (the_low_target): Add initializer for arch_setup field.
10991
10992 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10993 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10994 instead of init_registers ().
10995 * win32-arm-low.c (init_registers_arm): Add prototype.
10996 (the_low_target): Add initializer for arch_setup field.
10997 * win32-i386-low.c (init_registers_i386): Add prototype.
10998 (the_low_target): Add initializer for arch_setup field.
10999
11000 * spu-low.c (init_registers_spu): Add prototype.
11001 (initialize_low): Call initialie_registers_spu () instead of
11002 initialize_registers ().
11003
11004 2008-02-19 Pedro Alves <pedro@codesourcery.com>
11005
11006 * server.c (handle_v_requests): When handling the vRun and vAttach
11007 packets, if already debugging a process, don't kill it. Return an
11008 error instead.
11009
11010 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11011
11012 * server.c (handle_query): Correct length check.
11013
11014 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11015
11016 * win32-low.c (do_initial_child_stuff): Add process handle
11017 parameter. Set current_process_handle and current_process_id from the
11018 parameters. Clear globals.
11019 (win32_create_inferior): Don't set current_process_handle and
11020 current_process_id here. Instead pass them on the call to
11021 do_initial_child_stuff.
11022 (win32_attach): Likewise.
11023 (win32_clear_inferiors): New.
11024 (win32_kill): Don't close the current process handle or the
11025 current thread handle here. Instead call win32_clear_inferiors.
11026 (win32_detach): Don't open a new handle to the process. Call
11027 win32_clear_inferiors.
11028 (win32_join): Don't rely on current_process_handle; open a new
11029 handle using the process id.
11030 (win32_wait): Call win32_clear_inferiors when the inferior process
11031 has exited.
11032
11033 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11034
11035 * server.c (monitor_show_help): Add "exit".
11036
11037 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11038
11039 * Makefile.in (SFILES): Add linux-xtensa-low.c.
11040 (clean): Add reg-xtensa.c.
11041 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11042 * configure.srv (xtensa*-*-linux*) New target.
11043 * linux-xtensa-low.c: New.
11044 * xtensa-xtregs.c: New.
11045
11046 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11047
11048 * hostio.c: Don't include errno.h.
11049 (errno_to_fileio_errno): Move to hostio-errno.
11050 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11051 error number outputting to the target->hostio_last_error callback.
11052 (hostio_packet_error): Use FILEIO_EINVAL directly.
11053 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11054 calls to hostio_error.
11055 * hostio-errno.c: New.
11056 * server.h (hostio_last_error_from_errno): Declare.
11057 * target.h (target_ops): Add hostio_last_error member.
11058 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11059 as hostio_last_error handler.
11060 * spu-low.c (spu_target_ops): Likewise.
11061 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11062 (wince_hostio_last_error): New functions.
11063 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11064 as hostio_last_error handler.
11065 (win32_target_ops) [!_WIN32_WCE]: Register
11066 hostio_last_error_from_errno as hostio_last_error handler.
11067 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11068 (hostio-errno.o): New rule.
11069 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11070 * configure.srv (srv_hostio_err_objs): New variable. Default to
11071 hostio-errno.o.
11072 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11073 * configure: Regenerate.
11074
11075 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11076
11077 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11078 (linux_kill, linux_detach): Clean up the process list.
11079 * remote-utils.c (remote_open): Improve port number parsing.
11080 (putpkt_binary, input_interrupt): Only send interrupts if the target
11081 is running.
11082 * server.c (extended_protocol): Make static.
11083 (attached): Define earlier.
11084 (exit_requested, response_needed, program_argv): New variables.
11085 (target_running): New.
11086 (start_inferior): Clear attached here.
11087 (attach_inferior): Set attached here.
11088 (require_running): Define.
11089 (handle_query): Use require_running and target_running. Implement
11090 "monitor exit".
11091 (handle_v_attach, handle_v_run): New.
11092 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11093 (gdbserver_usage): Update.
11094 (main): Redo argument parsing. Handle --debug and --multi. Handle
11095 --attach along with other options or after the port. Save
11096 program_argv. Support no initial program. Resynchronize
11097 communication with GDB after an error. Handle "monitor exit".
11098 Use require_running and target_running. Always allow the extended
11099 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11100 restart in extended mode.
11101 * README: Refer to the GDB manual. Update --attach usage.
11102
11103 2007-12-20 Andreas Schwab <schwab@suse.de>
11104
11105 * linux-low.c (STACK_SIZE): Define.
11106 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11107 (linux_test_for_tracefork): Likewise.
11108
11109 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11110
11111 * linux-low.c (linux_wait_for_event): Update messages. Do not
11112 reinsert auto-delete breakpoints.
11113 * mem-break.c (struct breakpoint): Change return type of handler to
11114 int.
11115 (set_breakpoint_at): Update handler type.
11116 (reinsert_breakpoint_handler): Return 1 instead of calling
11117 delete_breakpoint.
11118 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11119 setting a new one.
11120 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11121 * mem-break.h (set_breakpoint_at): Update handler type.
11122 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11123 * win32-low.c (auto_delete_breakpoint): New.
11124 (get_child_debug_event): Use it.
11125
11126 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11127
11128 * configure.ac: Check for pread and pwrite.
11129 * hostio.c (handle_pread): Fall back to lseek and read.
11130 (handle_pwrite): Fall back to lseek and write.
11131 * config.in, configure: Regenerated.
11132
11133 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11134
11135 * server.c (myresume): Add own_buf argument.
11136 (main): Update calls.
11137
11138 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11139
11140 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11141 * remote-utils.c (remote_open): Do not call disable_async_io.
11142 (block_async_io): Delete.
11143 (unblock_async_io): Make static.
11144 (initialize_async_io): New.
11145 * server.c (handle_v_cont): Handle async I/O here.
11146 (myresume): Likewise. Move other common resume tasks here...
11147 (main): ... from here. Call initialize_async_io. Disable async
11148 I/O before the main loop.
11149 * server.h (initialize_async_io): Declare.
11150 (block_async_io, unblock_async_io): Delete prototypes.
11151 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11152
11153 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11154
11155 * remote-utils.c (readchar): Allow binary data in received messages.
11156
11157 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11158
11159 * win32-low.c (attaching): New global.
11160 (win32_create_inferior): Clear the `attaching' global.
11161 (win32_attach): Set the `attaching' global.
11162 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11163 attaching. Only set a breakpoint at the entry point if not
11164 attaching.
11165
11166 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11167
11168 * server.c (main): Don't report dll events on the initial
11169 connection on attaches.
11170
11171 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11172
11173 * server.c (main): Relax numerical bases supported for the pid of
11174 the --attach command line argument.
11175
11176 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11177
11178 * win32-low.c (win32_attach): Call OpenProcess before
11179 DebugActiveProcess, not after. Add last error output to error
11180 call.
11181
11182 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11183
11184 * win32-low.c (win32_get_thread_context)
11185 (win32_set_thread_context): New functions.
11186 (thread_rec): Use win32_get_thread_context.
11187 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11188 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11189 field.
11190
11191 2007-12-03 Leo Zayas
11192 Pedro Alves <pedro_alves@portugalmail.pt>
11193
11194 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11195 global variables.
11196 (child_add_thread): Minor cleanup.
11197 (child_continue): Resume artificially suspended threads before
11198 calling ContinueDebugEvent.
11199 (suspend_one_thread): New.
11200 (fake_breakpoint_event): New.
11201 (get_child_debug_event): Change return type to int. Check here if
11202 gdb sent an interrupt request. If a soft interrupt was requested,
11203 fake a breakpoint event. Return 0 if there is no event to handle,
11204 and 1 otherwise.
11205 (win32_wait): Don't check here if gdb sent an interrupt request.
11206 Ensure there is a valid event to handle.
11207 (win32_request_interrupt): Add soft interruption method as last
11208 resort.
11209
11210 2007-12-03 Leo Zayas
11211 Pedro Alves <pedro_alves@portugalmail.pt>
11212
11213 * win32-low.h (win32_thread_info): Add descriptions to the
11214 structure members. Replace `suspend_count' counter by a
11215 `suspended' flag.
11216 * win32-low.c (thread_rec): Update condition of when to get the
11217 context from the inferior. Rely on ContextFlags being set if it
11218 has already been retrieved. Only suspend the inferior thread if
11219 we haven't already. Warn if that fails.
11220 (continue_one_thread): s/suspend_count/suspended/. Only call
11221 ResumeThread once. Warn if that fails.
11222
11223 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11224
11225 * win32-low.c (win32_wait): Don't read from the inferior when it
11226 has already exited.
11227
11228 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11229
11230 * Makefile.in (win32_low_h): New variable.
11231 (win32-low.o): Add dependency on $(win32_low_h).
11232 (win32-arm-low.o, win32-i386-low.o): New rules.
11233
11234 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11235
11236 * hostio.c: Correct copyright year.
11237
11238 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11239
11240 * Makefile.in (OBS): Add hostio.o.
11241 (hostio.o): New rule.
11242 * server.h (handle_vFile): Declare.
11243 * hostio.c: New file.
11244 * server.c (handle_v_requests): Take packet_len and new_packet_len
11245 for binary packets. Call handle_vFile.
11246 (main): Update call to handle_v_requests.
11247
11248 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11249
11250 * linux-low.c: Include <sched.h>.
11251
11252 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11253
11254 * linux-low.c (linux_tracefork_grandchild): New.
11255 (linux_tracefork_child): Use clone.
11256 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11257
11258 2007-10-31 Joel Brobecker <brobecker@adacore.com>
11259
11260 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11261
11262 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11263
11264 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11265
11266 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11267
11268 * inferiors.c (change_inferior_id): Delete.
11269 (add_pid_to_list, pull_pid_from_list): New.
11270 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11271 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11272 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11273 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11274 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11275 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11276 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11277 (using_threads): Always set to 1.
11278 (handle_extended_wait): New.
11279 (add_process): Do not set TID.
11280 (linux_create_inferior): Set must_set_ptrace_flags.
11281 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11282 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11283 (linux_thread_alive): Rename TID argument to LWPID.
11284 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11285 (linux_wait_for_event): Do not use TID or check using_threads. Update
11286 call to dead_thread_notify. Call handle_extended_wait.
11287 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11288 (send_sigstop): Delete sigstop_sent.
11289 (wait_for_sigstop): Avoid TID.
11290 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11291 (linux_test_for_tracefork): New.
11292 (linux_lookup_signals): Use thread_db_active and
11293 linux_supports_tracefork_flag.
11294 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11295 * linux-low.h (get_process_thread): Avoid TID.
11296 (struct process_ifo): Move thread_known and tid to the end. Remove
11297 sigstop_sent.
11298 (linux_attach_lwp, thread_db_init): Update prototypes.
11299 * server.h (change_inferior_id): Delete prototype.
11300 (add_pid_to_list, pull_pid_from_list): New prototypes.
11301 * thread-db.c (thread_db_use_events): New.
11302 (find_first_thread): Rename to...
11303 (find_one_thread): ...this. Update callers and messages. Do not
11304 call fatal. Check thread_db_use_events. Do not call
11305 change_inferior_id or new_thread_notify.
11306 (maybe_attach_thread): Update. Do not call new_thread_notify.
11307 (thread_db_init): Set thread_db_use_events. Check use_events.
11308 * utils.c (fatal, warning): Correct message prefix.
11309
11310 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11311
11312 * Makefile.in (clean): Remove new files.
11313 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11314 (powerpc-64.o, powerpc-64.c): New rules.
11315 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11316 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11317 with SPE.
11318 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11319 SPE targets.
11320 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11321 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11322 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11323 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11324 (target_regsets): Add AltiVec and SPE register sets.
11325 * configure.ac: Check for AltiVec and SPE.
11326 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11327 (ppc_fill_vrregset, ppc_store_vrregset): New.
11328 (target_regsets): Add AltiVec register set.
11329 * configure: Regenerated.
11330
11331 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11332
11333 * linux-low.c (O_LARGEFILE): Define.
11334 (linux_read_memory): Use /proc/PID/mem.
11335 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11336 * configure, config.in: Regenerated.
11337
11338 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11339
11340 * linux-low.c (linux_wait_for_event): Do not pass signals while
11341 single-stepping.
11342
11343 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11344
11345 * win32-low.c (create_process): New.
11346 (win32_create_inferior): Use create_process instead of
11347 CreateProcess. If create_process failed retry appending an ".exe"
11348 suffix. Store the GetLastError result immediatelly after
11349 create_process calls and use it on the call to error.
11350
11351 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11352
11353 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11354
11355 2007-08-23 Joel Brobecker <brobecker@adacore.com>
11356
11357 * configure.ac: Switch license to GPLv3.
11358
11359 2007-08-01 Michael Snyder <msnyder@access-company.com>
11360
11361 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11362
11363 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11364
11365 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11366 typedef.
11367 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11368 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11369 CloseToolhelp32Snapshot.
11370 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11371 CloseToolhelp32Snapshot.
11372
11373 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
11374
11375 * server.c (main): Check for inferior exit before main loop.
11376
11377 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11378
11379 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11380 instead of on tmp_desc.
11381
11382 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11383 Daniel Jacobowitz <dan@codesourcery.com>
11384
11385 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11386 (add_thread): Minor cleanups.
11387 (clear_inferiors): Move lower in the file. Clear the DLL
11388 list.
11389 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11390 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11391 (xml_escape_text): New.
11392 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11393 for qSupported.
11394 (handle_v_cont): Report errors.
11395 (gdbserver_version): Update.
11396 (main): Correct size of own_buf. Do not report initial DLL events.
11397 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11398 (unloaded_dll, xml_escape_text): New.
11399 * win32-low.c (enum target_waitkind): Update comments.
11400 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11401 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11402 (win32_EnumProcessModules, win32_GetModuleInformation)
11403 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11404 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11405 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11406 (win32_Module32First, win32_Module32Next, load_toolhelp)
11407 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11408 (get_child_debug_event): Handle DLL events.
11409 (win32_wait): Likewise.
11410
11411 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11412
11413 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11414 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11415
11416 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11417
11418 * win32-low.c (handle_output_debug_string): Ignore event if not
11419 waiting.
11420
11421 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11422
11423 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11424
11425 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11426
11427 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11428
11429 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11430
11431 * inferiors.c (change_inferior_id): Add comment.
11432 * linux-low.c (check_removed_breakpoint): Add an early
11433 prototype. Improve debug output.
11434 (linux_attach): Doc update.
11435 (linux_detach_one_process, linux_detach): Clean up before releasing
11436 each process.
11437 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11438 * linux-low.h (struct process_info): Doc improvement.
11439 * mem-break.c (delete_all_breakpoints): New.
11440 * mem-break.h (delete_all_breakpoints): New prototype.
11441 * thread-db.c (find_first_thread): New.
11442 (thread_db_create_event): Call it instead of
11443 thread_db_find_new_threads. Clean up unused variables.
11444 (maybe_attach_thread): Remove first thread handling.
11445 (thread_db_find_new_threads): Use find_first_thread.
11446 (thread_db_get_tls_address): Likewise.
11447
11448 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11449
11450 * thread-db.c (thread_db_find_new_threads): Add prototype.
11451 (thread_db_create_event): Check for the main thread before adding
11452 a new thread.
11453 (maybe_attach_thread): Only enable event reporting if TID == 0.
11454 (thread_db_get_tls_address): Check for new threads.
11455
11456 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11457
11458 * linux-low.c (linux_create_inferior): Try execv before execvp.
11459 * spu-low.c (spu_create_inferior): Likewise.
11460
11461 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11462
11463 * linux-low.c (linux_create_inferior): Change execv to execvp.
11464 * spu-low.c (spu_create_inferior): Likewies.
11465
11466 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11467
11468 * Makefile.in (clean): Clean new files instead of deleted ones.
11469 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11470 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11471 rules.
11472 * configure.srv: Specify XML files and new regformats for MIPS and
11473 MIPS64 GNU/Linux.
11474 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11475 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11476 an entry for the restart register.
11477 (mips_cannot_fetch_register, mips_cannot_store_register)
11478 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11479 register names to match the XML descriptions.
11480 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11481 restart register instead of $0.
11482
11483 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11484 Markus Deuling <deuling@de.ibm.com>
11485
11486 * remote-utils.c (decode_xfer_write): New function.
11487 * server.h (decode_xfer_write): Add prototype.
11488 * server.c (handle_query): Add PACKET_LEN argument. Support
11489 qXfer:spu:read and qXfer:spu:write packets.
11490 (main): Pass packet_len to handle_query.
11491 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11492 * target.h (target_ops): Add qxfer_spu.
11493
11494 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11495
11496 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11497 accessing non-seekable spufs files.
11498
11499 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11500
11501 * server.c (handle_query): Add reply for qC packet.
11502
11503 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11504 Leo Zayas <lerele@champenstudios@com>
11505
11506 * server.h (check_remote_input_interrupt_request): New function.
11507 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11508 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11509 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11510 (check_remote_input_interrupt_request): New function.
11511 * server.h (check_remote_input_interrupt_request): Declare.
11512 * win32-low.c (winapi_DebugBreakProcess,
11513 winapi_GenerateConsoleCtrlEvent): New typedefs.
11514 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11515 to 250 ms.
11516 (win32_wait): Check for remote interrupt request
11517 with check_remote_input_interrupt_request.
11518 (win32_request_interrupt): New function.
11519 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11520
11521 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11522
11523 * win32-low.c (debug_registers_changed,
11524 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11525 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11526 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11527 (thread_rec): Get context using the low target.
11528 (child_add_thread): Call thread_added on the low target,
11529 which does the same thing.
11530 (regptr): Delete.
11531 (do_initial_child_stuff): Remove debug registers references.
11532 Set context using the low target. Resume threads after
11533 setting the contexts.
11534 (child_continue): Remove dead variable. Remove debug
11535 registers references.
11536 (child_fetch_inferior_registers): Go through the low target.
11537 (do_child_store_inferior_registers): Remove.
11538 (child_store_inferior_registers): Go through the low target.
11539 (win32_resume): Remove debug registers references.
11540 Set context using the low target.
11541 (handle_exception): Change return type to void. Don't record
11542 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11543 first chance exception.
11544 (get_child_debug_event): Change return type to void. Remove
11545 goto loop. Always return after waiting for debug event.
11546 (win32_wait): Convert to switch statement. Handle spurious
11547 events.
11548
11549 * win32-i386-low.c (debug_registers_changed,
11550 debug_registers_used): New.
11551 (initial_stuff): Rename to ...
11552 (i386_initial_stuff): ... this. Clear debug registers
11553 state variables.
11554 (store_debug_registers): Delete.
11555 (i386_get_thread_context): New.
11556 (load_debug_registers): Delete.
11557 (i386_set_thread_context): New.
11558 (i386_thread_added): New.
11559 (single_step): Rename to ...
11560 (i386_single_step): ... this.
11561 (do_fetch_inferior_registers): Rename to ...
11562 (i386_fetch_inferior_register): ... this.
11563 (i386_store_inferior_register): New.
11564 (the_low_target): Adapt to new interface.
11565
11566 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11567 (arm_get_thread_context): New.
11568 (arm_set_thread_context): New.
11569 (regptr): New.
11570 (do_fetch_inferior_registers): Rename to ...
11571 (arm_fetch_inferior_register): ... this.
11572 (arm_store_inferior_register): New.
11573 (arm_wince_breakpoint): Reimplement as unsigned long.
11574 (arm_wince_breakpoint_len): Define.
11575 (the_low_target): Adapt to new interface.
11576
11577 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11578 load_debug_registers. Add get_thread_context, set_thread_context,
11579 thread_added and store_inferior_register. Rename
11580 fetch_inferior_registers to fetch_inferior_register.
11581 (regptr): Remove declaration.
11582
11583 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11584
11585 * linux-low.c (linux_detach): Change return type to int. Return 0.
11586 * spu-low.c (spu_detach): Likewise.
11587
11588 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11589
11590 * target.h (target_ops): Change return type of detach to int.
11591 Add join.
11592 (join_inferior): New.
11593 * server.c (main): Don't skip detach support on mingw32.
11594 If the inferior doesn't support detaching return error.
11595 Call join_inferior instead of using waitpid.
11596 * linux-low.c (linux_join): New.
11597 (linux_target_op): Add linux_join.
11598 * spu-low.c (spu_join): New.
11599 (spu_target_ops): Add spu_join.
11600 * win32-low.c (win32_detach): Adapt to new interface.
11601 Reopen current_process_handle before detaching. Issue a child
11602 resume before detaching.
11603 (win32_join): New.
11604 (win32_target_op): Add win32_join.
11605
11606 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11607
11608 * win32-low.c (win32-attach): Fix return value.
11609 * target.h (target_ops): Describe ATTACH return values.
11610
11611 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11612
11613 * win32-low.c (GETPROCADDRESS): Define.
11614 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11615 (winapi_DebugSetProcessKillOnExit): Likewise.
11616 (win32_create_inferior): Force usage of ansi CreateProcessA.
11617 (win32_attach): Use GETPROCADDRESS.
11618 (win32_detach): Likewise.
11619
11620 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11621
11622 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11623
11624 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11625
11626 * win32-low.c: Commit leftover changes from 2007-03-29.
11627
11628 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11629
11630 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11631 fields short instead of int. Add explicit padding.
11632 (i387_cache_to_fsave): Remove unnecessary casts.
11633 (i387_fsave_to_cache): Doc fix.
11634 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11635
11636 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11637
11638 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11639 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11640
11641 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11642
11643 * configure.srv (arm*-*-mingw32ce*): Move near the other
11644 arm targets.
11645
11646 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11647
11648 * configure.ac: Add errno checking.
11649 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11650 sys/file.h and malloc.h.
11651 (AC_CHECK_DECLS): Add perror.
11652 (srv_mingwce): Handle.
11653 * configure.srv (i[34567]86-*-cygwin*): Add
11654 win32-i386-low.o to srv_tgtobj.
11655 (i[34567]86-*-mingw*): Likewise.
11656 (arm*-*-mingw32ce*): Add case.
11657 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11658 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11659 [__MINGW32CE__] (strerror): New function.
11660 [__MINGW32CE__] (errno): Define to GetLastError.
11661 [__MINGW32CE__] (COUNTOF): New macro.
11662 (remote_open): Remove extra close call.
11663 * mem-break.c (delete_breakpoint_at): New function.
11664 * mem-break.h (delete_breakpoint_at): Declare.
11665 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11666 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11667 [USE_WIN32API] (read, write): Add char* casts.
11668 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11669 * server.h: Include wincecompat.h on Windows CE.
11670 [HAVE_ERRNO_H]: Check.
11671 (perror): Declare if not declared.
11672 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11673 (perror_with_name): Remove errno declaration.
11674 * wincecompat.h: New.
11675 * wincecompat.c: New.
11676 * win32-low.h: New.
11677 * win32-arm-low.c: New.
11678 * win32-i386-low.c: New.
11679 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11680 (OUTMSG2): Make it safe.
11681 (_T): New macro.
11682 (COUNTOF): New macro.
11683 (NUM_REGS): Get it from the low target.
11684 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11685 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11686 (thread_rec): Let low target handle debug registers.
11687 (child_add_thread): Likewise.
11688 (child_init_thread_list): Likewise.
11689 (continue_one_thread): Likewise.
11690 (regptr): New.
11691 (do_child_fetch_inferior_registers): Move to ...
11692 * win32-i386-low.c: ... here, and rename to ...
11693 (do_fetch_inferior_registers): ... this.
11694 * win32-low.c (child_fetch_inferior_registers):
11695 Go through the low target.
11696 (do_child_store_inferior_registers): Use regptr.
11697 (strwinerror): New function.
11698 (win32_create_inferior): Handle Windows CE.
11699 Use strwinerror instead of strerror on Windows error
11700 codes. Add program to the error output.
11701 Don't close the main thread handle on Windows CE.
11702 (win32_attach): Use coredll.dll on Windows CE.
11703 (win32_kill): Close current process and current
11704 thread handles.
11705 (win32_detach): Use coredll.dll on Windows CE.
11706 (win32_resume): Let low target handle debug registers, and
11707 step request.
11708 (handle_exception): Add/Remove initial breakpoint. Avoid
11709 non-existant WSTOPSIG on Windows CE.
11710 (win32_read_inferior_memory): Cast to remove warning.
11711 (win32_arch_string): Go through the low target.
11712 (initialize_low): Call set_breakpoint_data with the low
11713 target's breakpoint.
11714 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11715 FOP_REGNUM, mappings): Move to ...
11716 * win32-i386-low.c: ... here.
11717 * win32-low.c (win32_thread_info): Move to ...
11718 * win32-low.h: ... here.
11719 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11720 win32-arm-low.c and wincecompat.c.
11721 (all:): Add $EXEEXT.
11722 (install-only:): Likewise.
11723 (gdbserver:): Likewise.
11724 (gdbreplay:): Likewise.
11725 * config.in: Regenerate.
11726 * configure: Regenerate.
11727
11728 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11729
11730 * win32-low.c: Rename typedef thread_info to
11731 win32_thread_info throughout.
11732
11733 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11734
11735 * win32-i386-low.c: Rename to ...
11736 * win32-low.c: ... this.
11737 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11738 * Makefile.in: Likewise.
11739
11740 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11741
11742 * remote-utils.c (monitor_output): Constify msg parameter.
11743 * server.h (monitor_output): Likewise.
11744 * win32-i386-low.c (handle_output_debug_string): New.
11745 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11746 handle_output_debug_string.
11747 (get_child_debug_event): Likewise.
11748
11749 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11750
11751 * server.c (main): Correct strtoul check.
11752
11753 2007-03-27 Jon Ringle <jon@ringle.org>
11754
11755 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11756
11757 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11758
11759 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11760
11761 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11762
11763 * terminal.h: Check HAVE_SGTTY_H.
11764
11765 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11766
11767 * remote-utils.c (remote_open): Print out the assigned port number.
11768
11769 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11770
11771 * remote-utils.c (monitor_output): New function.
11772 * server.c (debug_threads): Define here.
11773 (monitor_show_help): New function.
11774 (handle_query): Handle qRcmd.
11775 (main): Do not handle 'd' packet.
11776 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11777 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11778 of debug_threads.
11779
11780 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11781
11782 * Makefile.in (EXEEXT): New.
11783 (clean): Use $(EXEEXT).
11784
11785 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11786
11787 * target.h (target_ops): Rename send_signal to request_interrupt,
11788 and remove enum target_signal parameter.
11789 * linux-low.c (linux_request_interrupt): Rename from
11790 linux_send_signal, and always send SIGINT.
11791 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11792 and always send SIGINT.
11793 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11794 of send_signal.
11795 (input_interrupt): Likewise.
11796
11797 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11798
11799 * server.c (get_features_xml): Check if target implemented
11800 arch_string.
11801 * win32-i386-low.c (win32_arch_string): New.
11802 (win32_target_ops): Add win32_arch_string as arch_string member.
11803
11804 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11805
11806 * spu-low.c (spu_arch_string): New.
11807 (spu_target_ops): Add spu_arch_string.
11808
11809 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11810
11811 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11812 * configure.ac: Do not check for terminal.h.
11813 * configure, config.in: Regenerated.
11814
11815 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11816
11817 * Makefile.in (OBS): Add $(XML_BUILTIN).
11818 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11819 (clean): Update.
11820 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11821 (arm-with-iwmmxt.c): New.
11822 * config.in, configure: Regenerate.
11823 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11824 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11825 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11826 (arm*-*-linux*): Add iWMMXt and regset support.
11827 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11828 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11829 (arm_store_wmmxregset, target_regsets): New.
11830 * server.c (get_features_xml): Take annex argument. Check builtin
11831 XML documents.
11832 (handle_query): Handle multiple annexes.
11833
11834 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11835
11836 * remote-utils.c [USE_WIN32API] (read, write): Define.
11837 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11838 write.
11839
11840 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11841
11842 * linux-i386-low.c (the_low_target): Set arch_string.
11843 * linux-x86-64-low.c (the_low_target): Likewise.
11844 * linux-low.c (linux_arch_string): New.
11845 (linux_target_ops): Add it.
11846 * linux-low.h (struct linux_target_ops): Add arch_string.
11847 * server.c (write_qxfer_response): Use const void * for DATA.
11848 (get_features_xml): New.
11849 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11850 * target.h (struct target_ops): Add arch_string method.
11851
11852 2007-01-03 Denis Pilat <denis.pilat@st.com>
11853 Daniel Jacobowitz <dan@codesourcery.com>
11854
11855 * linux-low.c (linux_kill): Handle being called with no threads.
11856 * win32-i386-low.c (win32_kill): Likewise.
11857 (get_child_debug_event): Clear current_process_handle.
11858
11859 2006-12-30 Denis PILAT <denis.pilat@st.com>
11860 Daniel Jacobowitz <dan@codesourcery.com>
11861
11862 * remote-utils.c (remote_open): Check the type of specified
11863 serial port devices before opening them.
11864 * server.c (main): Kill the inferior if an error occurs during
11865 the first remote_open.
11866
11867 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11868
11869 * README: Update supported targets.
11870
11871 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11872
11873 * Makefile.in (clean): Remove reg-mips64.c.
11874 (reg-mips64.c, reg-mips64.o): New rules.
11875 * configure.srv: Handle mips64. Include regset support for mips.
11876 * linux-mips-low.c (union mips_register): New.
11877 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11878 (mips_breakpoint, mips_breakpoint_at): Use int.
11879 (mips_collect_register, mips_supply_register)
11880 (mips_collect_register_32bit, mips_supply_register_32bit)
11881 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11882 (mips_store_fpregset, target_regsets): New.
11883 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11884
11885 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11886
11887 * configure.srv: Add target "spu*-*-*".
11888 * Makefile.in (clean): Remove reg-spu.c.
11889 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11890 * spu-low.c: New file.
11891
11892 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11893
11894 * configure.ac: Correct td_thr_tls_get_addr test.
11895 * configure: Regenerated.
11896
11897 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11898
11899 * linux-low.c (linux_wait_for_event): Reformat. Use the
11900 pass_signals array.
11901 * remote-utils.c (decode_address_to_semicolon): New.
11902 * server.c (pass_signals, handle_general_set): New.
11903 (handle_query): Mention QPassSignals for qSupported.
11904 (main): Call handle_general_set.
11905 * server.h (pass_signals, decode_address_to_semicolon): New.
11906
11907 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11908
11909 * server.c (handle_query): Correct error handling for read_auxv.
11910
11911 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11912
11913 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11914 and srv_linux_thread_db to yes.
11915 * linux-s390-low.c (s390_fill_gregset): New function.
11916 (target_regsets): Define data structure.
11917
11918 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11919
11920 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11921 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11922 * config.in, configure: Regenerated.
11923 * inferiors.c (gdb_id_to_thread): New function.
11924 (gdb_id_to_thread_id): Use it.
11925 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11926 * linux-low.h (struct process_info): Add th member.
11927 (thread_db_get_tls_address): New prototype.
11928 * remote-utils.c (decode_address): Make non-static.
11929 * server.c (handle_query): Handle qGetTLSAddr.
11930 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11931 * target.h (struct target_ops): Add get_tls_address.
11932 * thread-db.c (maybe_attach_thread): Save the thread handle.
11933 (thread_db_get_tls_address): New.
11934
11935 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11936
11937 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11938 (linux_resume_one_process): Take a siginfo_t *. Update all
11939 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11940 (struct pending_signals): Add a siginfo_t.
11941 (linux_wait_for_process): Always set last_status.
11942 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11943 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11944 * linux-low.h (struct process_info): Add last_status.
11945
11946 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11947
11948 * remote-utils.c (try_rle): New function.
11949 (putpkt_binary): Use it.
11950
11951 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11952
11953 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11954 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11955 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11956 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11957 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11958 point registers.
11959
11960 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11961
11962 * server.c (terminal_fd): New variable.
11963 (old_foreground_pgrp): Likewise.
11964 (restore_old_foreground_pgrp): New function.
11965 (start_inferior): Record the terminal file descriptor in terminal_fd
11966 and its original foreground group in old_foreground_pgrp. Register
11967 restore_old_foreground_pgrp with atexit().
11968
11969 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11970
11971 * server.c (handle_query): Correct qPart to qXfer.
11972
11973 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11974
11975 * configure.ac: Check for more headers which are missing on
11976 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11977 * configure.srv: Add Cygwin and mingw32.
11978 * remote-utils.c: Don't include headers unconditionally which
11979 are missing on mingw32. Include <winsock.h> for mingw32.
11980 (remote_open): Adjust for mingw32 support. Flush
11981 standard error after writing to it.
11982 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11983 (unblock_async_io, enable_async_io, disable_async_io)
11984 (readchar, getpkt): Update for Winsock support.
11985 (prepare_resume_reply): Expect a protocol signal number.
11986 * server.c: Disable <sys/wait.h> on mingw32.
11987 (start_inferior): Adjust for mingw32 support. Flush
11988 standard error after writing to it.
11989 (attach_inferior): Likewise. Use protocol signal
11990 numbers.
11991 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11992 and names.
11993 * win32-i386-low.c: New file.
11994 * Makefile.in (XM_CLIBS): Set.
11995 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11996 (win32-i386-low.o): New dependency rule.
11997 * linux-low.c (linux_wait): Use target signal numbers.
11998 * target.h (struct target_ops): Doc fix.
11999 * server.h (target_signal_to_name): New prototype.
12000 * gdbreplay.c: Don't include headers unconditionally which
12001 are missing on mingw32. Include <winsock.h> for mingw32.
12002 (remote_close, remote_open): Adjust for Winsock support.
12003 * configure, config.in: Regenerated.
12004
12005 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12006
12007 * server.c (decode_xfer_read, write_qxfer_response): New.
12008 (handle_query): Take a packet length argument. Handle
12009 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12010 the qSupported response.
12011 (main): Update call to handle_query.
12012
12013 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12014
12015 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12016 (putpkt_binary): Renamed from putpkt and adjusted for binary
12017 data.
12018 (putpkt): New wrapper for putpkt_binary.
12019 (readchar): Don't mask off the high bit.
12020 (decode_X_packet): New function.
12021 * server.c (main): Call putpkt_binary if a handler sets the packet
12022 length. Save the length of the incoming packet. Handle 'X'.
12023 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12024
12025 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12026
12027 * server.c (handle_query): Handle qSupported.
12028
12029 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12030
12031 * remote-utils.c (all_symbols_looked_up): New variable.
12032 (look_up_one_symbol): Check it.
12033 * server.h (look_up_one_symbol): New declaration.
12034 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12035
12036 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12037
12038 * Makefile.in (linux-arm-low.o): Update dependencies.
12039 * linux-arm-low.c: Include "gdb_proc_service.h".
12040 (PTRACE_GET_THREAD_AREA): Define.
12041 (ps_get_thread_area): New function.
12042
12043 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12044
12045 * configure.srv (m68k*-*-uclinux*): New target.
12046 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12047 (linux_resume_one_process): Remove extraneous cast.
12048 (linux_read_offsets): New.
12049 (linux_target_op): Add linux_read_offsets on mmuless systems.
12050 * server.c (handle_query): Add qOffsets logic.
12051 * target.h (struct target_ops): Add read_offsets.
12052
12053 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12054
12055 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12056 (PTRACE_GET_THREAD_AREA): Define.
12057 (ps_get_thread_area): New function.
12058 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12059 (linux-x86-64-low.o): Update.
12060
12061 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12062
12063 * configure.ac: Remove checks for prfpregset_t.
12064 * gdb_proc_service.h: New file.
12065 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12066 new "gdb_proc_service.h".
12067 * proc-service.c: Likewise.
12068 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12069 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12070 * Makefile.in (gdb_proc_service_h): Updated.
12071 * configure, config.in: Regenerated.
12072
12073 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12074
12075 * remote-utils.c (prepare_resume_reply): Move declaration
12076 of gdb_id_from_wait to the top of the block.
12077
12078 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12079
12080 * linux-low.c (regsets_store_inferior_registers): Read the regset
12081 from the target before filling it.
12082
12083 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12084
12085 * server.c (attach_inferior): Return SIGTRAP for a successful
12086 attach.
12087
12088 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12089
12090 * Makefile.in (OBS): Add version.o.
12091 (STAGESTUFF): Delete.
12092 (version.o): Add dependencies.
12093 (version.c): Replace rule.
12094 (clean): Remove version.c.
12095 * server.c (gdbserver_version): New.
12096 (gdbserver_usage): Use printf.
12097 (main): Handle --version and --help.
12098 * server.h (version, host_name): Add declarations.
12099
12100 2005-12-23 Eli Zaretskii <eliz@gnu.org>
12101
12102 * linux-arm-low.c:
12103 * linux-arm-low.c:
12104 * inferiors.c:
12105 * i387-fp.h:
12106 * i387-fp.c:
12107 * gdbreplay.c:
12108 * regcache.c:
12109 * proc-service.c:
12110 * mem-break.h:
12111 * mem-break.c:
12112 * linux-x86-64-low.c:
12113 * linux-sh-low.c:
12114 * linux-s390-low.c:
12115 * linux-ppc64-low.c:
12116 * linux-ppc-low.c:
12117 * linux-mips-low.c:
12118 * linux-m68k-low.c:
12119 * linux-m32r-low.c:
12120 * linux-low.h:
12121 * linux-low.c:
12122 * linux-ia64-low.c:
12123 * linux-i386-low.c:
12124 * linux-crisv32-low.c:
12125 * thread-db.c:
12126 * terminal.h:
12127 * target.h:
12128 * target.c:
12129 * server.h:
12130 * server.c:
12131 * remote-utils.c:
12132 * regcache.h:
12133 * utils.c:
12134 * Makefile.in:
12135 * configure.ac:
12136 * gdbserver.1: Add (C) after Copyright. Update the FSF
12137 address.
12138
12139 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12140
12141 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12142 (arm_breakpoint_at): Recognize both breakpoints.
12143 (the_low_target): Use the correct breakpoint instruction.
12144
12145 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12146
12147 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12148 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12149 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12150 (the_low_target): Update.
12151
12152 2005-10-25 Andreas Schwab <schwab@suse.de>
12153
12154 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12155
12156 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12157 (ia64_num_regs): Reduce to 462.
12158
12159 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12160
12161 * acinclude.m4: Correct quoting.
12162 * aclocal.m4: Regenerated.
12163
12164 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12165 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12166 (thread_db_init): Call thread_db_err_str.
12167 * configure.ac: Check for TD_VERSION.
12168 * config.in, configure: Regenerated.
12169
12170 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12171
12172 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12173
12174 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12175
12176 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12177 is not available. Define HAVE_PTRACE_GETREGS if it is.
12178 * config.in, configure: Regenerated.
12179 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12180 * linux-i386-low.c, linux-m68k-low.c: Update to use
12181 HAVE_PTRACE_GETREGS.
12182 * linux-low.c (regsets_fetch_inferior_registers)
12183 (regsets_store_inferior_registers): Only return 0 if we processed
12184 GENERAL_REGS.
12185 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12186 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12187
12188 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12189
12190 * inferiors.c (struct thread_info): Add gdb_id.
12191 (add_thread): Add gdb_id argument.
12192 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12193 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12194 calls to add_thread.
12195 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12196 * server.c (handle_query): Use thread_to_gdb_id.
12197 (handle_v_cont, main): Use gdb_id_to_thread_id.
12198 * server.h (add_thread): Update prototype.
12199 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12200 prototypes.
12201
12202 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12203
12204 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12205 left-padded registers.
12206 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12207 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12208
12209 2005-07-01 Steve Ellcey <sje@cup.hp.com>
12210
12211 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12212 * configure: Regenerate.
12213 * config.in: Regenerate.
12214 * server.h (NEED_DECLARATION_STRERROR):
12215 Replace with !HAVE_DECL_STRERROR.
12216
12217 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12218
12219 * linux-low.c (linux_wait, linux_send_signal): Don't test
12220 an unsigned long variable for > 0 if it could be MAX_ULONG.
12221 * server.c (myresume): Likewise.
12222 * target.c (set_desired_inferior): Likewise.
12223
12224 2005-06-13 Mark Kettenis <kettenis@gnu.org>
12225
12226 * configure.ac: Simplify and improve check for socklen_t.
12227 * configure, config.in: Regenerate.
12228
12229 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12230
12231 * acconfig.h: Remove.
12232 * configure.ac: Add a test for socklen_t. Use three-argument
12233 AC_DEFINE throughout.
12234 * config.in: Regenerated using autoheader 2.59.
12235 * configure: Regenerated.
12236
12237 * gdbreplay.c (socklen_t): Provide a default.
12238 (remote_open): Use socklen_t.
12239 * remote-utils.c (socklen_t): Provide a default.
12240 (remote_open): Use socklen_t.
12241 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12242 unsigned char.
12243
12244 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12245 char for buffers.
12246 * linux-low.c (linux_read_memory, linux_write_memory)
12247 (linux_read_auxv): Likewise.
12248 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12249 (check_mem_write): Likewise.
12250 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12251 Likewise.
12252 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12253 (registers_from_string, register_data): Likewise.
12254 * server.c (handle_query, main): Likewise.
12255 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12256 (decode_M_packet): Likewise.
12257 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12258 * target.h (struct target_ops): Update read_memory, write_memory,
12259 and read_auxv.
12260 (read_inferior_memory, write_inferior_memory): Update.
12261 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12262 to unsigned char *.
12263 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12264 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12265 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12266 linux-s390-low.c, linux-sh-low.c: Update for changes in
12267 read_inferior_memory and the_low_target->breakpoint.
12268
12269 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12270
12271 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12272 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12273 * configure.srv: Add powerpc64-*-linux*.
12274 * linux-ppc64-low.c: New file.
12275
12276 2005-05-23 Orjan Friberg <orjanf@axis.com>
12277
12278 * linux-cris-low.c: New file with support for CRIS.
12279 * linux-crisv32-low.c: Ditto for CRISv32.
12280 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12281 (clean): Add reg-cris.c and reg-crisv32.c.
12282 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12283 reg-crisv32.o, and reg-crisv32.c to make rules.
12284 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12285 recognized targets.
12286
12287 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12288
12289 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12290 of sizeof (PTRACE_XFER_TYPE).
12291 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12292
12293 2005-05-12 Orjan Friberg <orjanf@axis.com>
12294
12295 * target.h (struct target_ops): Add insert_watchpoint,
12296 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12297 pointers for hardware watchpoint support.
12298 * linux-low.h (struct linux_target_ops): Ditto.
12299 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12300 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12301 to linux_target_ops.
12302 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12303 reply packet.
12304 * server.c (main): Recognize 'Z' and 'z' packets.
12305
12306 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12307
12308 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12309 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12310 (the_low_target): Add new members.
12311
12312 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12313
12314 * proc-service.c (ps_lgetregs): Search all_processes instead of
12315 all_threads.
12316
12317 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12318
12319 * server.c (start_inferior): Change return type to int.
12320 (attach_inferior): Change sigptr to int *.
12321 (handle_v_cont, handle_v_requests): Change signal to int *.
12322 (main): Change signal to int.
12323
12324 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
12325
12326 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12327 * configure.srv: Add m32r*-*-linux*.
12328 * linux-m32r-low.c: New file.
12329
12330 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12331
12332 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12333
12334 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12335
12336 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12337 Take unsigned long arguments for PIDs.
12338 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12339 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12340 (wait_for_sigstop, linux_resume_one_process)
12341 (regsets_fetch_inferior_registers, linux_send_signal)
12342 (linux_read_auxv): Likewise. Update the types of variables holding
12343 PIDs. Update format string specifiers.
12344 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12345 * remote-utils.c (prepare_resume_reply): Likewise.
12346 * server.c (cont_thread, general_thread, step_thread)
12347 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12348 unsigned long.
12349 (handle_query): Update format specifiers.
12350 (handle_v_cont, main): Use strtoul for thread IDs.
12351 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12352 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12353 (general_thread, step_thread, thread_from_wait)
12354 (old_thread_from_wait): Update.
12355 * target.h (struct thread_resume): Use unsigned long for THREAD.
12356 (struct target_ops): Use unsigned long for arguments to attach and
12357 thread_alive.
12358
12359 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12360
12361 * acinclude.m4: Include bfd/bfd.m4 directly.
12362 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12363 <agriffis@toolchain.org>.
12364 * aclocal.m4, configure: Regenerated.
12365
12366 2005-01-07 Andrew Cagney <cagney@gnu.org>
12367
12368 * configure.ac: Rename configure.in, require autoconf 2.59.
12369 * configure: Re-generate.
12370
12371 2004-12-08 Daniel Jacobowitz <dan@debian.org>
12372
12373 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12374 LIBS when finished.
12375 * aclocal.m4: Regenerated.
12376 * configure: Regenerated.
12377
12378 2004-11-21 Andreas Schwab <schwab@suse.de>
12379
12380 * linux-m68k-low.c (m68k_num_gregs): Define.
12381 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12382 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12383 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12384 (m68k_breakpoint_at): New. Add to the_low_target.
12385
12386 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12387 srv_linux_thread_db to yes.
12388
12389 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12390
12391 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12392 (ARCH_SET_FS): Likewise.
12393 (ARCH_GET_FS): Likewise.
12394 (ARCH_GET_GS): Likewise.
12395
12396 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12397
12398 * linux-i386-low.c (ps_get_thread_area): New.
12399 * linux-x86-64-low.c (ps_get_thread_area): New.
12400 * linux-low.c: Include <sys/syscall.h>.
12401 (linux_kill_one_process): Don't kill the first thread here.
12402 (linux_kill): Kill the first thread here.
12403 (kill_lwp): New function.
12404 (send_sigstop, linux_send_signal): Use it.
12405 * proc-service.c: Clean up #ifdefs.
12406 (fpregset_info): Delete.
12407 (ps_lgetregs): Update and enable implementation.
12408 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12409 implementations.
12410 * remote-utils.c (struct sym_cache, symbol_cache): New.
12411 (input_interrupt): Print a clearer message.
12412 (async_io_enabled): New variable.
12413 (enable_async_io, disable_async_io): Use it. Update comments.
12414 (look_up_one_symbol): Use the symbol cache.
12415 * thread-db.c (thread_db_look_up_symbols): New function.
12416 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12417
12418 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12419
12420 * configure.in: Test for -rdynamic.
12421 * configure: Regenerated.
12422 * Makefile (INTERNAL_LDFLAGS): New.
12423 (gdbserver, gdbreplay): Use it.
12424
12425 2004-09-02 Andrew Cagney <cagney@gnu.org>
12426
12427 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12428
12429 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12430
12431 * linux-low.c (linux_wait): Clear all_processes list also.
12432
12433 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12434
12435 * linux-low.c: Include <errno.h>. Remove extern declaration of
12436 errno.
12437
12438 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12439
12440 * gdbreplay.c, server.h, utils.c: Update copyright years.
12441
12442 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12443
12444 * server.c (main): Print child status or termination signal from
12445 variable 'signal', not 'sig'.
12446
12447 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12448
12449 * linux-low.c (linux_read_memory): Change return type to
12450 int. Check for and return error from ptrace().
12451 * target.c (read_inferior_memory): Change return type to int. Pass
12452 back return status from the_target->read_memory().
12453 * target.h (struct target_ops): Adapt *read_memory() prototype.
12454 Update comment.
12455 (read_inferior_memory): Adapt prototype.
12456 * server.c (main): Return an error packet if
12457 read_inferior_memory() returns an error.
12458
12459 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12460
12461 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12462 Unify with other clean targets.
12463
12464 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12465
12466 * server.c (handle_v_cont): Call set_desired_inferior.
12467
12468 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12469
12470 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12471
12472 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12473
12474 * linux-low.c (linux_wait): Unblock async I/O.
12475 (linux_resume): Block and enable async I/O.
12476 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12477 * server.h (block_async_io, unblock_async_io): Add prototypes.
12478
12479 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12480
12481 * remote-utils.c (remote_open): Print a status notice after
12482 opening a TCP port.
12483 * server.c (attach_inferior): Print a status notice after
12484 attaching.
12485
12486 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12487
12488 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12489
12490 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12491
12492 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12493 error packet.
12494 * server.c, target.h: Update copyright years.
12495
12496 2004-02-25 Roland McGrath <roland@redhat.com>
12497
12498 * target.h (struct target_ops): New member `read_auxv'.
12499 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12500 * linux-low.c (linux_read_auxv): New function.
12501 (linux_target_ops): Initialize `read_auxv' member to that.
12502
12503 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12504
12505 Committed by Jim Blandy <jimb@redhat.com>.
12506
12507 * linux-s390-low.c (s390_num_regs): Update.
12508 (s390_regmap): Remove control registers. Use __s390x__ predefine
12509 instead of GPR_SIZE to distiguish s390 and s390x targets.
12510
12511 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12512
12513 * linux-low.c: Update copyright year.
12514 (check_removed_breakpoint): Clear pending_is_breakpoint.
12515 (linux_set_resume_request, linux_queue_one_thread)
12516 (resume_status_pending_p): New functions.
12517 (linux_continue_one_thread): Use process->resume.
12518 (linux_resume): Only resume threads if there are no pending events.
12519 * linux-low.h (struct process_info): Add resume request
12520 pointer.
12521
12522 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12523
12524 * regcache.c (new_register_cache): Clear the allocated register
12525 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12526
12527 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12528
12529 * linux-low.c (linux_resume): Take a struct thread_resume *
12530 argument.
12531 (linux_wait): Update call.
12532 (resume_ptr): New static variable.
12533 (linux_continue_one_thread): Renamed from
12534 linux_continue_one_process. Use resume_ptr.
12535 (linux_resume): Use linux_continue_one_thread.
12536 * server.c (handle_v_cont, handle_v_requests): New functions.
12537 (myresume): New function.
12538 (main): Handle 'v' case.
12539 * target.h (struct thread_resume): New type.
12540 (struct target_ops): Change argument of "resume" to struct
12541 thread_resume *.
12542 (myresume): Delete macro.
12543
12544 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12545
12546 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12547 (uninstall): Support DESTDIR.
12548
12549 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12550
12551 * configure.srv: Add xscale*linux copy of arm*linux entry.
12552
12553 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12554
12555 * linux-arm-low.c (arm_reinsert_addr): New function.
12556 (the_low_target): Add arm_reinsert_addr.
12557
12558 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12559
12560 * mem-break.c: Remove whitespace at end of file.
12561
12562 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12563
12564 * configure.in: Check whether we need to prototype strerror.
12565 * server.h: Optionally prototype strerror.
12566 * gdbreplay.c (perror_with_name): Use strerror.
12567 * linux-low.c (linux_attach_lwp): Use strerror.
12568 * utils.c (perror_with_name): Use strerror.
12569 * config.in, configure: Regenerated.
12570
12571 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12572
12573 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12574 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12575
12576 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12577
12578 * Makefile.in (SFILES): Update.
12579 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12580 low-sun3.c: Remove files.
12581
12582 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12583
12584 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12585 (linux_detach_one_process, linux_detach): New functions.
12586 (linux_target_ops): Add linux_detach.
12587 * server.c (main): Handle 'D' packet.
12588 * target.h (struct target_ops): Add "detach" member.
12589 (detach_inferior): Define.
12590
12591 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12592
12593 From Kelley Cook <kelleycook@wideopenwest.com>:
12594 * configure.srv: Accept i[34567]86 variants.
12595
12596 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12597
12598 * linux-low.c (linux_wait_for_event): Correct comment typos.
12599 (linux_resume_one_process): Call check_removed_breakpoint.
12600 (linux_send_signal): New function.
12601 (linux_target_ops): Add linux_send_signal.
12602 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12603 of kill.
12604 * target.h (struct target_ops): Add send_signal.
12605
12606 2003-05-29 Jim Blandy <jimb@redhat.com>
12607
12608 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12609 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12610 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12611 away part of the register's value.
12612
12613 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12614
12615 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12616 (linux_wait_for_event, linux_init_signals): Likewise.
12617
12618 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12619
12620 * configure.in: Check for stdlib.h.
12621 * configure: Regenerated.
12622 * config.in: Regenerated.
12623
12624 2003-01-04 Andreas Schwab <schwab@suse.de>
12625
12626 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12627
12628 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12629
12630 * Makefile.in: Remove obsolete code.
12631
12632 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12633
12634 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12635 defined(PT_FPR0_HI).
12636
12637 2002-11-17 Stuart Hughes <seh@zee2.com>
12638
12639 * linux-arm-low.c (arm_num_regs): Increase.
12640 (arm_regmap): Include status register.
12641
12642 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12643
12644 * linux-low.c (register_addr): Remove incorrect -1 check.
12645
12646 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12647
12648 * linux-low.c (linux_create_inferior): Call setpgid. Return
12649 the new PID.
12650 (unstopped_p, linux_signal_pid): Remove.
12651 (linux_target_ops): Remove linux_signal_pid.
12652 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12653 global instead of target method.
12654 * target.h (struct target_ops): Remove signal_pid. Update comment
12655 for create_inferior.
12656 * server.c (signal_pid): New variable.
12657 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12658 gdbserver. Set the child to be the foreground process group.
12659 (attach_inferior): Set signal_pid.
12660
12661 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12662
12663 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12664
12665 2002-08-20 Jim Blandy <jimb@redhat.com>
12666
12667 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12668 default for this.
12669
12670 2002-08-01 Andrew Cagney <cagney@redhat.com>
12671
12672 * Makefile.in: Make chill references obsolete.
12673
12674 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12675
12676 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12677 * configure: Regenerate.
12678 * config.in: Regenerate.
12679
12680 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12681
12682 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12683 (perror_with_name, remote_close, remote_open, expect, play): Static.
12684
12685 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12686
12687 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12688 byte offsets instead of an array of indexes.
12689 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12690
12691 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12692
12693 * regcache.c: Add comment.
12694
12695 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12696
12697 * thread-db.c: New file.
12698 * proc-service.c: New file.
12699 * acinclude.m4: New file.
12700 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12701 proc-service.o, and thread-db.o.
12702 (linux-low.o): Add USE_THREAD_DB.
12703 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12704 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12705 * aclocal.m4: Regenerated.
12706 * config.in: Regenerated.
12707 * configure: Regenerated.
12708 * configure.in: Check for proc_service.h, sys/procfs.h,
12709 thread_db.h, and linux/elf.h headrs.
12710 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12711 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12712 Check for -lthread_db and thread support.
12713 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12714 PowerPC, and SuperH.
12715 * i387-fp.c: Constify arguments.
12716 * i387-fp.h: Likewise.
12717 * inferiors.c: (struct thread_info): Renamed from
12718 `struct inferior_info'. Remove PID member. Use generic inferior
12719 list header. All uses updated.
12720 (inferiors, signal_pid): Removed.
12721 (all_threads): New variable.
12722 (get_thread): Define.
12723 (add_inferior_to_list): New function.
12724 (for_each_inferior): New function.
12725 (change_inferior_id): New function.
12726 (add_inferior): Removed.
12727 (remove_inferior): New function.
12728 (add_thread): New function.
12729 (free_one_thread): New function.
12730 (remove_thread): New function.
12731 (clear_inferiors): Use for_each_inferior and free_one_thread.
12732 (find_inferior): New function.
12733 (find_inferior_id): New function.
12734 (inferior_target_data): Update argument type.
12735 (set_inferior_target_data): Likewise.
12736 (inferior_regcache_data): Likewise.
12737 (set_inferior_regcache_data): Likewise.
12738 * linux-low.c (linux_bp_reinsert): Remove.
12739 (all_processes, stopping_threads, using_thrads)
12740 (struct pending_signals, debug_threads, pid_of): New.
12741 (inferior_pid): Replace with macro.
12742 (struct inferior_linux_data): Remove.
12743 (get_stop_pc, add_process): New functions.
12744 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12745 Use add_process and add_thread.
12746 (linux_attach_lwp): New function, based on old linux_attach. Use
12747 add_process and add_thread. Set stop_expected for new threads.
12748 (linux_attach): New function.
12749 (linux_kill_one_process): New function.
12750 (linux_kill): Kill all LWPs.
12751 (linux_thread_alive): Use find_inferior_id.
12752 (check_removed_breakpoints, status_pending_p): New functions.
12753 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12754 Update. Use WNOHANG. Wait for cloned processes also. Update process
12755 struct for the found process.
12756 (linux_wait_for_event): New function.
12757 (linux_wait): Use it. Support LWPs.
12758 (send_sigstop, wait_for_sigstop, stop_all_processes)
12759 (linux_resume_one_process, linux_continue_one_process): New functions.
12760 (linux_resume): Support LWPs.
12761 (REGISTER_RAW_SIZE): Remove.
12762 (fetch_register): Use register_size instead. Call supply_register.
12763 (usr_store_inferior_registers): Likewise. Call collect_register.
12764 Fix recursive case.
12765 (regsets_fetch_inferior_registers): Improve error message.
12766 (regsets_store_inferior_registers): Add debugging.
12767 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12768 (unstopped_p, linux_signal_pid): New functions.
12769 (linux_target_ops): Add linux_signal_pid.
12770 (linux_init_signals): New function.
12771 (initialize_low): Call it. Initialize using_threads.
12772 * regcache.c (inferior_regcache_data): Add valid
12773 flag.
12774 (get_regcache): Fetch registers lazily. Add fetch argument
12775 and update all callers.
12776 (regcache_invalidate_one, regcache_invalidate): New
12777 functions.
12778 (new_register_cache): Renamed from create_register_cache.
12779 Return the new regcache.
12780 (free_register_cache): Change argument to a void *.
12781 (registers_to_string, registers_from_string): Call get_regcache
12782 with fetch flag set.
12783 (register_data): Make static. Pass fetch flag to get_regcache.
12784 (supply_register): Call get_regcache with fetch flag clear.
12785 (collect_register): Call get_regcache with fetch flag set.
12786 (collect_register_as_string): New function.
12787 * regcache.h: Update.
12788 * remote-utils.c (putpkt): Flush after debug output and use
12789 stderr.
12790 Handle input interrupts while waiting for an ACK.
12791 (input_interrupt): Use signal_pid method.
12792 (getpkt): Flush after debug output and use stderr.
12793 (outreg): Use collect_register_as_string.
12794 (new_thread_notify, dead_thread_notify): New functions.
12795 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12796 and general_thread.
12797 (look_up_one_symbol): Flush after debug output.
12798 * server.c (step_thread, server_waiting): New variables.
12799 (start_inferior): Don't use signal_pid. Update call to mywait.
12800 (attach_inferior): Update call to mywait.
12801 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12802 (main): Don't fetch/store registers explicitly. Use
12803 set_desired_inferior. Support proposed ``Hs'' packet. Update
12804 calls to mywait.
12805 * server.h: Update.
12806 (struct inferior_list, struct_inferior_list_entry): New.
12807 * target.c (set_desired_inferior): New.
12808 (write_inferior_memory): Constify.
12809 (mywait): New function.
12810 * target.h: Update.
12811 (struct target_ops): New signal_pid method.
12812 (mywait): Removed macro, added prototype.
12813
12814 * linux-low.h (regset_func): Removed.
12815 (regset_fill_func, regset_store_func): New.
12816 (enum regset_type): New.
12817 (struct regset_info): Add type field. Use new operation types.
12818 (struct linux_target_ops): stop_pc renamed to get_pc.
12819 Add decr_pc_after_break and breakpoint_at.
12820 (get_process, get_thread_proess, get_process_thread)
12821 (strut process_info, all_processes, linux_attach_lwp)
12822 (thread_db_init): New.
12823
12824 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12825 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12826 (the_low_target): Add new members.
12827 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12828 (i386_store_fpxregset): Constify.
12829 (target_regsets): Add new kind identifier.
12830 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12831 (i386_set_pc): Add debugging.
12832 (i386_breakpoint_at): New function.
12833 (the_low_target): Add new members.
12834 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12835 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12836 (mips_breakpoint_at): New.
12837 (the_low_target): Add new members.
12838 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12839 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12840 (the_low_target): Add new members.
12841 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12842 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12843 (the_low_target): Add new members.
12844 * linux-x86-64-low.c (target_regsets): Add new kind
12845 identifier.
12846
12847 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12848
12849 From Martin Pool <mbp@samba.org>:
12850 * server.c (gdbserver_usage): New function.
12851 (main): Call it.
12852
12853 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12854
12855 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12856 stop_at -> stop_pc.
12857
12858 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12859
12860 * Makefile.in: Remove obsolete code.
12861
12862 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12863
12864 * linux-low.c (regsets_fetch_inferior_registers),
12865 (regsets_store_inferior_registers): Removed cast to int from
12866 ptrace() calls.
12867 * regcache.h: Added declaration of struct inferior_info.
12868
12869 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12870
12871 * inferiors.c (struct inferior_info): Add regcache_data.
12872 (add_inferior): Call create_register_cache.
12873 (clear_inferiors): Call free_register_cache.
12874 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12875 * regcache.c (struct inferior_regcache_data): New.
12876 (registers): Remove.
12877 (get_regcache): New function.
12878 (create_register_cache, free_register_cache): New functions.
12879 (set_register_cache): Don't initialize the register cache here.
12880 (registers_to_string, registers_from_string, register_data): Call
12881 get_regcache.
12882 * regcache.h: Add prototypes.
12883 * server.h: Likewise.
12884
12885 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12886
12887 * mem-break.c: New file.
12888 * mem-break.h: New file.
12889 * Makefile.in: Add mem-break.o rule; update server.h
12890 dependencies.
12891 * inferiors.c (struct inferior_info): Add target_data
12892 member.
12893 (clear_inferiors): Free target_data member if set.
12894 (inferior_target_data, set_inferior_target_data): New functions.
12895 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12896 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12897 * linux-low.c (linux_bp_reinsert): New variable.
12898 (struct inferior_linux_data): New.
12899 (linux_create_inferior): Use set_inferior_target_data.
12900 (linux_attach): Likewise. Call add_inferior.
12901 (linux_wait_for_one_inferior): New function.
12902 (linux_wait): Call it.
12903 (linux_write_memory): Add const.
12904 (initialize_low): Call set_breakpoint_data.
12905 * linux-low.h (struct linux_target_ops): Add breakpoint
12906 handling members.
12907 * server.c (attach_inferior): Remove extra add_inferior
12908 call.
12909 * server.h: Include mem-break.h. Update inferior.c
12910 prototypes.
12911 * target.c (read_inferior_memory)
12912 (write_inferior_memory): New functions.
12913 * target.h (read_inferior_memory)
12914 (write_inferior_memory): Change macros to prototypes.
12915 (struct target_ops): Update comments. Add const to write_memory
12916 definition.
12917
12918 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12919
12920 * linux-low.c (usr_store_inferior_registers): Support
12921 registers which are allowed to fail to store.
12922 * linux-low.h (linux_target_ops): Likewise.
12923 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12924 (ppc_cannot_store_register): FPSCR may not be storable.
12925
12926 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12927
12928 * server.h: Include <string.h> if HAVE_STRING_H.
12929 * ChangeLog: Correct paths in last ChangeLog entry.
12930
12931 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12932
12933 * linux-low.h: Remove obsolete prototypes.
12934 (struct linux_target_ops): New.
12935 (extern the_low_target): New.
12936 * linux-low.c (num_regs, regmap): Remove declarations.
12937 (register_addr): Use the_low_target explicitly.
12938 (fetch_register): Likewise.
12939 (usr_fetch_inferior_registers): Likewise.
12940 (usr_store_inferior_registers): Likewise.
12941 * linux-arm-low.c (num_regs): Remove.
12942 (arm_num_regs): Define.
12943 (arm_regmap): Renamed from regmap, made static.
12944 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12945 made static.
12946 (arm_cannot_store_register): Renamed from cannot_store_register,
12947 made static.
12948 (the_low_target): New.
12949 * linux-i386-low.c (num_regs): Remove.
12950 (i386_num_regs): Define.
12951 (i386_regmap): Renamed from regmap, made static.
12952 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12953 made static.
12954 (i386_cannot_store_register): Renamed from cannot_store_register,
12955 made static.
12956 (the_low_target): New.
12957 * linux-ia64-low.c (num_regs): Remove.
12958 (ia64_num_regs): Define.
12959 (ia64_regmap): Renamed from regmap, made static.
12960 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12961 made static.
12962 (ia64_cannot_store_register): Renamed from cannot_store_register,
12963 made static.
12964 (the_low_target): New.
12965 * linux-m68k-low.c (num_regs): Remove.
12966 (m68k_num_regs): Define.
12967 (m68k_regmap): Renamed from regmap, made static.
12968 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12969 made static.
12970 (m68k_cannot_store_register): Renamed from cannot_store_register,
12971 made static.
12972 (the_low_target): New.
12973 * linux-mips-low.c (num_regs): Remove.
12974 (mips_num_regs): Define.
12975 (mips_regmap): Renamed from regmap, made static.
12976 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12977 made static.
12978 (mips_cannot_store_register): Renamed from cannot_store_register,
12979 made static.
12980 (the_low_target): New.
12981 * linux-ppc-low.c (num_regs): Remove.
12982 (ppc_num_regs): Define.
12983 (ppc_regmap): Renamed from regmap, made static.
12984 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12985 made static.
12986 (ppc_cannot_store_register): Renamed from cannot_store_register,
12987 made static.
12988 (the_low_target): New.
12989 * linux-s390-low.c (num_regs): Remove.
12990 (s390_num_regs): Define.
12991 (s390_regmap): Renamed from regmap, made static.
12992 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12993 made static.
12994 (s390_cannot_store_register): Renamed from cannot_store_register,
12995 made static.
12996 (the_low_target): New.
12997 * linux-sh-low.c (num_regs): Remove.
12998 (sh_num_regs): Define.
12999 (sh_regmap): Renamed from regmap, made static.
13000 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13001 made static.
13002 (sh_cannot_store_register): Renamed from cannot_store_register,
13003 made static.
13004 (the_low_target): New.
13005 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13006 (the_low_target): New.
13007
13008 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13009
13010 * Makefile.in: Add stamp-h target.
13011 * configure.in: Create stamp-h.
13012 * configure: Regenerated.
13013
13014 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13015
13016 * inferiors.c: New file.
13017 * target.c: New file.
13018 * target.h: New file.
13019 * Makefile.in: Add target.o and inferiors.o. Update
13020 dependencies.
13021 * linux-low.c (inferior_pid): New static variable,
13022 moved from server.c.
13023 (linux_create_inferior): Renamed from create_inferior.
13024 Call add_inferior. Return 0 on success instead of a PID.
13025 (linux_attach): Renamed from myattach.
13026 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13027 (linux_thread_alive): Renamed from mythread_alive.
13028 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13029 child dies.
13030 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13031 (regsets_store_inferior_registers): Correct error message.
13032 Add missing ``return 0''.
13033 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13034 (linux_store_registers): Renamed from store_inferior_registers.
13035 (linux_read_memory): Renamed from read_inferior_memory.
13036 (linux_write_memory): Renamed from write_inferior_memory.
13037 (linux_target_ops): New structure.
13038 (initialize_low): Call set_target_ops ().
13039 * remote-utils.c (unhexify): New function.
13040 (hexify): New function.
13041 (input_interrupt): Send signals to ``signal_pid''.
13042 * server.c (inferior_pid): Remove.
13043 (start_inferior): Update create_inferior call.
13044 (attach_inferior): Call add_inferior.
13045 (handle_query): New function.
13046 (main): Call handle_query for `q' packets.
13047 * server.h: Include "target.h". Remove obsolete prototypes.
13048 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13049
13050 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
13051
13052 * Makefile.in: Add WARN_CFLAGS. Update configury
13053 dependencies.
13054 * configure.in: Check for <string.h>
13055 * configure: Regenerate.
13056 * config.in: Regenerate.
13057 * gdbreplay.c: Include needed system headers.
13058 (remote_open): Remove strchr prototype.
13059 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13060 * regcache.c (supply_register): Change buf argument to const void *.
13061 (supply_register_by_name): Likewise.
13062 (collect_register): Change buf argument to void *.
13063 (collect_register_by_name): Likewise.
13064 * regcache.h: Add missing prototypes.
13065 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13066 * server.c (handle_query): New function.
13067 (attached): New static variable, moved out of main.
13068 (main): Quiet longjmp clobber warnings.
13069 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13070 * utils.c (error): Remove NORETURN.
13071 (fatal): Likewise.
This page took 0.308793 seconds and 5 git commands to generate.