Remove support for LinuxThreads and vendor 2.4 kernels w/ backported NPTL
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
4a6ed09b
PA
12015-12-17 Pedro Alves <palves@redhat.com>
2
3 * linux-low.c (linux_kill_one_lwp): Remove references to
4 LinuxThreads.
5 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
6 to 'kill'.
7 (linux_init_signals): Delete.
8 (initialize_low): Adjust.
9 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
10
7544db95
PA
112015-12-16 Pedro Alves <palves@redhat.com>
12
13 * configure.ac (compiler warning flags): When testing a
14 -Wno-foo option, check whether -Wfoo works instead.
15 * configure: Regenerate.
16
8020350c
DB
172015-12-11 Don Breazeal <donb@codesourcery.com>
18
19 * server.c (process_serial_event): Don't exit from gdbserver
20 in remote mode if there are still active inferiors.
21
db91f502
YQ
222015-12-11 Yao Qi <yao.qi@linaro.org>
23
24 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
25 arm_breakpoint_at if the process is 32-bit.
26
b37a6290
YQ
272015-12-11 Yao Qi <yao.qi@linaro.org>
28
29 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
30 arm breakpoint.
31
17b1509a
YQ
322015-12-07 Yao Qi <yao.qi@linaro.org>
33
34 * configure.srv: Append arm.o to srv_tgtobj for
35 aarch64*-*-linux* target.
36 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
37 from linux-arm-low.c.
38 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
39 (arm_breakpoint_len, thumb_breakpoint): Likewise.
40 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
41 (thumb2_breakpoint_len): Likewise.
42 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
43 (arm_breakpoint_kinds): Likewise.
44 (arm_breakpoint_kind_from_pc): Likewise.
45 (arm_sw_breakpoint_from_kind): Likewise.
46 (arm_breakpoint_kind_from_current_state): Likewise.
47 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
48 (arm_sw_breakpoint_from_kind): Declare.
49 (arm_breakpoint_kind_from_current_state): Declare.
50 (arm_breakpoint_at): Declare.
51 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
52 arm_sw_breakpoint_from_kind if process is 32-bit.
53 (aarch64_breakpoint_kind_from_pc): New function.
54 (aarch64_breakpoint_kind_from_current_state): New function.
55 (the_low_target): Initialize fields breakpoint_kind_from_pc
56 and breakpoint_kind_from_current_state.
57 * linux-arm-low.c (arm_breakpoint_kinds): Move to
58 linux-aarch32-low.c.
59 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
60 (arm_breakpoint, arm_breakpoint_len): Likewise.
61 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
62 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
63 (arm_is_thumb_mode): Likewise.
64 (arm_breakpoint_at): Likewise.
65 (arm_breakpoint_kind_from_pc): Likewise.
66 (arm_sw_breakpoint_from_kind): Likewise.
67 (arm_breakpoint_kind_from_current_state): Likewise.
68
69 Revert:
70 2015-08-04 Yao Qi <yao.qi@linaro.org>
71
72 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
73 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
74 * server.c (extended_protocol): Remove "static".
75 * server.h (extended_protocol): Declare it.
76
ece66d65
JS
772015-12-04 Josh Stone <jistone@redhat.com>
78
79 * target.h (struct target_ops) <arch_setup>: Rename to ...
80 (struct target_ops) <post_create_inferior>: ... this.
81 (target_arch_setup): Rename to ...
82 (target_post_create_inferior): ... this, calling post_create_inferior.
83 * server.c (start_inferior): Update target_arch_setup calls to
84 target_post_create_inferior.
85 * linux-low.c (linux_low_ptrace_options): Forward declare.
86 (linux_arch_setup): Update its comment for general use.
87 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
88 (struct linux_target_ops): Use linux_post_create_inferior.
89 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
90 to post_create_inferior.
91 * nto-low.c (struct nto_target_ops): Likewise.
92 * spu-low.c (struct spu_target_ops): Likewise.
93 * win32-low.c (struct win32_target_ops): Likewise.
94
e58c48b4
AT
952015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
96
97 * linux-arm-low.c: Remove duplicate arch/arm.h include.
98
fbec8956
AT
992015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
100
101 * linux-arm-low.c (arm_reinsert_addr): Remove function.
102 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
103 * linux-cris-low.c (cris_reinsert_addr> Remove function.
104 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
105 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
106 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
107 * linux-mips-low.c (mips_reinsert_addr): Remove function.
108 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
109 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
110 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
111 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
112 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
113
9b4c5f87
AT
1142015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
115
116 * linux-low.c (linux_look_up_symbols): Don't call
117 linux_supports_traceclone.
118 * linux-low.h (thread_db_init): Remove use_events argument.
119 * thread-db.c (thread_db_use_event): Remove global variable.
120 (struct thread_db) <td_thr_event_enable_p>: Remove field.
121 (struct thread_db) <td_create_bp>: Remove field.
122 (thread_db_create_event): Remove function.
123 (thread_db_enable_reporting): Likewise.
124 (find_one_thread): Don't check for thread_db_use_events.
125 (attach_thread): Likewise.
126 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
127 (try_thread_db_load_1): Don't check for thread_db_use_events.
128 (thread_db_init): Remove use_events argument and thread events
129 handling.
130 (remove_thread_event_breakpoints): Remove function.
131 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
132
7d00775e
AT
1332015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
134
135 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
136 New function.
137 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
138 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
139 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
140 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
141 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
142 Initialize.
143 * linux-crisv32-low.c (cris_supports_hardware_single_step):
144 New function.
145 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
146 * linux-low.c (can_hardware_single_step): Use
147 supports_hardware_single_step.
148 (can_software_single_step): New function.
149 (start_step_over): Call can_software_single_step.
150 (linux_supports_hardware_single_step): New function.
151 (struct target_ops) <supports_software_single_step>: Initialize.
152 * linux-low.h (struct linux_target_ops)
153 <supports_hardware_single_step>: Initialize.
154 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
155 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
156 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
157 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
158 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
159 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
160 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
161 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
162 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
163 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
164 Initialize.
165 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
166 (struct linux_target_ops) <tile_supports_hardware_single_step>:
167 Initialize.
168 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
169 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
170 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
171 New function.
172 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
173 * target.h (struct target_ops): <supports_software_single_step>:
174 New field.
175 (target_supports_software_single_step): New macro.
176
2d97cd35
AT
1772015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
178
179 * linux-low.c (linux_wait_1): Fix pc advance condition.
180 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
181 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
182
769ef81f
AT
1832015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
184
185 * linux-arm-low.c (arm_is_thumb_mode): New function.
186 (arm_breakpoint_at): Use arm_is_thumb_mode.
187 (arm_breakpoint_kind_from_current_state): New function.
188 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
189 Initialize.
190 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
191 (linux_breakpoint_kind_from_current_state): New function.
192 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
193 * linux-low.h (struct linux_target_ops)
194 <breakpoint_kind_from_current_state>: New field.
195 * target.h (struct target_ops): Likewise.
196 (target_breakpoint_kind_from_current_state): New macro.
197
1bebeeca
PA
1982015-11-30 Pedro Alves <palves@redhat.com>
199
200 * linux-low.c (linux_resume): Wake up the event loop before
201 returning.
202
a67a9fae
PA
2032015-11-30 Pedro Alves <palves@redhat.com>
204
205 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
206 check.
207 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
208 to -1.
209 * target.c (struct thread_search): New structure.
210 (thread_search_callback): New function.
211 (prev_general_thread): New global.
212 (prepare_to_access_memory, done_accessing_memory): New functions.
213 * target.h (prepare_to_access_memory, done_accessing_memory):
214 Replace macros with function declarations.
215
f2faf941
PA
2162015-11-30 Pedro Alves <palves@redhat.com>
217
218 PR 14618
219 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
220 report TARGET_WAITKIND_NO_RESUMED.
221 * remote-utils.c (prepare_resume_reply): Handle
222 TARGET_WAITKIND_NO_RESUMED.
223 * server.c (report_no_resumed): New global.
224 (handle_query) <qSupported>: Handle "no-resumed+". Report
225 "no-resumed+" support.
226 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
227 return error if the client doesn't support no-resumed events.
228 (push_stop_notification): New function.
229 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
230 events if the client supports them.
231
a681f9c9
PA
2322015-11-30 Pedro Alves <palves@redhat.com>
233
234 * linux-low.c (thread_still_has_status_pending_p): Don't check
235 vCont;t here.
236 (lwp_resumed): New function.
237 (status_pending_p_callback): Return early if the LWP is not
238 supposed to be resumed.
239
65706a29
PA
2402015-11-30 Pedro Alves <palves@redhat.com>
241
242 * linux-low.c (handle_extended_wait): Assert that the LWP's
243 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
244 thread create events, leave the new child's status pending.
245 (linux_low_filter_event): If GDB wants to hear about thread exit
246 events, leave the LWP marked dead and don't delete it.
247 (linux_wait_for_event_filtered): Don't check for thread exit.
248 (filter_exit_event): New function.
249 (linux_wait_1): Use it, when returning an exit event.
250 (linux_resume_one_lwp_throw): Assert that the LWP's
251 waitstatus is TARGET_WAITKIND_IGNORE.
252 * remote-utils.c (prepare_resume_reply): Handle
253 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
254 * server.c (report_thread_events): New global.
255 (handle_general_set): Handle QThreadEvents.
256 (handle_query) <qSupported>: Handle and report QThreadEvents+;
257 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
258 TARGET_WAITKIND_THREAD_EXITED.
259 * server.h (report_thread_events): Declare.
260
56cf4bed
PA
2612015-11-30 Pedro Alves <palves@redhat.com>
262
263 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
264 the thread's last_resume_kind was resume_stop.
265
500c1d85
PA
2662015-11-30 Pedro Alves <palves@redhat.com>
267
268 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
269 before returning.
270
de979965
PA
2712015-11-30 Pedro Alves <palves@redhat.com>
272
273 * server.c (handle_v_requests): Handle vCtrlC.
274
34c65914
PA
2752015-11-30 Pedro Alves <palves@redhat.com>
276
277 * gdbthread.h (find_any_thread_of_pid): Declare.
278 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
279 functions.
280 * server.c (handle_query): If current_thread is NULL, look for
281 another thread of the selected process.
282
79efa585 2832015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 284 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
285
286 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
287 * server.c (handle_qxfer_threads_worker): Refactor to include thread
288 name in reply.
289 * target.h (struct target_ops) <thread_name>: New field.
290 (target_thread_name): New macro.
291
80d82c19
JB
2922015-11-23 Joel Brobecker <brobecker@adacore.com>
293
294 * regcache.h (regcache_invalidate_pid): Add declaration.
295 * regcache.c (regcache_invalidate_pid): New function, extracted
296 from regcache_invalidate.
297 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
298 Add trivial documentation comment.
299 * lynx-low.c: Use regcache_invalidate_pid instead of
300 regcache_invalidate.
301
64da5dd5
JB
3022015-11-23 Joel Brobecker <brobecker@adacore.com>
303
304 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
305 and Elf64_auxv_t if the target is Android.
306
37ce4055
DE
3072015-11-22 Doug Evans <xdje42@gmail.com>
308
309 * target.h: #include <sys/types.h>.
310
06e03fff
PA
3112015-11-19 Pedro Alves <palves@redhat.com>
312
313 * linux-low.c (linux_process_qsupported): Change prototype.
314 Adjust.
315 * linux-low.h (struct linux_target_ops) <process_qsupported>:
316 Change prototype.
317 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
318 and adjust to loop over all features.
319 * server.c (handle_query) <qSupported>: Adjust to call
320 target_process_qsupported once, passing it a vector of unprocessed
321 features.
322 * target.h (struct target_ops) <process_qsupported>: Change
323 prototype.
324 (target_process_qsupported): Adjust.
325
9a084706
PA
3262015-11-19 Pedro Alves <palves@redhat.com>
327
328 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
329 mode.
330 * configure: Regenerate.
331
dad44a1f
PA
3322015-11-19 Pedro Alves <palves@redhat.com>
333
334 * configure: Regenerate.
335
231c0592
YQ
3362015-11-19 Yao Qi <yao.qi@linaro.org>
337
338 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
339 type to uint32_t.
340
6c1c9a8b
YQ
3412015-11-19 Yao Qi <yao.qi@linaro.org>
342
343 * linux-aarch64-low.c (enum aarch64_operand_type): New.
344 (struct aarch64_operand): Move enum out.
345
9caa3311
YQ
3462015-11-19 Yao Qi <yao.qi@linaro.org>
347
348 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
349 struct user_fpsimd_state *.
350 (aarch64_store_fpregset): Likewise.
351
6a69a054
YQ
3522015-11-19 Yao Qi <yao.qi@linaro.org>
353
354 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
355 struct user_pt_regs *.
356 (aarch64_store_gregset): Likewise.
357
1798301e
PA
3582015-11-18 Pedro Alves <palves@redhat.com>
359
360 * Makefile.in (all_object_files): Add $IPA_OBJS.
361
ce7715e2
PA
3622015-11-17 Pedro Alves <palves@redhat.com>
363
364 * win32-low.c (win32_resume): Use gdb_signal_from_host,
365 GDB_SIGNAL_0 and gdb_signal_to_string.
366
c0879059
PA
3672015-11-17 Pedro Alves <palves@redhat.com>
368
369 * win32-low.c (handle_output_debug_string): Remove parameter.
370 (win32_kill): Remove our_status local and adjust call to
371 handle_output_debug_string.
372 (get_child_debug_event): Adjust call to
373 handle_output_debug_string.
374
1996e237
SM
3752015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
376
377 * linux-mips-low.c (mips_fill_gregset): Add cast.
378 (mips_store_gregset): Likewise.
379 (mips_fill_fpregset): Likewise.
380 (mips_store_fpregset): Likewise.
381
cbec665b
SM
3822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
383
384 * linux-mips-low.c (mips_add_watchpoint): Rename private to
385 priv.
386
eb3e3c67
SM
3872015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
388
389 * linux-mips-low.c (mips_linux_new_thread): Change type of
390 watch_type to enum target_hw_bp_type.
391
171de4b8
SM
3922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
393
394 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
395 Change return type to arm_hwbp_type.
396
04248ead
SM
3972015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
398
399 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
400 (arm_store_gregset): Likewise.
401 * linux-arm-low.c (arm_get_hwcap): Likewise.
402 (arm_read_description): Likewise.
403
04b3479c
SM
4042015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
405
406 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
407
2bc84e8a
SM
4082015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
409
410 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
411 (ppc_fill_vsxregset): Likewise.
412 (ppc_store_vsxregset): Likewise.
413 (ppc_fill_vrregset): Likewise.
414 (ppc_store_vrregset): Likewise.
415 (ppc_fill_evrregset): Likewise.
416 (ppc_store_evrregset): Likewise.
417
e6c5bb05
SM
4182015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
419
420 * linux-ppc-low.c (ppc_usrregs_info): Remove
421 forward-declaration.
422 (ppc_arch_setup): Move lower in file.
423
7ea45d72
SM
4242015-10-30 Simon Marchi <simon.marchi@ericsson.com>
425
426 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
427 (ps_pdwrite): Likewise.
428
69291610
HW
4292015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
430
431 * linux-arm-low.c (arm_new_thread): Move pointer dereference
432 to after assert checks.
433
b42945fd
SM
4342015-10-29 Simon Marchi <simon.marchi@ericsson.com>
435
436 * proc-service.c (ps_pdread): Add/adjust casts.
437 (ps_pdwrite): Add/adjust casts.
438
d6f85c84
SM
4392015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
440
441 * server.c (handle_search_memory_1): Cast return value of
442 memmem.
443
f98cd059
SM
4442015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
445
446 * server.c (write_qxfer_response): Change type of data to
447 gdb_byte *.
448
d2412fa5
PA
4492015-10-29 Pedro Alves <palves@redhat.com>
450
451 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
452
c17414a2
PA
4532015-10-29 Pedro Alves <palves@redhat.com>
454
455 * tracepoint.c (clear_installed_tracepoints): Add casts.
456
e053fbc4
PA
4572015-10-29 Pedro Alves <palves@redhat.com>
458
459 * server.c (handle_v_cont, process_serial_event): Add enum
460 gdb_signal casts to signal parsing code.
461
add67df8
PA
4622015-10-29 Pedro Alves <palves@redhat.com>
463
464 * linux-low.h (NULL_REGSET): Define.
465 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
466 * linux-arm-low.c (arm_regsets): Likewise.
467 * linux-crisv32-low.c (cris_regsets): Likewise.
468 * linux-m68k-low.c (m68k_regsets): Likewise.
469 * linux-mips-low.c (mips_regsets): Likewise.
470 * linux-nios2-low.c (nios2_regsets): Likewise.
471 * linux-ppc-low.c (ppc_regsets): Likewise.
472 * linux-s390-low.c (s390_regsets): Likewise.
473 * linux-sh-low.c (sh_regsets): Likewise.
474 * linux-sparc-low.c (sparc_regsets): Likewise.
475 * linux-tic6x-low.c (tic6x_regsets): Likewise.
476 * linux-tile-low.c (tile_regsets): Likewise.
477 * linux-x86-low.c (x86_regsets): Likewise.
478 * linux-xtensa-low.c (xtensa_regsets): Likewise.
479
50bc912a
PA
4802015-10-29 Pedro Alves <palves@redhat.com>
481
482 * linux-low.h (NULL_REGSET): Define.
483 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
484 * linux-arm-low.c (arm_regsets): Likewise.
485 * linux-crisv32-low.c (cris_regsets): Likewise.
486 * linux-m68k-low.c (m68k_regsets): Likewise.
487 * linux-mips-low.c (mips_regsets): Likewise.
488 * linux-nios2-low.c (nios2_regsets): Likewise.
489 * linux-ppc-low.c (ppc_regsets): Likewise.
490 * linux-s390-low.c (s390_regsets): Likewise.
491 * linux-sh-low.c (sh_regsets): Likewise.
492 * linux-sparc-low.c (sparc_regsets): Likewise.
493 * linux-tic6x-low.c (tic6x_regsets): Likewise.
494 * linux-tile-low.c (tile_regsets): Likewise.
495 * linux-x86-low.c (x86_regsets): Likewise.
496 * linux-xtensa-low.c (xtensa_regsets): Likewise.
497
682b2546
DE
4982015-10-26 Doug Evans <dje@google.com>
499
500 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
501
963843d4
DE
5022015-10-26 Doug Evans <dje@google.com>
503
504 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
505
d41401ac
DE
5062015-10-26 Doug Evans <dje@google.com>
507
508 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
509 for debug_printf.
510 (attach_thread, find_new_threads_callback): Ditto.
511
3db28855
AT
5122015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
513
514 * mem-break.h (set_breakpoint_data): Remove.
515
fb78e89c
AT
5162015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
517
518 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
519 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
520 (initialize_low): Remove set_breakpoint_data call.
521 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
522 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
523 (initialize_low): Remove set_breakpoint_data call.
524 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
525 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
526 (initialize_low): Remove set_breakpoint_data call.
527
2e6ee069
AT
5282015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
529
530 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
531 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
532 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
533 * target.h (target_breakpoint_kind_from_pc): New macro.
534
1652a986
AT
5352015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
536
537 * linux-low.c (default_breakpoint_kind_from_pc): New function.
538 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
539 the default breakpoint kind.
540
abeead09
AT
5412015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
542
543 * linux-arm-low.c (arm_supports_z_point_type): Add software
544 breakpoint support.
545
b0b4b501
AT
5462015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
547
548 * linux-arm-low.c: Refactor breakpoint definitions.
549 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
550 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
551
8689682c
AT
5522015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
553
554 * Makefile.in: Add arm.c/o.
555 * configure.srv: Likewise.
556 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
557 (arm_breakpoint_kind_from_pc): New function.
558 (arm_sw_breakpoint_from_kind): Return proper kind.
559 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
560
27165294
AT
5612015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
562
563 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
564 removal.
565 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
566 (struct raw_breakpoint) <size>: Remove.
567 (struct raw_breakpoint) <kind>: Add.
568 (bp_size): New function.
569 (bp_opcode): Likewise.
570 (find_raw_breakpoint_at): Adjust for kind.
571 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
572 (remove_memory_breakpoint): Adjust for kind call bp_size.
573 (set_raw_breakpoint_at): Adjust for kind.
574 (set_breakpoint): Likewise.
575 (set_breakpoint_at): Call breakpoint_kind_from_pc.
576 (delete_raw_breakpoint): Adjust for kind.
577 (delete_breakpoint): Likewise.
578 (find_gdb_breakpoint): Likewise.
579 (set_gdb_breakpoint_1): Likewise.
580 (set_gdb_breakpoint): Likewise.
581 (delete_gdb_breakpoint_1): Likewise.
582 (delete_gdb_breakpoint): Likewise.
583 (uninsert_raw_breakpoint): Likewise.
584 (reinsert_raw_breakpoint): Likewise.
585 (set_breakpoint_data): Remove.
586 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
587 (check_mem_read): Adjust for kind call bp_size.
588 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
589 (clone_one_breakpoint): Adjust for kind.
590 * mem-break.h (set_gdb_breakpoint): Likewise.
591 (delete_gdb_breakpoint): Likewise.
592 * server.c (process_serial_event): Likewise.
593
dd373349
AT
5942015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
595
596 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
597 (struct linux_target_ops) <breakpoint>: Remove.
598 (struct linux_target_ops) <breakpoint_len>: Remove.
599 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
600 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
601 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
602 (arm_sw_breakpoint_from_kind): New function.
603 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
604 (struct linux_target_ops) <breakpoint>: Remove.
605 (struct linux_target_ops) <breakpoint_len>: Remove.
606 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
607 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
608 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
609 (struct linux_target_ops) <breakpoint>: Remove.
610 (struct linux_target_ops) <breakpoint_len>: Remove.
611 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
612 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
613 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
614 (struct linux_target_ops) <breakpoint>: Remove.
615 (struct linux_target_ops) <breakpoint_len>: Remove.
616 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
617 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
618 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
619 and sw_breakpoint_from_kind to increment the pc.
620 (linux_breakpoint_kind_from_pc): New function.
621 (linux_sw_breakpoint_from_kind): New function.
622 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
623 (initialize_low): Call breakpoint_kind_from_pc and
624 sw_breakpoint_from_kind to replace breakpoint_data/len.
625 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
626 New field.
627 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
628 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
629 (struct linux_target_ops) <breakpoint>: Remove.
630 (struct linux_target_ops) <breakpoint_len>: Remove.
631 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
632 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
633 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
634 (struct linux_target_ops) <breakpoint>: Remove.
635 (struct linux_target_ops) <breakpoint_len>: Remove.
636 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
637 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
638 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
639 (struct linux_target_ops) <breakpoint>: Remove.
640 (struct linux_target_ops) <breakpoint_len>: Remove.
641 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
642 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
643 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
644 (struct linux_target_ops) <breakpoint>: Remove.
645 (struct linux_target_ops) <breakpoint_len>: Remove.
646 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
647 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
648 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
649 (struct linux_target_ops) <breakpoint>: Remove.
650 (struct linux_target_ops) <breakpoint_len>: Remove.
651 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
652 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
653 * linux-s390-low.c (s390_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-sh-low.c (sh_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 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
664 (struct linux_target_ops) <breakpoint>: Remove.
665 (struct linux_target_ops) <breakpoint_len>: Remove.
666 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
667 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
668 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
669 (struct linux_target_ops) <breakpoint>: Remove.
670 (struct linux_target_ops) <breakpoint_len>: Remove.
671 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
672 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
673 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
674 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
675 (struct linux_target_ops) <breakpoint>: Remove.
676 (struct linux_target_ops) <breakpoint_len>: Remove.
677 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
678 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
679 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
680 (struct linux_target_ops) <breakpoint>: Remove.
681 (struct linux_target_ops) <breakpoint_len>: Remove.
682 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
683 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
684
4cd98a19
AT
6852015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
686
687 * linux-cris-low.c (cris_get_pc): Remove void arg.
688
774ee6d2
AR
6892015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
690
691 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
692 variable name.
693
833dcd29
AR
6942015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
695
696 * inferiors.c (thread_pid_matches_callback): New function.
697 (find_thread_process): New function.
698 (remove_thread): Reset current_thread.
699 (remove_process): Assert threads have been removed first.
700
8d689ee5
YQ
7012015-10-15 Yao Qi <yao.qi@linaro.org>
702
703 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
704 if it is 3.
705 (aarch64_remove_point): Likewise.
706 * regcache.c (regcache_register_size): New function.
707
1c2e1515
YQ
7082015-10-12 Yao Qi <yao.qi@linaro.org>
709
710 * linux-aarch64-low.c: Update all callers as emit_load_store
711 is renamed to aarch64_emit_load_store.
712
e1c587c3
YQ
7132015-10-12 Yao Qi <yao.qi@linaro.org>
714
715 * linux-aarch64-low.c: Update all callers of function renaming
716 from emit_insn to aarch64_emit_insn.
717
b6542f81
YQ
7182015-10-12 Yao Qi <yao.qi@linaro.org>
719
720 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
721 arch/aarch64-insn.h.
722 (struct aarch64_memory_operand): Likewise.
723 (ENCODE): Likewise.
724 (emit_insn): Move to arch/aarch64-insn.c.
725 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
726 (emit_load_store): Move to arch/aarch64-insn.c.
727 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
728 (can_encode_int32): Remove.
729
246994ce
YQ
7302015-10-12 Yao Qi <yao.qi@linaro.org>
731
732 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
733 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
734 (aarch64_relocate_instruction): Likewise.
735 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
736 (struct aarch64_insn_visitor): Likewise.
737
0badd99f
YQ
7382015-10-12 Yao Qi <yao.qi@linaro.org>
739
740 * linux-aarch64-low.c (struct aarch64_insn_data): New.
741 (struct aarch64_insn_visitor): New.
742 (struct aarch64_insn_relocation_data): New.
743 (aarch64_ftrace_insn_reloc_b): New function.
744 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
745 (aarch64_ftrace_insn_reloc_cb): Likewise.
746 (aarch64_ftrace_insn_reloc_tb): Likewise.
747 (aarch64_ftrace_insn_reloc_adr): Likewise.
748 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
749 (aarch64_ftrace_insn_reloc_others): Likewise.
750 (visitor): New.
751 (aarch64_relocate_instruction): Use visitor.
752
dfaffe9d
YQ
7532015-10-12 Yao Qi <yao.qi@linaro.org>
754
755 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
756 int. Add argument buf.
757 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
758 aarch64_relocate_instruction.
759
70b439f0
YQ
7602015-10-12 Yao Qi <yao.qi@linaro.org>
761
762 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
763 argument insn. Remove local variable insn. Don't call
764 target_read_uint32.
765 (aarch64_install_fast_tracepoint_jump_pad): Call
766 target_read_uint32.
767
7781c06f
YQ
7682015-09-30 Yao Qi <yao.qi@linaro.org>
769
770 * linux-aarch64-low.c (emit_movk): Shorten a long line.
771 (emit_load_store_pair): Likewise.
772
9a3c8263
SM
7732015-09-25 Simon Marchi <simon.marchi@ericsson.com>
774
775 * dll.c (match_dll): Add cast(s).
776 (unloaded_dll): Likewise.
777 * linux-low.c (second_thread_of_pid_p): Likewise.
778 (delete_lwp_callback): Likewise.
779 (count_events_callback): Likewise.
780 (select_event_lwp_callback): Likewise.
781 (linux_set_resume_request): Likewise.
782 * server.c (accumulate_file_name_length): Likewise.
783 (emit_dll_description): Likewise.
784 (handle_qxfer_threads_worker): Likewise.
785 (visit_actioned_threads): Likewise.
786 * thread-db.c (any_thread_of): Likewise.
787 * tracepoint.c (same_process_p): Likewise.
788 (match_blocktype): Likewise.
789 (build_traceframe_info_xml): Likewise.
790
224c3ddb
SM
7912015-09-25 Simon Marchi <simon.marchi@ericsson.com>
792
793 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
794 assignment.
795 (gdb_unparse_agent_expr): Likewise.
796 * hostio.c (require_data): Likewise.
797 (handle_pread): Likewise.
798 * linux-low.c (disable_regset): Likewise.
799 (fetch_register): Likewise.
800 (store_register): Likewise.
801 (get_dynamic): Likewise.
802 (linux_qxfer_libraries_svr4): Likewise.
803 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
804 (set_fast_tracepoint_jump): Likewise.
805 (uninsert_fast_tracepoint_jumps_at): Likewise.
806 (reinsert_fast_tracepoint_jumps_at): Likewise.
807 (validate_inserted_breakpoint): Likewise.
808 (clone_agent_expr): Likewise.
809 * regcache.c (init_register_cache): Likewise.
810 * remote-utils.c (putpkt_binary_1): Likewise.
811 (decode_M_packet): Likewise.
812 (decode_X_packet): Likewise.
813 (look_up_one_symbol): Likewise.
814 (relocate_instruction): Likewise.
815 (monitor_output): Likewise.
816 * server.c (handle_search_memory): Likewise.
817 (handle_qxfer_exec_file): Likewise.
818 (handle_qxfer_libraries): Likewise.
819 (handle_qxfer): Likewise.
820 (handle_query): Likewise.
821 (handle_v_cont): Likewise.
822 (handle_v_run): Likewise.
823 (captured_main): Likewise.
824 * target.c (write_inferior_memory): Likewise.
825 * thread-db.c (try_thread_db_load_from_dir): Likewise.
826 * tracepoint.c (init_trace_buffer): Likewise.
827 (add_tracepoint_action): Likewise.
828 (add_traceframe): Likewise.
829 (add_traceframe_block): Likewise.
830 (cmd_qtdpsrc): Likewise.
831 (cmd_qtdv): Likewise.
832 (cmd_qtstatus): Likewise.
833 (response_source): Likewise.
834 (response_tsv): Likewise.
835 (cmd_qtnotes): Likewise.
836 (gdb_collect): Likewise.
837 (initialize_tracepoint): Likewise.
838
afbe19f8
PL
8392015-09-21 Pierre Langlois <pierre.langlois@arm.com>
840
841 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
842 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
843 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
844 <NOP>: New.
845 (enum aarch64_condition_codes): New enum.
846 (w0): New static global.
847 (fp): Likewise.
848 (lr): Likewise.
849 (struct aarch64_memory_operand) <type>: New
850 MEMORY_OPERAND_POSTINDEX type.
851 (postindex_memory_operand): New helper function.
852 (emit_ret): New function.
853 (emit_load_store_pair): New function, factored out of emit_stp
854 with support for MEMORY_OPERAND_POSTINDEX.
855 (emit_stp): Rewrite using emit_load_store_pair.
856 (emit_ldp): New function.
857 (emit_load_store): Likewise.
858 (emit_ldr): Mention post-index instruction in comment.
859 (emit_ldrh): New function.
860 (emit_ldrb): New function.
861 (emit_ldrsw): Mention post-index instruction in comment.
862 (emit_str): Likewise.
863 (emit_subs): New function.
864 (emit_cmp): Likewise.
865 (emit_and): Likewise.
866 (emit_orr): Likewise.
867 (emit_orn): Likewise.
868 (emit_eor): Likewise.
869 (emit_mvn): Likewise.
870 (emit_lslv): Likewise.
871 (emit_lsrv): Likewise.
872 (emit_asrv): Likewise.
873 (emit_mul): Likewise.
874 (emit_sbfm): Likewise.
875 (emit_sbfx): Likewise.
876 (emit_ubfm): Likewise.
877 (emit_ubfx): Likewise.
878 (emit_csinc): Likewise.
879 (emit_cset): Likewise.
880 (emit_nop): Likewise.
881 (emit_ops_insns): New helper function.
882 (emit_pop): Likewise.
883 (emit_push): Likewise.
884 (aarch64_emit_prologue): New function.
885 (aarch64_emit_epilogue): Likewise.
886 (aarch64_emit_add): Likewise.
887 (aarch64_emit_sub): Likewise.
888 (aarch64_emit_mul): Likewise.
889 (aarch64_emit_lsh): Likewise.
890 (aarch64_emit_rsh_signed): Likewise.
891 (aarch64_emit_rsh_unsigned): Likewise.
892 (aarch64_emit_ext): Likewise.
893 (aarch64_emit_log_not): Likewise.
894 (aarch64_emit_bit_and): Likewise.
895 (aarch64_emit_bit_or): Likewise.
896 (aarch64_emit_bit_xor): Likewise.
897 (aarch64_emit_bit_not): Likewise.
898 (aarch64_emit_equal): Likewise.
899 (aarch64_emit_less_signed): Likewise.
900 (aarch64_emit_less_unsigned): Likewise.
901 (aarch64_emit_ref): Likewise.
902 (aarch64_emit_if_goto): Likewise.
903 (aarch64_emit_goto): Likewise.
904 (aarch64_write_goto_address): Likewise.
905 (aarch64_emit_const): Likewise.
906 (aarch64_emit_call): Likewise.
907 (aarch64_emit_reg): Likewise.
908 (aarch64_emit_pop): Likewise.
909 (aarch64_emit_stack_flush): Likewise.
910 (aarch64_emit_zero_ext): Likewise.
911 (aarch64_emit_swap): Likewise.
912 (aarch64_emit_stack_adjust): Likewise.
913 (aarch64_emit_int_call_1): Likewise.
914 (aarch64_emit_void_call_2): Likewise.
915 (aarch64_emit_eq_goto): Likewise.
916 (aarch64_emit_ne_goto): Likewise.
917 (aarch64_emit_lt_goto): Likewise.
918 (aarch64_emit_le_goto): Likewise.
919 (aarch64_emit_gt_goto): Likewise.
920 (aarch64_emit_ge_got): Likewise.
921 (aarch64_emit_ops_impl): New static global variable.
922 (aarch64_emit_ops): New target function, return
923 &aarch64_emit_ops_impl.
924 (struct linux_target_ops): Install it.
925
bb903df0
PL
9262015-09-21 Pierre Langlois <pierre.langlois@arm.com>
927
928 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
929 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
930 aarch64-ipa.o.
931 * linux-aarch64-ipa.c: New file.
932 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
933 and endian.h.
934 (aarch64_get_thread_area): New target method.
935 (extract_signed_bitfield): New helper function.
936 (aarch64_decode_ldr_literal): New function.
937 (enum aarch64_opcodes): New enum.
938 (struct aarch64_register): New struct.
939 (struct aarch64_operand): New struct.
940 (x0): New static global.
941 (x1): Likewise.
942 (x2): Likewise.
943 (x3): Likewise.
944 (x4): Likewise.
945 (w2): Likewise.
946 (ip0): Likewise.
947 (sp): Likewise.
948 (xzr): Likewise.
949 (aarch64_register): New helper function.
950 (register_operand): Likewise.
951 (immediate_operand): Likewise.
952 (struct aarch64_memory_operand): New struct.
953 (offset_memory_operand): New helper function.
954 (preindex_memory_operand): Likewise.
955 (enum aarch64_system_control_registers): New enum.
956 (ENCODE): New macro.
957 (emit_insn): New helper function.
958 (emit_b): New function.
959 (emit_bcond): Likewise.
960 (emit_cb): Likewise.
961 (emit_tb): Likewise.
962 (emit_blr): Likewise.
963 (emit_stp): Likewise.
964 (emit_ldp_q_offset): Likewise.
965 (emit_stp_q_offset): Likewise.
966 (emit_load_store): Likewise.
967 (emit_ldr): Likewise.
968 (emit_ldrsw): Likewise.
969 (emit_str): Likewise.
970 (emit_ldaxr): Likewise.
971 (emit_stxr): Likewise.
972 (emit_stlr): Likewise.
973 (emit_data_processing_reg): Likewise.
974 (emit_data_processing): Likewise.
975 (emit_add): Likewise.
976 (emit_sub): Likewise.
977 (emit_mov): Likewise.
978 (emit_movk): Likewise.
979 (emit_mov_addr): Likewise.
980 (emit_mrs): Likewise.
981 (emit_msr): Likewise.
982 (emit_sevl): Likewise.
983 (emit_wfe): Likewise.
984 (append_insns): Likewise.
985 (can_encode_int32_in): New helper function.
986 (aarch64_relocate_instruction): New function.
987 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
988 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
989 (struct linux_target_ops): Install aarch64_get_thread_area,
990 aarch64_install_fast_tracepoint_jump_pad and
991 aarch64_get_min_fast_tracepoint_insn_len.
992
787749ea
PL
9932015-09-21 Pierre Langlois <pierre.langlois@arm.com>
994
995 * Makefile.in (aarch64-insn.o): New rule.
996 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
997
9812b2e6
YQ
9982015-09-21 Yao Qi <yao.qi@linaro.org>
999
1000 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1001
18fe412b
YQ
10022015-09-21 Yao Qi <yao.qi@linaro.org>
1003
1004 * tracepoint.c (max_jump_pad_size): Remove.
1005
a0cc84cd
YQ
10062015-09-18 Yao Qi <yao.qi@linaro.org>
1007
1008 * linux-aarch64-low.c: Don't include sys/uio.h.
1009 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1010
d78908cf
WW
10112015-09-16 Wei-cheng Wang <cole945@gmail.com>
1012
1013 * tracepoint.c (eval_result_type): Change prototype.
1014 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1015
d57e0d50
PA
10162015-09-15 Pedro Alves <palves@redhat.com>
1017
1018 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1019 Check whether to report exec events instead of checking whether
1020 multiprocess is enabled.
1021
5a676acc
PA
10222015-09-15 Pedro Alves <palves@redhat.com>
1023
1024 PR remote/18965
1025 * remote-utils.c (prepare_resume_reply): Merge
1026 TARGET_WAITKIND_VFORK_DONE switch case with the
1027 TARGET_WAITKIND_FORKED case.
1028
7c5d0fad
YQ
10292015-09-15 Yao Qi <yao.qi@linaro.org>
1030
1031 * server.c (handle_query): Check string comparison using
1032 "else if" instead of "if".
1033
750ce8d1
YQ
10342015-09-15 Yao Qi <yao.qi@linaro.org>
1035
1036 * server.c (vCont_supported): New global variable.
1037 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1038 matches. Append ";vContSupported+" to own_buf.
1039 (handle_v_requests): Append ";s;S" to own_buf if target supports
1040 hardware single step or vCont_supported is false.
1041 (capture_main): Set vCont_supported to zero.
1042
70b90b91
YQ
10432015-09-15 Yao Qi <yao.qi@linaro.org>
1044
1045 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1046 it to ...
1047 (linux_supports_hardware_single_step): ... New function.
1048 (linux_target_ops): Update.
1049 * lynx-low.c (lynx_target_ops): Set field
1050 supports_hardware_single_step to target_can_do_hardware_single_step.
1051 * nto-low.c (nto_target_ops): Likewise.
1052 * spu-low.c (spu_target_ops): Likewise.
1053 * win32-low.c (win32_target_ops): Likewise.
1054 * target.c (target_can_do_hardware_single_step): New function.
1055 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1056 Remove. <supports_hardware_single_step>: New field.
1057 (target_supports_conditional_breakpoints): Remove.
1058 (target_supports_hardware_single_step): New macro.
1059 (target_can_do_hardware_single_step): Declare.
1060 * server.c (handle_query): Use target_supports_hardware_single_step
1061 instead of target_supports_conditional_breakpoints.
1062
ade90bde
YQ
10632015-09-15 Yao Qi <yao.qi@linaro.org>
1064
1065 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1066 function.
1067 (struct linux_target_ops the_low_target): Install
1068 aarch64_linux_siginfo_fixup.
1069
94585166
DB
10702015-09-11 Don Breazeal <donb@codesourcery.com>
1071 Luis Machado <lgustavo@codesourcery.com>
1072
1073 * linux-low.c (linux_mourn): Static declaration.
1074 (linux_arch_setup): Move in front of
1075 handle_extended_wait.
1076 (linux_arch_setup_thread): New function.
1077 (handle_extended_wait): Handle exec events. Call
1078 linux_arch_setup_thread. Make event_lwp argument a
1079 pointer-to-a-pointer.
1080 (check_zombie_leaders): Do not check stopped threads.
1081 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1082 (linux_low_filter_event): Add lwp and thread for exec'ing
1083 non-leader thread if leader thread has been deleted.
1084 Refactor code into linux_arch_setup_thread and call it.
1085 Pass child lwp pointer by reference to handle_extended_wait.
1086 (linux_wait_for_event_filtered): Update comment.
1087 (linux_wait_1): Prevent clobbering exec event status.
1088 (linux_supports_exec_events): New function.
1089 (linux_target_ops) <supports_exec_events>: Initialize new member.
1090 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1091 new member.
1092 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1093 * server.c (report_exec_events): New global variable.
1094 (handle_query): Handle qSupported query for exec-events feature.
1095 (captured_main): Initialize report_exec_events.
1096 * server.h (report_exec_events): Declare new global variable.
1097 * target.h (struct target_ops) <supports_exec_events>: New
1098 member.
1099 (target_supports_exec_events): New macro.
1100 * win32-low.c (win32_target_ops) <supports_exec_events>:
1101 Initialize new member.
1102
0568462b
MM
11032015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1104
1105 * linux-low.c (linux_low_enable_btrace): Remove.
1106 (linux_target_ops): Replace linux_low_enable_btrace with
1107 linux_enable_btrace.
1108
39edd165
YQ
11092015-09-03 Yao Qi <yao.qi@linaro.org>
1110
1111 * linux-aarch64-low.c (aarch64_insert_point): Call
1112 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1113 returns true.
1114
1db33b5a
UW
11152015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1116
1117 * linux-low.c (check_stopped_by_breakpoint): Use
1118 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1119
ab290430
PA
11202015-08-27 Pedro Alves <palves@redhat.com>
1121
1122 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1123
8d749320
SM
11242015-08-26 Simon Marchi <simon.marchi@ericsson.com>
1125
6711b7f8
SM
1126 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1127 the XNEW-family equivalent.
8d749320
SM
1128 (compile_bytecodes): Likewise.
1129 * dll.c (loaded_dll): Likewise.
1130 * event-loop.c (append_callback_event): Likewise.
1131 (create_file_handler): Likewise.
1132 (create_file_event): Likewise.
1133 * hostio.c (handle_open): Likewise.
1134 * inferiors.c (add_thread): Likewise.
1135 (add_process): Likewise.
1136 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1137 * linux-arm-low.c (arm_new_process): Likewise.
1138 (arm_new_thread): Likewise.
1139 * linux-low.c (add_to_pid_list): Likewise.
1140 (linux_add_process): Likewise.
1141 (handle_extended_wait): Likewise.
1142 (add_lwp): Likewise.
1143 (enqueue_one_deferred_signal): Likewise.
1144 (enqueue_pending_signal): Likewise.
1145 (linux_resume_one_lwp_throw): Likewise.
1146 (linux_resume_one_thread): Likewise.
1147 (linux_read_memory): Likewise.
1148 (linux_write_memory): Likewise.
1149 * linux-mips-low.c (mips_linux_new_process): Likewise.
1150 (mips_linux_new_thread): Likewise.
1151 (mips_add_watchpoint): Likewise.
1152 * linux-x86-low.c (initialize_low_arch): Likewise.
1153 * lynx-low.c (lynx_add_process): Likewise.
1154 * mem-break.c (set_raw_breakpoint_at): Likewise.
1155 (set_breakpoint): Likewise.
1156 (add_condition_to_breakpoint): Likewise.
1157 (add_commands_to_breakpoint): Likewise.
1158 (clone_agent_expr): Likewise.
1159 (clone_one_breakpoint): Likewise.
1160 * regcache.c (new_register_cache): Likewise.
1161 * remote-utils.c (look_up_one_symbol): Likewise.
1162 * server.c (queue_stop_reply): Likewise.
1163 (start_inferior): Likewise.
1164 (queue_stop_reply_callback): Likewise.
1165 (handle_target_event): Likewise.
1166 * spu-low.c (fetch_ppc_memory): Likewise.
1167 (store_ppc_memory): Likewise.
1168 * target.c (set_target_ops): Likewise.
1169 * thread-db.c (thread_db_load_search): Likewise.
1170 (try_thread_db_load_1): Likewise.
1171 * tracepoint.c (add_tracepoint): Likewise.
1172 (add_tracepoint_action): Likewise.
1173 (create_trace_state_variable): Likewise.
1174 (cmd_qtdpsrc): Likewise.
1175 (cmd_qtro): Likewise.
1176 (add_while_stepping_state): Likewise.
1177 * win32-low.c (child_add_thread): Likewise.
1178 (get_image_name): Likewise.
1179
ed8b7b42
YQ
11802015-08-25 Yao Qi <yao.qi@linaro.org>
1181
1182 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1183
db3cb7cb
YQ
11842015-08-25 Yao Qi <yao.qi@linaro.org>
1185
1186 * Makefile.in (aarch64-linux.o): New rule.
1187 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1188 srv_tgtobj.
1189 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1190 (aarch64_init_debug_reg_state): Make it extern.
1191 (aarch64_linux_prepare_to_resume): Remove.
1192
f6011a1c
YQ
11932015-08-25 Yao Qi <yao.qi@linaro.org>
1194
1195 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1196 lwp_arch_private_info and ptid_of_lwp.
1197
88e2cf7e
YQ
11982015-08-25 Yao Qi <yao.qi@linaro.org>
1199
1200 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1201 Find proc_info by find_process_pid. All callers updated.
1202
5e35436e
YQ
12032015-08-25 Yao Qi <yao.qi@linaro.org>
1204
1205 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1206 Remove.
1207 (debug_reg_change_callback): Remove.
1208 (aarch64_notify_debug_reg_change): Remove.
1209
4a8a7965
YQ
12102015-08-25 Yao Qi <yao.qi@linaro.org>
1211
1212 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1213 Call current_lwp_ptid.
1214
32a271ee
YQ
12152015-08-25 Yao Qi <yao.qi@linaro.org>
1216
1217 * linux-aarch64-low.c (debug_reg_change_callback): Use
1218 debug_printf.
1219
0d51c8d7
YQ
12202015-08-25 Yao Qi <yao.qi@linaro.org>
1221
1222 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1223
31a43dd5
YQ
12242015-08-25 Yao Qi <yao.qi@linaro.org>
1225
1226 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1227
8ee52567
YQ
12282015-08-25 Yao Qi <yao.qi@linaro.org>
1229
1230 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1231 the code.
1232
ff3f0f45
YQ
12332015-08-25 Yao Qi <yao.qi@linaro.org>
1234
1235 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1236 Remove.
1237 (debug_reg_change_callback): Remove argument entry and add argument
1238 lwp. Remove local variable thread. Don't print thread id in the
1239 debugging output. Don't check whether pid of thread equals to pid.
1240 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1241 iterate_over_lwps instead find_inferior.
1242
3d40fbb5
PA
12432015-08-24 Pedro Alves <palves@redhat.com>
1244
1245 * inferiors.c (get_first_process): New function.
1246 * inferiors.h (get_first_process): New declaration.
1247 * remote-utils.c (read_ptid): Default to the first process in the
1248 list, instead of to the current thread's process.
1249
438e1e42
PA
12502015-08-24 Pedro Alves <palves@redhat.com>
1251
1252 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1253 * event-loop.c: Likewise.
1254 * remote-utils.c: Likewise.
1255 * tracepoint.c: Likewise.
1256
a8c6d4fc
PA
12572015-08-24 Pedro Alves <palves@redhat.com>
1258
1259 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1260 ptid_get_lwp.
1261
99b0bb12
PA
12622015-08-21 Pedro Alves <palves@redhat.com>
1263
1264 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1265 instead of literal 1.
1266
f8904751
PA
12672015-08-21 Pedro Alves <palves@redhat.com>
1268
1269 * tdesc.c (default_description): Explicitly zero-initialize.
1270
465a859e
PA
12712015-08-21 Pedro Alves <palves@redhat.com>
1272
1273 PR gdb/18749
1274 * inferiors.c (remove_thread): Discard any pending stop reply for
1275 this thread.
1276 * server.c (remove_all_on_match_pid): Rename to ...
1277 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1278 instead of a pid.
1279 (discard_queued_stop_replies): Change parameter to a ptid. Now
1280 extern.
1281 (handle_v_kill, kill_inferior_callback, captured_main)
1282 (process_serial_event): Adjust.
1283 * server.h (discard_queued_stop_replies): Declare.
1284
f0db101d
PA
12852015-08-21 Pedro Alves <palves@redhat.com>
1286
1287 * linux-low.c (wait_for_sigstop): Always switch to no thread
1288 selected if the previously current thread dies.
1289 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1290 process instead of the current thread's.
1291 * remote-utils.c (input_interrupt): Don't check if there's no
1292 current thread.
1293 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1294 current thread to the general thread fails, error out.
1295 (handle_qxfer_auxv, handle_qxfer_libraries)
1296 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1297 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1298 (handle_query): Check if there's a thread selected instead of
1299 checking whether there's any thread in the thread list.
1300 (handle_qxfer_threads, handle_qxfer_btrace)
1301 (handle_qxfer_btrace_conf): Don't error out early if there's no
1302 thread in the thread list.
1303 (handle_v_cont, myresume): Don't set the current thread to the
1304 continue thread.
1305 (process_serial_event) <Hg handling>: Also set thread_id if the
1306 previous general thread is still alive.
1307 (process_serial_event) <g/G handling>: If setting the current
1308 thread to the general thread fails, error out.
1309 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1310 thread's lwp instead of the current thread's.
1311 * target.c (set_desired_thread): If the desired thread was not
1312 found, leave the current thread pointing to NULL. Return an int
1313 (boolean) indicating success.
1314 * target.h (set_desired_thread): Change return type to int.
1315
40045d91
MF
13162015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1317
1318 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1319 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1320 #includes.
1321 (ps_get_thread_area): New function.
1322
45face3b
GB
13232015-08-19 Gary Benson <gbenson@redhat.com>
1324
1325 * hostio.c (handle_pread): Do not attempt to read more data
1326 than hostio_reply_with_data can fit in a packet.
1327
16d5f642
JB
13282015-08-18 Joel Brobecker <brobecker@adacore.com>
1329
1330 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1331
a738da3a
MF
13322015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1333
1334 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1335
33ebda9d
PA
13362015-08-06 Pedro Alves <palves@redhat.com>
1337
1338 * tracepoint.c (expr_eval_result): Now an int.
1339
a44892be
PA
13402015-08-06 Pedro Alves <palves@redhat.com>
1341
1342 * gdbthread.h (struct regcache): Forward declare.
1343 (struct thread_info) <regcache_data>: Now a struct regcache
1344 pointer.
1345 * inferiors.c (inferior_regcache_data)
1346 (set_inferior_regcache_data): Now work with struct regcache
1347 pointers.
1348 * inferiors.h (struct regcache): Forward declare.
1349 (inferior_regcache_data, set_inferior_regcache_data): Now work
1350 with struct regcache pointers.
1351 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1352 (free_register_cache_thread): Remove struct regcache pointer
1353 casts.
1354
608a1e46
PA
13552015-08-06 Pedro Alves <palves@redhat.com>
1356
1357 * server.c (captured_main): On error, print the exception message
1358 to stderr, and if run_once is set, throw a quit.
1359
f0ce0d3a
PA
13602015-08-06 Pedro Alves <palves@redhat.com>
1361
1362 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1363 the current thread.
1364
bf47e248
PA
13652015-08-06 Pedro Alves <palves@redhat.com>
1366
1367 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1368 reading beyond the passed in buffer length.
1369
b6b9ffcc
PL
13702015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1371
1372 * tracepoint.c (symbol_list) <required>: Remove.
1373
863d01bd
PA
13742015-08-06 Pedro Alves <palves@redhat.com>
1375
1376 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1377 count if stopping and suspending threads.
1378 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1379 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1380 (linux_detach): Complete an ongoing step-over.
1381 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1382 throughout.
1383 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1384 (linux_wait_1): If passing a signal to the inferior after
1385 finishing a step-over, unsuspend and re-resume all lwps. If we
1386 see a single-step event but the thread should be continuing, don't
1387 pass the trap to gdb.
1388 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1389 internal_error instead of gdb_assert.
1390 (enqueue_pending_signal): New function.
1391 (check_ptrace_stopped_lwp_gone): Add debug output.
1392 (start_step_over): Use internal_error instead of gdb_assert.
1393 (complete_ongoing_step_over): New function.
1394 (linux_resume_one_thread): Don't resume a suspended thread.
1395 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1396 it stepping.
1397
00db26fa
PA
13982015-08-06 Pedro Alves <palves@redhat.com>
1399
1400 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1401 (linux_thread_alive): Use lwp_is_marked_dead.
1402 (extended_event_reported): Delete.
1403 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1404 instead of extended_event_reported.
1405 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1406 as well.
1407 (lwp_is_marked_dead): New function.
1408 (lwp_running): Use lwp_is_marked_dead.
1409 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1410 comment.
1411
ad071a30
PA
14122015-08-06 Pedro Alves <palves@redhat.com>
1413
1414 * linux-low.c (linux_wait_1): Move fork event output out of the
1415 !report_to_gdb check. Pass event_child->waitstatus to
1416 target_waitstatus_to_string instead of ourstatus.
1417
524b57e6
YQ
14182015-08-04 Yao Qi <yao.qi@linaro.org>
1419
1420 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1421 if current_thread is 32 bit.
1422
6085d6f6
YQ
14232015-08-04 Yao Qi <yao.qi@linaro.org>
1424
1425 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1426 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1427 * server.c (extended_protocol): Remove "static".
1428 * server.h (extended_protocol): Declare it.
1429
8a7e4587
YQ
14302015-08-04 Yao Qi <yao.qi@linaro.org>
1431
1432 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1433 both aarch64 and aarch32.
1434 (aarch64_set_pc): Likewise.
1435
3b53ae99
YQ
14362015-08-04 Yao Qi <yao.qi@linaro.org>
1437
1438 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1439 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1440 arm-with-neon.xml to srv_xmlfiles.
1441 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1442 (is_64bit_tdesc): New function.
1443 (aarch64_linux_read_description): New function.
1444 (aarch64_arch_setup): Call aarch64_linux_read_description.
1445 (regs_info): Rename to regs_info_aarch64.
1446 (aarch64_regs_info): Return right regs_info.
1447 (initialize_low_arch): Call initialize_low_arch_aarch32.
1448
bd9e6534
YQ
14492015-08-04 Yao Qi <yao.qi@linaro.org>
1450
1451 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1452 * linux-aarch32-low.c: New file.
1453 * linux-aarch32-low.h: New file.
1454 * linux-arm-low.c (arm_fill_gregset): Move it to
1455 linux-aarch32-low.c.
1456 (arm_store_gregset): Likewise.
1457 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1458 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1459 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1460 (regs_info): Rename to regs_info_arm.
1461 (arm_regs_info): Return regs_info_aarch32 if
1462 have_ptrace_getregset is 1 and target description is
1463 arm_with_neon or arm_with_vfpv3.
1464 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1465 Call initialize_low_arch_aarch32 instead.
1466
ded48a5e
YQ
14672015-08-04 Yao Qi <yao.qi@linaro.org>
1468
1469 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1470 * linux-low.c: ... here.
1471 * linux-low.h (have_ptrace_getregset): Declare it.
1472
96e9210f
PA
14732015-08-04 Pedro Alves <palves@redhat.com>
1474
1475 * thread-db.c (struct thread_db): Use new typedefs.
1476 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1477 CHK calls.
1478 (disable_thread_event_reporting): Cast result of dlsym to
1479 destination function pointer type.
1480 (thread_db_mourn): Use td_ta_delete_ftype.
1481
af60a1ef
SL
14822015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1483
1484 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1485 arch variant.
1486 (CDX_BREAKPOINT): Define for R2.
1487 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1488 (the_low_target): Add comments.
1489
e8b41681
YQ
14902015-07-30 Yao Qi <yao.qi@linaro.org>
1491
1492 * linux-arm-low.c (arm_hwcap): Remove it.
1493 (arm_read_description): New local variable arm_hwcap. Don't
1494 set arm_hwcap to zero.
1495
89abb039
YQ
14962015-07-30 Yao Qi <yao.qi@linaro.org>
1497
1498 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1499 Use regcache->tdesc instead.
1500 (arm_store_wmmxregset): Likewise.
1501 (arm_fill_vfpregset): Likewise.
1502 (arm_store_vfpregset): Likewise.
1503
deca266c
YQ
15042015-07-30 Yao Qi <yao.qi@linaro.org>
1505
1506 * linux-arm-low.c: Include arch/arm.h.
1507 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1508 (arm_store_gregset): Likewise.
1509
aa58a496
SM
15102015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1511
1512 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1513 ptrace's 4th parameter.
1514
50904b25
YQ
15152015-07-27 Yao Qi <yao.qi@linaro.org>
1516
1517 * configure.srv (case aarch64*-*-linux*): Don't set
1518 srv_linux_usrregs.
1519
5826e159
PA
15202015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1521
1522 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1523 sys/ptrace.h.
1524 * linux-arm-low.c: Likewise.
1525 * linux-cris-low.c: Likewise.
1526 * linux-crisv32-low.c: Likewise.
1527 * linux-low.c: Likewise.
1528 * linux-m68k-low.c: Likewise.
1529 * linux-mips-low.c: Likewise.
1530 * linux-nios2-low.c: Likewise.
1531 * linux-s390-low.c: Likewise.
1532 * linux-sparc-low.c: Likewise.
1533 * linux-tic6x-low.c: Likewise.
1534 * linux-tile-low.c: Likewise.
1535 * linux-x86-low.c: Likewise.
1536
54019719
PA
15372015-07-24 Pedro Alves <palves@redhat.com>
1538
1539 * config.in: Regenerate.
1540 * configure: Regenerate.
1541
eb7aa561
PA
15422015-07-24 Pedro Alves <palves@redhat.com>
1543
1544 * acinclude.m4: Include ../ptrace.m4.
1545 * configure.ac: Call GDB_AC_PTRACE.
1546 * config.in, configure: Regenerate.
1547
55d7b841
YQ
15482015-07-24 Yao Qi <yao.qi@linaro.org>
1549
1550 * linux-low.c (linux_create_inferior): Remove setting to
1551 proc->priv->new_inferior.
1552 (linux_attach): Likewise.
1553 (linux_low_filter_event): Likewise.
1554 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1555
c06cbd92
YQ
15562015-07-24 Yao Qi <yao.qi@linaro.org>
1557
1558 * linux-low.c (linux_arch_setup): New function.
1559 (linux_low_filter_event): If proc->tdesc is NULL and
1560 proc->attached is true, call the_low_target.arch_setup.
1561 Otherwise, keep status pending, and return.
1562 (linux_resume_one_lwp_throw): Don't call get_pc if
1563 thread->while_stepping isn't NULL. Don't call
1564 get_thread_regcache if proc->tdesc is NULL.
1565 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1566 (linux_target_ops): Install arch_setup.
1567 * server.c (start_inferior): Call the_target->arch_setup.
1568 * target.h (struct target_ops) <arch_setup>: New field.
1569 (target_arch_setup): New marco.
1570 * lynx-low.c (lynx_target_ops): Update.
1571 * nto-low.c (nto_target_ops): Update.
1572 * spu-low.c (spu_target_ops): Update.
1573 * win32-low.c (win32_target_ops): Update.
1574
5ae3ebba
YQ
15752015-07-24 Yao Qi <yao.qi@linaro.org>
1576
1577 * linux-low.c (linux_add_process): Don't set
1578 proc->priv->new_inferior.
1579 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1580 (linux_attach): Likewise.
1581
eb97750b
YQ
15822015-07-24 Yao Qi <yao.qi@linaro.org>
1583
1584 * server.c (start_inferior): Code refactor.
1585
51aee833
YQ
15862015-07-24 Yao Qi <yao.qi@linaro.org>
1587
1588 * server.c (process_serial_event): Set general_thread.
1589
af1b22f3
YQ
15902015-07-21 Yao Qi <yao.qi@linaro.org>
1591
1592 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1593 aarch64_linux_get_debug_reg_capacity.
1594
554717a3
YQ
15952015-07-17 Yao Qi <yao.qi@linaro.org>
1596
1597 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1598 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1599 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1600 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1601 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1602 (AARCH64_HWP_ALIGNMENT): Likewise.
1603 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1604 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1605 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1606 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1607 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1608 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1609 (struct aarch64_debug_reg_state): Likewise.
1610 (struct arch_lwp_info): Likewise.
1611 (aarch64_align_watchpoint): Likewise.
1612 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1613 (aarch64_watchpoint_length): Likewise.
1614 (aarch64_point_encode_ctrl_reg): Likewise
1615 (aarch64_point_is_aligned): Likewise.
1616 (aarch64_align_watchpoint): Likewise.
1617 (aarch64_linux_set_debug_regs):
1618 (aarch64_dr_state_insert_one_point): Likewise.
1619 (aarch64_dr_state_remove_one_point): Likewise.
1620 (aarch64_handle_breakpoint): Likewise.
1621 (aarch64_handle_aligned_watchpoint): Likewise.
1622 (aarch64_handle_unaligned_watchpoint): Likewise.
1623 (aarch64_handle_watchpoint): Likewise.
1624
c67ca4de
YQ
16252015-07-17 Yao Qi <yao.qi@linaro.org>
1626
1627 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1628 and don't aarch64_get_debug_reg_state. All callers update.
1629 (aarch64_handle_aligned_watchpoint): Likewise.
1630 (aarch64_handle_unaligned_watchpoint): Likewise.
1631 (aarch64_handle_watchpoint): Likewise.
1632 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1633 (aarch64_remove_point): Likewise.
1634
25abf979
YQ
16352015-07-17 Yao Qi <yao.qi@linaro.org>
1636
1637 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1638 debug_printf.
1639 (aarch64_handle_unaligned_watchpoint): Likewise.
1640
db1ff28b
JK
16412015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1642
1643 Revert the previous 3 commits:
1644 Move gdb_regex* to common/
1645 Move linux_find_memory_regions_full & co.
1646 gdbserver build-id attribute generator
1647
700ca40f
JK
16482015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1649 Jan Kratochvil <jan.kratochvil@redhat.com>
1650
1651 gdbserver build-id attribute generator.
1652 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1653 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1654 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1655 (find_phdr): New.
1656 (get_dynamic): Use find_pdhr to traverse program headers.
1657 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1658 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1659 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1660 (get_hex_build_id): New.
1661 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1662 to reply XML document.
1663
9904185c
JK
16642015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1665 Jan Kratochvil <jan.kratochvil@redhat.com>
1666
1667 * target.c: Include target/target-utils.h and fcntl.h.
1668 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1669 (target_fileio_read_stralloc): New functions.
1670
6e5b4429
JK
16712015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1672
1673 * Makefile.in (OBS): Add gdb_regex.o.
1674 (gdb_regex.o): New.
1675 * config.in: Rebuilt.
1676 * configure: Rebuilt.
1677
ddc98fbf
JK
16782015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1679 Jan Kratochvil <jan.kratochvil@redhat.com>
1680
1681 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1682 * Makefile.in (OBS): Add target-utils.o.
1683 (linux-maps.o, target-utils.o): New.
1684 * configure.srv (srv_linux_obj): Add linux-maps.o.
1685
e57bb7a0
PL
16862015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1687
1688 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1689 function, return 1.
1690 (the_low_target): Install it.
1691
586b02a9
PA
16922015-07-14 Pedro Alves <palves@redhat.com>
1693
1694 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1695 Instead, ignore ECHILD, and throw an error for other errnos.
1696
58c1b36c
PA
16972015-07-10 Pedro Alves <palves@redhat.com>
1698
1699 * event-loop.c (struct callback_event) <data>: Change type to
1700 gdb_client_data instance instead of gdb_client_data pointer.
1701 (append_callback_event): Adjust.
1702
421530db
PL
17032015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1704
1705 * linux-aarch64-low.c: Add comments for each linux_target_ops
1706 method. Remove comments already covered in target_ops and
1707 linux_target_ops definitions.
1708 (the_low_target): Add comments for each unimplemented method.
1709
c2d65f38
YQ
17102015-07-09 Yao Qi <yao.qi@linaro.org>
1711
1712 * linux-aarch64-low.c (aarch64_regmap): Remove.
1713 (aarch64_usrregs_info): Remove.
1714 (regs_info): Set field usrregs to NULL.
1715
b20a6524
MM
17162015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1717
1718 * linux-low.c: Include "rsp-low.h"
1719 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1720 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1721 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1722 (handle_btrace_enable_pt): New.
1723 (handle_btrace_general_set): Support "pt".
1724 (handle_btrace_conf_general_set): Support "pt:size".
1725
96c97461
PL
17262015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1727
1728 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1729 Z_PACKET_SW_BP.
1730
37d66942
PL
17312015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1732
1733 * linux-aarch64-low.c: Remove comment about endianness.
1734 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1735 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1736 memcmp.
1737
dc06243f
GB
17382015-06-24 Gary Benson <gbenson@redhat.com>
1739
1740 * linux-i386-ipa.c (stdint.h): Do not include.
1741 * lynx-i386-low.c (stdint.h): Likewise.
1742 * lynx-ppc-low.c (stdint.h): Likewise.
1743 * mem-break.c (stdint.h): Likewise.
1744 * thread-db.c (stdint.h): Likewise.
1745 * tracepoint.c (stdint.h): Likewise.
1746 * win32-low.c (stdint.h): Likewise.
1747
124e13d9
SM
17482015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1749
1750 * server.c (write_qxfer_response): Update call to
1751 remote_escape_output.
1752
909c2cda
JK
17532015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1754 Jan Kratochvil <jan.kratochvil@redhat.com>
1755
1756 Merge multiple hex conversions.
1757 * gdbreplay.c (tohex): Rename to 'fromhex'.
1758 (logchar): Use fromhex.
1759
24c05f46
JK
17602015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1761
1762 * server.c (handle_qxfer_libraries): Set `version' attribute for
1763 <library-list>.
1764
14d2069a
GB
17652015-06-10 Gary Benson <gbenson@redhat.com>
1766
1767 * target.h (struct target_ops) <multifs_open>: New field.
1768 <multifs_unlink>: Likewise.
1769 <multifs_readlink>: Likewise.
1770 * linux-low.c (nat/linux-namespaces.h): New include.
1771 (linux_target_ops): Initialize the_target->multifs_open,
1772 the_target->multifs_unlink and the_target->multifs_readlink.
1773 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1774 * hostio.c (hostio_fs_pid): New static variable.
1775 (hostio_handle_new_gdb_connection): New function.
1776 (handle_setfs): Likewise.
1777 (handle_open): Use the_target->multifs_open as appropriate.
1778 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1779 (handle_readlink): Use the_target->multifs_readlink as
1780 appropriate.
1781 (handle_vFile): Handle vFile:setfs packets.
1782 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1783 after target_handle_new_gdb_connection.
1784
4b8b5e72
GB
17852015-06-10 Gary Benson <gbenson@redhat.com>
1786
1787 * configure.ac (AC_CHECK_FUNCS): Add setns.
1788 * config.in: Regenerate.
1789 * configure: Likewise.
1790 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1791 (linux-namespaces.o): New rule.
1792 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1793
3ac2e371
GB
17942015-06-09 Gary Benson <gbenson@redhat.com>
1795
1796 * hostio.c (handle_open): Process mode argument with
1797 fileio_to_host_mode.
1798
ca9b78ce
YQ
17992015-06-01 Yao Qi <yao.qi@linaro.org>
1800
1801 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1802 * linux-x86-low.c: Likewise.
1803
bfacd19d
DB
18042015-05-28 Don Breazeal <donb@codesourcery.com>
1805
1806 * linux-low.c (handle_extended_wait): Initialize
1807 thread_info.last_resume_kind for new fork children.
1808
452003ef
PA
18092015-05-15 Pedro Alves <palves@redhat.com>
1810
1811 * target.h (target_handle_new_gdb_connection): Rewrite using if
1812 wrapped in do/while.
1813
1041a03c
JB
18142015-05-14 Joel Brobecker <brobecker@adacore.com>
1815
1816 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1817 * configure, config.in: Regenerate.
1818 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1819 Declare typedef.
1820
c269dbdb
DB
18212015-05-12 Don Breazeal <donb@codesourcery.com>
1822
1823 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1824 PTRACE_EVENT_VFORK_DONE.
1825 (linux_low_ptrace_options, extended_event_reported): Add vfork
1826 events.
1827 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1828 and "vforkdone" for RSP 'T' Stop Reply Packet.
1829 * server.h (report_vfork_events): Declare
1830 global variable.
1831
3a8a0396
DB
18322015-05-12 Don Breazeal <donb@codesourcery.com>
1833
1834 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1835 (the_low_target) <new_fork>: Initialize new member.
1836 * linux-arm-low.c (arm_new_fork): New function.
1837 (the_low_target) <new_fork>: Initialize new member.
1838 * linux-low.c (handle_extended_wait): Call new target function
1839 new_fork.
1840 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1841 * linux-mips-low.c (mips_add_watchpoint): New function
1842 extracted from mips_insert_point.
1843 (the_low_target) <new_fork>: Initialize new member.
1844 (mips_linux_new_fork): New function.
1845 (mips_insert_point): Call mips_add_watchpoint.
1846 * linux-x86-low.c (x86_linux_new_fork): New function.
1847 (the_low_target) <new_fork>: Initialize new member.
1848
de0d863e
DB
18492015-05-12 Don Breazeal <donb@codesourcery.com>
1850
1851 * linux-low.c (handle_extended_wait): Implement return value,
1852 rename argument 'event_child' to 'event_lwp', handle
1853 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1854 (linux_low_ptrace_options): New function.
1855 (linux_low_filter_event): Call linux_low_ptrace_options,
1856 use different argument fo linux_enable_event_reporting,
1857 use return value from handle_extended_wait.
1858 (extended_event_reported): New function.
1859 (linux_wait_1): Call extended_event_reported and set
1860 status to report fork events.
1861 (linux_write_memory): Add pid to debug message.
1862 (reset_lwp_ptrace_options_callback): New function.
1863 (linux_handle_new_gdb_connection): New function.
1864 (linux_target_ops): Initialize new structure member.
1865 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1866 * lynx-low.c: Initialize new structure member.
1867 * remote-utils.c (prepare_resume_reply): Implement stop reason
1868 "fork" for "T" stop message.
1869 * server.c (handle_query): Call handle_new_gdb_connection.
1870 * server.h (report_fork_events): Declare global flag.
1871 * target.h (struct target_ops) <handle_new_gdb_connection>:
1872 New member.
1873 (target_handle_new_gdb_connection): New macro.
1874 * win32-low.c: Initialize new structure member.
1875
ddcbc397
DB
18762015-05-12 Don Breazeal <donb@codesourcery.com>
1877
1878 * mem-break.c (APPEND_TO_LIST): Define macro.
1879 (clone_agent_expr): New function.
1880 (clone_one_breakpoint): New function.
1881 (clone_all_breakpoints): New function.
1882 * mem-break.h: Declare new functions.
1883
89245bc0
DB
18842015-05-12 Don Breazeal <donb@codesourcery.com>
1885
1886 * linux-low.c (linux_supports_fork_events): New function.
1887 (linux_supports_vfork_events): New function.
1888 (linux_target_ops): Initialize new structure members.
1889 (initialize_low): Call linux_check_ptrace_features.
1890 * lynx-low.c (lynx_target_ops): Initialize new structure
1891 members.
1892 * server.c (report_fork_events, report_vfork_events):
1893 New global flags.
1894 (handle_query): Add new features to qSupported packet and
1895 response.
1896 (captured_main): Initialize new global variables.
1897 * target.h (struct target_ops) <supports_fork_events>:
1898 New member.
1899 <supports_vfork_events>: New member.
1900 (target_supports_fork_events): New macro.
1901 (target_supports_vfork_events): New macro.
1902 * win32-low.c (win32_target_ops): Initialize new structure
1903 members.
1904
835205d0
GB
19052015-05-12 Gary Benson <gbenson@redhat.com>
1906
1907 * server.c (handle_qxfer_exec_file): Use current process
1908 if annex is empty.
1909
21e94bd9
SL
19102015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1911
1912 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1913 Remove HAVE_PTRACE_GETREGS conditionals.
1914 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1915 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1916
45614f15
YQ
19172015-05-08 Yao Qi <yao.qi@linaro.org>
1918
1919 * linux-low.c (linux_supports_conditional_breakpoints): New
1920 function.
1921 (linux_target_ops): Install new target method.
1922 * lynx-low.c (lynx_target_ops): Install NULL hook for
1923 supports_conditional_breakpoints.
1924 * nto-low.c (nto_target_ops): Likewise.
1925 * spu-low.c (spu_target_ops): Likewise.
1926 * win32-low.c (win32_target_ops): Likewise.
1927 * server.c (handle_query): Check
1928 target_supports_conditional_breakpoints.
1929 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1930 New field.
1931 (target_supports_conditional_breakpoints): New macro.
1932
80ad801e
PA
19332015-05-06 Pedro Alves <palves@redhat.com>
1934
1935 PR server/18081
1936 * server.c (start_inferior): If the process exits, mourn it.
1937
819843c7
GB
19382015-04-21 Gary Benson <gbenson@redhat.com>
1939
1940 * hostio.c (fileio_open_flags_to_host): Factored out to
1941 fileio_to_host_openflags in common/fileio.c. Single use
1942 updated.
1943
a2d5a9d7
MF
19442015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1945
1946 * linux-xtensa-low.c (xtensa_fill_gregset)
1947 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1948 XCHAL_HAVE_LOOP.
1949
deb44829
MF
19502015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1951
1952 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1953 (regs_info): Replace usrregs pointer with NULL.
1954
e57f1de3
GB
19552015-04-17 Gary Benson <gbenson@redhat.com>
1956
1957 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1958 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1959 * server.c (handle_qxfer_exec_file): New function.
1960 (qxfer_packets): Add exec-file entry.
1961 (handle_query): Report qXfer:exec-file:read as supported packet.
1962
62828379
RN
19632015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1964
1965 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1966
b88bb450
GB
19672015-04-09 Gary Benson <gbenson@redhat.com>
1968
1969 * hostio-errno.c (errno_to_fileio_error): Remove function.
1970 Update caller to use remote_fileio_to_fio_error.
1971
c8f4bfdd
YQ
19722015-04-09 Yao Qi <yao.qi@linaro.org>
1973
1974 * linux-low.c (linux_insert_point): Call
1975 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1976 (linux_remove_point): Call remove_memory_breakpoint if type is
1977 raw_bkpt_type_sw.
1978 * linux-x86-low.c (x86_insert_point): Don't call
1979 insert_memory_breakpoint.
1980 (x86_remove_point): Don't call remove_memory_breakpoint.
1981
41f98f02
PA
19822015-04-01 Pedro Alves <palves@redhat.com>
1983 Cleber Rosa <crosa@redhat.com>
1984
1985 * server.c (gdbserver_usage): Reorganize and extend the usage
1986 message.
1987
2bf6fb9d
PA
19882015-03-24 Pedro Alves <palves@redhat.com>
1989
1990 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1991 output. Also dump TRAP_TRACE.
1992 (linux_low_filter_event): In debug output, distinguish a
1993 resume_stop SIGSTOP from a delayed SIGSTOP.
1994
369f6daa
GB
19952015-03-24 Gary Benson <gbenson@redhat.com>
1996
1997 * linux-x86-low.c (x86_linux_new_thread): Moved to
1998 nat/x86-linux.c.
1999 (x86_linux_prepare_to_resume): Likewise.
2000
8e5d4070
GB
20012015-03-24 Gary Benson <gbenson@redhat.com>
2002
2003 * Makefile.in (x86-linux-dregs.o): New rule.
2004 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2005 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2006 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2007 (x86_linux_dr_get): Likewise.
2008 (x86_linux_dr_set): Likewise.
2009 (update_debug_registers_callback): Likewise.
2010 (x86_linux_dr_set_addr): Likewise.
2011 (x86_linux_dr_get_addr): Likewise.
2012 (x86_linux_dr_set_control): Likewise.
2013 (x86_linux_dr_get_control): Likewise.
2014 (x86_linux_dr_get_status): Likewise.
2015 (x86_linux_update_debug_registers): Likewise.
2016
2b95d440
GB
20172015-03-24 Gary Benson <gbenson@redhat.com>
2018
2019 * linux-x86-low.c (x86_linux_update_debug_registers):
2020 New function, factored out from...
2021 (x86_linux_prepare_to_resume): ...this.
2022
14b0bc68
GB
20232015-03-24 Gary Benson <gbenson@redhat.com>
2024
2025 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2026 (x86_linux_dr_set): Likewise.
2027 (update_debug_registers_callback): Likewise.
2028 (x86_linux_dr_set_addr): Likewise.
2029 (x86_linux_dr_get_addr): Likewise.
2030 (x86_linux_dr_set_control): Likewise.
2031 (x86_linux_dr_get_control): Likewise.
2032 (x86_linux_dr_get_status): Likewise.
2033 (x86_linux_prepare_to_resume): Likewise.
2034
5dfe6ca8
GB
20352015-03-24 Gary Benson <gbenson@redhat.com>
2036
2037 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2038 Use perror_with_name. Pass string through gettext.
2039 (x86_linux_dr_set): Likewise.
2040
d33472ad
GB
20412015-03-24 Gary Benson <gbenson@redhat.com>
2042
2043 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2044 (x86_linux_dr_set_addr): ...this.
2045 (x86_dr_low_get_addr): Rename to...
2046 (x86_linux_dr_get_addr): ...this.
2047 (x86_dr_low_set_control): Rename to...
2048 (x86_linux_dr_set_control): ...this.
2049 (x86_dr_low_get_control): Rename to...
2050 (x86_linux_dr_get_control): ...this.
2051 (x86_dr_low_get_status): Rename to...
2052 (x86_linux_dr_get_status): ...this.
2053 (x86_dr_low): Update with new function names.
2054
4b134ca1
GB
20552015-03-24 Gary Benson <gbenson@redhat.com>
2056
2057 * Makefile.in (x86-linux.o): New rule.
2058 * configure.srv: Add x86-linux.o to relevant targets.
2059 * linux-low.c (lwp_set_arch_private_info): New function.
2060 (lwp_arch_private_info): Likewise.
2061 * linux-x86-low.c: Include nat/x86-linux.h.
2062 (arch_lwp_info): Removed structure.
2063 (update_debug_registers_callback):
2064 Use lwp_set_debug_registers_changed.
2065 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2066 and lwp_set_debug_registers_changed.
2067 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2068
34c703da
GB
20692015-03-24 Gary Benson <gbenson@redhat.com>
2070
2071 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2072 * linux-arm-low.c (arm_new_thread): Likewise.
2073 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2074 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2075 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2076 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2077
cff068da
GB
20782015-03-24 Gary Benson <gbenson@redhat.com>
2079
2080 * linux-low.c (ptid_of_lwp): New function.
2081 (lwp_is_stopped): Likewise.
2082 (lwp_stop_reason): Likewise.
2083 * linux-x86-low.c (update_debug_registers_callback):
2084 Use lwp_is_stopped.
2085 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2086 lwp_stop_reason.
2087
b2f7c7e8
GB
20882015-03-24 Gary Benson <gbenson@redhat.com>
2089
2090 * linux-low.h (linux_stop_lwp): Remove declaration.
2091
6d4ee8c6
GB
20922015-03-24 Gary Benson <gbenson@redhat.com>
2093
2094 * linux-low.h: Include nat/linux-nat.h.
2095 * linux-low.c (iterate_over_lwps_args): New structure.
2096 (iterate_over_lwps_filter): New function.
2097 (iterate_over_lwps): Likewise.
2098 * linux-x86-low.c (update_debug_registers_callback):
2099 Update signature to what iterate_over_lwps expects.
2100 Remove PID check that iterate_over_lwps now performs.
2101 (x86_dr_low_set_addr): Use iterate_over_lwps.
2102 (x86_dr_low_set_control): Likewise.
2103
70a0bb6b
GB
21042015-03-24 Gary Benson <gbenson@redhat.com>
2105
2106 * linux-x86-low.c (x86_debug_reg_state): New function.
2107 (x86_linux_prepare_to_resume): Use the above.
2108
7b669087
GB
21092015-03-24 Gary Benson <gbenson@redhat.com>
2110
2111 * linux-low.c (current_lwp_ptid): New function.
2112 * linux-x86-low.c: Include nat/linux-nat.h.
2113 (x86_dr_low_get_addr): Use current_lwp_ptid.
2114 (x86_dr_low_get_control): Likewise.
2115 (x86_dr_low_get_status): Likewise.
2116
eef49a3d
PA
21172015-03-20 Pedro Alves <palves@redhat.com>
2118
2119 * tracepoint.c (cmd_qtstatus): Make "str" const.
2120
b2333d22
PA
21212015-03-20 Pedro Alves <palves@redhat.com>
2122
2123 * server.c (handle_general_set): Make "req_str" const.
2124
23f238d3
PA
21252015-03-19 Pedro Alves <palves@redhat.com>
2126
2127 * linux-low.c (linux_resume_one_lwp): Rename to ...
2128 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
2129 instead call perror_with_name.
2130 (check_ptrace_stopped_lwp_gone): New function.
2131 (linux_resume_one_lwp): Reimplement as wrapper around
2132 linux_resume_one_lwp_throw that swallows errors if the LWP is
2133 gone.
2134
91baf43f
PA
21352015-03-19 Pedro Alves <palves@redhat.com>
2136
2137 * linux-low.c (count_events_callback, select_event_lwp_callback):
2138 No longer check whether the thread has resume_stop as last resume
2139 kind.
2140
8bf3b159
PA
21412015-03-19 Pedro Alves <palves@redhat.com>
2142
2143 * linux-low.c (count_events_callback, select_event_lwp_callback):
2144 Use the lwp's status_pending_p field, not the thread's.
2145
b90fc188
PA
21462015-03-19 Pedro Alves <palves@redhat.com>
2147
2148 * linux-low.c (select_event_lwp_callback): Update comments to
2149 no longer mention SIGTRAP.
2150
464b0089
GB
21512015-03-18 Gary Benson <gbenson@redhat.com>
2152
2153 * server.c (handle_query): Do not report vFile:fstat as supported.
2154
aa9e327f
GB
21552015-03-11 Gary Benson <gbenson@redhat.com>
2156
2157 * hostio.c (sys/types.h): New include.
2158 (sys/stat.h): Likewise.
2159 (common-remote-fileio.h): Likewise.
2160 (handle_fstat): New function.
2161 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 2162
791c0056
GB
21632015-03-11 Gary Benson <gbenson@redhat.com>
2164
2165 * configure.ac (AC_CHECK_MEMBERS): Add checks for
2166 struct stat.st_blocks and struct stat.st_blksize.
2167 * configure: Regenerate.
2168 * config.in: Likewise.
2169 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2170 (OBS): Add common-remote-fileio.o.
2171 (common-remote-fileio.o): New rule.
2172
9a9df970
PA
21732015-03-09 Pedro Alves <palves@redhat.com>
2174
2175 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2176 'struct sockaddr' pointer in 'accept' call.
2177
9eb1356e
PA
21782015-03-09 Pedro Alves <palves@redhat.com>
2179
2180 Revert:
2181 2015-03-07 Pedro Alves <palves@redhat.com>
2182 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2183 or <winsock2.h> here. Instead include "gdb_socket.h".
2184 (remote_open): Use union gdb_sockaddr_u.
2185 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2186 or <winsock2.h> here. Instead include "gdb_socket.h".
2187 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2188 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2189 or <sys/un.h>.
2190 (init_named_socket, gdb_agent_helper_thread): Use union
2191 gdb_sockaddr_u.
2192
aac331e4
PA
21932015-03-07 Pedro Alves <palves@redhat.com>
2194
2195 * configure.ac (build_warnings): Move
2196 -Wdeclaration-after-statement to the C-specific set.
2197 * configure: Regenerate.
2198
366c75fc
PA
21992015-03-07 Pedro Alves <palves@redhat.com>
2200
2201 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2202 or <winsock2.h> here. Instead include "gdb_socket.h".
2203 (remote_open): Use union gdb_sockaddr_u.
2204 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2205 or <winsock2.h> here. Instead include "gdb_socket.h".
2206 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2207 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2208 or <sys/un.h>.
2209 (init_named_socket, gdb_agent_helper_thread): Use union
2210 gdb_sockaddr_u.
2211
492d29ea
PA
22122015-03-07 Pedro Alves <palves@redhat.com>
2213
2214 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2215 instead.
2216
60a191ed
YQ
22172015-03-06 Yao Qi <yao.qi@linaro.org>
2218
2219 * linux-aarch64-low.c (aarch64_insert_point): Use
2220 show_debug_regs as a boolean.
2221 (aarch64_remove_point): Likewise.
2222
f5771b1d
PA
22232015-03-05 Pedro Alves <palves@redhat.com>
2224
2225 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2226 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2227 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2228 * nto-low.c (nto_target_ops): Likewise.
2229 * spu-low.c (spu_target_ops): Likewise.
2230 * win32-low.c (win32_target_ops): Likewise.
2231
3e572f71
PA
22322015-03-04 Pedro Alves <palves@redhat.com>
2233
72f4393d 2234 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
2235 Decide whether a breakpoint triggered based on the SIGTRAP's
2236 siginfo.si_code.
72f4393d
L
2237 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2238 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
2239 (linux_low_filter_event): Check for breakpoints before checking
2240 watchpoints.
2241 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2242 siginfo.si_code.
72f4393d
L
2243 (linux_stopped_by_sw_breakpoint)
2244 (linux_supports_stopped_by_sw_breakpoint)
2245 (linux_stopped_by_hw_breakpoint)
2246 (linux_supports_stopped_by_hw_breakpoint): New functions.
2247 (linux_target_ops): Install new target methods.
3e572f71 2248
1ec68e26
PA
22492015-03-04 Pedro Alves <palves@redhat.com>
2250
2251 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2252 * server.c (swbreak_feature, hwbreak_feature): New globals.
2253 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2254 (captured_main): Clear swbreak_feature and hwbreak_feature.
2255 * server.h (swbreak_feature, hwbreak_feature): Declare.
2256 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2257 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2258 supports_stopped_by_hw_breakpoint>: New fields.
2259 (target_supports_stopped_by_sw_breakpoint)
2260 (target_stopped_by_sw_breakpoint)
2261 (target_supports_stopped_by_hw_breakpoint)
2262 (target_stopped_by_hw_breakpoint): Declare.
2263
15c66dd6
PA
22642015-03-04 Pedro Alves <palves@redhat.com>
2265
2266 enum lwp_stop_reason -> enum target_stop_reason
2267 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2268 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2269 (linux_wait_1, stuck_in_jump_pad_callback)
2270 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2271 (linux_stopped_by_watchpoint):
2272 * linux-low.h (enum lwp_stop_reason): Delete.
2273 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2274 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2275
98fc70d6
YQ
22762015-03-04 Yao Qi <yao.qi@linaro.org>
2277
2278 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2279
dd2ac174
GB
22802015-03-03 Gary Benson <gbenson@redhat.com>
2281
2282 * hostio.c (handle_vFile): Fix prefix lengths.
2283
d68e53f4
MM
22842015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2285
2286 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2287 ptr_bits.
2288
bf2d68ab
AA
22892015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2290
2291 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2292 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2293 (clean): Add "rm -f" for above C files.
2294 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2295 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2296 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2297 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2298 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2299 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2300 (init_registers_s390x_vx_linux64)
2301 (init_registers_s390x_tevx_linux64)
2302 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2303 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2304 declarations.
2305 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2306 (s390_store_vxrs_high): New functions.
2307 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2308 NT_S390_VXRS_HIGH.
2309 (s390_arch_setup): Add logic for selecting one of the new target
2310 descriptions. Activate the new vector regsets if applicable.
2311 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2312 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2313 and init_registers_s390x_tevx_linux64.
2314
c966a859
PA
23152015-03-01 Pedro Alves <palves@redhat.com>
2316
2317 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2318 parameter.
2319
4180215b
PA
23202015-02-27 Pedro Alves <palves@redhat.com>
2321
2322 * linux-x86-low.c (u_debugreg_offset): New function.
2323 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2324
749bab01
PA
23252015-02-27 Pedro Alves <palves@redhat.com>
2326
2327 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2328 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2329 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2330 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2331 (ps_lsetfpregs, ps_getpid)
2332 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2333 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2334 (ps_lsetxregs, ps_plog): Declare.
2335
3c14e5a3
PA
23362015-02-27 Pedro Alves <palves@redhat.com>
2337
2338 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2339 IP_AGENT_EXPORT_FUNC.
2340 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2341 IP_AGENT_EXPORT_FUNC.
2342 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2343 (IP_AGENT_EXPORT): Delete.
2344 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2345 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2346 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2347 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2348 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2349 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2350 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2351 (traceframe_read_count, traceframe_write_count)
2352 (traceframes_created, trace_state_variables, get_raw_reg)
2353 (get_trace_state_variable_value, set_trace_state_variable_value)
2354 (ust_loaded, helper_thread_id, cmd_buf): Use
2355 IPA_SYM_EXPORTED_NAME.
2356 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2357 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2358 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2359 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2360 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2361 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2362 EXTERN_C_PUSH/EXTERN_C_POP.
2363 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2364 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2365 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2366 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2367 (traceframe_write_count, traceframe_read_count)
2368 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2369 (about_to_request_buffer_space, get_trace_state_variable_value)
2370 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2371 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2372 EXTERN_C_PUSH/EXTERN_C_POP.
2373 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2374 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2375 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2376 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2377 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2378 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2379 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2380 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2381 Define.
2382 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2383 (IP_AGENT_EXPORT_VAR_DECL): Define.
2384 (tracing): Declare.
2385 (gdb_agent_get_raw_reg): Declare.
2386
fe978cb0
PA
23872015-02-27 Tom Tromey <tromey@redhat.com>
2388 Pedro Alves <palves@redhat.com>
2389
2390 Rename symbols whose names are reserved C++ keywords throughout.
2391
3bc3d82a
PA
23922015-02-27 Pedro Alves <palves@redhat.com>
2393
2394 * Makefile.in (COMPILER): New, get it from autoconf.
2395 (CXX): Get from autoconf instead.
2396 (COMPILE.pre): Use COMPILER.
2397 (CC-LD): Rename to ...
2398 (CC_LD): ... this. Use COMPILER.
2399 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2400 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2401 * acinclude.m4: Include build-with-cxx.m4.
2402 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2403 Disable -Werror by default if building in C++ mode.
2404 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2405 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2406 the C++ compiler. Save/restore CXXFLAGS too.
2407 * configure: Regenerate.
2408
07697489
PA
24092015-02-27 Pedro Alves <palves@redhat.com>
2410
2411 * acinclude.m4: Include libiberty.m4.
2412 * configure.ac: Call libiberty_INIT.
2413 * config.in, configure: Regenerate.
2414
9beb7c4e
PA
24152015-02-26 Pedro Alves <palves@redhat.com>
2416
2417 * linux-low.c (linux_wait_1): When incrementing the PC past a
2418 program breakpoint always use the_low_target.breakpoint_len as
2419 increment, rather than the maximum between that and
2420 the_low_target.decr_pc_after_break.
2421
8090aef2
PA
24222015-02-23 Pedro Alves <palves@redhat.com>
2423
2424 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2425 thread was doing a step-over; always adjust the PC if
2426 we stepped over a permanent breakpoint.
2427 (linux_wait_1): If we stepped over breakpoint that was on top of a
2428 permanent breakpoint, manually advance the PC past it.
2429
bc9540e8
PA
24302015-02-23 Pedro Alves <palves@redhat.com>
2431
2432 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2433 modes.
2434 (x86_fill_gregset, x86_store_gregset): Use it when handling
2435 $orig_eax.
2436
2db9a427
PA
24372015-02-20 Pedro Alves <palves@redhat.com>
2438
2439 * thread-db.c: Include "nat/linux-procfs.h".
2440 (thread_db_init): Skip listing new threads if the kernel supports
2441 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2442
afa8d396
PA
24432015-02-20 Pedro Alves <palves@redhat.com>
2444
2445 * linux-low.c (status_pending_p_callback): Use ptid_match.
2446
c9587f88
AT
24472015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2448
2449 PR breakpoints/16812
2450 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2451 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2452 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2453
b05ec7a5
AT
24542015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2455
2456 PR breakpoints/15956
2457 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2458
d33501a5
MM
24592015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2460
2461 * linux-low.c (linux_low_btrace_conf): Print size.
2462 * server.c (handle_btrace_conf_general_set): New.
2463 (hanle_general_set): Call handle_btrace_conf_general_set.
2464 (handle_query): Report Qbtrace-conf:bts:size as supported.
2465
f4abbc16
MM
24662015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2467
2468 * linux-low.c (linux_low_enable_btrace): Update parameters.
2469 (linux_low_btrace_conf): New.
2470 (linux_target_ops)<to_btrace_conf>: Initialize.
2471 * server.c (current_btrace_conf): New.
2472 (handle_btrace_enable): Rename to ...
2473 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2474 to target_enable_btrace. Update comment. Update users.
2475 (handle_qxfer_btrace_conf): New.
2476 (qxfer_packets): Add btrace-conf entry.
2477 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2478 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2479 (target_ops)<read_btrace_conf>: New.
2480 (target_enable_btrace): Update parameters.
2481 (target_read_btrace_conf): New.
2482
043c3577
MM
24832015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2484
2485 * server.c (handle_btrace_general_set): Remove call to
2486 target_supports_btrace.
2487 (supported_btrace_packets): New.
2488 (handle_query): Call supported_btrace_packets.
2489 * target.h: include btrace-common.h.
2490 (btrace_target_info): Removed.
2491 (supports_btrace, target_supports_btrace): Update parameters.
2492
734b0e4b
MM
24932015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2494
2495 * Makefile.in (SFILES): Add common/btrace-common.c.
2496 (OBS): Add common/btrace-common.o.
2497 (btrace-common.o): Add build rules.
2498 * linux-low: Include btrace-common.h.
2499 (linux_low_read_btrace): Use struct btrace_data. Call
2500 btrace_data_init and btrace_data_fini.
2501
d6c146e9
PA
25022015-02-06 Pedro Alves <palves@redhat.com>
2503
2504 * thread-db.c (find_new_threads_callback): Add debug output.
2505
20ba1ce6
PA
25062015-02-04 Pedro Alves <palves@redhat.com>
2507
2508 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2509 (resume_stopped_resumed_lwps): New function.
2510 (linux_wait_for_event_filtered): Use it.
2511
8cc73a39
SDJ
25122015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2513
2514 * Makefile.in (SFILES): Add linux-personality.c.
2515 (linux-personality.o): New rule.
2516 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2517 list of objects to be built.
2518 * linux-low.c: Include nat/linux-personality.h.
2519 (linux_create_inferior): Remove code to disable address space
2520 randomization (moved to ../nat/linux-personality.c). Create
2521 cleanup to disable address space randomization.
2522
fb23d554
SDJ
25232015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2524
2525 * Makefile.in (posix-strerror.o): New rule.
2526 (mingw-strerror.o): Likewise.
2527 * configure: Regenerated.
2528 * configure.ac: Source file ../common/common.host. Initialize new
2529 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2530
cdf43629
YQ
25312015-01-14 Yao Qi <yao@codesourcery.com>
2532
2533 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2534 (ppc-linux.o): New rule.
2535 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2536 * configure.ac: AC_CHECK_FUNCS(getauxval).
2537 * config.in: Re-generated.
2538 * configure: Re-generated.
2539 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2540 ppc64_64bit_inferior_p
2541
514c5338
YQ
25422015-01-14 Yao Qi <yao@codesourcery.com>
2543
2544 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2545 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2546 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2547 (PT_ORIG_R3, PT_TRAP): Likewise.
2548 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2549 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2550 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2551
3368c1e5
JB
25522015-01-10 Joel Brobecker <brobecker@adacore.com>
2553
2554 * i387-fp.c (i387_cache_to_xsave): In look over
2555 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2556 zmmh_low_space field by use of zmmh_high_space.
2557
582511be
PA
25582015-01-09 Pedro Alves <palves@redhat.com>
2559
2560 * linux-low.c (step_over_bkpt): Move higher up in the file.
2561 (handle_extended_wait): Don't store the stop_pc here.
2562 (get_stop_pc): Adjust comments and rename to ...
2563 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2564 stopped for a software breakpoint or hardware breakpoint.
2565 (thread_still_has_status_pending_p): New function.
2566 (status_pending_p_callback): Use
2567 thread_still_has_status_pending_p. If the event is no longer
2568 interesting, resume the LWP.
2569 (handle_tracepoints): Add assert.
2570 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2571 (wstatus_maybe_breakpoint): New function.
2572 (cancel_breakpoint): Delete function.
2573 (check_stopped_by_watchpoint): New function, factored out from
2574 linux_low_filter_event.
2575 (lp_status_maybe_breakpoint): Delete function.
2576 (linux_low_filter_event): Remove filter_ptid argument.
2577 Leave thread group exits pending here. Store the LWP's stop PC.
2578 Always leave events pending.
2579 (linux_wait_for_event_filtered): Pull all events out of the
2580 kernel, and leave them all pending.
2581 (count_events_callback, select_event_lwp_callback): Consider all
2582 events.
2583 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2584 (select_event_lwp): Only give preference to the stepping LWP in
2585 all-stop mode. Adjust comments.
2586 (ignore_event): New function.
2587 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2588 references to cancel_breakpoints. Adjust to renames. Also give
2589 equal priority to all LWPs that have had events in non-stop mode.
2590 If reporting a software breakpoint event, unadjust the LWP's PC.
2591 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2592 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2593 Adjust.
2594 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2595 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2596 (linux_stopped_by_watchpoint): Adjust.
2597 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2598 * linux-low.h (enum lwp_stop_reason): New.
2599 (struct lwp_info) <stop_pc>: Adjust comment.
2600 <stopped_by_watchpoint>: Delete field.
2601 <stop_reason>: New field.
2602 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2603 * mem-break.c (software_breakpoint_inserted_here)
2604 (hardware_breakpoint_inserted_here): New function.
2605 * mem-break.h (software_breakpoint_inserted_here)
2606 (hardware_breakpoint_inserted_here): Declare.
2607 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2608 (cancel_breakpoints): Delete.
2609 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2610 (upload_fast_traceframes): Remove references to
2611 cancel_breakpoints.
2612
a33e3959
PA
26132015-01-09 Pedro Alves <palves@redhat.com>
2614
2615 * thread-db.c (find_new_threads_callback): Ignore thread if the
2616 kernel thread ID is -1.
2617
8784d563
PA
26182015-01-09 Pedro Alves <palves@redhat.com>
2619
2620 * linux-low.c (linux_attach_fail_reason_string): Move to
2621 nat/linux-ptrace.c, and rename.
2622 (linux_attach_lwp): Update comment.
2623 (attach_proc_task_lwp_callback): New function.
2624 (linux_attach): Adjust to rename and use
2625 linux_proc_attach_tgid_threads.
2626 (linux_attach_fail_reason_string): Delete declaration.
2627
76f2b779
JB
26282015-01-01 Joel Brobecker <brobecker@adacore.com>
2629
2630 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2631 * server.c (gdbserver_version): Likewise.
2632
fafcc06a
SDJ
26332014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2634
2635 * remote-utils.c: Include ctype.h.
2636 (input_interrupt): Explicitly handle the case when the char
2637 received is the NUL byte. Improve the printing of non-ASCII
2638 characters.
2639
beed38b8
JB
26402014-12-16 Joel Brobecker <brobecker@adacore.com>
2641
2642 * linux-low.c (linux_low_filter_event): Update call to
2643 linux_enable_event_reporting following the addition of
2644 a new parameter to that function.
2645
bf330350
CU
26462014-12-16 Catalin Udma <catalin.udma@freescale.com>
2647
2648 PR server/17457
2649 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2650 (AARCH64_FPCR_REGNO): Likewise.
2651 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2652 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2653 (aarch64_store_fpregset): Likewise.
2654
5227d625
JB
26552014-12-15 Joel Brobecker <brobecker@adacore.com>
2656
2657 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2658 Remove FIXME comment about assumption about N.
2659
f93b65a0
JB
26602014-12-13 Joel Brobecker <brobecker@adacore.com>
2661
2662 * configure.ac: If large-file support is disabled in GDBserver,
2663 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2664 * configure: Regenerate.
2665
e5a9158d
AA
26662014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2667
2668 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2669 warning upon ENODATA from ptrace.
2670 * linux-s390-low.c (s390_store_tdb): New.
2671 (s390_regsets): Add regset for NT_S390_TDB.
2672
feea5f36
AA
26732014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2674
2675 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2676 without a fill_function.
2677 * linux-s390-low.c (s390_fill_last_break): Remove.
2678 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2679 (s390_arch_setup): Use regset's size instead of fill_function for
2680 loop end condition.
2681
098dbe61
AA
26822014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2683
2684 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2685 the regset's store function when ptrace returned an error.
2686 * regcache.c (get_thread_regcache): Invalidate register cache
2687 before fetching inferior's registers.
2688
28eef672
AA
26892014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2690
2691 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2692 while-loop as for-loop.
2693 (regsets_store_inferior_registers): Likewise.
2694
bdca27a2
YQ
26952014-11-28 Yao Qi <yao@codesourcery.com>
2696
2697 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2698 * config.in, configure: Re-generate.
2699 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2700 is defined.
2701
9c232dda
YQ
27022014-11-21 Yao Qi <yao@codesourcery.com>
2703
2704 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2705 (AC_CHECK_HEADERS): Remove malloc.h.
2706 * configure: Re-generated.
2707 * config.in: Re-generated.
2708 * server.h: Don't include alloca.h and malloc.h.
2709 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2710 Don't include malloc.h.
2711
43968415
JB
27122014-11-17 Joel Brobecker <brobecker@adacore.com>
2713
2714 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2715 corresponding ERRNO check in same block.
2716
40e91bc7
PA
27172014-11-12 Pedro Alves <palves@redhat.com>
2718
2719 * server.c (cont_thread): Update comment.
2720 (start_inferior, attach_inferior): No longer clear cont_thread.
2721 (handle_v_cont): No longer set cont_thread.
2722 (captured_main): Clear cont_thread each time a GDB connects.
2723
c2c118cf
PA
27242014-11-12 Pedro Alves <palves@redhat.com>
2725
2726 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2727 thread, and don't resume all threads if the Hc thread has exited.
2728
78708b7c
PA
27292014-11-12 Pedro Alves <palves@redhat.com>
2730
2731 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2732 the process group instead of to a specific LWP.
2733
a2abc7de
PA
27342014-10-15 Pedro Alves <palves@redhat.com>
2735
2736 PR server/17487
2737 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2738 parameter.
2739 (arm_set_thread_context): Delete.
2740 (the_low_target): Adjust.
2741 * win32-i386-low.c (debug_registers_changed)
2742 (debug_registers_used): Delete.
2743 (update_debug_registers_callback): New function.
2744 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2745 needing to update their debug registers.
2746 (win32_get_current_dr): New function.
2747 (x86_dr_low_get_addr, x86_dr_low_get_control)
2748 (x86_dr_low_get_status): Fetch the debug register from the thread
2749 record's context.
2750 (i386_initial_stuff): Adjust.
2751 (i386_get_thread_context): Remove current_event parameter. Don't
2752 clear debug_registers_changed nor copy DR values to
2753 debug_reg_state.
2754 (i386_set_thread_context): Delete.
2755 (i386_prepare_to_resume): New function.
2756 (i386_thread_added): Mark the thread as needing to update irs
2757 debug registers.
2758 (the_low_target): Remove i386_set_thread_context and install
2759 i386_prepare_to_resume.
2760 * win32-low.c (win32_get_thread_context): Adjust.
2761 (win32_set_thread_context): Use SetThreadContext
2762 directly.
2763 (win32_prepare_to_resume): New function.
2764 (win32_require_context): New function, factored out from ...
2765 (thread_rec): ... this.
2766 (continue_one_thread): Call win32_prepare_to_resume on each thread
2767 we're about to continue.
2768 (win32_resume): Call win32_prepare_to_resume on the event thread.
2769 * win32-low.h (struct win32_thread_info)
2770 <debug_registers_changed>: New field.
2771 (struct win32_target_ops): Change prototype of set_thread_context,
2772 delete set_thread_context and add prepare_to_resume.
2773 (win32_require_context): New declaration.
2774
a442d071
GB
27752014-10-08 Gary Benson <gbenson@redhat.com>
2776
2777 * server.h: Do not include common-exceptions.h.
2778
6f1947e8
GB
27792014-10-08 Gary Benson <gbenson@redhat.com>
2780
2781 * server.h: Do not include cleanups.h.
2782
63b434a4
JH
27832014-09-30 James Hogan <james.hogan@imgtec.com>
2784
2785 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2786 mips64-dsp-linux.c.
2787
c4d9ceb6
YQ
27882014-09-23 Yao Qi <yao@codesourcery.com>
2789
2790 * linux-low.c (lp_status_maybe_breakpoint): New function.
2791 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2792 (count_events_callback): Likewise.
2793 (select_event_lwp_callback): Likewise.
2794 (cancel_breakpoints_callback): Likewise.
2795
89a5711c
DB
27962014-09-19 Don Breazeal <donb@codesourcery.com>
2797
2798 * linux-low.c (handle_extended_wait): Call
2799 linux_ptrace_get_extended_event.
2800 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2801 linux_is_extended_waitstatus.
2802
bffc0964
JB
28032014-09-16 Joel Brobecker <brobecker@adacore.com>
2804
2805 * Makefile.in (CPPFLAGS): Define.
2806 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2807 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2808
0bfdf32f
GB
28092014-09-16 Gary Benson <gbenson@redhat.com>
2810
2811 * inferiors.h (current_inferior): Renamed as...
2812 (current_thread): New variable. All uses updated.
2813 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2814 (maybe_move_out_of_jump_pad): Likewise.
2815 (cancel_breakpoint): Likewise.
2816 (linux_low_filter_event): Likewise.
2817 (wait_for_sigstop): Likewise.
2818 (linux_resume_one_lwp): Likewise.
2819 (need_step_over_p): Likewise.
2820 (start_step_over): Likewise.
2821 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2822 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2823 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2824 and save_inferior as saved_thread.
2825 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2826 saved_thread.
2827 (regcache_invalidate_thread): Likewise.
2828 * remote-utils.c (prepare_resume_reply): Likewise.
2829 * thread-db.c (thread_db_get_tls_address): Likewise.
2830 (disable_thread_event_reporting): Likewise.
2831 (remove_thread_event_breakpoints): Likewise.
2832 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2833 as saved_thread.
2834 * target.h (set_desired_inferior): Renamed as...
2835 (set_desired_thread): New declaration. All uses updated.
2836 * server.c (myresume): Updated comment to reference thread instead
2837 of inferior.
2838 (handle_serial_event): Likewise.
2839 (handle_target_event): Likewise.
2840
361c8ade
GB
28412014-09-12 Tom Tromey <tromey@redhat.com>
2842 Gary Benson <gbenson@redhat.com>
2843
2844 * regcache.h: Include common-regcache.h.
2845 (regcache_read_pc): Don't declare.
2846 * regcache.c (get_thread_regcache_for_ptid): New function.
2847
bd9269f7
GB
28482014-09-11 Tom Tromey <tromey@redhat.com>
2849 Gary Benson <gbenson@redhat.com>
2850
2851 * symbol.c: New file.
2852 * Makefile.in (SFILES): Add symbol.c.
2853 (OBS): Add symbol.o.
2854
f8c1d06b
GB
28552014-09-11 Gary Benson <gbenson@redhat.com>
2856
2857 * target.c (target_stop_ptid, target_continue_ptid): New
2858 functions.
2859
721ec300
GB
28602014-09-11 Tom Tromey <tromey@redhat.com>
2861 Gary Benson <gbenson@redhat.com>
2862
2863 * target.h: Include target/target.h.
2864 * target.c (target_read_memory, target_read_uint32)
2865 (target_write_memory): New functions.
2866
c5e92cca
GB
28672014-09-11 Gary Benson <gbenson@redhat.com>
2868
2869 * server.h (debug_hw_points): Don't declare.
2870 * server.c (debug_hw_points): Don't define. Replace all uses
2871 with show_debug_regs.
2872 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2873 all uses with show_debug_regs.
2874
2e4bb98a
EBM
28752014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2876
2877 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2878 endianness into account.
2879 (ppc_supply_ptrace_register): Likewise.
2880
ac740bc7
JH
28812014-09-03 James Hogan <james.hogan@imgtec.com>
2882
2883 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2884 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2885
97ea6506
GB
28862014-09-03 Gary Benson <gbenson@redhat.com>
2887
2888 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2889 ALL_DEBUG_ADDRESS_REGISTERS.
2890
df7e5265
GB
28912014-09-02 Gary Benson <gbenson@redhat.com>
2892
2893 * i386-low.h: Renamed as...
2894 * x86-low.h: New file. All type, function and variable name
2895 prefixes changed from "i386_" to "x86_". All references updated.
2896 * i386-low.c: Renamed as...
2897 * x86-low.c: New file. All type, function and variable name
2898 prefixes changed from "i386_" to "x86_". All references updated.
2899
ed859da7
GB
29002014-09-02 Gary Benson <gbenson@redhat.com>
2901
2902 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2903 (x86_linux_new_thread): Likewise.
2904
860789c7
GB
29052014-08-29 Gary Benson <gbenson@redhat.com>
2906
2907 * server.h (setjmp.h): Do not include.
2908 (toplevel): Do not declare.
2909 (common-exceptions.h): Include.
2910 (cleanups.h): Likewise.
2911 * server.c (toplevel): Do not define.
2912 (exit_code): New static global.
2913 (detach_or_kill_for_exit_cleanup): New function.
2914 (main): New function. Original main renamed to...
2915 (captured_main): New function.
2916 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2917
ff55e1b5
GB
29182014-08-29 Gary Benson <gbenson@redhat.com>
2919
2920 * Makefile.in (SFILES): Add common/common-exceptions.c.
2921 (OBS): Add common-exceptions.o.
2922 (common-exceptions.o): New rule.
2923 * utils.c (prepare_to_throw_exception): New function.
2924
e9bcb658
GB
29252014-08-29 Gary Benson <gbenson@redhat.com>
2926
2927 * config.in: Regenerate.
2928 * configure: Likewise.
2929
e3180625
GB
29302014-08-29 Gary Benson <gbenson@redhat.com>
2931
2932 * Makefile.in (SFILES): Add common/cleanups.c.
2933 (OBS): cleanups.o.
2934 (cleanups.o): New rule.
2935
e3d6ba5d
GB
29362014-08-29 Gary Benson <gbenson@redhat.com>
2937
2938 * utils.c (internal_vwarning): New function.
2939
7096e886
GB
29402014-08-28 Gary Benson <gbenson@redhat.com>
2941
2942 * utils.h (fatal): Remove declaration.
2943 * utils.c (fatal): Remove function.
2944
14ce3192
GB
29452014-08-28 Gary Benson <gbenson@redhat.com>
2946
2947 * tracepoint.c (gdb_agent_init): Replace fatal with
2948 perror_with_name.
2949 (initialize_tracepoint): Likewise.
2950
50278d59
GB
29512014-08-28 Gary Benson <gbenson@redhat.com>
2952
2953 * remote-utils.c (remote_prepare): Replace fatal with error.
2954
aa96c426
GB
29552014-08-28 Gary Benson <gbenson@redhat.com>
2956
2957 * linux-low.c (linux_async): Replace fatal with warning.
2958 Tidy up and return.
2959 (linux_start_non_stop): Return -1 if linux_async failed.
2960
f7160e97
GB
29612014-08-28 Gary Benson <gbenson@redhat.com>
2962
2963 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2964 gdb_assert.
2965 (i386_dr_low_get_addr): Remove vague comment.
2966 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2967 gdb_assert.
2968
38e08fca
GB
29692014-08-28 Gary Benson <gbenson@redhat.com>
2970
2971 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2972 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2973 internal_error.
2974 (linux_resume_one_lwp): Likewise.
2975 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2976 gdb_assert.
2977 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2978 with internal_error.
2979 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2980 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2981 (find_register_by_name): Replace fatal with internal_error.
2982 (find_regno): Likewise.
2983 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2984 * thread-db.c (thread_db_create_event): Likewise.
2985 (thread_db_load_search): Likewise.
2986 (try_thread_db_load_1): Likewise.
2987 * tracepoint.c (get_jump_space_head): Replace fatal with
2988 internal_error.
2989 (claim_trampoline_space): Likewise.
2990 (have_fast_tracepoint_trampoline_buffer): Likewise.
2991 (cmd_qtstart): Likewise.
2992 (stop_tracing): Likewise.
2993 (fast_tracepoint_collecting): Likewise.
2994 (target_malloc): Likewise.
2995 (download_tracepoint): Likewise.
2996 (download_trace_state_variables): Replace check with gdb_assert.
2997 (upload_fast_traceframes): Replace fatal with internal_error.
2998
34abf635
GB
29992014-08-19 Tom Tromey <tromey@redhat.com>
3000 Gary Benson <gbenson@redhat.com>
3001
3002 * Makefile.in (SFILES): Add common/common-debug.c.
3003 (OBS): Add common-debug.o.
3004 (common-debug.o): New rule.
3005 * debug.h (debug_printf): Don't declare.
3006 * debug.c (debug_printf): Renamed and rewritten as...
3007 (debug_vprintf): New function.
3008
f6e94d78
GB
30092014-08-19 Gary Benson <gbenson@redhat.com>
3010
3011 * utils.h: Do not include print-utils.h.
3012
9239eeab
GB
30132014-08-19 Tom Tromey <tromey@redhat.com>
3014 Gary Benson <gbenson@redhat.com>
3015
3016 * server.h: Add static assertion.
3017 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3018
ef87c8bb
GB
30192014-08-19 Tom Tromey <tromey@redhat.com>
3020 Gary Benson <gbenson@redhat.com>
3021
3022 * Makefile.in (SFILES): Add common/errors.c.
3023 (OBS): Add errors.o.
3024 (IPA_OBS): Add errors-ipa.o.
3025 (errors.o): New rule.
3026 (errors-ipa.o): Likewise.
3027 * utils.h (perror_with_name, error, warning): Don't declare.
3028 * utils.c (warning): Renamed and rewritten as...
3029 (vwarning): New function.
3030 (error): Renamed and rewritten as...
3031 (verror): New function.
3032 (internal_error): Renamed and rewritten as...
3033 (internal_verror): New function.
3034
bb974a24
GB
30352014-08-07 Gary Benson <gbenson@redhat.com>
3036
3037 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3038 * configure: Regenerate.
3039 * config.in: Likewise.
3040 * server.h: Do not include errno.h.
3041 * event-loop.c: Likewise.
3042 * hostio-errno.c: Likewise.
3043 * linux-low.c: Likewise.
3044 * remote-utils.c: Likewise.
3045 * spu-low.c: Likewise.
3046 * utils.c: Likewise.
3047 * gdbreplay.c: Unconditionally include errno.h.
3048
6d3d12eb
GB
30492014-08-07 Gary Benson <gbenson@redhat.com>
3050
3051 * server.h: Do not include string.h.
3052 * event-loop.c: Likewise.
3053 * linux-low.c: Likewise.
3054 * regcache.c: Likewise.
3055 * remote-utils.c: Likewise.
3056 * spu-low.c: Likewise.
3057 * utils.c: Likewise.
3058
dccbb609
GB
30592014-08-07 Gary Benson <gbenson@redhat.com>
3060
3061 * server.h: Do not include gdb_assert.h.
3062
e76df0d0
GB
30632014-08-07 Gary Benson <gbenson@redhat.com>
3064
3065 * server.h: Do not include common-utils.h.
3066
4cb9c816
GB
30672014-08-07 Gary Benson <gbenson@redhat.com>
3068
3069 * server.h: Do not include ptid.h.
3070 * notif.h: Likewise.
3071
3995eeee
GB
30722014-08-07 Gary Benson <gbenson@redhat.com>
3073
3074 * server.h: Do not include gdb_locale.h.
3075
cb9f1a9b
GB
30762014-08-07 Gary Benson <gbenson@redhat.com>
3077
3078 * server.h: Do not include gdb/signals.h.
3079 * win32-low.c: Likewise.
3080
a5fceff8
GB
30812014-08-07 Gary Benson <gbenson@redhat.com>
3082
3083 * server.h: Do not include pathmax.h.
3084
b9391142
GB
30852014-08-07 Gary Benson <gbenson@redhat.com>
3086
3087 * server.h: Do not include libiberty.h.
3088 * linux-bfin-low.c: Likewise.
3089
0e443c87
GB
30902014-08-07 Gary Benson <gbenson@redhat.com>
3091
3092 * server.h: Do not include ansidecl.h.
3093
8ebb3f56
GB
30942014-08-07 Gary Benson <gbenson@redhat.com>
3095
3096 * linux-x86-low.c: Do not include stddef.h.
3097 * lynx-ppc-low.c: Likewise.
3098 * tracepoint.c: Likewise.
3099
8980bdf6
GB
31002014-08-07 Gary Benson <gbenson@redhat.com>
3101
3102 * server.h: Do not include stdarg.h.
3103 * nto-low.c: Likewise.
3104
d7096f71
GB
31052014-08-07 Gary Benson <gbenson@redhat.com>
3106
3107 * server.h: Do not include stdlib.h.
3108 * inferiors.c: Likewise.
3109 * linux-low.c: Likewise.
3110 * regcache.c: Likewise.
3111 * spu-low.c: Likewise.
3112 * tracepoint.c: Likewise.
3113 * utils.c: Likewise.
3114
d02f550d
GB
31152014-08-07 Gary Benson <gbenson@redhat.com>
3116
3117 * server.h: Do not include stdio.h.
3118 * linux-low.c: Likewise.
3119 * remote-utils.c: Likewise.
3120 * spu-low.c: Likewise.
3121 * utils.c: Likewise.
3122 * wincecompat.c: Likewise.
3123
87f6c4e3
GB
31242014-08-06 Gary Benson <gbenson@redhat.com>
3125
3126 * regcache.c (init_register_cache): Move conditionals inside if.
3127
7089dca4
GB
31282014-08-06 Gary Benson <gbenson@redhat.com>
3129
3130 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3131
462f517e
GB
31322014-07-31 Gary Benson <gbenson@redhat.com>
3133
3134 * ax.h: Do not include server.h.
3135 * gdbthread.h: Likewise.
3136 * lynx-low.h: Likewise.
3137 * notif.h: Likewise.
3138
976411d6
GB
31392014-07-30 Gary Benson <gbenson@redhat.com>
3140
3141 * server.h: Include common-defs.h.
3142 Do not include config.h or build-gnulib-gdbserver/config.h.
3143
d41f6d8e
GB
31442014-07-30 Gary Benson <gbenson@redhat.com>
3145
3146 * hostio-errno.c: Move server.h to top of includes list.
3147 * inferiors.c: Likewise.
3148 * linux-x86-low.c: Likewise.
3149 * notif.c: Include server.h.
3150
314c6a35
TT
31512014-07-24 Tom Tromey <tromey@redhat.com>
3152 Gary Benson <gbenson@redhat.com>
3153
3154 * server.h (CORE_ADDR): Now unsigned.
3155
69ff6be5
PA
31562014-07-16 Pedro Alves <palves@redhat.com>
3157
3158 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3159
ce9e3fe7
PA
31602014-07-15 Pedro Alves <palves@redhat.com>
3161
3162 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3163 copy.
3164
e76126e8
PA
31652014-07-11 Pedro Alves <palves@redhat.com>
3166
3167 * linux-low.c (kill_wait_lwp): New function, based on
3168 kill_one_lwp_callback, but use my_waitpid directly.
3169 (kill_one_lwp_callback, linux_kill): Use it.
3170
8e9db26e
PA
31712014-06-23 Pedro Alves <palves@redhat.com>
3172
3173 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3174 before setting DR0..DR3.
3175
698b3e08
GB
31762014-06-20 Gary Benson <gbenson@redhat.com>
3177
3178 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3179 * configure: Regenerated.
3180 * config.in: Likewise.
3181
125f8a3d
GB
31822014-06-20 Gary Benson <gbenson@redhat.com>
3183
3184 * Makefile.in (SFILES): Update locations for files moved
3185 from common to nat.
3186 (object file files): Reordered.
3187
42995dbd
GB
31882014-06-20 Gary Benson <gbenson@redhat.com>
3189
3190 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3191 (i386_dr_low_set_addr): Likewise.
3192 (i386_dr_low_get_addr): Likewise.
3193 (i386_dr_low_can_set_control): Likewise.
3194 (i386_dr_low_set_control): Likewise.
3195 (i386_dr_low_get_control): Likewise.
3196 (i386_dr_low_get_status): Likewise.
3197 (i386_get_debug_register_length): Likewise.
3198 * linux-x86-low.c (i386_dr_low_set_addr):
3199 Changed signature. Made static.
3200 (i386_dr_low_get_addr): Likewise.
3201 (i386_dr_low_set_control): Likewise.
3202 (i386_dr_low_get_control): Likewise.
3203 (i386_dr_low_get_status): Likewise.
3204 (i386_dr_low): New global variable.
3205 * win32-i386-low.c (i386_dr_low_set_addr):
3206 Changed signature. Made static.
3207 (i386_dr_low_get_addr): Likewise.
3208 (i386_dr_low_set_control): Likewise.
3209 (i386_dr_low_get_control): Likewise.
3210 (i386_dr_low_get_status): Likewise.
3211 (i386_dr_low): New global variable.
3212
e1d2394b
MS
32132014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3214
3215 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3216 * Makefile.in (AR, AR_FLAGS): Define.
3217 * configure: Regenerate.
3218
3a8ee006
GB
32192014-06-19 Gary Benson <gbenson@redhat.com>
3220
3221 * Makefile.in (i386-dregs.o): New rule.
3222 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3223 * i386-low.c (target.h): Remove include.
3224 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3225 (DR_CONTROL_SHIFT): Likewise.
3226 (DR_CONTROL_SIZE): Likewise.
3227 (DR_RW_EXECUTE): Likewise.
3228 (DR_RW_WRITE): Likewise.
3229 (DR_RW_READ): Likewise.
3230 (DR_RW_IORW): Likewise.
3231 (DR_LEN_1): Likewise.
3232 (DR_LEN_2): Likewise.
3233 (DR_LEN_4): Likewise.
3234 (DR_LEN_8): Likewise.
3235 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3236 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3237 (DR_ENABLE_SIZE): Likewise.
3238 (DR_LOCAL_SLOWDOWN): Likewise.
3239 (DR_GLOBAL_SLOWDOWN): Likewise.
3240 (DR_CONTROL_RESERVED): Likewise.
3241 (I386_DR_CONTROL_MASK): Likewise.
3242 (I386_DR_VACANT): Likewise.
3243 (I386_DR_LOCAL_ENABLE): Likewise.
3244 (I386_DR_GLOBAL_ENABLE): Likewise.
3245 (I386_DR_DISABLE): Likewise.
3246 (I386_DR_SET_RW_LEN): Likewise.
3247 (I386_DR_GET_RW_LEN): Likewise.
3248 (I386_DR_WATCH_HIT): Likewise.
3249 (i386_wp_op_t): Likewise.
3250 (i386_show_dr): Likewise.
3251 (i386_length_and_rw_bits): Likewise.
3252 (i386_insert_aligned_watchpoint): Likewise.
3253 (i386_remove_aligned_watchpoint): Likewise.
3254 (i386_handle_nonaligned_watchpoint): Likewise.
3255 i386_update_inferior_debug_regs(): Likewise.
3256 (i386_dr_insert_watchpoint): Likewise.
3257 (i386_dr_remove_watchpoint): Likewise.
3258 (i386_dr_region_ok_for_watchpoint): Likewise.
3259 (i386_dr_stopped_data_address): Likewise.
3260 (i386_dr_stopped_by_watchpoint): Likewise.
3261
8f26655c
GB
32622014-06-19 Gary Benson <gbenson@redhat.com>
3263
3264 * i386-low.c (i386_dr_show): Renamed to
3265 i386_show_dr and made static. All uses updated.
3266 (i386_dr_length_and_rw_bits): Renamed to
3267 i386_length_and_rw_bits and made static.
3268 All uses updated.
3269 (i386_dr_insert_aligned_watchpoint): Renamed to
3270 i386_insert_aligned_watchpoint and made static.
3271 All uses updated.
3272 (i386_dr_remove_aligned_watchpoint): Renamed to
3273 i386_remove_aligned_watchpoint and made static.
3274 All uses updated.
3275 (i386_dr_update_inferior_debug_regs): Renamed to
3276 i386_update_inferior_debug_regs and made static.
3277 All uses updated.
3278
b9228891
GB
32792014-06-18 Gary Benson <gbenson@redhat.com>
3280
5171def3
GB
3281 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3282 (i386_dr_low_can_set_control): Likewise.
3283 (i386_get_debug_register_length): Likewise.
3284 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3285 (i386_dr_low_can_set_control): Likewise.
3286 (i386_get_debug_register_length): Likewise.
3287
32882014-06-17 Gary Benson <gbenson@redhat.com>
3289
b9228891
GB
3290 * i386-low.h (i386-dregs.h): New include.
3291 (DR_FIRSTADDR): Now in i386-dregs.h.
3292 (DR_LASTADDR): Likewise.
3293 (DR_NADDR): Likewise.
3294 (DR_STATUS): Likewise.
3295 (DR_CONTROL): Likewise.
3296 (i386_debug_reg_state): Likewise.
3297 (i386_dr_insert_watchpoint): Likewise.
3298 (i386_dr_remove_watchpoint): Likewise.
3299 (i386_dr_region_ok_for_watchpoint): Likewise.
3300 (i386_dr_stopped_data_address): Likewise.
3301 (i386_dr_stopped_by_watchpoint): Likewise.
3302 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3303
4be83cc2
GB
33042014-06-18 Gary Benson <gbenson@redhat.com>
3305
3306 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3307 i386_dr_insert_watchpoint.
3308 (i386_low_remove_watchpoint): Renamed to
3309 i386_dr_remove_watchpoint.
3310 (i386_low_region_ok_for_watchpoint): Renamed to
3311 i386_dr_region_ok_for_watchpoint.
3312 (i386_low_stopped_data_address): Renamed to
3313 i386_dr_stopped_data_address.
3314 (i386_low_stopped_by_watchpoint): Renamed to
3315 i386_dr_stopped_by_watchpoint.
3316 * i386-low.c (i386_show_dr): Renamed to
3317 i386_dr_show and made nonstatic. All uses updated.
3318 (i386_length_and_rw_bits): Renamed to
3319 i386_dr_length_and_rw_bits and made nonstatic.
3320 All uses updated.
3321 (i386_insert_aligned_watchpoint): Renamed to
3322 i386_dr_insert_aligned_watchpoint and made nonstatic.
3323 All uses updated.
3324 (i386_remove_aligned_watchpoint): Renamed to
3325 i386_dr_remove_aligned_watchpoint and made nonstatic.
3326 All uses updated.
3327 (i386_update_inferior_debug_regs): Renamed to
3328 i386_dr_update_inferior_debug_regs and made nonstatic.
3329 All uses updated.
3330 (i386_low_insert_watchpoint): Renamed to
3331 i386_dr_insert_watchpoint. All uses updated.
3332 (i386_low_remove_watchpoint): Renamed to
3333 i386_dr_remove_watchpoint. All uses updated.
3334 (i386_low_region_ok_for_watchpoint): Renamed to
3335 i386_dr_region_ok_for_watchpoint. All uses updated.
3336 (i386_low_stopped_data_address): Renamed to
3337 i386_dr_stopped_data_address. All uses updated.
3338 (i386_low_stopped_by_watchpoint): Renamed to
3339 i386_dr_stopped_by_watchpoint. All uses updated.
3340
131aa0d4
GB
33412014-06-18 Gary Benson <gbenson@redhat.com>
3342
3343 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3344 (i386_dr_low_can_set_control): Likewise.
3345 (i386_insert_aligned_watchpoint): New check.
3346
d9305f7f
GB
33472014-06-18 Gary Benson <gbenson@redhat.com>
3348
3349 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3350 Renamed to state.
3351
e927c9fc
GB
33522014-06-18 Gary Benson <gbenson@redhat.com>
3353
3354 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3355 instead of fatal and error.
3356 (i386_handle_nonaligned_watchpoint): Likewise.
3357
1b6d4134
GB
33582014-06-18 Gary Benson <gbenson@redhat.com>
3359
3360 * i386-low.c (i386_get_debug_register_length): New macro.
3361 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3362 (i386_show_dr): Use debug_printf instead of fprintf. Use
3363 phex to format values.
3364
6e62758f
GB
33652014-06-18 Gary Benson <gbenson@redhat.com>
3366
3367 * i386-low.h: Comment changes.
3368 * i386-low.c: Likewise.
3369
fc6e2f03
GB
33702014-06-18 Gary Benson <gbenson@redhat.com>
3371
3372 * i386-low.c: Whitespace changes.
3373
f9d1eeed
TT
33742014-06-12 Tom Tromey <tromey@redhat.com>
3375
3376 * utils.c (freeargv): Remove.
3377
0b04e523
TT
33782014-06-12 Tom Tromey <tromey@redhat.com>
3379
3380 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3381 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3382 (parse_debug_format_options): Likewise.
3383 (gdbserver_usage): Likewise.
3384 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3385 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3386 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3387 against libiberty.
3388 ($(LIBGNU)): Depend on libiberty.
3389 (all-lib): Recurse into all subdirs.
3390 (install-only): Invoke "install" target in subdirs.
3391 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3392 targets.
3393 * configure: Rebuild.
3394 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3395 for vasprintf, vsnprintf, or gettimeofday.
3396 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3397 srv_tgtobj.
3398
270c9937
JB
33992014-06-05 Joel Brobecker <brobecker@adacore.com>
3400
3401 * development.sh: Delete.
3402 * Makefile.in (config.status): Adjust dependency on development.sh.
3403 * configure.ac: Adjust development.sh source call.
3404 * configure: Regenerate.
3405
0a261ed8
PA
34062014-06-02 Pedro Alves <palves@redhat.com>
3407
3408 * ax.c (gdb_free_agent_expr): New function.
3409 * ax.h (gdb_free_agent_expr): New declaration.
3410 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3411 list.
3412 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3413 static.
3414 (clear_breakpoint_conditions_and_commands): New function.
3415 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3416 (clear_breakpoint_conditions_and_commands): New declaration.
3417
e9dae05e
RR
34182014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3419
3420 * linux-aarch64-low.c (asm/ptrace.h): Include.
3421
5876f503
JK
34222014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3423
3424 Fix TLS access for -static -pthread.
3425 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3426 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3427 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3428
802e8e6d
PA
34292014-05-20 Pedro Alves <palves@redhat.com>
3430
3431 * linux-aarch64-low.c (aarch64_insert_point)
3432 (aarch64_remove_point): No longer check whether the type is
3433 supported here. Adjust to new interface.
3434 (the_low_target): Install aarch64_supports_z_point_type as
3435 supports_z_point_type method.
3436 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3437 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3438 instead of a Z packet char. Adjust.
3439 (arm_supports_z_point_type): New function.
3440 (arm_insert_point, arm_remove_point): Adjust to new interface.
3441 (the_low_target): Install arm_supports_z_point_type.
3442 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3443 (cris_insert_point, cris_remove_point): Adjust to new interface.
3444 Don't check whether the type is supported here.
3445 (the_low_target): Install cris_supports_z_point_type.
3446 * linux-low.c (linux_supports_z_point_type): New function.
3447 (linux_insert_point, linux_remove_point): Adjust to new interface.
3448 * linux-low.h (struct linux_target_ops) <insert_point,
3449 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3450 raw_breakpoint pointer parameter.
3451 <supports_z_point_type>: New method.
3452 * linux-mips-low.c (mips_supports_z_point_type): New function.
3453 (mips_insert_point, mips_remove_point): Adjust to new interface.
3454 Use mips_supports_z_point_type.
3455 (the_low_target): Install mips_supports_z_point_type.
3456 * linux-ppc-low.c (the_low_target): Install NULL as
3457 supports_z_point_type method.
3458 * linux-s390-low.c (the_low_target): Install NULL as
3459 supports_z_point_type method.
3460 * linux-sparc-low.c (the_low_target): Install NULL as
3461 supports_z_point_type method.
3462 * linux-x86-low.c (x86_supports_z_point_type): New function.
3463 (x86_insert_point): Adjust to new insert_point interface. Use
3464 insert_memory_breakpoint. Adjust to new
3465 i386_low_insert_watchpoint interface.
3466 (x86_remove_point): Adjust to remove_point interface. Use
3467 remove_memory_breakpoint. Adjust to new
3468 i386_low_remove_watchpoint interface.
3469 (the_low_target): Install x86_supports_z_point_type.
3470 * lynx-low.c (lynx_target_ops): Install NULL as
3471 supports_z_point_type callback.
3472 * nto-low.c (nto_supports_z_point_type): New.
3473 (nto_insert_point, nto_remove_point): Adjust to new interface.
3474 (nto_target_ops): Install nto_supports_z_point_type.
3475 * mem-break.c: Adjust intro comment.
3476 (struct raw_breakpoint) <raw_type, size>: New fields.
3477 <inserted>: Update comment.
3478 <shlib_disabled>: Delete field.
3479 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3480 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3481 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3482 (raw_bkpt_type_to_target_hw_bp_type): New function.
3483 (find_enabled_raw_code_breakpoint_at): New function.
3484 (find_raw_breakpoint_at): New type and size parameters. Use them.
3485 (insert_memory_breakpoint): New function, based off
3486 set_raw_breakpoint_at.
3487 (remove_memory_breakpoint): New function.
3488 (set_raw_breakpoint_at): Reimplement.
3489 (set_breakpoint): New, based on set_breakpoint_at.
3490 (set_breakpoint_at): Reimplement.
3491 (delete_raw_breakpoint): Go through the_target->remove_point
3492 instead of assuming memory breakpoints.
3493 (find_gdb_breakpoint_at): Delete.
3494 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3495 (find_gdb_breakpoint): New function.
3496 (set_gdb_breakpoint_at): Delete.
3497 (z_type_supported): New function.
3498 (set_gdb_breakpoint_1): New function, loosely based off
3499 set_gdb_breakpoint_at.
3500 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3501 (delete_gdb_breakpoint_at): Delete.
3502 (delete_gdb_breakpoint_1): New function, loosely based off
3503 delete_gdb_breakpoint_at.
3504 (delete_gdb_breakpoint): New function.
3505 (clear_gdb_breakpoint_conditions): Rename to ...
3506 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3507 breakpoint.
3508 (add_condition_to_breakpoint): Make static.
3509 (add_breakpoint_condition): Take a struct breakpoint pointer
3510 instead of an address. Adjust.
3511 (gdb_condition_true_at_breakpoint): Rename to ...
3512 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3513 z_type parameter.
3514 (gdb_condition_true_at_breakpoint): Reimplement.
3515 (add_breakpoint_commands): Take a struct breakpoint pointer
3516 instead of an address. Adjust.
3517 (gdb_no_commands_at_breakpoint): Rename to ...
3518 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3519 parameter. Return true if no breakpoint was found. Change debug
3520 output.
3521 (gdb_no_commands_at_breakpoint): Reimplement.
3522 (run_breakpoint_commands): Rename to ...
3523 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3524 and change return type to boolean.
3525 (run_breakpoint_commands): New function.
3526 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3527 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3528 breakpoint. Go through the_target->remove_point instead of
3529 assuming memory breakpoint.
3530 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3531 software and hardware breakpoints.
3532 (reinsert_raw_breakpoint): Go through the_target->insert_point
3533 instead of assuming memory breakpoint.
3534 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3535 software and hardware breakpoints.
3536 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3537 Check both software and hardware breakpoints.
3538 (validate_inserted_breakpoint): Assert the breakpoint is a
3539 software breakpoint. Set the inserted flag to -1 instead of
3540 setting shlib_disabled.
3541 (delete_disabled_breakpoints): Adjust.
3542 (validate_breakpoints): Only validate software breakpoints.
3543 Adjust to inserted flag change.
3544 (check_mem_read, check_mem_write): Skip breakpoint types other
3545 than software breakpoints. Adjust to inserted flag change.
3546 * mem-break.h (enum raw_bkpt_type): New enum.
3547 (raw_breakpoint, struct process_info): Forward declare.
3548 (Z_packet_to_target_hw_bp_type): Delete declaration.
3549 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3550 (set_gdb_breakpoint, delete_gdb_breakpoint)
3551 (clear_breakpoint_conditions): New declarations.
3552 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3553 (breakpoint_inserted_here): Update comment.
3554 (add_breakpoint_condition, add_breakpoint_commands): Replace
3555 address parameter with a breakpoint pointer parameter.
3556 (gdb_breakpoint_here): Update comment.
3557 (delete_gdb_breakpoint_at): Delete.
3558 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3559 * server.c (process_point_options): Take a struct breakpoint
3560 pointer instead of an address. Adjust.
3561 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3562 delete_gdb_breakpoint.
3563 * spu-low.c (spu_target_ops): Install NULL as
3564 supports_z_point_type method.
3565 * target.h: Include mem-break.h.
3566 (struct target_ops) <prepare_to_access_memory>: Update comment.
3567 <supports_z_point_type>: New field.
3568 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3569 instead of a char. Also take a raw breakpoint pointer.
3570 * win32-arm-low.c (the_low_target): Install NULL as
3571 supports_z_point_type.
3572 * win32-i386-low.c (i386_supports_z_point_type): New function.
3573 (i386_insert_point, i386_remove_point): Adjust to new interface.
3574 (the_low_target): Install i386_supports_z_point_type.
3575 * win32-low.c (win32_supports_z_point_type): New function.
3576 (win32_insert_point, win32_remove_point): Adjust to new interface.
3577 (win32_target_ops): Install win32_supports_z_point_type.
3578 * win32-low.h (struct win32_target_ops):
3579 <supports_z_point_type>: New method.
3580 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3581 instead of a char. Also take a raw breakpoint pointer.
3582
932539e3
PA
35832014-05-20 Pedro Alves <palves@redhat.com>
3584
3585 * mem-break.h: Include break-common.h.
3586 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3587 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3588 (Z_packet_to_target_hw_bp_type): New declaration.
3589 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3590 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3591 (Z_PACKET_ACCESS_WP): Delete macros.
3592 (Z_packet_to_hw_type): Delete function.
3593 * i386-low.h: Don't include break-common.h here.
3594 (Z_packet_to_hw_type): Delete declaration.
3595 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3596 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3597 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3598 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3599 * linux-aarch64-low.c: Don't include break-common.h here.
3600 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3601 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3602 (Z_packet_to_target_hw_bp_type): Delete function.
3603 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3604 function.
3605 (mips_insert_point, mips_remove_point): Use
3606 Z_packet_to_target_hw_bp_type.
3607
4ff0d3d8
PA
36082014-05-20 Pedro Alves <palves@redhat.com>
3609
3610 * linux-aarch64-low.c: Include break-common.h.
3611 (enum target_point_type): Delete.
3612 (Z_packet_to_point_type): Rename to ...
3613 (Z_packet_to_target_hw_bp_type): ... this, and return a
3614 target_hw_bp_type instead.
3615 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3616 instead of an enum target_point_type.
3617 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3618 breakpoint type.
3619 (aarch64_dr_state_insert_one_point)
3620 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3621 (aarch64_handle_aligned_watchpoint)
3622 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3623 Take an enum target_hw_bp_type instead of an enum
3624 target_point_type.
3625 (aarch64_supports_z_point_type): New function.
3626 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3627 use Z_packet_to_target_hw_bp_type.
3628
786dc519
JB
36292014-05-20 Joel Brobecker <brobecker@adacore.com>
3630
3631 * configure.ac: Only use -Werror by default when DEVELOPMENT
3632 is true.
3633 * configure: Regenerate.
3634
9e0aa64f
JK
36352014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3636
3637 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3638 * linux-x86-low.c (X86_64_USER_REGS): New.
3639 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3640
2b577b92
YQ
36412014-04-28 Yao Qi <yao@codesourcery.com>
3642
3643 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3644 name.
3645
94611da2
PA
36462014-04-25 Pedro Alves <palves@redhat.com>
3647
3648 PR server/16255
3649 * linux-low.c (linux_attach_fail_reason_string): New function.
3650 (linux_attach_lwp): Delete.
3651 (linux_attach_lwp_1): Rename to ...
3652 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3653 argument. Remove "initial" parameter. Return int instead of
3654 void. Don't error or warn here.
3655 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3656 failure to attach to the tgid. Call warning when failing to
3657 attach to an lwp.
3658 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3659 argument. Remove "initial" parameter. Return int instead of
3660 void. Don't error or warn here.
3661 (linux_attach_fail_reason_string): New declaration.
3662 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3663 interface change. Use linux_attach_fail_reason_string.
3664
01f9f808
MS
36652014-04-24 Michael Sturm <michael.sturm@mintel.com>
3666 Walfred Tedeschi <walfred.tedeschi@intel.com>
3667
3668 * Makefile.in: Added rules to handle new files
3669 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3670 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3671 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3672 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3673 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3674 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3675 x32-avx512-linux.o.
3676 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3677 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3678 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3679 i386/x32-avx512.xml.
3680 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3681 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3682 i386/x32-avx512-linux.xml.
3683 * i387-fp.c (num_avx512_k_registers): New constant for number
3684 of K registers.
3685 (num_avx512_zmmh_low_registers): New constant for number of
3686 lower ZMM registers (0-15).
3687 (num_avx512_zmmh_high_registers): New constant for number of
3688 higher ZMM registers (16-31).
3689 (num_avx512_ymmh_registers): New contant for number of higher
3690 YMM registers (ymm16-31 added by avx521 on x86_64).
3691 (num_avx512_xmm_registers): New constant for number of higher
3692 XMM registers (xmm16-31 added by AVX512 on x86_64).
3693 (struct i387_xsave): Add space for AVX512 registers.
3694 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3695 Add code to handle AVX512 registers.
3696 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3697 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3698 prototypei from generated file.
3699 (tdesc_amd64_avx512_linux): Likewise.
3700 (init_registers_x32_avx512_linux): Likewise.
3701 (tdesc_x32_avx512_linux): Likewise.
3702 (init_registers_i386_avx512_linux): Likewise.
3703 (tdesc_i386_avx512_linux): Likewise.
3704 (x86_64_regmap): Add AVX512 registers.
3705 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3706 mask.
3707 (initialize_low_arch): Add code to initialize AVX512 registers.
3708
51aa91f9
PA
37092014-04-23 Pedro Alves <palves@redhat.com>
3710
3711 * mem-break.c (find_gdb_breakpoint_at): Make static.
3712 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3713
a4165e94
PA
37142014-04-23 Pedro Alves <palves@redhat.com>
3715
3716 * i386-low.c: Don't include break-common.h here.
3717 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3718 prototype to take target_hw_bp_type as argument instead of a Z
3719 packet char.
3720 * i386-low.h: Include break-common.h here.
3721 (Z_packet_to_hw_type): Declare.
3722 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3723 prototypes.
3724 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3725 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3726 (x86_remove_point): Convert the packet number to a
3727 target_hw_bp_type before calling i386_low_remove_watchpoint.
3728 * win32-i386-low.c (i386_insert_point): Convert the packet number
3729 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3730 (i386_remove_point): Convert the packet number to a
3731 target_hw_bp_type before calling i386_low_remove_watchpoint.
3732
b8acf843
PA
37332014-04-23 Pedro Alves <palves@redhat.com>
3734
3735 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3736
d708bcd1
PA
37372014-04-10 Pedro Alves <palves@redhat.com>
3738
3739 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3740 Check if the condition or command is NULL before checking if the
3741 breakpoint is known. On success, return true.
3742 * mem-break.h (add_breakpoint_condition): Document return.
3743 (add_breakpoint_commands): Add describing comment.
3744 * server.c (skip_to_semicolon): New function.
3745 (process_point_options): Use it.
3746
2eec7d5b
PA
37472014-04-09 Pedro Alves <palves@redhat.com>
3748
3749 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3750 to lwpid_of.
3751
fa96cb38
PA
37522014-02-27 Pedro Alves <palves@redhat.com>
3753
3754 PR 12702
3755 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3756 macros.
3757 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3758 output.
3759 (last_thread_of_process_p): Take a PID argument instead of a
3760 thread pointer.
3761 (linux_wait_for_lwp): Delete.
3762 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3763 functions.
3764 (linux_low_filter_event): New function, party factored out from
3765 linux_wait_for_event.
3766 (linux_wait_for_event): Rename to ...
3767 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3768 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3769 sigsuspend. Check for zombie leaders.
3770 (linux_wait_for_event): Reimplement as wrapper around
3771 linux_wait_for_event_filtered.
3772 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3773 a normal or signal exit is seen, it's the whole process exiting.
3774 (wait_for_sigstop): No longer a for_each_inferior callback.
3775 Rewrite on top of linux_wait_for_event_filtered.
3776 (stop_all_lwps): Call wait_for_sigstop directly.
3777 * server.c (resume, handle_target_event): Handle
3778 TARGET_WAITKIND_NO_RESUMED.
3779
d763de10
JB
37802014-02-26 Joel Brobecker <brobecker@adacore.com>
3781
3782 * win32-low.c (psapi_get_dll_name,
3783 * win32_CreateToolhelp32Snapshot): Delete.
3784 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3785 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3786 Delete.
3787 (handle_load_dll): Add function description.
3788 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3789
850a0f76
JB
37902014-02-26 Joel Brobecker <brobecker@adacore.com>
3791
3792 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3793 Add comment.
3794 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3795 base address when calling win32_add_one_solib.
3796 (handle_load_dll): Delete local variable load_addr.
3797 Remove 0x1000 offset applied to DLL base address when calling
3798 win32_add_one_solib.
3799 (handle_unload_dll): Add comment.
3800
f25b3fc3
JB
38012014-02-26 Joel Brobecker <brobecker@adacore.com>
3802
3803 * win32-low.c (win32_add_all_dlls): Renames
3804 win32_ensure_ntdll_loaded. Rewrite function documentation.
3805 Adjust implementation to always load all DLLs.
3806 Add 0x1000 offset to DLL base address when calling
3807 win32_add_one_solib.
3808 (child_initialization_done): New static global.
3809 (do_initial_child_stuff): Set child_initialization_done to
3810 zero during child initialization, and 1 after. Replace call
3811 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3812 Add comment.
3813 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3814 (handle_unload_dll): Add function documentation.
3815 (get_child_debug_event): Ignore load and unload DLL events
3816 during child initialization.
3817
d86d4aaf
DE
38182014-02-20 Doug Evans <dje@google.com>
3819
3bc32da3 3820 Remove global all_lwps.
d86d4aaf
DE
3821 * inferiors.h (ptid_of): Move here from linux-low.h.
3822 (pid_of, lwpid_of): Ditto.
3823 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3824 parameter is a struct thread_info * now.
3825 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3826 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3827 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3828 directly.
3829 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3830 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3831 * linux-arm-low.c (update_registers_callback): Update, "entry"
3832 parameter is a struct thread_info * now.
3833 Fetch lwpid from current_inferior directly.
3834 (arm_insert_point): Pass &all_threads to find_inferior instead of
3835 &all_lwps.
3836 (arm_remove_point): Ditto.
3837 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3838 (arm_prepare_to_resume): Fetch pid from thread.
3839 (arm_read_description): Fetch lwpid from current_inferior directly.
3840 * linux-low.c (all_lwps): Delete.
3841 (delete_lwp): Delete call to remove_inferior.
3842 (handle_extended_wait): Fetch lwpid from thread.
3843 (add_lwp): Don't set lwp->entry.id. Remove call to
3844 add_inferior_to_list.
3845 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3846 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3847 (kill_one_lwp_callback): Ditto.
3848 (linux_kill): Don't dereference NULL pointer.
3849 Fetch ptid,lwpid from thread.
3850 (get_detach_signal): Fetch ptid from thread.
3851 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3852 Simplify call to regcache_invalidate_thread.
3853 (delete_lwp_callback): Update, "entry" parameter is a
3854 struct thread_info * now. Fetch pid from thread.
3855 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3856 (status_pending_p_callback): Update, "entry" parameter is a
3857 struct thread_info * now. Fetch ptid from thread.
3858 (find_lwp_pid): Update, "entry" parameter is a
3859 struct thread_info * now.
3860 (linux_wait_for_lwp): Fetch pid from thread.
3861 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3862 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3863 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3864 (dequeue_one_deferred_signal): Ditto.
3865 (cancel_breakpoint): Fetch ptid from current_inferior.
3866 (linux_wait_for_event): Pass &all_threads to find_inferior,
3867 not &all_lwps. Fetch ptid, lwpid from thread.
3868 (count_events_callback): Update, "entry" parameter is a
3869 struct thread_info * now.
3870 (select_singlestep_lwp_callback): Ditto.
3871 (select_event_lwp_callback): Ditto.
3872 (cancel_breakpoints_callback): Ditto.
3873 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3874 not &all_lwps.
3875 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3876 (unsuspend_one_lwp): Update, "entry" parameter is a
3877 struct thread_info * now.
3878 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3879 not &all_lwps.
3880 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3881 Fetch lwpid from thread, not lwp.
3882 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3883 Pass &all_threads to find_inferior, not &all_lwps.
3884 (send_sigstop): Fetch lwpid from thread, not lwp.
3885 (send_sigstop_callback): Update, "entry" parameter is a
3886 struct thread_info * now.
3887 (suspend_and_send_sigstop_callback): Ditto.
3888 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3889 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3890 struct thread_info * now.
3891 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3892 from thread, lwp.
3893 (lwp_running): Update, "entry" parameter is a
3894 struct thread_info * now.
3895 (stop_all_lwps): Fetch ptid from thread.
3896 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3897 (linux_resume_one_lwp): Fetch lwpid from thread.
3898 (linux_set_resume_request): Update, "entry" parameter is a
3899 struct thread_info * now. Fetch pid, lwpid from thread.
3900 (resume_status_pending_p): Update, "entry" parameter is a
3901 struct thread_info * now.
3902 (need_step_over_p): Ditto. Fetch lwpid from thread.
3903 (start_step_over): Fetch lwpid from thread.
3904 (linux_resume_one_thread): Update, "entry" parameter is a
3905 struct thread_info * now. Fetch lwpid from thread.
3906 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3907 (proceed_one_lwp): Update, "entry" parameter is a
3908 struct thread_info * now. Fetch lwpid from thread.
3909 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3910 struct thread_info * now.
3911 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3912 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3913 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3914 directly.
3915 (regsets_store_inferior_registers): Ditto.
3916 (fetch_register, store_register): Ditto.
3917 (linux_read_memory, linux_write_memory): Ditto.
3918 (linux_request_interrupt): Ditto.
3919 (linux_read_auxv): Ditto.
3920 (linux_xfer_siginfo): Ditto.
3921 (linux_qxfer_spu): Ditto.
3922 (linux_qxfer_libraries_svr4): Ditto.
3923 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3924 moved to inferiors.h.
3925 (get_lwp): Delete.
3926 (get_thread_lwp): Update.
3927 (struct lwp_info): Delete member "entry". Simplify comment for
3928 member "thread".
3929 (all_lwps): Delete.
3930 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3931 current_inferior directly.
3932 (update_watch_registers_callback): Update, "entry" parameter is a
3933 struct thread_info * now. Fetch pid from thread.
3934 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3935 (mips_insert_point): Fetch lwpid from current_inferior.
3936 Pass &all_threads to find_inferior, not &all_lwps.
3937 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3938 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3939 directly.
3940 (mips_stopped_data_address): Ditto.
3941 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3942 directly.
3943 * linux-tile-low.c (tile_arch_setup): Ditto.
3944 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3945 (update_debug_registers_callback): Update, "entry" parameter is a
3946 struct thread_info * now. Fetch pid from thread.
3947 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3948 Pass &all_threads to find_inferior, not &all_lwps.
3949 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3950 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3951 Pass &all_threads to find_inferior, not &all_lwps.
3952 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3953 (i386_dr_low_get_status): Ditto.
3954 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3955 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3956 (x86_linux_read_description): Ditto.
3957 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3958
3b8361aa
DE
39592014-02-20 Doug Evans <dje@google.com>
3960
3961 * inferiors.c (get_first_inferior): Fix buglet.
3962
f7667f0d
DE
39632014-02-19 Doug Evans <dje@google.com>
3964
3965 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3966 * inferiors.c (add_thread): Change result type to struct thread_info *.
3967 All callers updated.
3968 (add_lwp): Call add_thread here instead of in callers.
3969 All callers updated.
3970 * linux-low.h (get_lwp_thread): Rewrite.
3971 (struct lwp_info): New member "thread".
3972
b3312d80
DE
39732014-02-19 Doug Evans <dje@google.com>
3974
3975 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3976 All callers updated.
3977
ecc6f45c
DE
39782014-02-19 Doug Evans <dje@google.com>
3979
3980 * inferiors.c (add_thread): Fix whitespace.
3981
649ebbca
DE
39822014-02-19 Doug Evans <dje@google.com>
3983
3984 * dll.c (clear_dlls): Replace accessing list implemention details
3985 with API function.
3986 * gdbthread.h (get_first_thread): Declare.
3987 * inferiors.c (for_each_inferior_with_data): New function.
3988 (get_first_thread): New function.
3989 (find_thread_ptid): Simplify.
3990 (get_first_inferior): New function.
3991 (clear_list): Delete.
3992 (one_inferior_p): New function.
3993 (clear_inferior_list): New function.
3994 (clear_inferiors): Update.
3995 * inferiors.h (for_each_inferior_with_data): Declare.
3996 (clear_inferior_list): Declare.
3997 (one_inferior_p): Declare.
3998 (get_first_inferior): Declare.
3999 * linux-low.c (linux_wait_for_event): Replace accessing list
4000 implemention details with API function.
4001 * server.c (target_running): Ditto.
4002 (accumulate_file_name_length): New function.
4003 (emit_dll_description): New function.
4004 (handle_qxfer_libraries): Replace accessing list implemention
4005 details with API function.
4006 (handle_qxfer_threads_worker): New function.
4007 (handle_qxfer_threads_proper): Replace accessing list implemention
4008 details with API function.
4009 (handle_query): Ditto.
4010 (visit_actioned_threads_callback_ftype): New typedef.
4011 (visit_actioned_threads_data): New struct.
4012 (visit_actioned_threads): Rewrite to be find_inferior callback.
4013 (resume): Call find_inferior.
4014 (handle_status): Replace accessing list implemention
4015 details with API function.
4016 (process_serial_event): Replace accessing list implemention details
4017 with API function.
4018 * target.c (set_desired_inferior): Replace accessing list implemention
4019 details with API function.
4020 * tracepoint.c (same_process_p): New function.
4021 (gdb_agent_about_to_close): Replace accessing list implemention
4022 details with API function.
4023 * win32-low.c (child_delete_thread): Replace accessing list
4024 implemention details with API function.
4025 (match_dll_by_basename): New function.
4026 (dll_is_loaded_by_basename): New function.
4027 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4028 details call to dll_is_loaded_by_basename.
4029
80894984
DE
40302014-02-19 Doug Evans <dje@google.com>
4031
4032 * dll.h (struct dll_info): Add comment.
4033 * gdbthread.h (struct thread_info): Add comment.
4034 (current_ptid): Simplify.
4035 * inferiors.c (add_process): Update.
4036 (remove_process): Update.
4037 * inferiors.h (struct process_info): Rename member "head" to "entry".
4038 * linux-low.c (delete_lwp): Update.
4039 (add_lwp): Update.
4040 (last_thread_of_process_p): Update.
4041 (kill_one_lwp_callback, linux_kill): Update.
4042 (status_pending_p_callback): Update.
4043 (wait_for_sigstop): Update. Simplify read of ptid.
4044 (start_step_over): Update.
4045 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4046 (get_lwp_thread): Update.
4047 (struct lwp_info): Rename member "head" to "entry".
4048 * regcache.h (inferior_list_entry): Delete.
4049 * server.c (kill_inferior_callback): Update.
4050 (detach_or_kill_inferior_callback): Update.
4051 (print_started_pid): Update.
4052 (print_attached_pid): Update.
4053 (process_serial_event): Simplify read of ptid.
4054 * thread-db.c (thread_db_create_event): Update.
4055 (thread_db_get_tls_address): Update.
4056 * win32-low.c (current_inferior_ptid): Simplify.
4057
46917d26
TT
40582014-02-19 Tom Tromey <tromey@redhat.com>
4059
4060 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4061 argument.
4062 (target_supports_btrace): Update.
4063
0759a81e
YQ
40642014-02-14 Yao Qi <yao@codesourcery.com>
4065
4066 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4067 (rsp-low-ipa.o): New target.
4068
a7191e8b
TT
40692014-02-12 Tom Tromey <tromey@redhat.com>
4070
4071 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4072 convert_ascii_to_int.
4073 * regcache.c (registers_to_string): Likewise.
4074 * remote-utils.c (decode_M_packet): Likewise.
4075 * server.c (process_serial_event): Likewise.
4076
ff0e980e
TT
40772014-02-12 Tom Tromey <tromey@redhat.com>
4078
4079 * server.c (handle_query, handle_v_run): Use hex2bin, not
4080 unhexify.
4081 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4082
e9371aff
TT
40832014-02-12 Tom Tromey <tromey@redhat.com>
4084
4085 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4086 convert_int_to_ascii.
4087 * regcache.c (registers_to_string, collect_register_as_string):
4088 Likewise.
4089 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4090 Likewise.
4091 * server.c (process_serial_event): Likewise.
4092 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4093 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4094
971dc0b8
TT
40952014-02-12 Tom Tromey <tromey@redhat.com>
4096
4097 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4098 bin2hex, not hexify.
4099 * tracepoint.c (cmd_qtstatus): Likewise.
4100
0a822afb
TT
41012014-02-12 Tom Tromey <tromey@redhat.com>
4102
4103 * remote-utils.c (monitor_output): Pass explicit length to
4104 hexify.
4105
9c3d6531
TT
41062014-02-12 Tom Tromey <tromey@redhat.com>
4107
4108 * tracepoint.c: Include rsp-low.h.
4109 * server.c: Include rsp-low.h.
4110 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4111 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4112 declare.
4113 * remote-utils.c: Include rsp-low.h.
4114 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4115 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4116 (convert_int_to_ascii, convert_ascii_to_int): Move to
4117 common/rsp-low.c.
4118 * regcache.c: Include rsp-low.h.
4119 * ax.c: Include rsp-low.h.
4120 * Makefile.in (SFILES): Add common/rsp-low.c.
4121 (OBS): Add rsp-low.o.
4122 (rsp-low.o): New target.
4123
01fd3ea5
TT
41242014-02-12 Tom Tromey <tromey@redhat.com>
4125
4126 * utils.h (pulongest, plongest, phex_nz): Don't declare.
4127 Include print-utils.h.
4128 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4129 (plongest, thirty_two, phex_nz): Remove.
4130 * Makefile.in (SFILES): Add common/print-utils.c.
4131 (OBS): Add print-utils.o.
4132 (print-utils-ipa.o): New target.
4133 (print-utils.o): New target.
4134 (IPA_OBJS): Add print-utils-ipa.o.
4135
e99dc820
TT
41362014-02-06 Tom Tromey <tromey@redhat.com>
4137
4138 * Makefile.in (SFILES): Fix indentation.
4139
ee1e2d4f
DE
41402014-02-05 Doug Evans <dje@google.com>
4141
4142 * linux-low.c (linux_wait_for_event): Improve comment.
4143 (linux_wait_1): Keep current_inferior in sync with event_child.
4144
f5a02773
DE
41452014-01-22 Doug Evans <dje@google.com>
4146
4147 * gdbthread.h (gdb_id_to_thread): Delete, unused.
4148
87ce2a04
DE
41492014-01-22 Doug Evans <dje@google.com>
4150
4151 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4152 * configure: Regenerate.
4153 * config.in: Regenerate.
4154 * Makefile.in (SFILES): Add debug.c.
4155 (OBS): Add debug.o.
4156 * debug.c: New file.
4157 * debug.h: New file.
4158 * linux-aarch64-low.c (*): Update all debugging printfs to use
4159 debug_printf instead of fprintf.
4160 * linux-arm-low.c (*): Ditto.
4161 * linux-cris-low.c (*): Ditto.
4162 * linux-crisv32-low.c (*): Ditto.
4163 * linux-m32r-low.c (*): Ditto.
4164 * linux-sparc-low.c (*): Ditto.
4165 * linux-x86.c (*): Ditto.
4166 * linux-low.c (*): Ditto.
4167 (linux_wait_1): Add calls to debug_enter, debug_exit.
4168 (linux_wait): Remove redundant debugging printf.
4169 (stop_all_lwps): Add calls to debug_enter, debug_exit.
4170 (linux_resume, unstop_all_lwps): Ditto.
4171 * mem-break.c (*): Update all debugging printfs to use
4172 debug_printf instead of fprintf.
4173 * remote-utils.c (*): Ditto.
4174 * thread-db.c (*): Ditto.
4175 * server.c #include <ctype.h>, "gdb_vecs.h".
4176 (debug_threads): Moved to debug.c.
4177 (*): Update all debugging printfs to use debug_printf instead of
4178 fprintf.
4179 (start_inferior): Replace call to fflush with call to debug_flush.
4180 (monitor_show_help): Mention set debug-format.
4181 (parse_debug_format_options): New function.
4182 (handle_monitor_command): Handle "monitor set debug-format".
4183 (gdbserver_usage): Mention --debug-format.
4184 (main): Parse --debug-format.
4185 * server.h (debug_threads): Declaration moved to debug.h.
4186 #include "debug.h".
4187 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4188 trace_debug_1 that uses debug_printf.
4189 (tracepoint_look_up_symbols): Update all debugging printfs to use
4190 debug_printf instead of fprintf.
4191
e671835b
BS
41922014-01-20 Baruch Siach <baruch@tkos.co.il>
4193
4194 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4195 sys/ptrace.h.
4196
b5737fa9
PA
41972014-01-17 Pedro Alves <palves@redhat.com>
4198
ea38d2a9 4199 PR build/16445
c7faa97a
PA
4200 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4201 defined after including gdb_proc_service.h.
b5737fa9 4202
40ed484e
DE
42032014-01-16 Doug Evans <dje@google.com>
4204
4205 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4206 (match_dll): Use it.
4207
969c39fb
MM
42082014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4209
4210 * target.h (target_ops) <read_btrace>: Change parameters and
4211 return type to allow error reporting.
4212 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4213 trace reading errors on.
4214 * linux-low.c (linux_low_read_btrace): Pass trace reading
4215 errors on.
4216 (linux_low_disable_btrace): New.
4217
ab7f45ba
DE
42182014-01-15 Doug Evans <dje@google.com>
4219
4220 * inferiors.c (thread_id_to_gdb_id): Delete.
4221 * inferiors.h (thread_id_to_gdb_id): Delete.
4222
66af0f44
EZ
42232014-01-13 Eli Zaretskii <eliz@gnu.org>
4224
4225 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4226 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4227 versions.
4228
9939e131
PA
42292014-01-08 Pedro Alves <palves@redhat.com>
4230
4231 * server.c (handle_status): Don't discard previous queued stop
4232 replies or thread's pending status here.
4233 (main) <disconnection>: Do it here instead.
4234
b7ea362b
PA
42352014-01-08 Pedro Alves <palves@redhat.com>
4236
4237 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4238 * server.c (visit_actioned_threads, handle_pending_status): New
4239 function.
4240 (handle_v_cont): Factor out parts to ...
4241 (resume): ... this new function. If in all-stop, and a thread
4242 being resumed has a pending status, report it without actually
4243 resuming.
4244 (myresume): Adjust to use the new 'resume' function.
4245 (clear_pending_status_callback, set_pending_status_callback)
4246 (find_status_pending_thread_callback): New functions.
4247 (handle_status): Handle the case of multiple threads having
4248 interesting statuses to report. Report threads' real last signal
4249 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4250 with an interesting thread to report the status for, instead of
4251 always reporting the status of the first thread.
4252
28498c42
JB
42532014-01-01 Joel Brobecker <brobecker@adacore.com>
4254
4255 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4256 * gdbreplay.c (gdbreplay_version): Likewise.
4257
f45c82da
YZ
42582013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4259
4260 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4261 iov.iov_len with the real length in use.
4262
379a5e2d
JB
42632013-12-13 Joel Brobecker <brobecker@adacore.com>
4264
4265 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4266 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4267 for all targets that use win32-low.c.
4268 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4269 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4270
4210d83e
PA
42712013-12-13 Pedro Alves <palves@redhat.com>
4272
4273 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4274 if equal to TARGET_WAITKIND_LOADED.
4275 * win32-low.c (cached_status): New static global.
4276 (win32_wait): Add declaration.
4277 (do_initial_child_stuff): Flush all initial pending debug events
4278 up to the initial breakpoint.
4279 (win32_wait): If CACHED_STATUS was set, return that instead
4280 of doing a real wait. Remove the code resuming the execution
4281 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4282 during the initial phase. Also remove the code changing
4283 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4284 TARGET_WAITKIND_STOPPED.
4285
e7f0d979
YQ
42862013-12-11 Yao Qi <yao@codesourcery.com>
4287
4288 * notif.c (handle_notif_ack): Return 0 if no notification
4289 matches.
4290
ebcf782c
DE
42912013-11-20 Doug Evans <dje@google.com>
4292
4293 * linux-low.c (linux_set_resume_request): Fix comment.
4294
20ad9378
DE
42952013-11-20 Doug Evans <dje@google.com>
4296
4297 * linux-low.c (resume_status_pending_p): Tweak comment.
4298
a196ebeb
WT
42992013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4300
4301 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4302 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4303 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4304 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4305 (srv_amd64_regobj): Add amd64-mpx.o.
4306 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4307 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4308 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4309 * i387-fp.c (num_pl_bnd_register) Added constant.
4310 (num_pl_bnd_cfg_registers) Added constant.
4311 (struct i387_xsave) Added reserved area and MPX fields.
4312 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4313 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4314 function.
4315 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4316 (init_registers_amd64_mpx_linux): Declare new function.
4317 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4318 (x86_64_regmap): Add MPX registers.
4319 (x86_linux_read_description): Add MPX case.
4320 (initialize_low_arch): Initialize MPX targets.
4321
0080a2f6
TT
43222013-11-18 Tom Tromey <tromey@redhat.com>
4323
4324 * configure: Rebuild.
4325 * configure.ac: Don't check for stdlib.h.
4326 * gdbreplay.c: Unconditionally include stdlib.h.
4327
2978b111
TT
43282013-11-18 Tom Tromey <tromey@redhat.com>
4329
4330 * config.in: Rebuild.
4331 * configure: Rebuild.
4332 * configure.ac: Don't use AC_HEADER_DIRENT.
4333
a3d08894
TT
43342013-11-18 Tom Tromey <tromey@redhat.com>
4335
4336 * server.h: Don't check HAVE_STRING_H.
4337 * gdbreplay.c: Don't check HAVE_STRING_H.
4338 * configure: Rebuild.
4339
0a5dd17d
TT
43402013-11-18 Tom Tromey <tromey@redhat.com>
4341
4342 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4343 LIBGNU.
4344
1bd2f0ba
TT
43452013-11-08 Tom Tromey <tromey@redhat.com>
4346
4347 * configure, config.in: Rebuild.
4348 * configure.ac: Remove unused configury.
4349
3266f10b
TT
43502013-11-08 Tom Tromey <tromey@redhat.com>
4351
4352 * acinclude.m4: Include common.m4, codeset.m4.
4353 * configure, config.in: Rebuild.
4354 * configure.ac: Use GDB_AC_COMMON.
4355
6682d959
AA
43562013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4357
4358 * linux-s390-low.c (HWCAP_S390_TE): New define.
4359 (s390_arch_setup): Consider the TE field in the HWCAP for
4360 determining 'have_regset_tdb'.
4361
fd0a4d76
SDJ
43622013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4363
4364 PR gdb/16014
4365 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4366 call to sizeof.
4367
1a3d890b
PA
43682013-10-02 Pedro Alves <palves@redhat.com>
4369
4370 * server.c (process_serial_event): Don't output "GDBserver
4371 exiting" if GDB is connected through stdio.
4372 * target.c (mywait): Likewise, be silent if GDB is connected
4373 through stdio.
4374
97ad4581
JB
43752013-10-01 Joel Brobecker <brobecker@adacore.com>
4376
4377 * lynx-low.c (lynx_add_threads_after_attach): New function.
4378 (lynx_attach): Remove call to add_thread. Add call to
4379 lynx_add_threads_after_attach instead.
4380
5b4e221c
MF
43812013-09-28 Mike Frysinger <vapier@gentoo.org>
4382
4383 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4384 * config.in, configure: Regenerated.
4385
ee47b2f8
YQ
43862013-09-18 Yao Qi <yao@codesourcery.com>
4387
4388 PR server/15959
4389 * server.c (start_inferior): Clear 'resume_info'.
4390
d6707650 43912013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4392
d6707650
JW
4393 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4394 for each register.
4395
9243dd0e 43962013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4397
9243dd0e
JW
4398 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4399 linux-tile-low.o to srv_tgtobj.
4400
c623a6ef
WN
44012013-09-16 Will Newton <will.newton@linaro.org>
4402
4403 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4404 out regs.
4405
fb71d39e
PA
44062013-09-06 Pedro Alves <palves@redhat.com>
4407
4408 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4409 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4410 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4411 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4412 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4413 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4414
8e7e9910
PA
44152013-09-06 Pedro Alves <palves@redhat.com>
4416
4417 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4418 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4419
7c3a12ca
PA
44202013-09-06 Pedro Alves <palves@redhat.com>
4421
4422 * linux-amd64-ipa.c: Include tracepoint.h.
4423 * linux-i386-ipa.c: Include tracepoint.h.
4424
8eb3d7b6
RW
44252013-09-06 Ricard Wanderlof <ricardw@axis.com>
4426
4427 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4428 (ps_get_thread_area): New function.
4429
eddddb9d
RW
44302013-09-06 Ricard Wanderlof <ricardw@axis.com>
4431
4432 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4433 (initialize_low_arch): Call init_registers_crisv32 rather than
4434 init_register_crisv32.
4435
533b0600
PA
44362013-09-05 Pedro Alves <palves@redhat.com>
4437
4438 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4439 to ...
4440 * hostio.h: ... this new file.
4441 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4442 win32-low.c: Include hostio.h.
4443
0ce3d3b5
PA
44442013-09-05 Pedro Alves <palves@redhat.com>
4445
4446 * server.h (gdb_client_data, handler_func, callback_handler_func)
4447 (delete_file_handler, add_file_handler, append_callback_event)
4448 (delete_callback_event, start_event_loop, initialize_event_loop):
4449 Move to event-loop.h and include it.
4450 * event-loop.h: New file.
4451
799cdc37
PA
44522013-09-05 Pedro Alves <palves@redhat.com>
4453
4454 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4455 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4456 (loaded_dll, unloaded_dll): Move to ...
4457 * dll.h: ... this new file.
4458 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4459
6a6bbd9d
PA
44602013-09-05 Pedro Alves <palves@redhat.com>
4461
4462 * server.h (current_process, get_thread_process, all_processes)
4463 (add_inferior_to_list, for_each_inferior, current_inferior)
4464 (remove_inferior, add_process, remove_process, find_process_pid)
4465 (have_started_inferiors_p, have_attached_inferiors_p)
4466 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4467 (clear_inferiors, find_inferior, find_inferior_id)
4468 (inferior_target_data, set_inferior_target_data)
4469 (inferior_regcache_data, set_inferior_regcache_data): Move to
4470 inferiors.h, and include it.
4471 * inferiors.h: New file.
4472
f699aaba
PA
44732013-09-05 Pedro Alves <palves@redhat.com>
4474
4475 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4476 Move ...
72f4393d 4477 * ax.h: ... here.
f699aaba 4478
c144c7a0
PA
44792013-09-05 Pedro Alves <palves@redhat.com>
4480
4481 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4482 tracepoint.h.
4483 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4484 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4485 (handle_tracepoint_general_set, handle_tracepoint_query)
4486 (tracepoint_finished_step, tracepoint_was_hit)
4487 (release_while_stepping_state_list, current_traceframe)
4488 (in_readonly_region, traceframe_read_mem)
4489 (fetch_traceframe_registers, traceframe_read_sdata)
4490 (traceframe_read_info, struct fast_tpoint_collect_status)
4491 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4492 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4493 (supply_fast_tracepoint_registers)
4494 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4495 (ipa_tdesc, claim_trampoline_space)
4496 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4497 (agent_mem_read, agent_get_trace_state_variable_value)
4498 (agent_set_trace_state_variable_value, agent_tsv_read)
4499 (agent_mem_read_string, get_raw_reg_func_addr)
4500 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4501 * tracepoint.h: ... this new file.
4502
ff42e6ab
PA
45032013-09-05 Pedro Alves <palves@redhat.com>
4504
4505 * server.h (perror_with_name, error, fatal, warning, paddress)
4506 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4507 include it.
4508 * utils.h: New file.
4509
541af0f4
PA
45102013-09-05 Pedro Alves <palves@redhat.com>
4511
4512 * server.h (remote_debug, noack_mode, transport_is_reliable)
4513 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4514 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4515 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4516 (write_enn, initialize_async_io, enable_async_io)
4517 (disable_async_io, check_remote_input_interrupt_request)
4518 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4519 (dead_thread_notify, prepare_resume_reply)
4520 (decode_address_to_semicolon, decode_address, decode_m_packet)
4521 (decode_M_packet, decode_X_packet, decode_xfer_write)
4522 (decode_search_memory_packet, unhexify, hexify)
4523 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4524 (look_up_one_symbol, relocate_instruction)
4525 (monitor_output): Move to remote-utils.h, and include it.
4526 * remote-utils.h: New file.
4527
eebdf26b
PA
45282013-09-05 Pedro Alves <palves@redhat.com>
4529
4530 * server.h (_): Delete.
4531
3aafd2ff
PA
45322013-09-02 Pedro Alves <palves@redhat.com>
4533
4534 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4535 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4536 allocated.
4537 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4538
cee83bcb
PM
45392013-09-02 Pierre Muller <muller@sourceware.org>
4540
4541 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4542 or WriteProcessMemory complete successfully and handle
4543 ERROR_PARTIAL_COPY error.
4544
9a13b2fa
PA
45452013-09-02 Pedro Alves <palves@redhat.com>
4546
4547 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4548 error instead of EIO.
4549
602e3198
JK
45502013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4551
4552 PR server/15604
4553 * linux-low.c: Include filestuff.h.
4554 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4555 * lynx-low.c: Include filestuff.h.
4556 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4557 * server.c: Include filestuff.h.
4558 (main): Call notice_open_fds.
4559 * spu-low.c: Include filestuff.h.
4560 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4561
96d7229d
LM
45622013-08-22 Luis Machado <lgustavo@codesourcery.com>
4563
4564 * Makefile.in: Explain why ../target and ../nat are not
4565 listed as include file search paths.
4566 (linux-waitpid.o): New object file rule.
4567 * configure.srv (srv_native_linux_obj): New variable.
4568 Replace all occurrences of linux native object files with
4569 $srv_native_linux_obj.
4570 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4571 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4572 (linux_enable_event_reporting): Remove declaration.
4573 (my_waitpid): Moved to common/linux-waitpid.c.
4574 (linux_wait_for_event): Pass ptid when calling
4575 linux_enable_event_reporting.
4576 (linux_supports_tracefork_flag): Remove.
4577 (linux_enable_event_reporting): Likewise.
4578 (linux_tracefork_grandchild): Remove.
4579 (STACK_SIZE): Moved to common/linux-ptrace.c.
4580 (linux_tracefork_child): Remove.
4581 (linux_test_for_tracefork): Remove.
4582 (linux_look_up_symbols): Call linux_supports_traceclone.
4583 (initialize_low): Remove call to linux_test_for_tracefork.
4584 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4585 common/linux-ptrace.h.
4586 (PTRACE_TYPE_ARG4): Likewise.
4587 Include linux-ptrace.h.
4588
32940073
PA
45892013-08-21 Pedro Alves <palves@redhat.com>
4590
4591 * config.in: Renegerate.
4592
33b60d58 45932013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4594
33b60d58
LM
4595 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4596 (SFILES): Remove $(srcdir)/common/target-common.c and
4597 add $(srcdir)/target/waitstatus.c.
4598 (OBS): Remove target-common.o and add waitstatus.o.
4599 (server_h): Remove $(srcdir)/../common/target-common.h and
4600 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4601 and $(srcdir)/../target/waitstatus.h.
4602 (target-common.o): Remove.
4603 (waitstatus.o): New target object file.
4604 * target.h: Do not include target-common.h and
4605 include target/resume.h, target/wait.h and
4606 target/waitstatus.h.
4607
b8e1b30e
LM
46082013-08-13 Luis Machado <lgustavo@codesourcery.com>
4609
4610 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4611 to PTRACE_TYPE_ARG3.
4612 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4613 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4614 PTRACE_TYPE_ARG4.
4615 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4616 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4617
7a60ad40
YQ
46182013-07-27 Jie Zhang <jie@codesourcery.com>
4619 Daniel Jacobowitz <dan@codesourcery.com>
4620 Yao Qi <yao@codesourcery.com>
4621
4622 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4623 (mips-linux-watch.o): New rule.
4624 (mips_linux_watch_h): New variable.
4625 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4626 srv_tgtobj.
4627 * linux-mips-low.c: Include mips-linux-watch.h.
4628 (struct arch_process_info, struct arch_lwp_info): New.
4629 (update_watch_registers_callback): New function.
4630 (mips_linux_new_process, mips_linux_new_thread) New functions.
4631 (mips_linux_prepare_to_resume, mips_insert_point): New
4632 functions.
4633 (mips_remove_point, mips_stopped_by_watchpoint): New
4634 functions.
4635 (rsp_bp_type_to_target_hw_bp_type): New function.
4636 (mips_stopped_data_address): New function.
4637 (the_low_target): Add watchpoint support functions.
4638
de6f69ad
YQ
46392013-07-27 Yao Qi <yao@codesourcery.com>
4640
4641 * i386-low.c: Include break-common.h.
4642 (enum target_hw_bp_type): Remove.
4643
3360c0bf
LM
46442013-07-24 Luis Machado <lgustavo@codesourcery.com>
4645
4646 * Makefile.in (SFILES): /common/target-common.c.
4647 (OBS): Add target-common.o.
4648 (server_h): Add $(srcdir)/../common/target-common.h.
4649 (target-common.o): New target.
4650 * server.c (queue_stop_reply_callback): Free
4651 status string after use.
4652 * target.c (target_waitstatus_to_string): Remove.
4653 * target.h: Include target-common.h.
4654 (resume_kind): Likewise.
4655 (target_waitkind): Likewise.
4656 (target_waitstatus): Likewise.
4657 (TARGET_WNOHANG): Likewise.
4658
bd885420
YQ
46592013-07-04 Yao Qi <yao@codesourcery.com>
4660
4661 * Makefile.in (host_alias): Use @host_noncanonical@.
4662 (target_alias): Use @target_noncanonical@.
4663 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4664 ACX_NONCANONICAL_HOST.
4665 * configure: Regenerated.
4666
4667 Revert:
4668 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4669
4670 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4671 * configure: Rebuild.
4672 * Makefile.in (version_host, version_target): Get from configure.
4673 (version.c): Use $(version_host) and $(version_target).
4674
17ef446e
PA
46752013-07-03 Pedro Alves <palves@redhat.com>
4676
4677 * Makefile.in (config.status): Depend on development.sh.
4678 * acinclude.m4: Include libmcheck.m4.
4679 * configure: Regenerate.
4680
7a9a7487
MG
46812013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4682
4683 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4684 attribute inside the parentheses.
4685 (winapi_DebugSetProcessKillOnExit): Ditto.
4686 (winapi_DebugBreakProcess): Ditto.
4687 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 4688
49b64de6
MG
46892013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4690
4691 * notif.h (notif_event): Add a dummy member to avoid compiler
4692 errors.
4693
d5749ee7
PA
46942013-07-01 Pedro Alves <palves@redhat.com>
4695
4696 * hostio.c (HOSTIO_PATH_MAX): Define.
4697 (require_filename, handle_open, handle_unlink, handle_readlink):
4698 Use it.
4699
d8d2a3ee
PA
47002013-07-01 Pedro Alves <palves@redhat.com>
4701
4702 * server.h: Include "pathmax.h".
4703 * linux-low.c: Don't include sys/param.h.
4704 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4705 MAXPATHLEN.
4706 * win32-low.c: Don't include sys/param.h.
4707 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4708
bc7dea8d
PA
47092013-07-01 Pedro Alves <palves@redhat.com>
4710
4711 * event-loop.c: Don't check HAVE_UNISTD_H before including
4712 <unistd.h>.
4713 * gdbreplay.c: Likewise.
4714 * remote-utils.c: Likewise.
4715 * server.c: Likewise.
4716 * configure.ac: Don't check for unistd.h.
4717 * configure: Regenerate.
4718
d6c2da54
TT
47192013-06-28 Tom Tromey <tromey@redhat.com>
4720
4721 * Makefile.in (version.c): Use version.in, not
4722 common/version.in.
4723
257b6bec
MG
47242013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4725
4726 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4727 * configure: Rebuild.
4728 * Makefile.in (version_host, version_target): Get from configure.
4729 (version.c): Use $(version_host) and $(version_target).
4730
86ebe149
DK
47312013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4732
4733 Fix trace-status to output user name without trailing colon.
4734 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4735
f30aa5af
DK
47362013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4737
4738 Fix trace-status to output proper start-time and stop-time.
4739 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4740 output start time and stop time in hex as gdb expects.
4741
28a93511
YQ
47422013-06-26 Pedro Alves <pedro@codesourcery.com>
4743
4744 * tracepoint.c (build_traceframe_info_xml): Output trace state
4745 variables present in the trace buffer.
4746
01208463
TT
47472013-06-24 Tom Tromey <tromey@redhat.com>
4748
4749 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4750 create-version.sh.
4751 (version.o): Remove.
4752 * gdbreplay.c: Include version.h.
4753 (version, host_name): Don't declare.
4754 * server.h: Include version.h.
4755 (version, host_name): Don't declare.
4756
760256f9
PA
47572013-06-12 Pedro Alves <palves@redhat.com>
4758
4759 * linux-x86-low.c (linux_is_elf64): Delete global.
4760 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4761 with local linux_pid_exe_is_elf_64_file use.
4762
030031ee
PA
47632013-06-11 Pedro Alves <palves@redhat.com>
4764
4765 * linux-low.c (regset_disabled, disable_regset): New functions.
4766 (regsets_fetch_inferior_registers)
4767 (regsets_store_inferior_registers): Use them.
4768 (initialize_regsets_info); Don't allocate the disabled_regsets
4769 array here.
4770 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4771 comment.
4772
5da6eb0a
PA
47732013-06-11 Pedro Alves <palves@redhat.com>
4774
4775 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4776 xmalloc.
4777
7e5aaa09
PA
47782013-06-11 Pedro Alves <palves@redhat.com>
4779
4780 * linux-x86-low.c (initialize_low_arch): Call
4781 init_registers_x32_avx_linux.
4782
d878444c
JK
47832013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4784
4785 Fix compatibility with Android Bionic.
4786 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4787 it is not empty.
4788
3aee8918
PA
47892013-06-07 Pedro Alves <palves@redhat.com>
4790
5f2b57b5 4791 PR server/14823
3aee8918
PA
4792 * Makefile.in (OBS): Add tdesc.o.
4793 (IPA_OBJS): Add tdesc-ipa.o.
4794 (tdesc-ipa.o): New rule.
4795 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4796 interface.
4797 * linux-low.c (new_inferior): Delete.
4798 (disabled_regsets, num_regsets): Delete.
4799 (linux_add_process): Adjust to set the new per-process
4800 new_inferior flag.
4801 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4802 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4803 was a stop. When calling arch_setup, switch the current inferior
4804 to the thread that got an event.
4805 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4806 (regsets_fetch_inferior_registers)
4807 (regsets_store_inferior_registers): New regsets_info parameter.
4808 Adjust to use it.
4809 (linux_register_in_regsets): New regs_info parameter. Adjust to
4810 use it.
4811 (register_addr, fetch_register, store_register): New usrregs_info
4812 parameter. Adjust to use it.
4813 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4814 parameter regs_info. Adjust to use it.
4815 (linux_fetch_registers): Get the current inferior's regs_info, and
4816 adjust to use it.
4817 (linux_store_registers): Ditto.
4818 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4819 (initialize_low): Don't initialize the target_regsets here. Call
4820 initialize_low_arch.
4821 * linux-low.h (target_regsets): Delete declaration.
4822 (struct regsets_info): New.
4823 (struct usrregs_info): New.
4824 (struct regs_info): New.
4825 (struct process_info_private) <new_inferior>: New field.
4826 (struct linux_target_ops): Delete the num_regs, regmap, and
4827 regset_bitmap fields. New field regs_info.
4828 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4829 * i387-fp.c (num_xmm_registers): Delete.
4830 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4831 calls to new interface.
4832 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4833 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4834 Infer the number of xmm registers from the regcache's target
4835 description.
4836 * i387-fp.h (num_xmm_registers): Delete.
4837 * inferiors.c (add_thread): Don't install the thread's regcache
4838 here.
4839 * proc-service.c (gregset_info): Fetch the current inferior's
4840 regs_info. Adjust to use it.
4841 * regcache.c: Include tdesc.h.
4842 (register_bytes, reg_defs, num_registers)
4843 (gdbserver_expedite_regs): Delete.
4844 (get_thread_regcache): If the thread doesn't have a regcache yet,
4845 create one, instead of aborting gdbserver.
4846 (regcache_invalidate_one): Rename to ...
4847 (regcache_invalidate_thread): ... this.
4848 (regcache_invalidate_one): New.
4849 (regcache_invalidate): Only invalidate registers of the current
4850 process.
4851 (init_register_cache): Add target_desc parameter, and use it.
4852 (new_register_cache): Ditto. Assert the target description has a
4853 non zero registers_size.
4854 (regcache_cpy): Add assertions. Adjust.
4855 (realloc_register_cache, set_register_cache): Delete.
4856 (registers_to_string, registers_from_string): Adjust.
4857 (find_register_by_name, find_regno, find_register_by_number)
4858 (register_cache_size): Add target_desc parameter, and use it.
4859 (free_register_cache_thread, free_register_cache_thread_one)
4860 (regcache_release, register_cache_size): New.
4861 (register_size): Add target_desc parameter, and use it.
4862 (register_data, supply_register, supply_register_zeroed)
4863 (supply_regblock, supply_register_by_name, collect_register)
4864 (collect_register_as_string, collect_register_by_name): Adjust.
4865 * regcache.h (struct target_desc): Forward declare.
4866 (struct regcache) <tdesc>: New field.
4867 (init_register_cache, new_register_cache): Add target_desc
4868 parameter.
4869 (regcache_invalidate_thread): Declare.
4870 (regcache_invalidate_one): Delete declaration.
4871 (regcache_release): Declare.
4872 (find_register_by_number, register_cache_size, register_size)
4873 (find_regno): Add target_desc parameter.
4874 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4875 declarations.
4876 * remote-utils.c: Include tdesc.h.
4877 (outreg, prepare_resume_reply): Adjust.
4878 * server.c: Include tdesc.h.
4879 (gdbserver_xmltarget): Delete declaration.
4880 (get_features_xml, process_serial_event): Adjust.
4881 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4882 declare.
4883 (struct process_info) <tdesc>: New field.
4884 (ipa_tdesc): Declare.
4885 * tdesc.c: New file.
4886 * tdesc.h: New file.
4887 * tracepoint.c: Include tdesc.h.
4888 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4889 (get_context_regcache): Adjust to pass ipa_tdesc down.
4890 (do_action_at_tracepoint): Adjust to get the register cache size
4891 from the context regcache's description.
4892 (traceframe_walk_blocks): Adjust to get the register cache size
4893 from the current trace frame's description.
4894 (traceframe_get_pc): Adjust to get current trace frame's
4895 description and pass it down.
4896 (gdb_collect): Adjust to get the register cache size from the
4897 IPA's description.
4898 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4899 (gdbserver_xmltarget): Delete.
4900 (initialize_low_tracepoint): Set the ipa's target description.
4901 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4902 (initialize_low_tracepoint): Set the ipa's target description.
4903 * linux-x86-low.c: Include tdesc.h.
4904 [__x86_64__] (is_64bit_tdesc): New.
4905 (ps_get_thread_area, x86_get_thread_area): Use it.
4906 (i386_cannot_store_register): Rename to ...
4907 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4908 (i386_cannot_fetch_register): Rename to ...
4909 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4910 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4911 to new interface.
4912 (target_regsets): Rename to ...
4913 (x86_regsets): ... this.
4914 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4915 interface.
4916 (x86_siginfo_fixup): Use is_64bit_tdesc.
4917 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4918 (tdesc_x32_avx_linux, tdesc_x32_linux)
4919 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4920 Declare.
4921 (x86_linux_update_xmltarget): Delete.
4922 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4923 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4924 (AMD64_LINUX_USER64_CS): New.
4925 (x86_linux_read_description): New, based on
4926 x86_linux_update_xmltarget.
4927 (same_process_callback): New.
4928 (x86_arch_setup_process_callback): New.
4929 (x86_linux_update_xmltarget): New.
4930 (x86_regsets_info): New.
4931 (amd64_linux_regs_info): New.
4932 (i386_linux_usrregs_info): New.
4933 (i386_linux_regs_info): New.
4934 (x86_linux_regs_info): New.
4935 (x86_arch_setup): Reimplement.
4936 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4937 (x86_emit_ops): Ditto.
4938 (the_low_target): Adjust. Install x86_linux_regs_info,
4939 x86_cannot_fetch_register, and x86_cannot_store_register.
4940 (initialize_low_arch): New.
4941 * linux-ia64-low.c (tdesc_ia64): Declare.
4942 (ia64_fetch_register): Adjust.
4943 (ia64_usrregs_info, regs_info): New globals.
4944 (ia64_regs_info): New function.
4945 (the_low_target): Adjust.
4946 (initialize_low_arch): New function.
4947 * linux-sparc-low.c (tdesc_sparc64): Declare.
4948 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4949 Adjust.
4950 (sparc_arch_setup): New function.
4951 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4952 (the_low_target): Adjust.
4953 (initialize_low_arch): New function.
4954 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4955 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4956 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4957 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4958 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4959 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4960 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4961 (tdesc_powerpc_isa205_vsx64l): Declare.
4962 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4963 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4964 (ppc_set_pc, ppc_get_hwcap): Adjust.
4965 (ppc_usrregs_info): Forward declare.
4966 (!__powerpc64__) ppc_regmap_adjusted: New global.
4967 (ppc_arch_setup): Adjust to the current process'es target
4968 description.
4969 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4970 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4971 (ppc_store_evrregset): Adjust.
4972 (target_regsets): Rename to ...
4973 (ppc_regsets): ... this, and make static.
4974 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4975 (ppc_regs_info): New function.
4976 (the_low_target): Adjust.
4977 (initialize_low_arch): New function.
4978 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4979 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4980 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4981 (tdesc_s390x_linux64v2): Declare.
4982 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4983 (s390_fill_gregset, s390_store_last_break): Adjust.
4984 (target_regsets): Rename to ...
4985 (s390_regsets): ... this, and make static.
4986 (s390_get_pc, s390_set_pc): Adjust.
4987 (s390_get_hwcap): New target_desc parameter, and use it.
4988 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4989 (s390_arch_setup): Adjust to set the current process'es target
4990 description. Don't adjust the regmap.
4991 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4992 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4993 (regs_info_3264): New globals.
4994 (s390_regs_info): New function.
4995 (the_low_target): Adjust.
4996 (initialize_low_arch): New function.
4997 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4998 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4999 [__mips64] (init_registers_mips_linux)
5000 (init_registers_mips_dsp_linux): Delete defines.
5001 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5002 (have_dsp): New global.
5003 (mips_read_description): New, based on mips_arch_setup.
5004 (mips_arch_setup): Reimplement.
5005 (get_usrregs_info): New function.
5006 (mips_cannot_fetch_register, mips_cannot_store_register)
5007 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5008 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5009 (target_regsets): Rename to ...
5010 (mips_regsets): ... this, and make static.
5011 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5012 (dsp_regs_info, regs_info): New globals.
5013 (mips_regs_info): New function.
5014 (the_low_target): Adjust.
5015 (initialize_low_arch): New function.
5016 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5017 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5018 Declare.
5019 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5020 (arm_read_description): New, with bits factored from
5021 arm_arch_setup.
5022 (arm_arch_setup): Reimplement.
5023 (target_regsets): Rename to ...
5024 (arm_regsets): ... this, and make static.
5025 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5026 (arm_regs_info): New function.
5027 (the_low_target): Adjust.
5028 (initialize_low_arch): New function.
5029 * linux-m68k-low.c (tdesc_m68k): Declare.
5030 (target_regsets): Rename to ...
5031 (m68k_regsets): ... this, and make static.
5032 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5033 (m68k_regs_info): New function.
5034 (m68k_arch_setup): New function.
5035 (the_low_target): Adjust.
5036 (initialize_low_arch): New function.
5037 * linux-sh-low.c (tdesc_sharch): Declare.
5038 (target_regsets): Rename to ...
5039 (sh_regsets): ... this, and make static.
5040 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5041 (sh_regs_info, sh_arch_setup): New functions.
5042 (the_low_target): Adjust.
5043 (initialize_low_arch): New function.
5044 * linux-bfin-low.c (tdesc_bfin): Declare.
5045 (bfin_arch_setup): New function.
5046 (bfin_usrregs_info, regs_info): New globals.
5047 (bfin_regs_info): New function.
5048 (the_low_target): Adjust.
5049 (initialize_low_arch): New function.
5050 * linux-cris-low.c (tdesc_cris): Declare.
5051 (cris_arch_setup): New function.
5052 (cris_usrregs_info, regs_info): New globals.
5053 (cris_regs_info): New function.
5054 (the_low_target): Adjust.
5055 (initialize_low_arch): New function.
5056 * linux-cris-low.c (tdesc_crisv32): Declare.
5057 (cris_arch_setup): New function.
5058 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5059 (cris_regs_info): New function.
5060 (the_low_target): Adjust.
5061 (initialize_low_arch): New function.
5062 * linux-m32r-low.c (tdesc_m32r): Declare.
5063 (m32r_arch_setup): New function.
5064 (m32r_usrregs_info, regs_info): New globals.
5065 (m32r_regs_info): Adjust.
5066 (initialize_low_arch): New function.
5067 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5068 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5069 (tic6x_usrregs_info): Forward declare.
5070 (tic6x_read_description): New function, based on ...
5071 (tic6x_arch_setup): ... this. Reimplement.
5072 (target_regsets): Rename to ...
5073 (tic6x_regsets): ... this, and make static.
5074 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5075 (tic6x_regs_info): New function.
5076 (the_low_target): Adjust.
5077 (initialize_low_arch): New function.
5078 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5079 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5080 (target_regsets): Rename to ...
5081 (xtensa_regsets): ... this, and make static.
5082 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5083 globals.
5084 (xtensa_arch_setup, xtensa_regs_info): New functions.
5085 (the_low_target): Adjust.
5086 (initialize_low_arch): New function.
5087 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5088 (nios2_arch_setup): Set the current process'es tdesc.
5089 (target_regsets): Rename to ...
5090 (nios2_regsets): ... this.
5091 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5092 (nios2_regs_info): New function.
5093 (the_low_target): Adjust.
5094 (initialize_low_arch): New function.
a261b8f5
PA
5095 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5096 (aarch64_arch_setup): Set the current process'es tdesc.
5097 (target_regsets): Rename to ...
5098 (aarch64_regsets): ... this.
5099 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5100 (aarch64_regs_info): New function.
5101 (the_low_target): Adjust.
5102 (initialize_low_arch): New function.
3aee8918
PA
5103 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5104 globals.
5105 (target_regsets): Rename to ...
5106 (tile_regsets): ... this.
5107 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5108 (tile_regs_info): New function.
5109 (tile_arch_setup): Set the current process'es tdesc.
5110 (the_low_target): Adjust.
5111 (initialize_low_arch): New function.
5112 * spu-low.c (tdesc_spu): Declare.
5113 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5114 * win32-arm-low.c (tdesc_arm): Declare.
5115 (arm_arch_setup): New function.
5116 (the_low_target): Install arm_arch_setup instead of
5117 init_registers_arm.
5118 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5119 (init_windows_x86): Rename to ...
5120 (i386_arch_setup): ... this. Set `win32_tdesc'.
5121 (the_low_target): Adjust.
5122 * win32-low.c (win32_tdesc): New global.
5123 (child_add_thread): Don't create the thread cache here.
5124 (do_initial_child_stuff): Set the new process'es tdesc.
5125 * win32-low.h (struct target_desc): Forward declare.
5126 (win32_tdesc): Declare.
5127 * lynx-i386-low.c (tdesc_i386): Declare global.
5128 (lynx_i386_arch_setup): Set `lynx_tdesc'.
5129 * lynx-low.c (lynx_tdesc): New global.
5130 (lynx_add_process): Set the new process'es tdesc.
5131 * lynx-low.h (struct target_desc): Forward declare.
5132 (lynx_tdesc): Declare global.
5133 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5134 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5135 * nto-low.c (nto_tdesc): New global.
5136 (do_attach): Set the new process'es tdesc.
5137 * nto-low.h (struct target_desc): Forward declare.
5138 (nto_tdesc): Declare.
5139 * nto-x86-low.c (tdesc_i386): Declare.
5140 (nto_x86_arch_setup): Set `nto_tdesc'.
5141
b1fbec62
GB
51422013-06-04 Gary Benson <gbenson@redhat.com>
5143
5144 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5145 to qSupported response when appropriate.
5146 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5147 with nonzero-length annex.
5148 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5149 arguments supplied in annex.
5150
d1ec4ce7
DE
51512013-05-31 Doug Evans <dje@google.com>
5152
ac44adcb 5153 PR server/15594
d1ec4ce7
DE
5154 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5155 64 bits in 64-cross-32 environment.
5156
9b25f2d3
PA
51572013-05-28 Pedro Alves <palves@redhat.com>
5158
5159 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5160 (aarch64-without-fpu.c): Delete rule.
5161 * configure.srv (aarch64*-*-linux*): Remove references to
5162 aarch64-without-fpu.o and aarch64-without-fpu.xml.
5163 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5164 declaration.
5165
6740dc9c
PA
51662013-05-24 Pedro Alves <palves@redhat.com>
5167
5168 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5169 instead of strchr/decode_address. Error if the range isn't split
5170 with a ','. Don't assume there's be a ':' in the action.
5171
c2d6af84
PA
51722013-05-23 Yao Qi <yao@codesourcery.com>
5173 Pedro Alves <palves@redhat.com>
5174
5175 * linux-low.c (lwp_in_step_range): New function.
5176 (linux_wait_1): If the thread was range stepping and stopped
5177 outside the stepping range, report the stop to GDB. Otherwise,
5178 continue stepping. Add range stepping debug output.
5179 (linux_set_resume_request): Copy the step range from the resume
5180 request to the lwp.
5181 (linux_supports_range_stepping): New.
5182 (linux_target_ops) <supports_range_stepping>: Set to
5183 linux_supports_range_stepping.
5184 * linux-low.h (struct linux_target_ops)
5185 <supports_range_stepping>: New field.
5186 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5187 * linux-x86-low.c (x86_supports_range_stepping): New.
5188 (the_low_target) <supports_range_stepping>: Set to
5189 x86_supports_range_stepping.
5190 * server.c (handle_v_cont): Handle 'r' action.
5191 (handle_v_requests): Append ";r" if the target supports range
5192 stepping.
5193 * target.h (struct thread_resume) <step_range_start,
5194 step_range_end>: New fields.
5195 (struct target_ops) <supports_range_stepping>:
5196 New field.
5197 (target_supports_range_stepping): New macro.
5198
58794e1a
JB
51992013-05-17 Joel Brobecker <brobecker@adacore.com>
5200
5201 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5202 confusion in comment.
5203
d631c5a7
JB
52042013-05-17 Joel Brobecker <brobecker@adacore.com>
5205
5206 * lynx-low.c (struct process_info_private): New type.
5207 (lynx_add_process): New function.
5208 (lynx_create_inferior, lynx_attach): Replace calls to
5209 add_process by calls to lynx_add_process.
5210 (lynx_resume): If PTID is null, then try using
5211 current_process()->private->last_wait_event_ptid.
5212 Add comments.
5213 (lynx_clear_inferiors): Delete. The contents of that function
5214 has been inlined in lynx_mourn;
5215 (lynx_wait_1): Save the ptid in the process's private data.
5216 (lynx_mourn): Free the process' private data. Replace call
5217 to lynx_clear_inferiors by call to clear_inferiors.
5218
96f7a20f
YQ
52192013-05-17 Yao Qi <yao@codesourcery.com>
5220
5221 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5222 the right place.
5223
db0dfaa0
LM
52242013-05-16 Luis Machado <lgustavo@codesourcery.com>
5225
5226 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5227 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5228 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5229 PT_TEXT_END_ADDR guards. Update comments.
5230 (linux_target_op) <read_offsets>: Conditionally define to
5231 linux_read_offsets if the target is UCLIBC and if it defines
5232 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5233
68f5f838
SL
52342013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5235 Andrew Jenner <andrew@codesourcery.com>
5236
5237 * Makefile.in (SFILES): Add linux-nios2-low.c.
5238 (clean): Add action to delete nios2-linux.c.
5239 (nios2-linux.c): New rule.
5240 * configure.srv: Add nios2*-*-linux*.
5241 * linux-nios2-low.c: New.
5242
1ebff1fd
HAQ
52432013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5244
5245 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5246
f6150862
HZ
52472013-04-25 Hui Zhu <hui@codesourcery.com>
5248
5249 PR gdb/15186
f6150862
HZ
5250 * ax.c (ax_printf): Add fflush.
5251
614c279d
TT
52522013-04-22 Tom Tromey <tromey@redhat.com>
5253
5254 * Makefile.in (SFILES): Add filestuff.c.
5255 (OBS): Add filestuff.o.
5256 (filestuff.o): New target.
5257 * config.in, configure: Rebuild.
5258 * configure.ac: Check for fdwalk, pipe2.
5259
7d4e5717
PA
52602013-04-17 Pedro Alves <palves@redhat.com>
5261
5262 * configure.ac (USE_THREAD_DB): Delete variable.
5263 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5264 Don't AC_SUBST USE_THREAD_DB.
5265 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5266 * config.in, configure: Regenerate.
5267
d5c93e41
PA
52682013-04-16 Pedro Alves <palves@redhat.com>
5269
5270 * linux-low.h (struct lwp_info) <thread_known>: Move under
5271 the USE_THREAD_DB #ifdef.
5272
04f5fe89
PA
52732013-04-16 Pedro Alves <palves@redhat.com>
5274
5275 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5276 (linux-low.o): Delete rule.
5277 * linux-low.h: Always include "gdb_thread_db.h" instead of
5278 conditionally including thread_db.h.
5279 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5280 HAVE_THREAD_DB_H.
5281
480b27bf
JK
52822013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5283
5284 * Makefile.in (install-only): Fix make install regression.
5285
43662968
JK
52862013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5287
5288 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5289 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5290 installation.
5291 * gdbserver.1: Remove.
5292
3e74e146
PA
52932013-03-22 Pedro Alves <palves@redhat.com>
5294
5295 * linux-low.c (handle_extended_wait): Don't call
5296 linux_enable_event_reporting.
5297
a8347a2a
TT
52982013-03-15 Tony Theodore <tonyt@logyst.com>
5299
5300 PR build/9098:
5301 * Makefile.in (SHELL): Use @SHELL@.
5302
eeb56fa7
SDJ
53032013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5304
5305 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5306 compiler warning.
5307
4fa7e2ff
JB
53082013-03-13 Joel Brobecker <brobecker@adacore.com>
5309
5310 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5311 Remove extraneous NULL element.
5312
8ddb1965
YQ
53132013-03-13 Yao Qi <yao@codesourcery.com>
5314
5315 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5316 'V' block in trace frame.
5317
9accd112
MM
53182013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5319
5320 * target.h (struct target_ops): Add btrace ops.
5321 (target_supports_btrace): New macro.
5322 (target_enable_btrace): New macro.
5323 (target_disable_btrace): New macro.
5324 (target_read_btrace): New macro.
5325 * gdbthread.h (struct thread_info): Add btrace field.
5326 * server.c: Include btrace-common.h.
5327 (handle_btrace_general_set): New function.
5328 (handle_btrace_enable): New function.
5329 (handle_btrace_disable): New function.
5330 (handle_general_set): Call handle_btrace_general_set.
5331 (handle_qxfer_btrace): New function.
5332 (struct qxfer qxfer_packets[]): Add btrace entry.
5333 * inferiors.c (remove_thread): Disable btrace.
5334 * linux-low: Include linux-btrace.h.
5335 (linux_low_enable_btrace): New function.
5336 (linux_low_read_btrace): New function.
5337 (linux_target_ops): Add btrace ops.
5338 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5339 Add srv_linux_btrace=yes.
5340 (x86_64-*-linux*): Add linux-btrace.o.
5341 Add srv_linux_btrace=yes.
5342 * configure.ac: Define HAVE_LINUX_BTRACE.
5343 * config.in: Regenerated.
5344 * configure: Regenerated.
5345
5cc22e4c
MM
53462013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5347
5348 * server.c (handle_qxfer): Preserve error message if -3 is
5349 returned.
5350 (qxfer): Document the -3 return value.
5351
7c97f91e
MM
53522013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5353
5354 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5355 (linux_btrace_h): New variable.
5356 (linux-btrace.o): New rule.
5357
be9a119c 53582013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
5359 Hafiz Abid Qadeer <abidh@codesourcery.com>
5360
5361 * tracepoint.c (trace_buffer_size): New global.
5362 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5363 (init_trace_buffer): Change to one-argument function. Allocate
5364 trace buffer memory.
5365 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5366 handle QTBuffer:size packet.
5367 (cmd_bigqtbuffer_size): New function.
5368 (initialize_tracepoint): Call init_trace_buffer with
5369 DEFAULT_TRACE_BUFFER_SIZE.
5370 * server.c (handle_query): Add QTBuffer:size in the
5371 supported packets.
5372
e64f7499
YQ
53732013-03-07 Yao Qi <yao@codesourcery.com>
5374
5375 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5376 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5377 of -1.
5378 (cmd_qtsp): Adjust condition. Do post increment.
5379 Set cur_action and cur_step_action back to 0.
5380
f0ae6fc3
PA
53812013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5382
5383 PR server/15236
5384 * linux-low.c (linux_write_memory): Return early success if LEN is
5385 zero.
5386
b5b0b0af
CV
53872013-03-05 Corinna Vinschen <vinschen@redhat.de>
5388
334ad4a8 5389 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 5390
589bc927
TT
53912013-02-28 Tom Tromey <tromey@redhat.com>
5392
5393 * configure.ac: Invoke AC_SYS_LARGEFILE.
5394 * configure, config.in: Rebuild.
5395
dfe07582
CV
53962013-02-28 Corinna Vinschen <vinschen@redhat.com>
5397
5398 * win32-low.c: Throughout, fix format strings and casts of
5399 printf-like functions to avoid type related warnings on all
5400 platforms.
5401 (get_child_debug_event): Print dwDebugEventCode as hex since
5402 that's how it's usually documented.
5403
736cd585
YQ
54042013-02-28 Yao Qi <yao@codesourcery.com>
5405
5406 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5407 pulongest.
5408
e1f58301
JW
54092013-02-27 Jiong Wang <jiwang@tilera.com>
5410
5411 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5412 (reg-tilegx32.c): New rule.
5413 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5414 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5415 different register info initializer according to elf class.
5416 (init_registers_tilgx32): New function. The tilegx32 register info
5417 initializer.
5418 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5419 (tile_store_gregset): Likewise.
5420
d171ca78
YQ
54212013-02-27 Yao Qi <yao@codesourcery.com>
5422
5423 * server.c (process_point_options): Print debug message when
5424 debug_threads is true.
5425
282bbdf3
YQ
54262013-02-26 Yao Qi <yao@codesourcery.com>
5427
5428 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5429
aca22551
PA
54302013-02-19 Pedro Alves <palves@redhat.com>
5431 Kai Tietz <ktietz@redhat.com>
5432
5433 PR gdb/15161
5434
5435 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5436 instead of strtoul to extract address from packet.
5437 (process_serial_event) <'z'>: Likewise.
5438
4f3cee1c
YQ
54392013-02-18 Yao Qi <yao@codesourcery.com>
5440
5441 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5442
8e1d55a3
PA
54432013-02-14 Pedro Alves <palves@redhat.com>
5444
5445 Plug memory leak.
5446
5447 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5448 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5449
458820da
PA
54502013-02-14 Pedro Alves <palves@redhat.com>
5451
5452 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5453
baea0dae
PA
54542013-02-14 Pedro Alves <palves@redhat.com>
5455
5456 * tracepoint.c (save_string): Delete.
5457 (add_tracepoint_action): Use savestring instead of save_string.
5458
0b1afbb3
PA
54592013-02-12 Pedro Alves <palves@redhat.com>
5460
5461 * linux-xtensa-low.c: Ditto.
5462 * xtensa-xtregs.c: Ditto.
5463
8a4ac37e
PA
54642013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5465
5466 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5467 thread_db.
5468
148de6bb
MS
54692013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5470
5471 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5472 aarch64_num_wp_regs and aarch64_num_bp_regs to
5473 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5474
55fac6e0
MS
54752013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5476
5477 * linux-aarch64-low.c (ps_get_thread_area): Replace
5478 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5479
176eb98c
MS
54802013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5481 Marcus Shawcroft <marcus.shawcroft@arm.com>
5482 Nigel Stephens <nigel.stephens@arm.com>
5483 Yufeng Zhang <yufeng.zhang@arm.com>
5484
5485 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5486 (aarch64.c, aarch64-without-fpu.c): New targets.
5487 * configure.srv (aarch64*-*-linux*): New.
5488 * linux-aarch64-low.c: New file.
5489
56f7af9c
MS
54902013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5491
43aaf8b6 5492 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5493 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5494 (dequeue_one_deferred_signal, linux_resume_one_thread)
5495 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5496 (linux_tracefork_grandchild, linux_test_for_tracefork)
5497 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5498 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5499 where the argument is 0.
5500
60f662b0
YQ
55012013-01-25 Yao Qi <yao@codesourcery.com>
5502
5503 * event-loop.c: Include "queue.h".
5504 (gdb_event_p): New typedef.
5505 (struct gdb_event) <next_event>: Remove.
5506 (event_queue): Change to QUEUE(gdb_event_p).
5507 (async_queue_event): Remove.
5508 (gdb_event_xfree): New.
5509 (initialize_event_loop): New.
5510 (process_event): Use API from QUEUE.
5511 (wait_for_event): Likewise.
5512 * server.c (main): Call initialize_event_loop.
5513 * server.h (initialize_event_loop): Declare.
5514
5ae4861a
YQ
55152013-01-18 Yao Qi <yao@codesourcery.com>
5516
5517 * ax.h (struct eval_agent_expr_context): New.
5518 (gdb_eval_agent_expr): Update declaration.
5519 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5520 TFRAME. Add new argument CTX.
5521 * server.h (struct eval_agent_expr_context): Declare.
5522 (agent_mem_read, agent_tsv_read): Update declaration.
5523 (agent_mem_read_string): Likewise.
5524 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5525 (add_traceframe_block): Add new argument TPOINT.
5526 Increase TPOINT->traceframe_usage.
5527 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5528 eval_tracepoint_agent_expr.
5529 (condition_true_at_tracepoint): Likewise.
5530 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5531 (agent_mem_read_string, agent_tsv_read): Likewise.
5532
85e00e85
YQ
55332013-01-16 Yao Qi <yao@codesourcery.com>
5534
5535 * linux-low.c (linux_resume_one_lwp): Don't check
5536 'lwp->bp_reinsert != 0'.
5537
4039cf45
JB
55382013-01-07 Joel Brobecker <brobecker@adacore.com>
5539 Pedro Alves <palves@redhat.com>
5540
5541 * lynx-low.c (ptrace_request_to_str): Define a temporary
5542 macro and use it to simplify this function's implementation.
5543
9044dee2
JB
55442013-01-07 Joel Brobecker <brobecker@adacore.com>
5545
5546 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5547 sets errno.
5548
e6352c8f
JB
55492013-01-07 Joel Brobecker <brobecker@adacore.com>
5550
5551 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5552
50681a27
JB
55532013-01-07 Joel Brobecker <brobecker@adacore.com>
5554
5555 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5556
3f6e77ef
JB
55572013-01-07 Joel Brobecker <brobecker@adacore.com>
5558
5559 * lynx-low.c (lynx_resume): Use the resume_info parameter
5560 to determine the ptid for the lynx_ptrace call, unless
5561 it is equal to minus_one_ptid, in which case we use the
5562 ptid of the current_inferior.
5563 (lynx_wait_1): After having received a thread create/exit
5564 event, resume the inferior's execution using the signaling
5565 thread's ptid, rather than the old ptid.
5566
7fda33ae
JB
55672013-01-07 Joel Brobecker <brobecker@adacore.com>
5568
5569 * lynx-low.c (lynx_resume): Delete variable ret.
5570
b9786c74
JB
55712013-01-01 Joel Brobecker <brobecker@adacore.com>
5572
5573 * gdbreplay.c (gdbreplay_version): Update copyright year.
5574 * server.c (gdbserver_version): Likewise.
5575
8b93d60f
JB
55762012-12-17 Joel Brobecker <brobecker@adacore.com>
5577
5578 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5579 new thread.
5580
037335a7
JB
55812012-12-17 Joel Brobecker <brobecker@adacore.com>
5582
5583 * lynx-low.c (ptrace_request_to_str): Add handling for
5584 PTRACE_GETTRACESIG.
5585
52d4cbd8
JB
55862012-12-17 Joel Brobecker <brobecker@adacore.com>
5587
5588 * lynx-low.c (lynx_attach): Delete variable new_process.
5589
ab8f6ca9
JB
55902012-12-17 Joel Brobecker <brobecker@adacore.com>
5591
5592 * lynx-low.c (lynx_create_inferior): Delete variable
5593 new_process.
5594
78cbc024
JB
55952012-12-17 Joel Brobecker <brobecker@adacore.com>
5596
5597 * lynx-low.c (ptrace_request_to_str): Do not handle
5598 PTRACE_GETTHREADLIST if this macro does not exist.
5599
14a00470
YQ
56002012-12-15 Yao Qi <yao@codesourcery.com>
5601
5602 * Makefile.in (OBS): Add notif.o.
5603 * notif.c, notif.h: New.
5604 * server.c: Include "notif.h".
5605 (struct vstop_notif) <next>: Remove.
5606 <base>: New field.
5607 (queue_stop_reply): Update.
5608 (push_event, send_next_stop_reply): Remove.
5609 (discard_queued_stop_replies): Update.
5610 (notif_stop): New variable.
5611 (handle_v_stopped): Remove.
5612 (handle_v_requests): Don't call handle_v_stopped. Call
5613 handle_ack_notif instead.
5614 (queue_stop_reply_callback): Call notif_event_enque instead
5615 of queue_stop_reply.
5616 (handle_status): Don't call send_next_stop_reply, call
5617 notif_write_event instead.
5618 (kill_inferior_callback): Likewise.
5619 (detach_or_kill_inferior_callback): Likewise.
5620 (main): Call initialize_notif.
5621 (process_serial_event): Call QUEUE_is_empty.
5622 (handle_target_event): Call notif_push instead of push event.
5623 * server.h (push_event): Remove declaration.
5624
61c125b9
TT
56252012-12-10 Tom Tromey <tromey@redhat.com>
5626
5627 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5628 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5629 macros.
5630 (.c.o): Rewrite.
5631 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5632 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5633 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5634 (amd64-linux-ipa.o, ax.o): Rewrite.
5635 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5636 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5637 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5638 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5639 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5640 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5641 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5642 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5643 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5644 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5645 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5646 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5647 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5648 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5649 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5650 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5651 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5652 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5653 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5654 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5655 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5656 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5657 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5658 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5659 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5660 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5661 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5662 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5663 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5664 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5665 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5666 (reg-tilegx.o): Remove.
5667 (all_object_files): New macro.
5668 Include .deps files.
5669 * aclocal.m4, configure: Rebuild.
5670 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5671 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5672 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5673
e90e9ad9
TT
56742012-12-05 Tom Tromey <tromey@redhat.com>
5675
5676 PR gdb/14917:
5677 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5678
02d403bf 56792012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
5680
5681 * configure.ac: Check for linux/perf_event.h.
5682 * config.in: Regenerated.
5683 * configure: Regenerated.
5684
0270a750
PA
56852012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5686
5687 * hostio.c (handle_readlink): Decrease buffer size
5688 parameter passed to readlink by one byte.
5689
8c29b58e
YQ
56902012-11-26 Yao Qi <yao@codesourcery.com>
5691
5692 * configure.ac (build_warnings): Append '-Wempty-body'.
5693 * configure: Regenerated.
5694 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5695 body.
5696
8bdce1ff
PM
56972012-11-15 Pierre Muller <muller@sourceware.org>
5698
5699 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5700 * config.in: Regenerate.
5701 * configure: Regenerate.
5702 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5703 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5704 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5705 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5706 header.
5707 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5708 instead of <sys/wait.h> header.
5709 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5710
02d403bf 57112012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
5712
5713 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5714 (various make rules): Remove -DGDBSERVER
5715
fbd5db48
YQ
57162012-11-09 Yao Qi <yao@codesourcery.com>
5717
5718 * spu-low.c (current_ptid): Move it to ..
5719 * gdbthread.h: ... here. New.
5720 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5721 * server.c (myresume, process_serial_event): Likewise.
5722 * thread-db.c (thread_db_find_new_threads): Likewise.
5723 * tracepoint.c (run_inferior_command): Likewise.
5724
b3dc46ff
AB
57252012-10-01 Andrew Burgess <aburgess@broadcom.com>
5726
5727 * server.c (handle_search_memory_1): Include access length in
5728 warning message.
5729
07c04788
HPN
57302012-09-05 Michael Brandt <michael.brandt@axis.com>
5731
5732 * linux-crisv32-low.c: Fix compile errors.
5733
918d227b
YQ
57342012-09-04 Yao Qi <yao@codesourcery.com>
5735
5736 * tracepoint.c (cmd_qtsv): Adjust debug message.
5737 Don't check CUR_TPOINT.
5738
18c1b81a
YQ
57392012-08-28 Yao Qi <yao@codesourcery.com>
5740
5741 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5742 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5743 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5744 Remove declarations of xmalloc, xreallloc, xstrdup and
5745 freeargv.
5746 * Makefile.in (libiberty_h): New.
5747 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5748 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5749
dc82f37b
YQ
57502012-08-23 Yao Qi <yao@codesourcery.com>
5751
5752 * server.h: Remove declaration of 'xsnprintf'.
5753
406b1477
KS
57542012-08-22 Keith Seitz <keiths@redhat.com>
5755
5756 * server.h: Include build-gnulib-gbserver/config.h.
5757 * gdbreplay.c: Likewise.
5758
e6712ff1
DE
57592012-08-08 Doug Evans <dje@google.com>
5760
5761 * Makefile.in (SFILES): Add gdb_vecs.c.
5762 (OBS): Add gdb_vecs.o.
5763 (gdb_vecs_h, host_defs_h): New variables.
5764 (thread-db.o): Add $(gdb_vecs_h) dependency.
5765 (gdb_vecs.o): New rule.
5766 * thread-db.c: #include "gdb_vecs.h".
5767 (thread_db_load_search): Use a vector to iterate over path elements.
5768 Handle text appearing after "$pdir".
5769
5770 * configure.ac: Add check for strstr.
5771 * config.in: Regenerate.
5772 * configure: Regenerate.
5773
7c3270ae
UW
57742012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5775
5776 * hostio.c (handle_pread): If pread fails, fall back to attempting
5777 lseek/read.
5778 (handle_pwrite): Likewise for pwrite.
5779
b62e2b27
UW
57802012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5781
5782 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5783 between unsupported TYPE and unimplementable ADDR/LEN combination.
5784 (arm_insert_point): Act on new return value.
5785
78a99e91
PA
57862012-07-31 Pedro Alves <palves@redhat.com>
5787
5788 * server.c (process_point_options): Only skip tokens if we find
5789 one that is unrecognized. Don't treat 'X' specially while
5790 skipping unrecognized tokens.
5791
fcf303ab
UW
57922012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5793
5794 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5795 to 4-byte-align HW breakpoint addresses for Thumb.
5796
7255706c
YQ
57972012-07-27 Yao Qi <yao@codesourcery.com>
5798
5799 PR remote/14161.
5800
5801 * server.h: Declare gdb_agent_about_to_close.
5802 * target.c (kill_inferior): Include "agent.h".
5803 New. Send command 'kill'.
5804 * target.h (kill_inferior): Removed macro.
5805 * tracepoint.c (gdb_agent_about_to_close): New.
5806 (gdb_agent_helper_thread): Handle command 'close'.
5807 Wait endlessly until the inferior stops.
5808 Install gdb_agent_remove_socket to atexit hook.
5809 (agent_socket_name): New static variable.
5810 (gdb_agent_socket_init): Replace local variable 'name' with
5811 'agent_socket_name'.
5812 (gdb_agent_remove_socket): New.
5813
5a3f286f
YQ
58142012-07-27 Yao Qi <yao@codesourcery.com>
5815
5816 * server.c (process_point_options): Stop at 'X' when parsing.
5817
961bd387
ME
58182012-07-19 Michael Eager <eager@eagercon.com>
5819
a261b8f5 5820 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
5821 to hw_execute.
5822 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5823 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5824 hardware breakpoint.
5825
aa7c7447
JK
58262012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5827
5828 * gdbserver/linux-low.c (initialize_low): Call
5829 linux_ptrace_init_warnings.
5830
7f216e7c
DE
58312012-07-02 Doug Evans <dje@google.com>
5832
5833 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5834 pointer to int.
5835
d3ce09f5
SS
58362012-07-02 Stan Shebs <stan@codesourcery.com>
5837
5838 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5839 (ax.o): Add it to build rule.
5840 (ax-ipa.o): Ditto.
5841 (OBS): Add format.o.
5842 (IPA_OBS): Add format.o.
5843 * server.c (handle_query): Claim support for breakpoint commands.
5844 (process_point_options): Add command case.
5845 (process_serial_event): Leave running if there are printfs in
5846 effect.
5847 * mem-break.h (any_persistent_commands): Declare.
5848 (add_breakpoint_commands): Declare.
5849 (gdb_no_commands_at_breakpoint): Declare.
5850 (run_breakpoint_commands): Declare.
5851 * mem-break.c (struct point_command_list): New struct.
5852 (struct breakpoint): New field command_list.
5853 (any_persistent_commands): New function.
5854 (add_commands_to_breakpoint): New function.
5855 (add_breakpoint_commands): New function.
5856 (gdb_no_commands_at_breakpoint): New function.
5857 (run_breakpoint_commands): New function.
5858 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5859 locally.
5860 * ax.c: Include format.h.
5861 (ax_printf): New function.
5862 (gdb_eval_agent_expr): Add printf opcode.
5863
2f8f6aed
YQ
58642012-06-13 Yao Qi <yao@codesourcery.com>
5865
5866 * server.c (start_inferior): Remove duplicated writes to fields
5867 'last_resume_kind' and 'last_status' of 'current_inferior'.
5868
0c9070b3
YQ
58692012-06-12 Yao Qi <yao@codesourcery.com>
5870 Pedro Alves <palves@redhat.com>
5871
5872 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5873 comment.
5874 * server.c (handle_v_cont): Extend comment.
5875
c52daf70
YQ
58762012-06-11 Yao Qi <yao@codesourcery.com>
5877
5878 * linux-low.c (linux_attach): Add 'static'.
5879
d38bbb0a
YQ
58802012-06-06 Yao Qi <yao@codesourcery.com>
5881
5882 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5883
89dc0afd
JK
58842012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5885
5886 Fix gcc -flto compilation warning.
5887 * server.c (main): Make variable multi_mode and attach volatile.
5888
75f62ce7
TJB
58892012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5890
5891 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5892 if the platform doesn't know about it.
5893
65f479b6
PA
58942012-05-30 Jeff Kenton <jkenton@tilera.com>
5895
5896 * Makefile.in (SFILES): Add linux-tile-low.c.
5897 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5898 * configure.srv: Handle tilegx-*-linux*.
5899 * linux-tile-low.c: New file.
5900
0c5bf5a9
JK
59012012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5902
5903 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5904
a493e3e2
PA
59052012-05-24 Pedro Alves <palves@redhat.com>
5906
5907 PR gdb/7205
5908
43aaf8b6 5909 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 5910
2ea28649
PA
59112012-05-24 Pedro Alves <palves@redhat.com>
5912
5913 PR gdb/7205
5914
5915 Replace target_signal with gdb_signal throughout.
5916
8d409d16
MR
59172012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5918
5919 * linux-low.c (linux_store_registers): Avoid the copying sequence
5920 when no data has been retrieved by ptrace.
5921
23512c01
MGD
59222012-05-22 Will Deacon <will.deacon@arm.com>
5923
5924 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5925 Include asm/ptrace.h.
5926 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5927 already defined.
5928
4934b29e
MR
59292012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5930
5931 * linux-low.c (linux_store_registers): Don't re-retrieve data
5932 with ptrace that has already been obtained from /proc. Always
5933 copy any data retrieved with ptrace to the buffer supplied.
5934
bde24c0a
PA
59352012-05-11 Yao Qi <yao@codesourcery.com>
5936 Pedro Alves <palves@redhat.com>
5937
5938 * linux-low.c (enum stopping_threads_kind): New.
5939 (stopping_threads): Change type to `enum stopping_threads_kind'.
5940 (handle_extended_wait): If stopping and suspending threads, leave
5941 the new_lwp suspended too.
5942 (linux_wait_for_event): Adjust.
5943 (stop_all_lwps): Set `stopping_threads' to
5944 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5945 whether we're suspending threads or just stopping them. Assert no
5946 recursion happens.
5947
623b6bdf
YQ
59482012-04-29 Yao Qi <yao@codesourcery.com>
5949
5950 * server.h: Move some code to ...
5951 * gdbthread.h: ... here. New.
5952 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5953 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5954 (nto-low.o, win32-low.o): Likewise.
5955 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5956 * regcache.c, remote-utils.c, server.c: Likewise.
5957 * target.c, tracepoint.c, win32-low.c: Likewise.
5958
f15f9948
TJB
59592012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5960
5961 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5962 (PTRACE_ARG4_TYPE): Likewise.
5963 (PTRACE_XFER_TYPE): Likewise.
5964 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5965 ptrace to PTRACE_ARG3_TYPE.
5966 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5967 (PTRACE_ARG4_TYPE): Likewise.
5968 (PTRACE_XFER_TYPE): Likewise.
5969 (linux_detach_one_lwp): Cast fourth argument of
5970 ptrace to long then PTRACE_ARG4_TYPE.
5971 (regsets_fetch_inferior_registers): Cast third argument of
5972 ptrace to long then PTRACE_ARG3_TYPE.
5973 (regsets_store_inferior_registers): Likewise.
5974
38ea300a
PA
59752012-04-20 Pedro Alves <palves@redhat.com>
5976
5977 * configure: Regenerate.
5978
c971b7fa
PA
59792012-04-19 Pedro Alves <palves@redhat.com>
5980
43aaf8b6 5981 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 5982 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
5983 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5984 (all, install-only, uninstall, clean-info, all-lib, clean): No
5985 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5986 (maintainer-clean realclean distclean): Use subdir_do.
5987 (subdir_do): New.
5988 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 5989 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
5990 * acinclude.m4: Include acx_configure_dir.m4.
5991 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5992 calls. Call AC_PROG_RANLIB. Configure gnulib using
5993 ACX_CONFIGURE_DIR.
5994 (GNULIB): New.
5995 (GNULIB_STDINT_H): Adjust.
5996 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5997 * gdbreplay.c: Include build-gnulib/config.h.
5998 * server.h: Likewise.
5999 * aclocal.m4: Regenerate.
6000 * config.in: Regenerate.
6001 * configure: Regenerate.
c971b7fa 6002
809277f8
PA
60032012-04-19 Pedro Alves <palves@redhat.com>
6004
6005 * Makefile.in (LIBGNU, INCGNU): Adjust.
6006 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6007 (all, install-only, uninstall, clean-info, all-lib, clean)
6008 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6009 * configure.ac: Adjust AC_OUTPUT output.
6010 * aclocal.m4: Regenerate.
6011 * configure: Regenerate.
6012
fd9bb8b8
PA
60132012-04-19 Pedro Alves <palves@redhat.com>
6014
6015 * Makefile.in (generated_files): New.
6016 (server_h): Remove the explicit dependency on config.h, and depend
6017 on $generated_files.
6018
1c298c66
PA
60192012-04-19 Pedro Alves <palves@redhat.com>
6020
6021 * Makefile.in (INCGNU): Add -Ignulib.
6022
57c4b50b
PA
60232012-04-19 Pedro Alves <palves@redhat.com>
6024
6025 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6026 (INCGNU): ... this, and spell out -I here.
6027 (GNULIB_LIB): Rename to ...
6028 (LIBGNU): ... this.
6029 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6030
1030e047
PA
60312012-04-19 Pedro Alves <palves@redhat.com>
6032
6033 * config.in: Regenerate.
6034
447d4319
PA
60352012-04-19 Pedro Alves <palves@redhat.com>
6036
6037 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6038 * server.h (memmem): Remove declaration.
6039 * config.in: Regenerate.
6040 * configure: Regenerate.
6041
aad9eab9
YQ
60422012-04-19 Yao Qi <yao@codesourcery.com>
6043
6044 * Makefile.in (SFILES): Add common/vec.c.
6045 (OBS): Add vec.o.
6046 (vec.o): New rule.
6047
3e10640f
YQ
60482012-04-19 Yao Qi <yao@codesourcery.com>
6049
6050 * remote-utils.c (prepare_resume_reply): Replace with macro
6051 target_core_of_thread.
6052 * server.c (handle_qxfer_threads_proper): Likewise.
6053 * target.h (traget_core_of_thread): New macro.
6054
71622373
PA
60552012-04-18 Pedro Alves <palves@redhat.com>
6056
6057 * aclocal.m4: Regenerate.
6058 * configure: Regenerate.
6059
80d26939
YQ
60602012-04-16 Yao Qi <yao@codesourcery.com>
6061
6062 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6063 duplicated on address.
6064
42476b70
YQ
60652012-04-16 Yao Qi <yao@codesourcery.com>
6066
6067 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6068 (struct tracepoint_action_ops) <send>: New field.
6069 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6070 (agent_expr_send, x_tracepoint_action_send): New.
6071 (l_tracepoint_action_send): New.
6072 (cmd_qtdp): Download and install tracepoint
6073 according to `use_agent'.
6074 (run_inferior_command): Add one more parameter `len'.
6075 Update callers.
6076 (tracepoint_send_agent): New.
6077 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6078
7bc83639
YQ
60792012-04-16 Yao Qi <yao@codesourcery.com>
6080
6081 * tracepoint.c (download_tracepoints): Moved to ...
6082 (cmd_qtstart): ... here.
6083
5f18041e
YQ
60842012-04-14 Yao Qi <yao@codesourcery.com>
6085
6086 * tracepoint.c: Include inttypes.h.
6087 (struct collect_memory_action): Use sized types.
6088 (struct tracepoint): Likewise.
6089 (cmd_qtdp, stop_tracing): Update print specifiers.
6090 (cmd_qtp, response_tracepoint): Likewise.
6091 (collect_data_at_tracepoint): Likewise.
6092 (collect_data_at_step): Likewise.
6093
55a8c076
YQ
60942012-04-14 Yao Qi <yao@codesourcery.com>
6095
6096 Import gnulib module inttypes.
6097 * aclocal.m4, config.in, configure: Regenerated.
6098
dc750257
YQ
60992012-04-14 Yao Qi <yao@codesourcery.com>
6100
6101 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6102 Makefile and config.status at last.
6103
0ab5faf9
YQ
61042012-04-13 Yao Qi <yao@codesourcery.com>
6105
6106 * tracepoint.c: Include stdint.h unconditionally.
6107
18f5fd81
TJB
61082012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6109
6110 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6111 on BFD_HAVE_SYS_PROCFS_TYPE.
6112 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6113 * configure: Regenerate.
6114 * config.in: Likewise.
6115
4d47af5c
L
61162012-04-13 H.J. Lu <hongjiu.lu@intel.com>
6117
6118 * Makefile.in (clean): Also remove x32.c x32-linux.c
6119 x32-avx.c x32-avx-linux.c.
6120 (x32.o): New target.
6121 (x32.c): Likewise.
6122 (x32-linux.o): Likewise.
6123 (x32-linux.c): Likewise.
6124 (x32-avx.o): Likewise.
6125 (x32-avx.c): Likewise.
6126 (x32-avx-linux.o): Likewise.
6127 (x32-avx-linux.c): Likewise.
6128
6129 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6130 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6131 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6132 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6133 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6134 i386/x32-avx-linux.xml.
6135
6136 * linux-x86-low.c (init_registers_x32_linux): New prototype.
6137 (init_registers_x32_avx_linux): Likwise.
6138 (x86_linux_update_xmltarget): Call init_registers_x32_linux
6139 or init_registers_x32_avx_linux if linux_is_elf64 is false.
6140
ecedbe58
PA
61412012-04-13 Pedro Alves <palves@redhat.com>
6142
6143 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6144 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6145 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6146 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6147 the sub-make.
6148
c92b5177
L
61492012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6150
6151 * linux-x86-low.c (compat_x32_clock_t): New.
6152 (compat_x32_siginfo_t): Likewise.
6153 (compat_x32_siginfo_from_siginfo): Likewise.
6154 (siginfo_from_compat_x32_siginfo): Likewise.
6155 (linux_is_elf64): Likewise.
6156 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6157 and siginfo_from_compat_x32_siginfo for x32.
6158 (x86_arch_setup): Set linux_is_elf64.
6159
214d508e
L
61602012-04-12 H.J. Lu <hongjiu.lu@intel.com>
6161
6162 PR gdb/13969
6163 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6164 e_machine field.
6165 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6166 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6167 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6168 compatible with process.
6169
c9a1864a
YQ
61702012-04-12 Yao Qi <yao@codesourcery.com>
6171
6172 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6173 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6174 (install-only, install-info, clean): Handle sub dir gnulib.
6175 (all-lib, am--refresh): New targets.
6176 (memmem.o): Remove target.
6177 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6178 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
6179 (AC_REPLACE_FUNCS): Remove memmem.
6180 Invoke gl_INIT and AM_INIT_AUTOMAKE.
6181 (AC_OUTPUT): Generate Makefile in gnulib/.
6182 * aclocal.m4, config.in, configure: Regenerated.
6183
367ba2c2
MR
61842012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6185
6186 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6187
9d236627
PA
61882012-04-05 Pedro Alves <palves@redhat.com>
6189
6190 -Werror=strict-aliasing
6191
6192 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6193 pointer.
6194
111217b3
PA
61952012-04-04 Pedro Alves <palves@redhat.com>
6196
6197 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6198 (sparc_store_gregset_from_stack, sparc_store_gregset)
6199 (sparc_breakpoint_at): Fix formatting.
6200
8365dcf5
TJB
62012012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6202
6203 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6204 are available.
6205 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6206 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6207 * config.in: Regenerate.
6208 * configure: Likewise.
6209
689cc2ae
PA
62102012-03-29 Pedro Alves <palves@redhat.com>
6211
6212 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6213 Correct ptrace arguments.
6214
c14dfd32
PA
62152012-03-28 Pedro Alves <palves@redhat.com>
6216
6217 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6218 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6219 (IA64_FR1_REGNUM): New defines.
6220 (ia64_fetch_register): New.
6221 (the_low_target): Install it.
6222 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6223 field.
6224 * linux-low.c (linux_fetch_registers): Try the
6225 the_low_target.fetch_register hook first.
6226
6227 * linux-arm-low.c (the_low_target): Adjust.
6228 * linux-bfin-low.c (the_low_target): Adjust.
6229 * linux-cris-low.c (the_low_target): Adjust.
6230 * linux-crisv32-low.c (the_low_target): Adjust.
6231 * linux-m32r-low.c (the_low_target): Adjust.
6232 * linux-m68k-low.c (the_low_target): Adjust.
6233 * linux-mips-low.c (the_low_target): Adjust.
6234 * linux-ppc-low.c (the_low_target): Adjust.
6235 * linux-s390-low.c (the_low_target): Adjust.
6236 * linux-sh-low.c (the_low_target): Adjust.
6237 * linux-sparc-low.c (the_low_target): Adjust.
6238 * linux-tic6x-low.c (the_low_target): Adjust.
6239 * linux-x86-low.c (the_low_target): Adjust.
6240 * linux-xtensa-low.c (the_low_target): Adjust.
6241
63c88e13
PA
62422012-03-26 Pedro Alves <palves@redhat.com>
6243
6244 * server.c (handle_qxfer_libraries): Don't bail early if
6245 the_target->qxfer_libraries_svr4 is not NULL.
6246
fb723180
PA
62472012-03-26 Pedro Alves <palves@redhat.com>
6248
6249 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6250
0afae3cf
PA
62512012-03-23 Pedro Alves <palves@redhat.com>
6252
6253 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6254 "library-list-svr4" element's start tag when the the DSO list is
6255 empty.
6256
485f1ee4
PA
62572012-03-23 Pedro Alves <palves@redhat.com>
6258
6259 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6260 a variable whose type size is the same as the inferior's pointer
6261 size.
6262
a5362b9a
TS
62632012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6264
6265 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6266 struct siginfo.
6267 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6268 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6269 * linux-low.h: Include <signal.h>.
6270 (struct siginfo): Remove forward declaration.
6271 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6272 struct siginfo.
6273
d226c142
MF
62742012-03-21 Mike Frysinger <vapier@gentoo.org>
6275
6276 * .gitignore: Ignore more files.
6277
122f36ef
PA
62782012-03-19 Pedro Alves <palves@redhat.com>
6279 Jan Kratochvil <jan.kratochvil@redhat.com>
6280
6281 * server.c (cont_thread, general_thread): Add describing comments.
6282 (start_inferior): Clear `cont_thread'.
6283 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6284 of a process.
6285
fc3e5175
YQ
62862012-03-15 Yao Qi <yao@codesourcery.com>
6287
6288 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6289 handling to ...
6290 (cmd_qtdp): ... here.
6291
8d0d92cd
YQ
62922012-03-15 Yao Qi <yao@codesourcery.com>
6293
6294 * tracepoint.c (struct tracepoint_action_ops): New.
6295 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6296 (m_tracepoint_action_download): New.
6297 (r_tracepoint_action_download): New.
6298 (x_tracepoint_action_download): New.
6299 (l_tracepoint_action_download): New.
6300 (add_tracepoint_action): Install `action->ops' according type.
6301 (download_tracepoint_1): Move code `download' function pointer
6302 of various tracepoint_action_ops.
6303
87b0bb13
JK
63042012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6305
6306 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6307 linux_ptrace_attach_warnings.
6308
5f572dec
JK
63092012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6310
6311 * Makefile.in (linux-ptrace.o): New.
6312 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6313 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6314 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6315 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6316 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6317 of these targets.
6318 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6319
f4647387
YQ
63202012-03-08 Yao Qi <yao@codesourcery.com>
6321 Pedro Alves <palves@redhat.com>
6322
6323 Fix PR server/13392.
6324 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6325 offset of JMP insn.
6326 * tracepoint.c (remove_tracepoint): New.
6327 (cmd_qtdp): Call remove_tracepoint when failed to install.
6328
9b224c5e
PA
63292012-03-07 Pedro Alves <palves@redhat.com>
6330
6331 * linux-low.c (get_detach_signal): New.
6332 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6333 Pass on pending signals to PTRACE_DETACH. Check the result of the
6334 ptrace call.
6335 * server.c (program_signals, program_signals_p): New.
6336 (handle_general_set): Handle QProgramSignals.
6337 * server.h (program_signals, program_signals_p): Declare.
6338
e237a7e2
JK
63392012-03-05 Pedro Alves <palves@redhat.com>
6340 Jan Kratochvil <jan.kratochvil@redhat.com>
6341
6342 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6343 New comment why.
6344
5808517f
YQ
63452012-03-03 Yao Qi <yao@codesourcery.com>
6346
6347 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6348 agent_look_up_symbols.
6349
58b4daa5
YQ
63502012-03-03 Yao Qi <yao@codesourcery.com>
6351
6352 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6353 (linux-x86-low.o): Likewise.
6354 * server.h: Remove in_process_agent_loaded.
6355 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6356 common/agent.c.
6357 Update callers.
6358
8ffcbaaf
YQ
63592012-03-03 Yao Qi <yao@codesourcery.com>
6360
6361 * tracepoint.c (gdb_agent_capability): New global.
6362 (in_process_agent_loaded_ust): Renamed to
6363 `in_process_agent_supports_ust'.
6364 Update callers.
6365 (in_process_agent_supports_ust): Call agent_capability_check.
6366 (clear_installed_tracepoints): Assert that agent supports
6367 agent.
6368
d1feda86
YQ
63692012-03-03 Yao Qi <yao@codesourcery.com>
6370
6371 * linux-low.c (linux_supports_agent): New.
6372 (linux_target_ops): Initialize field `supports_agent' with
6373 linux_supports_agent.
6374 * target.h (struct target_ops) <supports_agent>: New.
6375 (target_supports_agent): New macro.
6376 * server.c (handle_general_set): Handle packet 'QAgent'.
6377 (handle_query): Send `QAgent+'.
6378 * Makefile.in (server.o): Depends on agent.h.
6379
2fa291ac
YQ
63802012-03-03 Yao Qi <yao@codesourcery.com>
6381
6382 * Makefile.in (OBS): Add agent.o.
6383 Add new rule for agent.o.
6384 Track dependence of tracepoint.c on agent.h.
6385 * tracepoint.c (run_inferior_command_1):
6386 (run_inferior_command): Call agent_run_command.
6387 (gdb_ust_connect_sync_socket): Deleted. Move it to
6388 common/agent.c.
6389 (resume_thread, stop_thread): Likewise.
6390 (gdb_ust_socket_init): Renamed to ...
6391 (gdb_agent_socket_init): ... New.
6392 (gdb_ust_thread): Renamed to ...
6393 (gdb_agent_helper_thread): ... New.
6394 (gdb_ust_init): Move some code to ...
6395 (gdb_agent_init): ... here. New.
6396 [HAVE_UST]: Call gdb_ust_init.
6397 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6398 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6399 * config.in, configure: Regenerated.
6400
05044653
PA
64012012-03-02 Pedro Alves <palves@redhat.com>
6402
6403 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6404 * linux-low.c (struct simple_pid_list): New.
6405 (stopped_pids): New a struct simple_pid_list pointer.
6406 (add_to_pid_list, pull_pid_from_list): New.
6407 (handle_extended_wait): Don't assume the first signal new children
6408 report is SIGSTOP. Adjust call to pull_pid_from_list.
6409 (linux_wait_for_lwp): Adjust.
6410
8d00225b
YQ
64112012-03-02 Yao Qi <yao@codesourcery.com>
6412
6413 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6414 debug log.
6415
19560ba5
YQ
64162012-03-02 Yao Qi <yao@codesourcery.com>
6417
6418 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6419 `stop_pc' and `tpoint'. Update caller.
6420
1faeff08
MR
64212012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6422
6423 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6424 * linux-low.c (use_linux_regsets): New macro.
6425 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6426 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6427 (linux_register_in_regsets): New function.
6428 (usr_fetch_inferior_registers): Skip registers covered by
6429 regsets.
6430 (usr_store_inferior_registers): Likewise.
6431 (usr_fetch_inferior_registers): New macro.
6432 (usr_store_inferior_registers): Likewise.
6433 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6434 (linux_store_registers): Likewise.
6435 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6436 prototype.
6437 (init_registers_mips64_dsp_linux): Likewise.
6438 (init_registers_mips_linux): New macro.
6439 (init_registers_mips_dsp_linux): Likewise.
6440 (mips_dsp_num_regs): Likewise.
6441 (DSP_BASE, DSP_CONTROL): New fallback macros.
6442 (mips_base_regs): New macro.
6443 (mips_regmap): Use it. Fix the size.
6444 (mips_dsp_regmap): New variable.
6445 (mips_dsp_regset_bitmap): Likewise.
6446 (mips_arch_setup): New function.
6447 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6448 than mips_regmap.
6449 (mips_cannot_store_register): Likewise.
6450 (the_low_target): Update .arch_setup, .num_regs and .regmap
6451 initializers. Add .regset_bitmap initializer.
6452 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6453 initializer.
6454 * linux-bfin-low.c (the_low_target): Likewise.
6455 * linux-cris-low.c (the_low_target): Likewise.
6456 * linux-crisv32-low.c (the_low_target): Likewise.
6457 * linux-ia64-low.c (the_low_target): Likewise.
6458 * linux-m32r-low.c (the_low_target): Likewise.
6459 * linux-m68k-low.c (the_low_target): Likewise.
6460 * linux-ppc-low.c (the_low_target): Likewise.
6461 * linux-s390-low.c (the_low_target): Likewise.
6462 * linux-sh-low.c (the_low_target): Likewise.
6463 * linux-sparc-low.c (the_low_target): Likewise.
6464 * linux-tic6x-low.c (the_low_target): Likewise.
6465 * linux-x86-low.c (the_low_target): Likewise.
6466 * linux-xtensa-low.c (the_low_target): Likewise.
6467 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6468 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6469 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6470 srv_xmlfiles.
6471 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6472 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6473
c03e6ccc
YQ
64742012-02-29 Yao Qi <yao@codesourcery.com>
6475 Pedro Alves <palves@redhat.com>
6476
6477 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6478 `step_over_finished' is true.
6479
644cebc9
PA
64802012-02-27 Pedro Alves <palves@redhat.com>
6481
6482 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6483 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6484
c14d7ab2
PA
64852012-02-27 Pedro Alves <palves@redhat.com>
6486
6487 PR server/9684
6488 * linux-low.c (pid_is_stopped): New.
6489 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6490
412c89dd
LM
64912012-02-25 Luis Machado <lgustavo@codesourcery.com>
6492
6493 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6494 of conditions.
6495
b745defe
MR
64962012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6497
6498 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6499
9f3a5c85
LM
65002012-02-24 Luis Machado <lgustavo@codesourcery>
6501
6502 * server.c (handle_query): Advertise support for target-side
6503 breakpoint condition evaluation.
6504 (process_point_options): New function.
6505 (process_serial_event): When inserting a breakpoint, check for
6506 a target-side condition that should be evaluated.
6507
6508 * mem-break.c: Include regcache.h and ax.h.
6509 (point_cond_list_t): New data structure.
6510 (breakpoint) <cond_list>: New field.
6511 (find_gdb_breakpoint_at): Make non-static.
6512 (delete_gdb_breakpoint_at): Clear any target-side
6513 conditions.
6514 (clear_gdb_breakpoint_conditions): New function.
6515 (add_condition_to_breakpoint): Likewise.
6516 (add_breakpoint_condition): Likewise.
6517 (gdb_condition_true_at_breakpoint): Likewise.
6518 (gdb_breakpoint_here): Return result directly instead
6519 of going through a local variable.
6520
6521 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6522 (clear_gdb_breakpoint_conditions): Likewise.
6523 (add_breakpoint_condition): Likewise.
6524 (gdb_condition_true_at_breakpoint): Likewise.
6525
6526 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6527 (need_step_over_p): Take target-side breakpoint condition into
6528 consideration.
6529
5e1dc496
LM
65302012-02-24 Luis Machado <lgustavo@codesourcery>
6531
6532 * server.h: Include tracepoint.h.
6533 (agent_mem_read, agent_get_trace_state_variable_value,
6534 agent_set_trace_state_variable_value,
6535 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6536 get_set_tsv_func_addr): New prototypes.
6537
6538 * ax.h: New include file.
6539 * ax.c: New source file.
6540
6541 * tracepoint.c: Include ax.h.
6542 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6543 agent_expr, eval_result_type): Move to ax.h.
6544 (parse_agent_expr): Rename to ...
6545 (gdb_parse_agent_expr): ... this, make it non-static and move
6546 to ax.h.
6547 (unparse_agent_expr) Rename to ...
6548 (gdb_unparse_agent_expr): ... this, make it non-static and move
6549 to ax.h.
6550 (eval_agent_expr): Rename to ...
6551 (eval_tracepoint_agent_expr): ... this.
6552 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6553 forward declarations.
6554 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6555 (agent_get_trace_state_variable_value): New function.
6556 (agent_set_trace_state_variable_value): New function.
6557 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6558 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6559 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6560 (condition_true_at_tracepoint): Likewise.
6561 (parse_agent_expr): Rename to ...
6562 (gdb_parse_agent_expr): ... this and move to ax.c.
6563 (unparse_agent_expr): Rename to ...
6564 (gdb_unparse_agent_expr): ... this and move to ax.c.
6565 (gdb_agent_op_name): Move to ax.c.
6566 (eval_agent_expr): Rename to ...
6567 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6568 and move to ax.c.
6569 (eval_tracepoint_agent_expr): New function.
6570 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 6571 non-static.
5e1dc496
LM
6572 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6573 ax.c.
6574 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6575 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6576 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6577 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6578 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6579 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6580 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6581 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6582 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6583 (compile_bytecodes): Remove forward declaration.
6584 (is_goto_target): Move to ax.c.
6585 (compile_bytecodes): Move to ax.c and call
6586 agent_get_trace_state_variable_value (...) and
6587 agent_set_trace_state_variable_value (...).
6588
6589 * Makefile.in: Update ax.c and IPA dependencies.
6590
277e4e52
PA
65912012-02-24 Pedro Alves <palves@redhat.com>
6592
6593 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6594 (cmd_bigqtbuffer_circular): ... this. Only handle
6595 'QTBuffer:circular:'.
6596 (handle_tracepoint_general_set): Adjust.
6597
bf4c19f7
YQ
65982012-02-16 Yao Qi <yao@codesourcery.com>
6599
6600 * inferiors.c: Move code to ...
6601 * dll.c: .... here. New.
6602 * server.h: Declare clear_dlls.
6603 * Makefile.in (SFILES): Add dll.c.
6604 (OBS): Add dll.o
6605 (dll.o): New rule.
6606
d73f2619
YQ
66072012-02-11 Yao Qi <yao@codesourcery.com>
6608
6609 * server.c: (handle_monitor_command): Add a new parameter
6610 `own_buf'.
6611 (handle_query): Update caller.
6612
f8255c2a
JB
66132012-02-09 Joel Brobecker <brobecker@adacore.com>
6614
6615 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6616 * configure, config.in: Regenerate.
6617 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6618 is not defined.
6619
da84f473
PA
66202012-02-02 Pedro Alves <palves@redhat.com>
6621
6622 Try SIGKILL first, then PTRACE_KILL.
6623 * linux-low.c (linux_kill_one_lwp): New.
6624 (linux_kill_one_lwp): Rename to ...
6625 (kill_one_lwp_callback): ... this. Use the new
6626 linux_kill_one_lwp.
6627
e886a173
PA
66282012-02-02 Pedro Alves <palves@redhat.com>
6629
6630 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6631 inferior.
6632
be07f1a2
PA
66332012-01-27 Pedro Alves <palves@redhat.com>
6634
6635 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6636 (elf_64_file_p): Make static.
6637 (linux_pid_exe_is_elf_64_file): New.
6638 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6639 Delete declarations.
6640 (linux_pid_exe_is_elf_64_file): Declare.
6641 * linux-x86-low.c (x86_arch_setup): Use
6642 linux_pid_exe_is_elf_64_file.
6643
d8301ad1
JK
66442012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6645
6646 * linux-low.c (linux_wait_for_event_1): Rename to ...
6647 (linux_wait_for_event): ... here and merge it with former
6648 linux_wait_for_event - new variable wait_ptid, use it.
6649 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6650
01b17894
PA
66512012-01-23 Pedro Alves <palves@redhat.com>
6652
6653 * server.c (main): Avoid yet another case of infinite loop while
6654 detaching/killing after a longjmp.
6655
e825046f
JK
66562012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6657
6658 Code cleanup.
6659 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6660
b9e7b9c3
UW
66612012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6662
6663 * hostio.c (handle_readlink): New function.
6664 (handle_vFile): Call it to handle "vFile:readlink" packets.
6665
901f9912
UW
66662012-01-20 Pedro Alves <palves@redhat.com>
6667 Ulrich Weigand <ulrich.weigand@linaro.org>
6668
6669 * server.c (handle_v_requests): Only support vAttach and vRun to
6670 start multiple processes when in extended protocol mode.
6671
fc1ab1a0
PA
66722012-01-17 Pedro Alves <palves@redhat.com>
6673
6674 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6675 memalign plus mprotect to allocate the scratch buffer.
6676
7d5d4e98
PA
66772012-01-13 Pedro Alves <palves@redhat.com>
6678
6679 * server.c (attach_inferior): Clear `cont_thread'.
6680
f128d5e9
PA
66812012-01-13 Pedro Alves <palves@redhat.com>
6682
6683 * server.c (main): Avoid infinite loop while detaching/killing
6684 after a longjmp.
6685
06db92f0
DE
66862012-01-09 Doug Evans <dje@google.com>
6687
6688 * server.c (start_inferior): Set last_ptid in --wrapper case.
6689
32d92999
YQ
66902012-01-06 Yao Qi <yao@codesourcery.com>
6691
6692 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6693 defined.
6694 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6695
5e0a92a9
YQ
66962012-01-04 Yao Qi <yao@codesourcery.com>
6697
6698 * tracepoint.c (cmd_qtdp): Print debug message
6699 for static tracepoint.
6700
ae639e8c
YQ
67012012-01-04 Yao Qi <yao@codesourcery.com>
6702
6703 * tracepoint.c (trace_vdebug): Differentiate debug message
6704 between gdbserver and IPA.
6705
f72429c5
YQ
67062012-01-03 Yao Qi <yao@codesourcery.com>
6707
6708 * tracepoint.c (tracepoint_was_hit): Don't collect for
6709 static tracepoint.
6710
12c3e59c
JB
67112012-01-02 Joel Brobecker <brobecker@adacore.com>
6712
6713 * terminal.h: Reformat copyright header.
6714
67827812
JB
67152012-01-02 Joel Brobecker <brobecker@adacore.com>
6716
6717 * server.c (gdbserver_version): Update copyright year.
6718 * gdbreplay.c (gdbreplay_version): Likewise.
6719
3e52c33d
JK
67202011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6721
6722 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6723
6724 Revert:
6725 2011-12-18 Hui Zhu <teawater@gmail.com>
6726 * linux-low.c (linux_create_inferior): Save return value to ret.
6727
66f1260e
HZ
67282011-12-18 Hui Zhu <teawater@gmail.com>
6729
6730 * linux-low.c (linux_create_inferior): Save return value to ret.
6731
e77616d7
DE
67322011-12-16 Doug Evans <dje@google.com>
6733
e7b06c57
DE
6734 * linux-low.c (linux_create_inferior): If stdio connection,
6735 redirect stdin from /dev/null, stdout to stderr.
6736 * remote-utils.c (remote_is_stdio): New static global.
6737 (remote_connection_is_stdio): New function.
6738 (remote_prepare): Handle stdio connection.
6739 (remote_open): Ditto.
6740 (remote_close): Don't close stdin for stdio connections.
6741 (read_prim,write_prim): New functions. Replace all calls to
6742 read/write to these.
6743 * server.c (main): Watch for "-" argument. Move call to
6744 remote_prepare before start_inferior.
6745 * server.h (STDIO_CONNECTION_NAME): New macro.
6746 (remote_connection_is_stdio): Declare.
6747
e77616d7
DE
6748 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6749 in debugging output.
6750
82067193
YQ
67512011-12-15 Yao Qi <yao@codesourcery.com>
6752
6753 * tracepoint.c: Include sys/syscall.h.
6754 (gdb_ust_thread): Remove preprocessor conditional.
6755
82bfbe7e
PA
67562011-12-14 Pedro Alves <pedro@codesourcery.com>
6757
6758 * linux-low.c (linux_detach_one_lwp): Call
6759 the_low_target.prepare_to_resume before detaching.
6760
712c6575
YQ
67612011-12-14 Yao Qi <yao@codesourcery.com>
6762
6763 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6764 of write.
6765
d54d1edf
YQ
67662011-12-14 Yao Qi <yao@codesourcery.com>
6767
6768 * i386-low.c (i386_low_stopped_data_address): Initialize local
6769 variable `control'.
6770
6210a125
PA
67712011-12-13 Pedro Alves <pedro@codesourcery.com>
6772
6773 PR remote/13492
6774
6775 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6776 DR_CONTROL unless necessary. Extend comments.
6777 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6778 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6779
2ece8244
YQ
67802011-12-13 Yao Qi <yao@codesourcery.com>
6781
6782 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6783 macros.
6784 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6785
784867a5
JK
67862011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6787
6788 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6789 Print new debug message for such case.
6790
6bf36717
JK
67912011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6792
6793 Fix overlapping memcpy.
6794 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6795 the read_inferior_memory transfer.
6796 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6797 write_inferior_memory transfer.
6798 (set_fast_tracepoint_jump): New variable buf. Use it for the
6799 read_inferior_memory and write_inferior_memory transfers.
6800 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6801 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6802 Use it for the write_inferior_memory transfer.
6803 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6804 buffers.
6805
50275556
MR
68062011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6807
6808 * linux-low.c (fetch_register, store_register): Make code
6809 consistent, fix formatting.
6810
7325beb4
MR
68112011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6812
6813 * linux-low.c (usr_store_inferior_registers): Factor out code
6814 to handle individual registers into...
6815 (store_register): ... this new function.
6816
c642a434
UW
68172011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6818
6819 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6820 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6821 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6822 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6823 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6824 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6825 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6826 (srv_xmlfiles): Add new XML files.
6827
6828 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6829 and <sys/uio.h>.
6830 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6831 (init_registers_s390_linux32v1): Add prototype.
6832 (init_registers_s390_linux32v2): Likewise.
6833 (init_registers_s390_linux64v1): Likewise.
6834 (init_registers_s390_linux64v2): Likewise.
6835 (init_registers_s390x_linux64v1): Likewise.
6836 (init_registers_s390x_linux64v2): Likewise.
6837 (s390_num_regs): Increment to 52.
6838 (s390_regmap): Add orig_r2 register.
6839 (s390_num_regs_3264): Increment to 68.
6840 (s390_regmap_3264): Add orig_r2 register.
6841 (s390_collect_ptrace_register): Handle orig_r2 register.
6842 (s390_supply_ptrace_register): Likewise.
6843 (s390_fill_last_break): New function.
6844 (s390_store_last_break): Likewise.
6845 (s390_fill_system_call): New function.
6846 (s390_store_system_call): Likewise.
6847 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6848 register sets.
6849 (s390_check_regset): New function.
6850 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6851 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6852 Update target_regsets for available register sets.
6853
2268b414
JK
68542011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6855 Jan Kratochvil <jan.kratochvil@redhat.com>
6856
6857 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6858 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6859 New.
6860 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6861 * linux-low.h (struct process_info_private): New member r_debug.
6862 * server.c (handle_qxfer_libraries): Call
6863 the_target->qxfer_libraries_svr4.
6864 (handle_qxfer_libraries_svr4): New function.
6865 (qxfer_packets): New entry "libraries-svr4".
6866 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6867 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6868 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6869 PACKET_qXfer_libraries_svr4.
6870
d6db1fab
UW
68712011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6872
6873 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6874 PSW address/mask between 8-byte and 16-byte formats.
6875 (s390_supply_ptrace_register): Likewise.
6876 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6877 basic addressing mode bit.
6878
242f5f1c
SS
68792011-11-24 Stan Shebs <stan@codesourcery.com>
6880
6881 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6882
f196051f
SS
68832011-11-17 Stan Shebs <stan@codesourcery.com>
6884
6885 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6886 (tracing_start_time): New global.
6887 (tracing_stop_time): New global.
6888 (tracing_user_name): New global.
6889 (tracing_notes): New global.
6890 (tracing_stop_note): New global.
6891 (cmd_qtstart): Set traceframe_usage, start_time.
6892 (stop_tracing): Set stop_time.
6893 (cmd_qtstatus): Report additional status.
6894 (cmd_qtp): New function.
6895 (handle_tracepoint_query): Call it.
6896 (cmd_qtnotes): New function.
6897 (handle_tracepoint_general_set): Call it.
6898 (get_timestamp): Rename from tsv_get_timestamp.
6899
405f8e94
SS
69002011-11-14 Stan Shebs <stan@codesourcery.com>
6901 Kwok Cheung Yeung <kcy@codesourcery.com>
6902
6903 * linux-x86-low.c (small_jump_insn): New.
6904 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6905 trampoline and error message, build a trampoline and issue a small
6906 jump instruction to it.
6907 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6908 trampoline and error message.
6909 (x86_get_min_fast_tracepoint_insn_len): New.
6910 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6911 * linux-low.h (struct linux_target_ops): Add arguments to
6912 install_fast_tracepoint_jump_pad operation, add new operation.
6913 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6914 arguments.
6915 (linux_get_min_fast_tracepoint_insn_len): New function.
6916 (linux_target_op): Add new operation.
6917 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6918 (gdb_trampoline_buffer_end): Ditto.
6919 (gdb_trampoline_buffer_error): Ditto.
6920 (struct ipa_sym_addresses): Add fields for new IPA variables.
6921 (symbol_list): Add entries for new IPA variables.
6922 (struct tracepoint): Add fields to hold the address range of the
6923 trampoline used by the tracepoint.
6924 (trampoline_buffer_head): New static variable.
6925 (trampoline_buffer_tail): Ditto.
6926 (claim_trampoline_space): New function.
6927 (have_fast_tracepoint_trampoline_buffer): New function.
6928 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6929 structure.
6930 (install_fast_tracepoint): Ditto, also add error buffer argument.
6931 (cmd_qtminftpilen): New function.
6932 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6933 (fast_tracepoint_from_trampoline_address): New function.
6934 (fast_tracepoint_collecting): Handle trampoline as part of jump
6935 pad space.
6936 (set_trampoline_buffer_space): New function.
6937 (initialize_tracepoint): Initialize new IPA variables.
6938 * target.h (struct target_ops): Add arguments to
6939 install_fast_tracepoint_jump_pad operation, add new
6940 get_min_fast_tracepoint_insn_len operation.
6941 (target_get_min_fast_tracepoint_insn_len): New.
6942 (install_fast_tracepoint_jump_pad): Add arguments.
6943 * server.h (IPA_BUFSIZ): Define.
6944 * linux-i386-ipa.c: Include extra header files.
6945 (initialize_fast_tracepoint_trampoline_buffer): New function.
6946 (initialize_low_tracepoint): Call it.
6947 * server.h (set_trampoline_buffer_space): Declare.
6948 (claim_trampoline_space): Ditto.
6949 (have_fast_tracepoint_trampoline_buffer): Ditto.
6950
1e4d1764
YQ
69512011-11-14 Yao Qi <yao@codesourcery.com>
6952
6953 * server.c (handle_query): Handle InstallInTrace for qSupported.
6954 * tracepoint.c (add_tracepoint): Sort list.
6955 (install_tracepoint, download_tracepoint): New.
6956 (cmd_qtdp): Call them to install and download tracepoints.
6957 (sort_tracepoints): Removed.
6958 (cmd_qtstart): Update.
6959
5c73ff4e
YQ
69602011-11-14 Yao Qi <yao@codesourcery.com>
6961
6962 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6963 * mem-break.h: Declare.
6964 * tracepoint.c (cmd_qtstart): Move some code to ...
6965 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6966 New.
6967 (download_tracepoints): Move some code to ...
6968 (download_tracepoint_1): ... here. New.
6969
86a30030
YQ
69702011-11-08 Yao Qi <yao@codesourcery.com>
6971
6972 * remote-utils.c (relocate_instruction): A comment fix.
6973
8d26e50c
JB
69742011-11-07 Joel Brobecker <brobecker@adacore.com>
6975
6976 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6977 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6978 dr_status_mirror and dr_control_mirror from debug_reg_state.
6979 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6980 (i386_initial_stuff): Remove use of deleted globals.
6981 (i386_get_thread_context, i386_set_thread_context,
6982 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6983 from debug_reg_state.
6984
a59306a3
YQ
69852011-11-05 Yao Qi <yao@codesourcery.com>
6986
6987 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6988 address as TPOINT's.
6989
3065dfb6
SS
69902011-11-02 Stan Shebs <stan@codesourcery.com>
6991
6992 * tracepoint.c (agent_mem_read_string): New function.
6993 (eval_agent_expr): Call it for tracenz.
6994 * server.c (handle_query): Report support for tracenz.
6995
fd0d8c7c
YQ
69962011-11-02 Yao Qi <yao@codesourcery.com>
6997
6998 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6999
609086b1
YQ
70002011-11-02 Yao Qi <yao@codesourcery.com>
7001
7002 * target.h: Fix a typo in comment.
7003
b9fd1791
PA
70042011-10-31 Pedro Alves <pedro@codesourcery.com>
7005
7006 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7007 clobber the breakpoints' shadows with fast tracepoint jumps.
7008 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7009 * target.c (write_inferior_memory): Also pass MYADDR down to
7010 check_mem_write.
7011
03583c20
UW
70122011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7013
7014 * configure.ac: Check support for personality routine.
7015 * configure: Regenerate.
7016 * config.in: Likewise.
7017 * linux-low.c: Include <sys/personality.h>.
7018 Define ADDR_NO_RANDOMIZE if necessary.
7019 (linux_create_inferior): Disable address space randomization when
7020 forking inferior, if requested.
7021 (linux_supports_disable_randomization): New function.
7022 (linux_target_ops): Install it.
7023 * server.h (disable_randomization): Declare.
7024 * server.c (disable_randomization): New global variable.
7025 (handle_general_set): Handle QDisableRandomization.
7026 (handle_query): Likewise for qSupported.
7027 (main): Support --disable-randomization and --no-disable-randomization
7028 command line arguments.
7029 * target.h (struct target_ops): Add supports_disable_randomization.
7030 (target_supports_disable_randomization): New macro.
7031
723b724b
MF
70322011-09-29 Mike Frysinger <vapier@gentoo.org>
7033
7034 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7035 ifdef check.
7036 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7037 [!PT_GETDSBT] (target_loadmap): New definition.
7038 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7039 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7040 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7041 and PT_GETDSBT to LINUX_LOADMAP.
7042 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7043 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7044
55329a5c 70452011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
7046
7047 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7048 (arm_linux_hwbp_cap): New static variable.
7049 (arm_linux_get_hwbp_cap): Replace by ...
7050 (arm_linux_init_hwbp_cap): ... this new function.
7051 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7052 (arm_linux_get_hw_watchpoint_count): Likewise.
7053 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7054 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7055 (arm_prepare_to_resume): Use perror_with_name instead of error.
7056
55329a5c 70572011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
7058
7059 * linux-arm-low.c: Include <signal.h>.
7060 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7061 (struct arm_linux_hwbp_cap): New data type.
7062 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7063 (struct arm_linux_hw_breakpoint): New data type.
7064 (MAX_BPTS, MAX_WPTS): Define.
7065 (struct arch_process_info, struct arch_lwp_info): New data types.
7066 (arm_linux_get_hwbp_cap): New function.
7067 (arm_linux_get_hw_breakpoint_count): Likewise.
7068 (arm_linux_get_hw_watchpoint_count): Likewise.
7069 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7070 (arm_hwbp_control_initialize): Likewise.
7071 (arm_hwbp_control_is_enabled): Likewise.
7072 (arm_hwbp_control_is_initialized): Likewise.
7073 (arm_hwbp_control_disable): Likewise.
7074 (arm_linux_hw_breakpoint_equal): Likewise.
7075 (arm_linux_hw_point_initialize): Likewise.
7076 (struct update_registers_data): New data structure.
7077 (update_registers_callback: New function.
7078 (arm_insert_point): Likewise.
7079 (arm_remove_point): Likewise.
7080 (arm_stopped_by_watchpoint): Likewise.
7081 (arm_stopped_data_address): Likewise.
7082 (arm_new_process): Likewise.
7083 (arm_new_thread): Likewise.
7084 (arm_prepare_to_resume): Likewise.
7085 (the_low_target): Register arm_insert_point, arm_remove_point,
7086 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7087 arm_new_thread, and arm_prepare_to_resume.
7088
6b9801d4
SS
70892011-09-15 Stan Shebs <stan@codesourcery.com>
7090
7091 * server.h (struct emit_ops): Add compare-goto fields.
7092 * tracepoint.c (gdb_agent_op_sizes): New table.
7093 (emit_eq_goto): New function.
7094 (emit_ne_goto): New function.
7095 (emit_lt_goto): New function.
7096 (emit_le_goto): New function.
7097 (emit_gt_goto): New function.
7098 (emit_ge_goto): New function.
7099 (is_goto_target): New function.
7100 (compile_bytecodes): Recognize special cases of compare-goto
7101 combinations and call specialized emitters for them.
7102 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7103 (amd64_emit_ne_goto): New function.
7104 (amd64_emit_lt_goto): New function.
7105 (amd64_emit_le_goto): New function.
7106 (amd64_emit_gt_goto): New function.
7107 (amd64_emit_ge_goto): New function.
7108 (amd64_emit_ops): Add the new functions.
7109 (i386_emit_eq_goto): New function.
7110 (i386_emit_ne_goto): New function.
7111 (i386_emit_lt_goto): New function.
7112 (i386_emit_le_goto): New function.
7113 (i386_emit_gt_goto): New function.
7114 (i386_emit_ge_goto): New function.
7115 (i386_emit_ops): Add the new functions.
7116
bf15cbda
SS
71172011-09-08 Stan Shebs <stan@codesourcery.com>
7118
7119 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7120 (i386_emit_epilogue): Restore %ebx.
7121
943ca1dd
JZ
71222011-08-31 Jie Zhang <jzhang918@gmail.com>
7123
7124 * server.c (step_thread): Remove definition.
7125 (process_serial_event): Don't handle Hs.
7126 * server.h (step_thread): Remove declaration.
7127 * target.c (set_desired_inferior): Remove use of step_thread.
7128
e3deef73
LM
71292011-08-24 Luis Machado <lgustavo@codesourcery.com>
7130
7131 * linux-low.c: Include linux-procfs.h.
7132 (linux_attach_lwp_1): Update comments.
7133 (linux_attach): Scan for existing threads when attaching to a
7134 process that is the tgid.
7135 * Makefile.in: Update dependencies.
7136
13da1c97
LM
71372011-08-24 Luis Machado <lgustavo@codesourcery.com>
7138
7139 * configure.srv: Add linux-procfs.o dependencies.
7140
881127c9
YQ
71412011-08-14 Yao Qi <yao@codesourcery.com>
7142
7143 * target.h (struct target_ops): Fix indent.
7144 * win32-low.c (win32_target_ops): Fix comment.
7145
58dbd541
YQ
71462011-08-14 Andrew Jenner <andrew@codesourcery.com>
7147 Yao Qi <yao@codesourcery.com>
7148
7149 * Makefile.in (clean): Remove tic6x-*.c files.
7150 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7151 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7152 (tic6x-c64xp-linux.c): Likewise.
7153 * configure.srv: Add support for tic6x-*-uclinux.
7154 * linux-tic6x-low.c: New.
7155 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7156
78d85199
YQ
71572011-08-14 Andrew Stubbs <ams@codesourcery.com>
7158 Yao Qi <yao@codesourcery.com>
7159
7160 * target.h (struct target_ops): Add read_loadmap.
7161 * linux-low.c (struct target_loadseg): New type.
7162 (struct target_loadmap): New type.
7163 (linux_read_loadmap): New function.
7164 (linux_target_ops): Add linux_read_loadmap.
7165 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
7166 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7167 to NULL.
78d85199 7168
a959a88d
EZ
71692011-08-05 Eli Zaretskii <eliz@gnu.org>
7170
7171 * win32-low.c: Include <stdint.h>.
7172
1ced966e
PA
71732011-07-22 Pedro Alves <pedro@codesourcery.com>
7174
7175 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7176 to the inferior here.
7177 (i386_remove_aligned_watchpoint): Ditto.
7178 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7179 fit part of the watchpoint in the debug registers.
7180 (i386_update_inferior_debug_regs): New.
7181 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7182 registers, and only update the inferior on success.
7183 (i386_low_remove_watchpoint): Ditto.
7184
d26e3629
KY
71852011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7186
7187 * linux-low.c (compare_ints, unique, list_threads, show_process,
7188 linux_core_of_thread): Delete.
7189 (linux_target_ops): Change linux_core_of_thread to
7190 linux_common_core_of_thread.
7191 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7192 * utils.c (malloc_failure): Change type of argument.
7193 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7194 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7195 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7196 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7197 (IPA_OBJS): Add common-utils-ipa.o.
7198 (ptid_h, linux_osdata_h): New macros.
7199 (server_h): Add common/common-utils.h, common/xml-utils.h,
7200 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7201 common/ptid.h.
7202 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7203 ptid.o, buffer.o): New rules.
7204 (linux-low.o): Add common/linux-osdata.h as a dependency.
7205 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7206 * configure.ac: Add AC_HEADER_DIRENT check.
7207 * config.in: Regenerate.
7208 * configure: Regenerate.
7209 * remote-utils.c (xml_escape_text): Delete.
7210 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7211 buffer_xml_printf): Move to common/buffer.c.
7212 * server.c (main): Remove call to initialize_inferiors.
7213 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7214 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7215 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7216 internal_error, gdb_assert, gdb_assert_fail): Delete.
7217 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7218 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7219 common/buffer.h.
7220 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7221 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7222 initialize_inferiors): Delete.
7223
2275a1a7
PA
72242011-07-20 Pedro Alves <pedro@codesourcery.com>
7225
7226 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7227 symbol error.
7228
0a5b1e09
PA
72292011-05-31 Pedro Alves <pedro@codesourcery.com>
7230
7231 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7232 assertion.
7233 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7234
6938fd34
YQ
72352011-05-26 Yao Qi <yao@codesourcery.com>
7236
7237 * Makefile.in (thread-db.o): Track dependence to
7238 common/gdb_thread_db.h.
7239 * thread-db.c: include gdb_thread_db.h from right place.
7240
b481f9e0
TT
72412011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7242
7243 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7244 __FILE__ and __LINE__ to internal_error.
7245
98a5dd13
DE
72462011-05-13 Doug Evans <dje@google.com>
7247
7248 * thread-db.c (try_thread_db_load_from_sdir): New function.
7249 (try_thread_db_load_from_dir): New function.
7250 (thread_db_load_search): Handle $sdir, ignore $pdir.
7251 Remove trying of system directories if search of
7252 libthread-db-search-path fails, that is now done via $sdir.
7253
d248b706
KY
72542011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7255
7256 * server.c (handle_query): Add EnableDisableTracepoints to the list
7257 of supported features.
43aaf8b6 7258 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 7259 tracepoints.
43aaf8b6
PA
7260 (cmd_qtenable_disable): New.
7261 (cmd_qtstart): Install tracepoints even if disabled.
7262 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7263 receiving a QTEnable or QTDisable packet.
7264 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7265 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7266 tracepoints.
7267 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 7268
84e578fb
DE
72692011-05-10 Doug Evans <dje@google.com>
7270
7271 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7272
71f55dd8
DE
72732011-05-04 Doug Evans <dje@google.com>
7274
7275 * linux-low.c (linux_join): Skip process lookup.
7276 * spu-low.c (spu_join): Ditto.
7277 * server.c (join_inferiors_callback): Delete.
7278 (process_serial_event): For 'D' packet (detach) call join_inferior
7279 directly.
7280
4d393d60
JM
72812011-05-04 Joseph Myers <joseph@codesourcery.com>
7282
7283 * README: Don't mention xscale*-*-linux*.
7284 * configure.srv (xscale*-*-linux*): Don't handle target.
7285
b00ad6ff
NF
72862011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7287
7288 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7289 casting pointers.
7290 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7291 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7292 (i386_emit_void_call_2): Likewise.
7293
af96c192
YQ
72942011-04-26 Yao Qi <yao@codesourcery.com>
7295
43aaf8b6
PA
7296 * linux-low.c: Move common macros to linux-ptrace.h.
7297 Include linux-ptrace.h.
af96c192
YQ
7298 * Makefile.in (linux_ptrace_h): New.
7299 (linux-low.o): Depends on linux-ptrace.h.
7300
03f2bd59
JK
73012011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7302
7303 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7304 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7305 (remote_prepare): New function with most of the TCP code from ...
7306 (remote_open): ... here. Detect PORT here unconditionally. Move also
7307 setting transport_is_reliable.
7308 * server.c (run_once): New variable.
7309 (gdbserver_usage): Document it.
7310 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7311 the first run if RUN_ONCE.
7312 * server.h (run_once, remote_prepare): New declarations.
7313
7a9dd1b2
TT
73142011-04-19 Tom Tromey <tromey@redhat.com>
7315
7316 * win32-low.c (handle_load_dll): Remove duplicate "the".
7317
81239425
PM
73182011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7319
7320 Remove support for old Cygwin 1.5 versions.
7321 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7322 function to avoid warning.
7323 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7324 warning.
7325
9e0627f1
PM
73262011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7327
7328 * gdbserver/server.h (Macro _): Define it if not available.
7329
588eebee
MS
73302011-03-14 Michael Snyder <msnyder@vmware.com>
7331
348af9f7 7332 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 7333
43f70d4c
JB
73342011-03-10 Joel Brobecker <brobecker@adacore.com>
7335
7336 * Makefile.in (maintainer-clean realclean distclean): Remove
7337 "make ... subdir_do" command.
7338
348af9f7
MS
73392011-03-10 Michael Snyder <msnyder@vmware.com>
7340
7341 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7342
7343 * server.c (handle_v_run): Free alloced buffer on early return.
7344
e637a4f5
YQ
73452011-03-09 Yao Qi <yao@codesourcery.com>
7346
7347 Revert:
7348 2011-03-04 Yao Qi <yao@codesourcery.com>
7349
7350 * Makefile.in: Remove GNU make feature --directory.
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-02-11 Yao Qi <yao@codesourcery.com>
7360
7361 * configure.ac: Call AC_PROG_RANLIB.
7362 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7363 * configure: Regenerate.
7364
e6edda56
JK
73652011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7366
7367 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7368
e5141119
JB
73692011-03-06 Yao Qi <yao@codesourcery.com>
7370
7371 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7372
64794aa4
JB
73732011-03-05 Yao Qi <yao@codesourcery.com>
7374
7375 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7376 (subdir_do): New make target. Copied from gdb/Makefile.
7377 (maintainer-clean, realclean, distclean, clean): Call corresponding
7378 make targets in common/Makefile.
7379
7a762829
YQ
73802011-03-04 Yao Qi <yao@codesourcery.com>
7381
7382 * Makefile.in: Remove GNU make feature --directory.
7383
348af9f7
MS
73842011-03-04 Michael Snyder <msnyder@vmware.com>
7385
7386 * server.c (queue_stop_reply): Call xmalloc not malloc.
7387
73882011-03-02 Michael Snyder <msnyder@vmware.com>
7389
7390 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7391
9f72fee2
MS
73922011-02-28 Michael Snyder <msnyder@vmware.com>
7393
588eebee
MS
7394 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7395 (cmd_qtframe): Ditto.
7396 (cmd_qtbuffer): Ditto.
7397 (cmd_bigqtbuffer): Ditto.
7398
9f72fee2
MS
7399 * utils.c (decimal2str): Initialize 'width' to nine, then
7400 don't mess with it.
7401
8040bd49
UW
74022011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7403
7404 * hostio.c (require_data): Free *data, not data.
7405
7e52cbd0
JK
74062011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7407
7408 * hostio.c (require_data): Use free, not xfree.
7409
9130f83e
MS
74102011-02-27 Michael Snyder <msnyder@vmware.com>
7411
4b812f4e
MS
7412 * server.c (handle_query): Discard unused value.
7413
9130f83e
MS
7414 * hostio.c (require_data): Free malloc memory before returning
7415 error.
7416
69d37113
MS
74172011-02-26 Michael Snyder <msnyder@vmware.com>
7418
7419 * linux-low.c (list_threads): Call closedir for dirent.
7420
35f5825a
MS
74212011-02-27 Michael Snyder <msnyder@vmware.com>
7422
2a589cef
MS
7423 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7424 a case statement falls through.
7425
0adea5f7
MS
7426 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7427
35f5825a
MS
7428 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7429 in comparison.
7430
238f1c74
MS
74312011-02-26 Michael Snyder <msnyder@vmware.com>
7432
7433 * utils.c (decimal2str): Eliminate dead code and dead param.
7434 (pulongest): Drop dead param from call to decimal2str.
7435 (plongest): Ditto.
7436
633ff500
JB
74372011-02-24 Joel Brobecker <brobecker@adacore.com>
7438
7439 Revert the following patch (not approved yet):
7440 2011-02-21 Hui Zhu <teawater@gmail.com>
7441 * tracepoint.c (tp_printf): New function.
7442 (eval_agent_expr): Handle gdb_agent_op_printf.
7443
f9c6ff72
HZ
74442011-02-21 Hui Zhu <teawater@gmail.com>
7445
7446 * tracepoint.c (tp_printf): New function.
7447 (eval_agent_expr): Handle gdb_agent_op_printf.
7448
94d5e490
TT
74492011-02-18 Tom Tromey <tromey@redhat.com>
7450
7451 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7452 (tracepoint.o): Likewise.
7453 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7454 (gdb_agent_op_names): Likewise.
7455
c7f96d2b
TT
74562011-02-18 Tom Tromey <tromey@redhat.com>
7457
7458 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7459 gdb_agent_op_rot>: New constants.
7460 (gdb_agent_op_names): Add pick and roll.
7461 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7462 cases.
7463
0feedb2c
JK
74642011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7465
7466 * aclocal.m4: Regenerated with aclocal-1.11.1.
7467
b3b9301e
PA
74682011-02-14 Pedro Alves <pedro@codesourcery.com>
7469
7470 * server.c (handle_qxfer_traceframe_info): New.
7471 (qxfer_packets): Register "traceframe-info".
7472 (handle_query): Report support for qXfer:traceframe-info:read+.
7473 * tracepoint.c (match_blocktype): New.
7474 (traceframe_find_block_type): Rename to ...
7475 (traceframe_walk_blocks): ... this. Add callback filter argument,
7476 and use it.
7477 (traceframe_find_block_type): New, reimplemented on top of
7478 traceframe_walk_blocks.
7479 (build_traceframe_info_xml): New.
7480 (traceframe_read_info): New.
7481 * server.h (traceframe_read_info): Declare.
7482
4f3e6fb7
YQ
74832011-02-11 Yao Qi <yao@codesourcery.com>
7484
7485 * configure.ac: Call AC_PROG_RANLIB.
7486 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7487 * configure: Regenerate.
7488
764880b7
PA
74892011-02-07 Pedro Alves <pedro@codesourcery.com>
7490
7491 * server.c (gdb_read_memory): Change return semantics to allow
7492 partial transfers.
7493 (handle_search_memory_1): Adjust.
7494 (process_serial_event) <'m' packet>: Handle partial transfers.
7495 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7496
1c79eb8a
PA
74972011-01-28 Pedro Alves <pedro@codesourcery.com>
7498
7499 * regcache.c (init_register_cache): Initialize
7500 regcache->register_status.
7501 (free_register_cache): Release regcache->register_status.
7502 (regcache_cpy): Copy register_status.
7503 (registers_to_string): Print 'x's for unavailable registers.
7504 (supply_register): Mark the register's status valid or
7505 unavailable, depending on whether a buffer was passed in or not.
7506 (supply_register_zeroed): New.
7507 (supply_regblock): Mark the registers' status valid or
7508 unavailable, depending on whether a buffer was passed in or not.
7509 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7510 (struct regcache): New `register_status' field.
7511 (supply_register_zeroed): Declare.
7512 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7513 supply_register_zeroed, rather than passing a NULL buffer to
7514 supply_register.
7515 * tracepoint.c (fetch_traceframe_registers): Update comment.
7516
85724a0e
PA
75172011-01-28 Pedro Alves <pedro@codesourcery.com>
7518
7519 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7520 buffer explicit.
7521
d08aafef
PA
75222011-01-25 Pedro Alves <pedro@codesourcery.com>
7523
7524 * server.h (decode_xfer_write): Change prototype.
7525 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7526 and don't extract the annex here.
7527 * server.c (decode_xfer_read): Remove `annex' parameter,
7528 and don't extract the annex here.
7529 (decode_xfer): New.
7530 (struct qxfer): New.
7531 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7532 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7533 (handle_qxfer_statictrace): New functions, abstracted out from
7534 handle_query, and made to use the struct qxfer interface.
7535 (handle_threads_qxfer_proper): Rename to ...
7536 (handle_qxfer_threads_proper): ... this.
7537 (handle_threads_qxfer): Rename to ...
7538 (handle_qxfer_threads): ... this. Adjust.
7539 (qxfer_packets): New array.
7540 (handle_qxfer): New function.
7541 (handle_query): Use handle_qxfer.
7542
493e2a69
MS
75432011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7544
7545 * gdbreplay.c: Shorten lines of >= 80 columns.
7546 * linux-low.c: Ditto.
7547 * linux-ppc-low.c: Ditto.
7548 * linux-s390-low.c: Ditto.
7549 * linux-sparc-low.c: Ditto.
7550 * linux-x86-low.c: Ditto.
7551 * linux-xtensa-low.c: Ditto.
7552 * mem-break.c: Ditto.
7553 * nto-low.c: Ditto.
7554 * regcache.h: Ditto.
7555 * remote-utils.c: Ditto.
7556 * server.c: Ditto.
7557 * server.h: Ditto.
7558 * thread-db.c: Ditto.
7559 * tracepoint.c: Ditto.
7560 * utils.c: Ditto.
7561 * win32-low.h: Ditto.
7562
44944448
JB
75632011-01-05 Joel Brobecker <brobecker@adacore.com>
7564
7565 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7566 update.
7567
71ce852c
JB
75682011-01-01 Joel Brobecker <brobecker@adacore.com>
7569
7570 * server.c (gdbserver_version): Update copyright year in version
7571 output.
7572 * gdbreplay.c (gdbreplay_version): Ditto.
7573
eb826dc6
MF
75742010-12-29 Jie Zhang <jie.zhang@analog.com>
7575
7576 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7577 * linux-bfin-low.c: New file.
7578 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7579 PT_DATA_ADDR for BFIN targets.
7580 * Makefile.in (SFILES): Add linux-bfin-low.c.
7581 (clean): Remove reg-bfin.c.
7582 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7583 * README: Mention supported Blackfin targets.
7584
39ab222a
MF
75852010-12-23 Mike Frysinger <vapier@gentoo.org>
7586
7587 * .gitignore: New file.
7588
a1f2ce7d
MF
75892010-11-16 Mike Frysinger <vapier@gentoo.org>
7590
7591 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7592
f474844c
JZ
75932010-10-22 Jie Zhang <jie@codesourcery.com>
7594
7595 * Makefile.in: Add FLAGS_TO_PASS variable.
7596 (install): Remove dependency of install-only and recursively
7597 invoke make for install-only.
7598
f1048712
DE
75992010-10-04 Doug Evans <dje@google.com>
7600
7601 * Makefile.in (uninstall): Use $(DESTDIR).
7602
b53a1623
PA
76032010-09-24 Pedro Alves <pedro@codesourcery.com>
7604
e6ee044d
PA
7605 PR gdb/11842
7606
b53a1623
PA
7607 * linux-x86-low.c (compat_siginfo_from_siginfo)
7608 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7609 si_code is < 0. Check for si_code == SI_TIMER before checking for
7610 si_code < 0.
7611
fa1bd1e4
JB
76122010-09-13 Joel Brobecker <brobecker@adacore.com>
7613
7614 * lynx-i386-low.c: New file.
7615 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7616
47fac8f8
JB
76172010-09-13 Joel Brobecker <brobecker@adacore.com>
7618
7619 * lynx-low.c (ptrace_request_to_str): Remove handling for
7620 request values that have been removed in LynxOS 5.x.
7621
1adfc54d
JB
76222010-09-13 Joel Brobecker <brobecker@adacore.com>
7623
7624 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7625 <ptrace.h>
7626
c2a66c29
NS
76272010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7628
7629 * configure.ac: Add --enable-inprocess-agent option.
7630 * configure: Rebuilt.
7631
32fcada3
YQ
76322010-09-06 Yao Qi <yao@codesourcery.com>
7633
7634 * linux-low.c (linux_kill): Remove unused variable.
7635 (linux_stabilize_threads): Likewise.
7636 * server.c (start_inferior): Likewise.
7637 (queue_stop_reply_callback): Likewise.
7638 * tracepoint.c (do_action_at_tracepoint): Likewise.
7639
0cccb683
YQ
76402010-09-06 Yao Qi <yao@codesourcery.com>
7641
7642 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7643 on return.
7644
423ec54c
JK
76452010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7646
7647 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7648
12ac6819
PA
76492010-09-06 Pedro Alves <pedro@codesourcery.com>
7650
7651 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7652 "$(IPA_DEPFILES)".
7653
8ed54b31
JB
76542010-09-01 Joel Brobecker <brobecker@adacore.com>
7655
7656 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7657 gdbserver/lynx-ppc-low.c: New files.
7658 * Makefile.in (lynx_low_h): New variable.
7659 (lynx-low.o, lynx-ppc-low.o): New rules.
7660 * configure.ac: On LynxOS, link with -lnetinet.
7661 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7662 * configure: regenerate.
7663
bb0116a4
JB
76642010-09-01 Joel Brobecker <brobecker@adacore.com>
7665
7666 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7667 * configure.ac: Add check for vasprintf and vsnprintf.
7668 * configure, config.in: Regenerate.
7669 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7670
a778ab81 76712010-09-01 Joel Brobecker <brobecker@adacore.com>
7672
7673 * gdbreplay.c: Move include of alloca.h up, next to include of
7674 malloc.h.
7675 * server.h: Add include of malloc.h.
7676 * mem-break.c: Remove include of malloc.h.
7677 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7678
8b034a19 76792010-09-01 Joel Brobecker <brobecker@adacore.com>
7680
7681 * Makefile.in (memmem.o): Build with -Wno-error.
7682
76832010-09-01 Joel Brobecker <brobecker@adacore.com>
7684
7685 * utils.c (xsnprintf): Make non-static.
7686 * server.h: Add xsnprintf declaration.
7687 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7688 replace calls to snprintf by calls to xsnprintf throughout.
7689
76902010-09-01 Joel Brobecker <brobecker@adacore.com>
7691
7692 * configure.ac: Add configure check for alloca.
7693 * configure, config.in: Regenerate.
7694 * server.h: Include alloca.h if it exists.
7695 * gdbreplay.c: Include alloca.h if it exists.
7696
1a981360
PA
76972010-08-28 Pedro Alves <pedro@codesourcery.com>
7698
7699 * linux-low.c (__SIGRTMIN): Define if not already defined.
7700 (linux_create_inferior): Check for __ANDROID__ rather than
7701 __SIGRTMIN.
7702 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7703 are already deferred.
7704 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7705 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7706 stopped and already has a pending signal to report.
7707 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7708 a pending signal to report or is moving out of a jump pad.
7709 (linux_init_signals): Check for __ANDROID__ rather than
7710 __SIGRTMIN.
7711
b4d51a55
PA
77122010-08-28 Pedro Alves <pedro@codesourcery.com>
7713
7714 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7715 debug_threads check. Avoid a linear search when not doing debug
7716 output.
7717
ec48365d
PA
77182010-08-27 Pedro Alves <pedro@codesourcery.com>
7719
7720 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7721 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7722 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7723 (process_event): Change local fd's type to gdb_fildes_t.
7724 (create_file_handler): Adjust prototype.
7725 (delete_file_handler): Adjust prototype.
7726 (handle_file_event): Adjust prototype. Use pfildes.
7727 (create_file_event): Adjsut prototype.
7728 * remote-utils.c (remote_desc, listen_desc): Change type to
7729 gdb_fildes_t.
7730 * server.h: New gdb_fildes_t typedef.
7731 [USE_WIN32API]: Include winsock2.h.
7732 (delete_file_handler, add_file_handler): Adjust prototypes.
7733 (pfildes): Declare.
7734 * utils.c (pfildes): New.
7735
854d88f0
PA
77362010-08-27 Pedro Alves <pedro@codesourcery.com>
7737
7738 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7739 * configure: Regenerate.
7740
0146f85b
PA
77412010-08-27 Pedro Alves <pedro@codesourcery.com>
7742
7743 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7744 (linux_done_accessing_memory): ... this.
7745 (linux_target_ops): Adjust.
7746 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7747 * nto-low.c (nto_target_ops): Adjust comment.
7748 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7749 * spu-low.c (spu_target_ops): Adjust comment.
7750 * target.h (target_ops): Rename unprepare_to_access_memory field
7751 to done_accessing_memory.
7752 (unprepare_to_access_memory): Rename to ...
7753 (done_accessing_memory): ... this.
7754
90d74c30
PA
77552010-08-26 Pedro Alves <pedro@codesourcery.com>
7756
7757 * linux-low.c (linux_prepare_to_access_memory): New.
7758 (linux_unprepare_to_access_memory): New.
7759 (linux_target_ops): Install them.
7760 * server.c (read_memory): Rename to ...
7761 (gdb_read_memory): ... this. Use
7762 prepare_to_access_memory/prepare_to_access_memory.
7763 (write_memory): Rename to ...
7764 (gdb_write_memory): ... this. Use
7765 prepare_to_access_memory/prepare_to_access_memory.
7766 (handle_search_memory_1): Adjust.
7767 (process_serial_event): Adjust.
7768 * target.h (struct target_ops): New fields
7769 prepare_to_access_memory and unprepare_to_access_memory.
7770 (prepare_to_access_memory, unprepare_to_access_memory): New.
7771 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7772 prepare_to_access_memory/prepare_to_access_memory.
7773 * nto-low.c (nto_target_ops): Adjust.
7774 * spu-low.c (spu_target_ops): Adjust.
7775 * win32-low.c (win32_target_ops): Adjust.
7776
fd467969
PA
77772010-08-26 Pedro Alves <pedro@codesourcery.com>
7778
7779 * Makefile.in (WARN_CFLAGS): Get it from configure.
7780 (WERROR_CFLAGS): New.
7781 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7782 * configure.ac: Introduce --enable-werror, which adds -Werror to
7783 the compiler command line. Enabled by default. Disable with
7784 --disable-werror. Add -Wdeclaration-after-statement
7785 Wpointer-arith and -Wformat-nonliteral to warning flags.
7786 * configure: Regenerate.
7787
331e2f5f
PA
77882010-08-26 Pedro Alves <pedro@codesourcery.com>
7789
7790 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7791
e581f2b4
PA
77922010-08-26 Pedro Alves <pedro@codesourcery.com>
7793
7794 * gdbreplay.c (remote_error): New.
7795 (gdbchar): New.
7796 (expect): Use gdbchar. Check for error reading from GDB.
7797 Clarify sync error output.
7798 (play): Check for errors writing to GDB.
7799 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7800 * remote-utils.c (getpkt): Check for errors writing to the remote
7801 descriptor.
7802
3c11dd79
PA
78032010-08-25 Pedro Alves <pedro@codesourcery.com>
7804
7805 * linux-low.c (linux_wait_1): Move non-debugging code out of
7806 `debug_threads' control.
7807
d20a8ad9
PA
78082010-08-25 Pedro Alves <pedro@codesourcery.com>
7809
7810 * linux-low.c (linux_wait_1): Don't set last_status here.
7811 * server.c (push_event, queue_stop_reply_callback): Assert we're
7812 not pushing a TARGET_WAITKIND_IGNORE event.
7813 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7814 (myresume, handle_target_event): Set the thread's last_resume_kind
7815 and last_status from the target returned status.
7816
964e4306
PA
78172010-08-25 Pedro Alves <pedro@codesourcery.com>
7818
7819 PR threads/10729
7820
7821 * linux-x86-low.c (update_debug_registers_callback): New.
7822 (i386_dr_low_set_addr): Use it.
7823 (i386_dr_low_get_addr): New.
7824 (i386_dr_low_set_control): Use update_debug_registers_callback.
7825 (i386_dr_low_get_control): New.
7826 (i386_dr_low_get_status): Adjust.
7827 * linux-low.c (linux_stop_lwp): New.
7828 * linux-low.h (linux_stop_lwp): Declare.
7829
7830 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7831 argument instead of a i386_debug_reg_state.
7832 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7833 a i386_debug_reg_state.
7834 (i386_insert_aligned_watchpoint): Adjust.
7835 (i386_remove_aligned_watchpoint): Adjust.
7836 (i386_low_stopped_data_address): Read the debug registers from the
7837 inferior instead of from the mirrors.
7838 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7839 (i386_dr_low_get_addr): Declare.
7840 (i386_dr_low_get_control): Declare.
7841 (i386_dr_low_get_status): Change prototype.
7842
7843 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7844 (i386_dr_low_get_addr): New.
7845 (i386_dr_low_get_control): New.
7846 (i386_dr_low_get_status): Adjust prototype. Return
7847 dr_status_mirror.
7848 (i386_initial_stuff): Clear dr_status_mirror and
7849 dr_control_mirror.
7850 (i386_get_thread_context): Adjust.
7851 (i386_set_thread_context): Adjust.
7852 (i386_thread_added): Adjust.
7853
5f21a75b
PA
78542010-08-24 Pedro Alves <pedro@codesourcery.com>
7855
7856 * linux-low.h (linux_thread_area): Delete declaration.
7857
3e4c1235
TS
78582010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7859
7860 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7861 after its termination.
7862
1971b033
PA
78632010-08-09 Pedro Alves <pedro@codesourcery.com>
7864
7865 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7866 (gdb_wants_all_stopped): Delete.
7867 (linux_wait_1): Don't call them.
7868 * server.c (handle_v_cont): Tag all threads as want-stopped.
7869 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7870 stopped as "client-wants-stopped".
7871
310444ac
PA
78722010-07-31 Pedro Alves <pedro@codesourcery.com>
7873
7874 * Makefile.in (signals_h): New.
7875 (server_h): Depend on it.
7876 (server.o): Don't depend on $(signals_def).
7877 (signals.o): Depend on $(signals_def).
7878
a19cae16
JK
78792010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7880
7881 * Makefile.in (signals_def): New.
7882 (server_h): Append include/gdb/signals.h and signals_def.
7883 (server.o): Append signals_def.
7884
30d50328
JK
78852010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7886
7887 * server.c (handle_target_event): Use target_signal_to_host for
7888 resume_info.sig initialization.
7889 * target.h (struct thread_resume) <sig>: New comment.
7890
5c3216e2
OS
78912010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7892
c6f46ca0
OS
7893 * server.c (handle_query): strcpy() the returned string from paddress()
7894 instead of sprintf().
5c3216e2
OS
7895 * utils.c (paddress): Return phex_nz().
7896
6bd31874
JB
78972010-07-07 Joel Brobecker <brobecker@adacore.com>
7898
7899 * server.c (handle_v_cont): Call mourn_inferior if process
7900 just exited.
7901 (myresume): Likewise.
7902
0fb4aa4b
PA
79032010-07-01 Pedro Alves <pedro@codesourcery.com>
7904
7905 Static tracepoints, and integration with UST.
7906
7907 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7908 * mem-break.c (uninsert_all_breakpoints)
7909 (reinsert_all_breakpoints): New.
7910 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7911 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7912 (gdb_agent_ust_loaded, helper_thread_id)
7913 (gdb_agent_helper_thread_id): New macros.
7914 (struct ipa_sym_addresses): Add addr_ust_loaded,
7915 addr_helper_thread_id, addr_cmd_buf.
7916 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7917 (in_process_agent_loaded_ust): New.
7918 (write_e_ust_not_loaded): New.
7919 (maybe_write_ipa_ust_not_loaded): New.
7920 (struct collect_static_trace_data_action): New.
7921 (enum tracepoint_type) <static_tracepoint>: New.
7922 (struct tracepoint) <handle>: Mention static tracepoints.
7923 (struct static_tracepoint_ctx): New.
7924 (CMD_BUF_SIZE): New.
7925 (add_tracepoint_action): Handle static tracepoint actions.
7926 (unprobe_marker_at): New.
7927 (clear_installed_tracepoints): Handle static tracepoints.
7928 (cmd_qtdp): Handle static tracepoints.
7929 (probe_marker_at): New.
7930 (cmd_qtstart): Handle static tracepoints.
7931 (response_tracepoint): Handle static tracepoints.
7932 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7933 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7934 (get_context_regcache): Handle static tracepoints.
7935 (do_action_at_tracepoint): Handle static tracepoint actions.
7936 (traceframe_find_block_type): Handle static trace data blocks.
7937 (traceframe_read_sdata): New.
7938 (download_tracepoints): Download static tracepoint actions.
7939 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7940 (GDB_PROBE_NAME): New.
7941 (ust_ops): New.
7942 (GET_UST_SYM): New.
7943 (USTF): New.
7944 (dlsym_ust): New.
7945 (ust_marker_to_static_tracepoint): New.
7946 (gdb_probe): New.
7947 (collect_ust_data_at_tracepoint): New.
7948 (gdb_ust_probe): New.
7949 (UNIX_PATH_MAX, SOCK_DIR): New.
7950 (gdb_ust_connect_sync_socket): New.
7951 (resume_thread, stop_thread): New.
7952 (run_inferior_command): New.
7953 (init_named_socket): New.
7954 (gdb_ust_socket_init): New.
7955 (cstr_to_hexstr): New.
7956 (next_st): New.
7957 (first_marker, next_marker): New.
7958 (response_ust_marker): New.
7959 (cmd_qtfstm, cmd_qtsstm): New.
7960 (unprobe_marker_at, probe_marker_at): New.
7961 (cmd_qtstmat, gdb_ust_thread): New.
7962 (gdb_ust_init): New.
7963 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7964 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7965 (ST_REGENTRY): New.
7966 (x86_64_st_collect_regmap): New.
7967 (X86_64_NUM_ST_COLLECT_GREGS): New.
7968 (AMD64_RIP_REGNUM): New.
7969 (supply_static_tracepoint_registers): New.
7970 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7971 (ST_REGENTRY): New.
7972 (i386_st_collect_regmap): New.
7973 (i386_NUM_ST_COLLECT_GREGS): New.
7974 (supply_static_tracepoint_registers): New.
7975 * server.c (handle_query): Handle qXfer:statictrace:read.
7976 <qSupported>: Report support for StaticTracepoints, and
7977 qXfer:statictrace:read features.
7978 * server.h (traceframe_read_sdata)
7979 (supply_static_tracepoint_registers): Declare.
7980 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7981 (unpack_varlen_hex): Include in IPA build.
7982 * Makefile.in (ustlibs, ustinc): New.
7983 (IPA_OBJS): Add remote-utils-ipa.o.
7984 ($(IPA_LIB)): Link -ldl and -lpthread.
7985 (UST_CFLAGS): New.
7986 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7987 * config.in, configure: Regenerate.
7988
9e4344e5
PA
79892010-06-20 Ian Lance Taylor <iant@google.com>
7990 Pedro Alves <pedro@codesourcery.com>
7991
7992 * linux-x86-low.c (always_true): Delete.
7993 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7994 trying to fool the compiler with always_true.
7995
c6beb2cb
PA
79962010-06-20 Pedro Alves <pedro@codesourcery.com>
7997
7998 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7999 conditions in gdbserver.
8000
d2ed6730
UW
80012010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8002
8003 * spu-low.c (spu_read_memory): Wrap around local store limit.
8004 (spu_write_memory): Likewise.
8005
4e29fb54
PA
80062010-06-15 Pedro Alves <pedro@codesourcery.com>
8007
8008 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8009 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8010 LONGEST uses.
8011 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8012 uses.
8013 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8014 uses with LONGEST uses.
8015
6a271cae
PA
80162010-06-14 Stan Shebs <stan@codesourcery.com>
8017 Pedro Alves <pedro@codesourcery.com>
8018
8019 Bytecode compiler.
8020
8021 * linux-x86-low.c: Include limits.h.
8022 (add_insns): New.
8023 (always_true): New.
8024 (EMIT_ASM): New.
8025 (EMIT_ASM32): New.
8026 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8027 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8028 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8029 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8030 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8031 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8032 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8033 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8034 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8035 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8036 (amd64_emit_void_call_2): New.
8037 (amd64_emit_ops): New.
8038 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8039 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8040 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8041 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8042 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8043 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8044 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8045 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8046 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8047 (i386_emit_stack_adjust, i386_emit_int_call_1)
8048 (i386_emit_void_call_2): New.
8049 (i386_emit_ops): New.
8050 (x86_emit_ops): New.
8051 (the_low_target): Install x86_emit_ops.
8052 * server.h (struct emit_ops): New.
8053 (get_raw_reg_func_addr): Declare.
8054 (current_insn_ptr, emit_error): Declare.
8055 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8056 (set_trace_state_variable_value): New defines.
8057 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8058 addr_get_trace_state_variable_value and
8059 addr_set_trace_state_variable_value.
8060 (symbol_list): New fields for get_raw_reg,
8061 get_trace_state_variable_value and set_trace_state_variable_value.
8062 (condfn): New typedef.
8063 (struct tracepoint): New field `compiled_cond'.
8064 (do_action_at_tracepoint): Clear compiled_cond.
8065 (get_trace_state_variable_value, set_trace_state_variable_value):
8066 Export in the IPA.
8067 (condition_true_at_tracepoint): If there's a compiled condition,
8068 run that.
8069 (current_insn_ptr, emit_error): New globals.
8070 (struct bytecode_address): New.
8071 (get_raw_reg_func_addr): New.
8072 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8073 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8074 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8075 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8076 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8077 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8078 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8079 (compile_tracepoint_condition, compile_bytecodes): New.
8080 * target.h (emit_ops): Forward declare.
8081 (struct target_ops): New field emit_ops.
8082 (target_emit_ops): New.
8083 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8084 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8085 * linux-low.c (linux_emit_ops): New.
8086 (linux_target_ops): Install it.
8087 * linux-low.h (struct linux_target_ops): New field emit_ops.
8088
92b72907
UW
80892010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8090
8091 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8092 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8093
fa593d66
PA
80942010-06-01 Pedro Alves <pedro@codesourcery.com>
8095 Stan Shebs <stan@codesourcery.com>
8096
8097 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8098 (all): Depend on $(extra_libraries).
8099 (install-only): Install the IPA.
8100 (IPA_OBJS, IPA_LIB): New.
8101 (clean): Remove the IPA lib.
8102 (IPAGENT_CFLAGS): New.
8103 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8104 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8105 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8106 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8107 * configure.ac: Check for atomic builtins support in the compiler.
8108 (IPA_DEPFILES, extra_libraries): Define.
8109 * configure.srv (ipa_obj): Add description.
8110 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8111 (i[34567]86-*-linux*): Set ipa_obj.
8112 (x86_64-*-linux*): Set ipa_obj.
8113 * linux-low.c (stabilizing_threads): New.
8114 (supports_fast_tracepoints): New.
8115 (linux_detach): Stabilize threads before detaching.
8116 (handle_tracepoints): Handle internal tracing breakpoints. Assert
8117 the lwp is either not stabilizing, or is moving out of a jump pad.
8118 (linux_fast_tracepoint_collecting): New.
8119 (maybe_move_out_of_jump_pad): New.
8120 (enqueue_one_deferred_signal): New.
8121 (dequeue_one_deferred_signal): New.
8122 (linux_wait_for_event_1): If moving out of a jump pad, defer
8123 pending signals to later.
8124 (linux_stabilize_threads): New.
8125 (linux_wait_1): Check if threads need moving out of jump pads, and
8126 do it if so.
8127 (stuck_in_jump_pad_callback): New.
8128 (move_out_of_jump_pad_callback): New.
8129 (lwp_running): New.
8130 (linux_resume_one_lwp): Handle moving out of jump pads.
8131 (linux_set_resume_request): Dequeue deferred signals.
8132 (need_step_over_p): Also step over fast tracepoint jumps.
8133 (start_step_over): Also uninsert fast tracepoint jumps.
8134 (finish_step_over): Also reinsert fast tracepoint jumps.
8135 (linux_install_fast_tracepoint_jump): New.
8136 (linux_target_ops): Install linux_stabilize_threads and
8137 linux_install_fast_tracepoint_jump_pad.
8138 * linux-low.h (linux_target_ops) <get_thread_area,
8139 install_fast_tracepoint_jump_pad>: New fields.
8140 (struct lwp_info) <collecting_fast_tracepoint,
8141 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8142 (linux_get_thread_area): Declare.
8143 * linux-x86-low.c (jump_insn): New.
8144 (x86_get_thread_area): New.
8145 (append_insns): New.
8146 (push_opcode): New.
8147 (amd64_install_fast_tracepoint_jump_pad): New.
8148 (i386_install_fast_tracepoint_jump_pad): New.
8149 (x86_install_fast_tracepoint_jump_pad): New.
8150 (the_low_target): Install x86_get_thread_area and
8151 x86_install_fast_tracepoint_jump_pad.
8152 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8153 (struct fast_tracepoint_jump): New.
8154 (fast_tracepoint_jump_insn): New.
8155 (fast_tracepoint_jump_shadow): New.
8156 (find_fast_tracepoint_jump_at): New.
8157 (fast_tracepoint_jump_here): New.
8158 (delete_fast_tracepoint_jump): New.
8159 (set_fast_tracepoint_jump): New.
8160 (uninsert_fast_tracepoint_jumps_at): New.
8161 (reinsert_fast_tracepoint_jumps_at): New.
8162 (set_breakpoint_at): Use write_inferior_memory.
8163 (uninsert_raw_breakpoint): Use write_inferior_memory.
8164 (check_mem_read): Mask out fast tracepoint jumps.
8165 (check_mem_write): Mask out fast tracepoint jumps.
8166 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8167 (set_fast_tracepoint_jump): Declare.
8168 (delete_fast_tracepoint_jump)
8169 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8170 (reinsert_fast_tracepoint_jumps_at): Declare.
8171 * regcache.c: Don't compile many functions when building the
8172 in-process agent library.
8173 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8174 the register buffer in the heap.
8175 (free_register_cache): If the register buffer isn't owned by the
8176 regcache, don't free it.
8177 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8178 pre-existing register caches.
8179 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8180 type.
8181 (convert_ascii_to_int): : Constify `from' parameter type.
8182 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8183 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8184 the needed buffer in-place.
8185 (relocate_instruction): New.
8186 * server.c (handle_query) <qSymbols>: If the target supports
8187 tracepoints, give it a chance of looking up symbols. Report
8188 support for fast tracepoints.
8189 (handle_status): Stabilize threads.
8190 (process_serial_event): Adjust.
8191 * server.h (struct fast_tracepoint_jump): Forward declare.
8192 (struct process_info) <fast_tracepoint_jumps>: New field.
8193 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8194 (decode_X_packet, decode_M_packet): Adjust.
8195 (relocate_instruction): Declare.
8196 (in_process_agent_loaded): Declare.
8197 (tracepoint_look_up_symbols): Declare.
8198 (struct fast_tpoint_collect_status): Declare.
8199 (fast_tracepoint_collecting): Declare.
8200 (force_unlock_trace_buffer): Declare.
8201 (handle_tracepoint_bkpts): Declare.
8202 (initialize_low_tracepoint)
8203 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8204 * target.h (struct target_ops) <stabilize_threads,
8205 install_fast_tracepoint_jump_pad>: New fields.
8206 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8207 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8208 [HAVE_STDINT_H]: Include stdint.h.
8209 (trace_debug_1): Rename to ...
8210 (trace_vdebug): ... this.
8211 (trace_debug): Rename to ...
8212 (trace_debug_1): ... this. Add `level' parameter.
8213 (trace_debug): New.
8214 (ATTR_USED, ATTR_NOINLINE): New.
8215 (IP_AGENT_EXPORT): New.
8216 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8217 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8218 (about_to_request_buffer_space, trace_buffer_is_full)
8219 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8220 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8221 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8222 (traceframe_write_count, traceframes_created)
8223 (trace_state_variables)
8224 New renaming defines.
8225 (struct ipa_sym_addresses): New.
8226 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8227 (symbol_list): New.
8228 (ipa_sym_addrs): New.
8229 (all_tracepoint_symbols_looked_up): New.
8230 (in_process_agent_loaded): New.
8231 (write_e_ipa_not_loaded): New.
8232 (maybe_write_ipa_not_loaded): New.
8233 (tracepoint_look_up_symbols): New.
8234 (debug_threads) [IN_PROCESS_AGENT]: New.
8235 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8236 (UNKNOWN_SIDE_EFFECTS): New.
8237 (stop_tracing): New.
8238 (flush_trace_buffer): New.
8239 (stop_tracing_bkpt): New.
8240 (flush_trace_buffer_bkpt): New.
8241 (read_inferior_integer): New.
8242 (read_inferior_uinteger): New.
8243 (read_inferior_data_pointer): New.
8244 (write_inferior_data_pointer): New.
8245 (write_inferior_integer): New.
8246 (write_inferior_uinteger): New.
8247 (struct collect_static_trace_data_action): Delete.
8248 (enum tracepoint_type): New.
8249 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
8250 <actions_str, step_actions, step_actions_str>: Only include in
8251 GDBserver.
fa593d66
PA
8252 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8253 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8254 (tracepoints): Use IP_AGENT_EXPORT.
8255 (last_tracepoint): Don't include in the IPA.
8256 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8257 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8258 (alloced_trace_state_variables): New.
8259 (trace_state_variables): Use IP_AGENT_EXPORT.
8260 (traceframe_t): Delete unused variable.
8261 (circular_trace_buffer): Don't include in the IPA.
8262 (trace_buffer_start): Delete.
8263 (struct trace_buffer_control): New.
8264 (trace_buffer_free): Delete.
8265 (struct ipa_trace_buffer_control): New.
8266 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8267 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8268 New.
8269 (trace_buffer_ctrl): New.
8270 (TRACE_BUFFER_CTRL_CURR): New.
8271 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8272 Reimplement as macros.
8273 (trace_buffer_wrap): Delete.
8274 (traceframe_write_count, traceframe_read_count)
8275 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8276 (struct tracepoint_hit_ctx) <type>: New field.
8277 (struct fast_tracepoint_ctx): New.
8278 (memory_barrier): New.
8279 (cmpxchg): New.
8280 (record_tracepoint_error): Update atomically in the IPA.
8281 (clear_inferior_trace_buffer): New.
8282 (about_to_request_buffer_space): New.
8283 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8284 updating the same buffer.
8285 (add_tracepoint): Default the tracepoint's type to trap
8286 tracepoint, and orig_size to -1.
8287 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8288 internal variables.
8289 (create_trace_state_variable): New parameter `gdb'. Handle it.
8290 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8291 (cmd_qtdp): Handle fast tracepoints.
8292 (cmd_qtdv): Adjust.
8293 (max_jump_pad_size): New.
8294 (gdb_jump_pad_head): New.
8295 (get_jump_space_head): New.
8296 (claim_jump_space): New.
8297 (sort_tracepoints): New.
8298 (MAX_JUMP_SIZE): New.
8299 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8300 IPA.
8301 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8302 support. Upload fast traceframes, and delete internal IPA
8303 breakpoints.
8304 (stop_tracing_handler): New.
8305 (flush_trace_buffer_handler): New.
8306 (cmd_qtstop): Upload fast tracepoints.
8307 (response_tracepoint): Handle fast tracepoints.
8308 (tracepoint_finished_step): Upload fast traceframes. Set the
8309 tracepoint hit context's tracepoint type.
8310 (handle_tracepoint_bkpts): New.
8311 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8312 type. Add comment about fast tracepoints.
8313 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8314 non-existing action_str field.
8315 (get_context_regcache): Handle fast tracepoints.
8316 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8317 to the regcache.
8318 (fast_tracepoint_from_jump_pad_address): New.
8319 (fast_tracepoint_from_ipa_tpoint_address): New.
8320 (collecting_t): New.
8321 (force_unlock_trace_buffer): New.
8322 (fast_tracepoint_collecting): New.
8323 (collecting): New.
8324 (gdb_collect): New.
8325 (write_inferior_data_ptr): New.
8326 (target_tp_heap): New.
8327 (target_malloc): New.
8328 (download_agent_expr): New.
8329 (UALIGN): New.
8330 (download_tracepoints): New.
8331 (download_trace_state_variables): New.
8332 (upload_fast_traceframes): New.
8333 (IPA_FIRST_TRACEFRAME): New.
8334 (IPA_NEXT_TRACEFRAME_1): New.
8335 (IPA_NEXT_TRACEFRAME): New.
8336 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8337 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8338 (gdb_jump_pad_buffer_end): New.
8339 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8340 (initialize_tracepoint): Adjust.
8341 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8342 buffer. Initialize the low module.
8343 * utils.c (PREFIX, TOOLNAME): New.
8344 (malloc_failure): Use PREFIX.
8345 (error): In the IPA, an error causes an exit.
8346 (fatal, warning): Use PREFIX.
8347 (internal_error): Use TOOLNAME.
8348 (NUMCELLS): Increase to 10.
8349 * configure, config.in: Regenerate.
8350
d149dd1d
PA
83512010-06-01 Pedro Alves <pedro@codesourcery.com>
8352
8353 * server.c (handle_query) <qSupported>: Do two passes over the
8354 qSupported string to avoid nesting strtok.
8355
f6528abd
JK
83562010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8357
8358 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8359 (CDEPS): New.
8360 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8361 -Wl,--dynamic-list.
8362 * configure: Regenerate.
8363 * proc-service.list: New.
8364
ca2a87a0
JK
83652010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8366
8367 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8368 New comment.
8369
363a6e9f
OS
83702010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8371
8372 * gdbreplay.c (remote_open): Check error return from socket() call by
8373 its equality to -1 not by it being negative.
8374 * remote-utils.c (remote_open): Likewise.
8375
d23b6cb1
PA
83762010-05-23 Pedro Alves <pedro@codesourcery.com>
8377
8378 * config.h: Regenerate.
8379
28d3cf85
MK
83802010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8381
8382 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8383 doesn't provide PTRACE_GET_THREAD_AREA.
8384
fea36a59
MK
83852010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8386
8387 * linux-m68k-low.c: Include <asm/ptrace.h>
8388 (ps_get_thread_area): Implement.
8389
24b066ba
DE
83902010-05-03 Doug Evans <dje@google.com>
8391
8392 * event-loop.c (struct callback_event): New struct.
8393 (callback_list): New global.
8394 (append_callback_event, delete_callback_event): New functions.
8395 (process_callback): New function.
8396 (start_event_loop): Call it.
8397 * remote-utils.c (NOT_SCHEDULED): Define.
8398 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8399 moved out of readchar.
8400 (readchar): Rewrite. Call reschedule before returning.
8401 (reset_readchar): New function.
8402 (remote_close): Call it.
8403 (process_remaining, reschedule): New functions.
8404 * server.h (callback_handler_func): New typedef.
8405 (append_callback_event, delete_callback_event): Declare.
8406
9836d6ea
PA
84072010-05-03 Pedro Alves <pedro@codesourcery.com>
8408
8409 * proc-service.c (ps_pglobal_lookup): Use
8410 thread_db_look_up_one_symbol.
8411 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8412 parameter. Use it instead of all_symbols_looked_up.
8413 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8414 field.
8415 (all_symbols_looked_up): Don't declare.
8416 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8417 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8418 field.
8419 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8420 Set all_symbols_looked_up here.
8421 (thread_db_look_up_one_symbol): New.
8422 (thread_db_get_tls_address): Adjust.
8423 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8424 thread_db object on the heap, and tentatively set it in the
8425 process structure.
8426 (thread_db_init): Don't set all_symbols_looked_up here.
8427 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8428
7984d532
PA
84292010-05-03 Pedro Alves <pedro@codesourcery.com>
8430
8431 * linux-low.c (linux_kill, linux_detach): Adjust.
8432 (status_pending_p_callback): Remove redundant statement. Check
8433 for !TARGET_WAITIKIND_IGNORE, instead of
8434 TARGET_WAITKIND_STOPPED.
8435 (handle_tracepoints): Make sure LWP is locked. Adjust.
8436 (linux_wait_for_event_1): Adjust.
8437 (linux_cancel_breakpoints): New.
8438 (unsuspend_one_lwp): New.
8439 (unsuspend_all_lwps): New.
8440 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8441 (send_sigstop_callback): Change return type to int, add new
8442 `except' parameter and handle it.
8443 (suspend_and_send_sigstop_callback): New.
8444 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8445 pass them down. If SUSPEND, also increment the lwp's suspend
8446 count.
8447 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8448 (need_step_over_p): Don't consider suspended LWPs.
8449 (start_step_over): Adjust.
8450 (proceed_one_lwp): Change return type to int, add new `except'
8451 parameter and handle it.
8452 (unsuspend_and_proceed_one_lwp): New.
8453 (proceed_all_lwps): Use find_inferior instead of
8454 for_each_inferior.
8455 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8456 also decrement the suspend count of LWPs. Pass `except' down,
8457 instead of hacking its suspend count.
8458 (linux_pause_all): Add `freeze' parameter. Adjust.
8459 (linux_unpause_all): New.
8460 (linux_target_ops): Install linux_unpause_all.
8461 * server.c (handle_status): Adjust.
8462 * target.h (struct target_ops): New fields `unpause_all' and
8463 `cancel_breakpoints'. Add new parameter to `pause_all'.
8464 (pause_all): Add new `freeze' parameter.
8465 (unpause_all): New.
8466 (cancel_breakpoints): New.
8467 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8468 cancel breakpoints.
8469 (cmd_qtstart): Pause threads.
8470 (stop_tracing): Pause threads, and cancel breakpoints.
8471 * win32-low.c (win32_target_ops): Adjust.
8472
e471f25b
PA
84732010-05-03 Pedro Alves <pedro@codesourcery.com>
8474
8475 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8476 the inferior right away from here...
8477 (linux_wait_1): ... to here, and adjust to check the thread's
8478 last_resume_kind instead of the lwp's step or stop_expected flags.
8479
1915ef4f
PA
84802010-05-02 Pedro Alves <pedro@codesourcery.com>
8481
8482 * README: Use consistent `GDB' and `GDBserver' spellings.
8483
f9e39928
PA
84842010-05-02 Pedro Alves <pedro@codesourcery.com>
8485
8486 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8487 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8488 (linux_detach_one_lwp): Assume the lwp is stopped.
8489 (any_thread_of): Delete.
8490 (linux_detach): Stop all lwps here. Don't blindly delete all
8491 breakpoints.
8492 (delete_lwp_callback): New.
8493 (linux_mourn): Delete all lwps of the process that is gone.
8494 (linux_wait_1): Don't delete the last lwp of the process here.
8495 * mem-break.h (mark_breakpoints_out): Declare.
8496 * mem-break.c (mark_breakpoints_out): New.
8497 (free_all_breakpoints): Use it.
8498 * server.c (handle_target_event): If the process is gone, mark
8499 breakpoints out.
8500 * thread-db.c (struct thread_db) <create_bp>: New field.
8501 (thread_db_enable_reporting): Fix prototype. Store a thread event
8502 breakpoint reference in the thread_db struct.
8503 (thread_db_load_search): Clear the thread_db object.
8504 (try_thread_db_load_1): Ditto.
8505 (switch_to_process): New.
8506 (disable_thread_event_reporting): Use it.
8507 (remove_thread_event_breakpoints): New.
8508 (thread_db_detach, thread_db_mourn): Use it.
8509
1e7fc18c
PA
85102010-05-01 Pedro Alves <pedro@codesourcery.com>
8511
8512 * linux-low.c (linux_enable_event_reporting): New.
8513 (linux_wait_for_event_1, handle_extended_wait): Use it.
8514
02fc4de7
PA
85152010-04-30 Pedro Alves <pedro@codesourcery.com>
8516
8517 * linux-low.c (linux_kill_one_lwp, linux_kill)
8518 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8519 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8520 SIGSTOP even if the LWP is stopped.
8521 (send_sigstop_callback): New.
8522 (stop_all_lwps): Use send_sigstop_callback instead.
8523 (linux_resume_one_thread): Adjust.
8524 (proceed_one_lwp): Still proceed an LWP that the client has
8525 requested to stop, if we haven't reported it as stopped yet. Make
8526 sure that LWPs the client want stopped, have a pending SIGSTOP.
8527
bc3b5632
DE
85282010-04-26 Doug Evans <dje@google.com>
8529
ae1ada35
DE
8530 * server.c (handle_general_set): Make static.
8531
bc3b5632
DE
8532 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8533 Print received char after testing for error/eof instead of before.
8534 (input_interrupt): Tweak comment.
8535
65730243
DE
85362010-04-23 Doug Evans <dje@google.com>
8537
8538 * server.c (start_inferior): Print inferior argv if --debug.
8539
a8ae7dc0
AR
85402010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8541
8542 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8543 * nto-x86-low.c: Include server.h
8544
1c07cc19
PM
85452010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8546
8547 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8548 be consistent with other sources of this directory.
8549 (init_registers_amd64): Correct name of source file of this function
8550 in the comment.
8551
e0a61e09
PM
85522010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8553
8554 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8555 64-bit executables.
8556
54709339
PM
85572010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8558
8559 * win32-i386-low.c: Add 64-bit support.
8560 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8561 (init_registers_amd64): Declare.
8562 (mappings): Add 64-bit version of array.
8563 (init_windows_x86): New function.
8564 (the_low_target): Change init_arch field to init_windows_x86.
8565
e8f0053d
PM
85662010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8567
8568 * win32-low.c: Adapt to support also 64-bit architecture.
8569 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8570 (get_image_name): Use SIZE_T type for local variable `done'.
8571 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8572 (toolhelp_get_dll_name): Idem.
8573 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8574 Use uintptr_t typecast to avoid warning.
8575 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8576 (handle_exception): Use phex_nz to avoid warning.
8577 (win32_wait): Remove unused local variable `process'.
8578
c481e77e
PM
85792010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8580
8581 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8582 `amd64-avx.o'.
8583
12ea4b69
PM
85842010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8585
8586 * configure.ac: Use `ws2_32' library for srv_mingw.
8587 * configure: Regenerate.
8588 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8589 * remote-utils.c: Likewise.
8590
f6d1620c
L
85912010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8592
8593 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8594 if __x86_64__ is defined.
8595
8e642873
PM
85962010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8597
8598 * configure: Regenerate.
8599
711e434b
PM
86002010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8601
8602 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8603 * target.h (target_ops): New get_tib_address field.
8604 * win32-low.h (win32_thread_info): Add thread_local_base field.
8605 * win32-low.c (child_add_thread): Add tlb argument.
8606 Set thread_local_base field to TLB.
8607 (get_child_debug_event): Adapt to child_add_thread change.
8608 (win32_get_tib_address): New function.
8609 (win32_target_ops): Set get_tib_address field to
8610 win32_get_tib_address.
8611 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8612
505106cd
PA
86132010-04-12 Pedro Alves <pedro@codesourcery.com>
8614
505106cd
PA
8615 * linux-low.c (linux_mourn): Also remove the process.
8616 * server.c (handle_target_event): Don't remove the process here.
8617 * nto-low.c (nto_mourn): New.
8618 (nto_target_ops): Install it.
8619 * spu-low.c (spu_mourn): New.
8620 (spu_target_ops): Install it.
8621 * win32-low.c (win32_mourn): New.
8622 (win32_target_ops): Install it.
8623
e8470a06
PA
86242010-04-12 Pedro Alves <pedro@codesourcery.com>
8625
8626 * server.h (buffer_xml_printf): Remove redundant `;'.
8627
45ba0d02
PA
86282010-04-12 Pedro Alves <pedro@codesourcery.com>
8629
8630 * regcache.c (set_register_cache): Invalidate regcaches before
8631 changing the register cache layout.
8632 (regcache_invalidate_one): Allow a NULL regcache.
8633 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8634 regcaches before changing the register cache layout or the target
8635 regsets.
8636
59e04013
L
86372010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8638
8639 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8640 variable warning on Linux/x86-64.
8641
8336d594
PA
86422010-04-11 Pedro Alves <pedro@codesourcery.com>
8643
8644 GDBserver disconnected tracing support.
8645
8646 * linux-low.c (linux_remove_process): Delete.
8647 (add_lwp): Don't set last_resume_kind here.
8648 (linux_kill): Use `mourn'.
8649 (linux_detach): Use `thread_db_detach', and `mourn'.
8650 (linux_mourn): New.
8651 (linux_attach_lwp_1): Adjust comment.
8652 (linux_attach): last_resume_kind moved the thread_info; adjust.
8653 (status_pending_p_callback): Adjust.
8654 (linux_wait_for_event_1): Adjust.
8655 (count_events_callback, select_singlestep_lwp_callback)
8656 (select_event_lwp_callback, cancel_breakpoints_callback)
8657 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8658 (proceed_one_lwp): Adjust.
8659 (linux_async): Add debug output.
8660 (linux_thread_stopped): New.
8661 (linux_pause_all): New.
8662 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8663 linux_pause_all.
8664 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8665 (thread_db_free): Delete declaration.
8666 (thread_db_detach, thread_db_mourn): Declare.
8667 * thread-db.c (thread_db_init): Use thread_db_mourn.
8668 (thread_db_free): Delete, split in two.
8669 (disable_thread_event_reporting): New.
8670 (thread_db_detach): New.
8671 (thread_db_mourn): New.
8672
8673 * server.h (struct thread_info) <last_resume_kind>: New field.
8674 <attached>: Add comment.
8675 <gdb_detached>: New field.
8676 (handler_func): Change return type to int.
8677 (handle_serial_event, handle_target_event): Ditto.
8678 (gdb_connected): Declare.
8679 (tracing): Delete.
8680 (disconnected_tracing): Declare.
8681 (stop_tracing): Declare.
8682
8683 * server.c (handle_query) <qSupported>: Report support for
8684 disconnected tracing.
8685 (queue_stop_reply_callback): Account for running threads.
8686 (gdb_wants_thread_stopped): New.
8687 (gdb_wants_all_threads_stopped): New.
8688 (gdb_reattached_process): New.
8689 (handle_status): Clear the `gdb_detached' flag of all processes.
8690 In all-stop, stop all threads.
8691 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8692 (process_serial_event): If the remote connection breaks, or if an
8693 exit was forced with "monitor exit", force an event loop exit.
8694 Handle disconnected tracing on detach.
8695 (handle_serial_event): Adjust.
8696 (handle_target_event): If GDB isn't connected, forward events back
8697 to the inferior, unless the last process exited, in which case,
8698 exit gdbserver. Adjust interface.
8699
8700 * remote-utils.c (remote_open): Don't block in accept. Instead
8701 register an event loop source on the listen socket file
8702 descriptor. Refactor bits into ...
8703 (listen_desc): ... this new global.
8704 (gdb_connected): ... this new function.
8705 (enable_async_notification): ... this new function.
8706 (handle_accept_event): ... this new function.
8707 (remote_close): Clear remote_desc.
8708
8709 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8710
8711 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8712 New fields.
8713 (mourn_inferior): Define.
8714 (target_process_qsupported): Avoid the dangling else problem.
8715 (thread_stopped): Define.
8716 (pause_all): Define.
8717 (target_waitstatus_to_string): Declare.
8718 * target.c (target_waitstatus_to_string): New.
8719
8720 * tracepoint.c (tracing): Make extern.
8721 (disconnected_tracing): New.
8722 (stop_tracing): Make extern. Handle tracing stops due to GDB
8723 disconnecting.
8724 (cmd_qtdisconnected): New.
8725 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8726 (handle_tracepoint_general_set): Handle QTDisconnected.
8727
8728 * event-loop.c (event_handler_func): Change return type to int.
8729 (process_event): Bail out if the event handler wants the event
8730 loop to stop.
8731 (handle_file_event): Ditto.
8732 (start_event_loop): Bail out if the event handler wants the event
8733 loop to stop.
8734
8735 * nto-low.c (nto_target_ops): Adjust.
8736 * spu-low.c (spu_wait): Don't remove the process here.
8737 (spu_target_ops): Adjust.
8738 * win32-low.c (win32_wait): Don't remove the process here.
8739 (win32_target_ops): Adjust.
8740
5d267c4c
PA
87412010-04-11 Pedro Alves <pedro@codesourcery.com>
8742
8743 * regcache.c (realloc_register_cache): Invalidate inferior's
8744 regcache before recreating it.
8745
623ccd72
PA
87462010-04-09 Pedro Alves <pedro@codesourcery.com>
8747
8748 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8749
219f2f23
PA
87502010-04-09 Stan Shebs <stan@codesourcery.com>
8751 Pedro Alves <pedro@codesourcery.com>
8752
8753 * server.h (LONGEST): New.
8754 (struct thread_info) <while_stepping>: New field.
8755 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8756 Declare.
8757 (initialize_tracepoint, handle_tracepoint_general_set)
8758 (handle_tracepoint_query, tracepoint_finished_step)
8759 (tracepoint_was_hit, release_while_stepping_state_list):
8760 (current_traceframe): Declare.
8761 * server.c (handle_general_set): Handle tracepoint packets.
8762 (read_memory): New.
8763 (write_memory): New.
8764 (handle_search_memory_1): Use read_memory.
8765 (handle_query): Report support for conditional tracepoints, trace
8766 state variables, and tracepoint sources. Handle tracepoint
8767 queries.
8768 (main): Initialize the tracepoints module.
8769 (process_serial_event): Handle traceframe reads/writes.
8770
8771 * linux-low.c (handle_tracepoints): New.
8772 (linux_wait_1): Call it.
8773 (linux_resume_one_lwp): Handle while-stepping.
8774 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8775 (linux_target_ops): Install them.
8776 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8777 New field.
8778 * linux-x86-low.c (x86_supports_tracepoints): New.
8779 (the_low_target). Install it.
8780
8781 * mem-break.h (delete_breakpoint): Declare.
8782 * mem-break.c (delete_breakpoint): Make external.
8783
8784 * target.h (struct target_ops): Add `supports_tracepoints',
8785 `read_pc', and `write_pc' fields.
8786 (target_supports_tracepoints): Define.
8787 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8788 (phex_nz): New.
8789
8790 * regcache.h (struct regcache) <registers_owned>: New field.
8791 (init_register_cache, regcache_cpy): Declare.
8792 (regcache_read_pc, regcache_write_pc): Declare.
8793 (register_cache_size): Declare.
8794 (supply_regblock): Declare.
8795 * regcache.c (init_register_cache): New.
8796 (new_register_cache): Use it.
8797 (regcache_cpy): New.
8798 (register_cache_size): New.
8799 (supply_regblock): New.
8800 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 8801
219f2f23
PA
8802 * tracepoint.c: New.
8803
8804 * Makefile.in (OBS): Add tracepoint.o.
8805 (tracepoint.o): New rule.
8806
3a13a53b
L
88072010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8808
8809 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8810 (i386-mmx.o): New.
8811 (i386-mmx.c): Likewise.
8812 (i386-mmx-linux.o): Likewise.
8813 (i386-mmx-linux.c): Likewise.
8814
8815 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8816 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8817 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8818 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8819
8820 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8821 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8822 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8823
1570b33e
L
88242010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8825
8826 * Makefile.in (clean): Updated.
8827 (i386-avx.o): New.
8828 (i386-avx.c): Likewise.
8829 (i386-avx-linux.o): Likewise.
8830 (i386-avx-linux.c): Likewise.
8831 (amd64-avx.o): Likewise.
8832 (amd64-avx.c): Likewise.
8833 (amd64-avx-linux.o): Likewise.
8834 (amd64-avx-linux.c): Likewise.
8835
8836 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8837 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8838 (srv_amd64_regobj): Add amd64-avx.o.
8839 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8840 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8841 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8842 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8843 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8844 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8845 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8846
8847 * i387-fp.c: Include "i386-xstate.h".
8848 (i387_xsave): New.
8849 (i387_cache_to_xsave): Likewise.
8850 (i387_xsave_to_cache): Likewise.
8851 (x86_xcr0): Likewise.
8852
8853 * i387-fp.h (i387_cache_to_xsave): Likewise.
8854 (i387_xsave_to_cache): Likewise.
8855 (x86_xcr0): Likewise.
8856
8857 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8858 * linux-crisv32-low.c (target_regsets): Likewise.
8859 * linux-m68k-low.c (target_regsets): Likewise.
8860 * linux-mips-low.c (target_regsets): Likewise.
8861 * linux-ppc-low.c (target_regsets): Likewise.
8862 * linux-s390-low.c (target_regsets): Likewise.
8863 * linux-sh-low.c (target_regsets): Likewise.
8864 * linux-sparc-low.c (target_regsets): Likewise.
8865 * linux-xtensa-low.c (target_regsets): Likewise.
8866
8867 * linux-low.c: Include <sys/uio.h>.
8868 (regsets_fetch_inferior_registers): Support nt_type.
8869 (regsets_store_inferior_registers): Likewise.
8870 (linux_process_qsupported): New.
8871 (linux_target_ops): Add linux_process_qsupported.
8872
8873 * linux-low.h (regset_info): Add nt_type.
8874 (linux_target_ops): Add process_qsupported.
8875
8876 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8877 and <sys/uio.h>.
8878 (init_registers_i386_avx_linux): New.
8879 (init_registers_amd64_avx_linux): Likewise.
8880 (xmltarget_i386_linux_no_xml): Likewise.
8881 (xmltarget_amd64_linux_no_xml): Likewise.
8882 (PTRACE_GETREGSET): Likewise.
8883 (PTRACE_SETREGSET): Likewise.
8884 (x86_fill_xstateregset): Likewise.
8885 (x86_store_xstateregset): Likewise.
8886 (use_xml): Likewise.
8887 (x86_linux_update_xmltarget): Likewise.
8888 (x86_linux_process_qsupported): Likewise.
8889 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8890 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8891 init_registers_i386_linux here. Call
8892 x86_linux_update_xmltarget.
8893 (the_low_target): Add x86_linux_process_qsupported.
8894
8895 * server.c (handle_query): Call target_process_qsupported.
8896
8897 * target.h (target_ops): Add process_qsupported.
8898 (target_process_qsupported): New.
8899
fc7238bb
PA
89002010-04-03 Pedro Alves <pedro@codesourcery.com>
8901
8902 * inferiors.c (add_thread): Set last_status kind to
8903 TARGET_WAITKIND_IGNORE.
8904 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8905 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8906 (linux_wait_1): Move `thread' local definition to block that uses
8907 it. Don't NULL initialize `event_child'.
8908 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8909 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8910 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8911
bdabb078
PA
89122010-04-01 Pedro Alves <pedro@codesourcery.com>
8913
8914 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8915 an extended waitstatus, or by a watchpoint.
8916 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8917 thread was stepping or has been stopped by a watchpoint.
8918
d3bbe7a0
PA
89192010-04-01 Pedro Alves <pedro@codesourcery.com>
8920
8921 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8922 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8923 of another, then delete the previous, and validate all
8924 breakpoints.
8925 (validate_inserted_breakpoint): New.
8926 (delete_disabled_breakpoints): New.
8927 (validate_breakpoints): New.
8928 (check_mem_read): Validate breakpoints before trusting their
8929 shadow. Delete disabled breakpoints.
8930 (check_mem_write): Validate breakpoints before trusting they
8931 should be inserted. Delete disabled breakpoints.
8932 * mem-break.h (validate_breakpoints):
8933 * server.c (handle_query): Validate breakpoints when we see a
8934 qSymbol query.
8935
8b07ae33
PA
89362010-04-01 Pedro Alves <pedro@codesourcery.com>
8937
8938 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8939 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8940 if we could tell there's a GDB breakpoint at stop_pc.
8941 (need_step_over_p): Don't do a step over if we find a GDB
8942 breakpoint at the resume PC.
8943
8944 * mem-break.c (struct raw_breakpoint): New.
8945 (enum bkpt_type): New type `gdb_breakpoint'.
8946 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8947 fields. New field `raw'.
8948 (find_raw_breakpoint_at): New.
8949 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8950 breakpoint instead.
8951 (set_breakpoint_at): Adjust.
8952 (delete_raw_breakpoint): New.
8953 (release_breakpoint): New.
8954 (delete_breakpoint): Rename to...
8955 (delete_breakpoint_1): ... this. Add proc parameter. Use
8956 release_breakpoint. Return ENOENT.
8957 (delete_breakpoint): Reimplement.
8958 (find_breakpoint_at): Delete.
8959 (find_gdb_breakpoint_at): New.
8960 (delete_breakpoint_at): Delete.
8961 (set_gdb_breakpoint_at): New.
8962 (delete_gdb_breakpoint_at): New.
8963 (gdb_breakpoint_here): New.
8964 (set_reinsert_breakpoint): Use release_breakpoint.
8965 (uninsert_breakpoint): Rename to ...
8966 (uninsert_raw_breakpoint): ... this.
8967 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8968 (reinsert_raw_breakpoint): Change parameter type to
8969 raw_breakpoint.
8970 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8971 instead.
8972 (check_breakpoints): Adjust. Use release_breakpoint.
8973 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8974 (breakpoint_inserted_here): Ditto.
8975 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8976 Don't trust the breakpoint's shadow if it is not inserted.
8977 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8978 (delete_all_breakpoints): Adjust.
8979 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8980 use delete_breakpoint_1.
8981
8982 * mem-break.h (breakpoints_supported): Delete declaration.
8983 (set_gdb_breakpoint_at): Declare.
8984 (gdb_breakpoint_here): Declare.
8985 (delete_breakpoint_at): Delete.
8986 (delete_gdb_breakpoint_at): Declare.
8987
8988 * server.h (struct raw_breakpoint): Forward declare.
8989 (struct process_info): New field `raw_breakpoints'.
8990
8991 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8992 breakpoints.
8993
6bf5e0ba
PA
89942010-03-24 Pedro Alves <pedro@codesourcery.com>
8995
8996 * linux-low.c (status_pending_p_callback): Fix comment.
8997 (linux_wait_for_event_1): Move most of the internal breakpoint
8998 handling from here...
8999 (linux_wait_1): ... to here.
9000 (count_events_callback): New.
9001 (select_singlestep_lwp_callback): New.
9002 (select_event_lwp_callback): New.
9003 (cancel_breakpoints_callback): New.
9004 (select_event_lwp): New.
9005 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9006 priority to all LWPs that have had events that should be reported
9007 to the client. Cancel breakpoints when about to reporting the
9008 event to the client, not while stopping lwps. No longer cancel
9009 finished single-steps here.
9010 (cancel_finished_single_step): Delete.
9011 (cancel_finished_single_steps): Delete.
9012
414a389f
PA
90132010-03-24 Pedro Alves <pedro@codesourcery.com>
9014
9015 * mem-break.c (enum bkpt_type): New.
9016 (struct breakpoint): New field `type'.
9017 (set_breakpoint_at): Change return type to struct breakpoint
9018 pointer. Set type to `other_breakpoint' by default.
9019 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9020 in the breakpoint list.
9021 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9022 (reinsert_breakpoint): Rename to ...
9023 (reinsert_raw_breakpoint): ... this.
9024 (reinsert_breakpoints_at): Adjust.
9025 * mem-break.h (struct breakpoint): Declare.
9026 (set_breakpoint_at): Change return type to struct breakpoint
9027 pointer.
9028
2280c721
PA
90292010-03-24 Pedro Alves <pedro@codesourcery.com>
9030
9031 * server.c (handle_query): Assign, not compare.
9032
d50171e4
PA
90332010-03-24 Pedro Alves <pedro@codesourcery.com>
9034
9035 Teach linux gdbserver to step-over-breakpoints.
9036
9037 * linux-low.c (can_hardware_single_step): New.
9038 (supports_breakpoints): New.
9039 (handle_extended_wait): If stopping threads, read the stop pc of
9040 the new cloned LWP.
9041 (get_pc): New.
9042 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9043 low target doesn't support retrieving the PC.
9044 (add_lwp): Set last_resume_kind to resume_continue.
9045 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9046 (linux_attach): Don't clear stop_expected. Set the lwp's
9047 last_resume_kind to resume_stop.
9048 (linux_detach_one_lwp): Don't check for removed breakpoints.
9049 (check_removed_breakpoint): Delete.
9050 (status_pending_p): Rename to ...
9051 (status_pending_p_callback): ... this. Don't check for removed
9052 breakpoints. Don't consider threads that are stopped from GDB's
9053 perspective.
9054 (linux_wait_for_lwp): Always read the stop_pc here.
9055 (cancel_breakpoint): New.
9056 (step_over_bkpt): New global.
9057 (linux_wait_for_event_1): Implement stepping over breakpoints.
9058 (gdb_wants_lwp_stopped): New.
9059 (gdb_wants_all_stopped): New.
9060 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9061 single-step traps here. Store the thread's last reported target
9062 wait status.
9063 (send_sigstop): Don't clear stop_expected. Always set it,
9064 instead.
9065 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9066 (cancel_finished_single_step): New.
9067 (cancel_finished_single_steps): New.
9068 (wait_for_sigstop): Don't cancel finished single-step traps here.
9069 (linux_resume_one_lwp): Don't check for removed breakpoints.
9070 Don't set `step' on non-hardware step archs.
9071 (linux_set_resume_request): Ignore resume_stop requests if already
9072 stopping or stopped. Set the lwp's last_resume_kind.
9073 (resume_status_pending_p): Don't check for removed breakpoints.
9074 (need_step_over_p): New.
9075 (start_step_over): New.
9076 (finish_step_over): New.
9077 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9078 requests. Clear the thread's last reported target waitstatus.
9079 Don't use the `suspended' flag. Don't consider pending breakpoints.
9080 (linux_resume): Start a step-over if necessary.
9081 (proceed_one_lwp): New.
9082 (proceed_all_lwps): New.
9083 (unstop_all_lwps): New.
9084 * linux-low.h (struct lwp_info): Rewrite comment for the
9085 `suspended' flag. Add the `stop_pc' field. Delete the
9086 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9087 Add `'last_resume_kind' and `need_step_over' fields.
9088 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9089 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9090 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9091 (set_raw_breakpoint_at): New.
9092 (set_breakpoint_at): Rewrite to use it.
9093 (reinsert_breakpoint_handler): Delete.
9094 (set_reinsert_breakpoint): New.
9095 (reinsert_breakpoint_by_bp): Delete.
9096 (delete_reinsert_breakpoints): New.
9097 (uninsert_breakpoint): Rewrite.
9098 (uninsert_breakpoints_at): New.
9099 (reinsert_breakpoint): Rewrite.
9100 (reinsert_breakpoints_at): New.
9101 (check_breakpoints): Rewrite.
9102 (breakpoint_here): New.
9103 (breakpoint_inserted_here): New.
9104 (check_mem_read): Adjust.
9105 * mem-break.h (breakpoints_supported, breakpoint_here)
9106 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9107 (reinsert_breakpoint_by_bp): Delete declaration.
9108 (delete_reinsert_breakpoints): Declare.
9109 (reinsert_breakpoint): Delete declaration.
9110 (reinsert_breakpoints_at): Declare.
9111 (uninsert_breakpoint): Delete declaration.
9112 (uninsert_breakpoints_at): Declare.
9113 (check_breakpoints): Adjust prototype.
9114 * server.h: Adjust include order.
9115 (struct thread_info): Declare here. Add a `last_status' field.
9116
30ba68cb
MS
91172010-03-23 Michael Snyder <msnyder@vmware.com>
9118
9119 * server.c (crc32): New function.
9120 (handle_query): Add handling for 'qCRC:' request.
9121
b9a881c2
PA
91222010-03-23 Pedro Alves <pedro@codesourcery.com>
9123
9124 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9125 lwp had been stopped by a watchpoint.
9126
e92d13d5
PA
91272010-03-16 Pedro Alves <pedro@codesourcery.com>
9128
9129 * server.h (internal_error): Declare.
9130 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9131 * utils.c (internal_error): New function.
9132
64daa791
AS
91332010-03-15 Andreas Schwab <schwab@redhat.com>
9134
9135 * configure.srv: Fix typo setting srv_regobj.
9136
f52cd8cd
PA
91372010-03-15 Pedro Alves <pedro@codesourcery.com>
9138
9139 * linux-low.c (fetch_register): Avoid passing a non string literal
9140 format to `error'.
9141 (usr_store_inferior_registers): Ditto.
9142
93ae6fdc
PA
91432010-03-14 Pedro Alves <pedro@codesourcery.com>
9144
9145 * linux-low.c (linux_write_memory): Bail out early if peeking
9146 memory failed.
9147
c3adc08c
PA
91482010-03-14 Pedro Alves <pedro@codesourcery.com>
9149
9150 * linux-low.h (struct lwp_info): New fields
9151 `stopped_by_watchpoint' and `stopped_data_address'.
9152 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9153 here, and cache them in the lwp object.
9154 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9155 directly.
9156 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9157 field.
9158 (linux_stopped_by_watchpoint): Rewrite.
9159 (linux_stopped_data_address): Rewrite.
9160
bce522a2
PA
91612010-03-06 Simo Melenius <simo.melenius@iki.fi>
9162
9163 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9164 switching the current inferior, not before.
9165
90884b2b
L
91662010-03-01 H.J. Lu <hongjiu.lu@intel.com>
9167
9168 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9169 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9170 i386-linux.c and amd64-linux.c.
9171 (reg-i386.o): Removed.
9172 (reg-i386.c): Likewise.
9173 (reg-i386-linux.o): Likewise.
9174 (reg-i386-linux.c): Likewise.
9175 (reg-x86-64.o): Likewise.
9176 (reg-x86-64.c): Likewise.
9177 (reg-x86-64-linux.o): Likewise.
9178 (reg-x86-64-linux.c): Likewise.
9179 (i386.o): New.
9180 (i386.c): Likewise.
9181 (i386-linux.o): Likewise.
9182 (i386-linux.c): Likewise.
9183 (amd64.o): Likewise.
9184 (amd64.c): Likewise.
9185 (amd64-linux.o): Likewise.
9186 (amd64-linux.c): Likewise.
9187
9188 * configure.srv (srv_i386_regobj): New.
9189 (srv_i386_linux_regobj): Likewise.
9190 (srv_amd64_regobj): Likewise.
9191 (srv_amd64_linux_regobj): Likewise.
9192 (srv_i386_32bit_xmlfiles): Likewise.
9193 (srv_i386_64bit_xmlfiles): Likewise.
9194 (srv_i386_xmlfiles): Likewise.
9195 (srv_amd64_xmlfiles): Likewise.
9196 (srv_i386_linux_xmlfiles): Likewise.
9197 (srv_amd64_linux_xmlfiles): Likewise.
9198 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9199 srv_xmlfiles to $srv_i386_xmlfiles.
9200 (i[34567]86-*-mingw32ce*): Likewise.
9201 (i[34567]86-*-mingw*): Likewise.
9202 (i[34567]86-*-nto*): Likewise.
9203 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9204 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9205 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9206 (x86_64-*-linux*): Likewise.
9207
9208 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9209 (init_registers_amd64_linux): New.
9210 (x86_arch_setup): Replace init_registers_x86_64_linux with
9211 init_registers_amd64_linux.
9212
193f13e6
MK
92132010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9214
9215 * configure.ac: Check for libdl. If it is not available link against
9216 static libthread_db.
9217 * configure: Regenerate.
9218
85d721b8
PA
92192010-02-22 Pedro Alves <pedro@codesourcery.com>
9220
9221 PR9605
9222
9223 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9224 handing a read watchpoint.
9225 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9226
6076632b
DE
92272010-02-12 Doug Evans <dje@google.com>
9228
9229 * linux-low.c (linux_supports_tracefork_flag): Document.
9230 (linux_look_up_symbols): Add comment.
9231
3327ccf7
L
92322010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9233
9234 * regcache.c (supply_register): Clear regcache if buf is NULL.
9235
0718675c 92362010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 9237 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
9238
9239 * inferiors.c (find_inferior): Add function documentation.
9240 (unloaded_dll): Handle the case where the unloaded dll has not
9241 been previously registered in the dll list.
9242
177321bd
DJ
92432010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9244
9245 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9246 (thumb2_breakpoint): New.
9247 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9248
2b009048
DJ
92492010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9250
9251 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9252 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9253 breakpoints.
9254
3be029c7
PA
92552010-01-21 Pedro Alves <pedro@codesourcery.com>
9256
9257 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9258
18f5de3b
JK
92592010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9260
9261 * linux-s390-low.c (s390_collect_ptrace_register)
9262 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9263
3743bb4f
DE
92642010-01-21 Doug Evans <dje@google.com>
9265
14ce3065
DE
9266 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9267 (PTRACE_ARG4_TYPE): New macro.
9268 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9269 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9270 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9271 (usr_store_inferior_registers): Ditto.
9272 (linux_read_memory, linux_write_memory): Ditto.
9273 (linux_test_for_tracefork): Ditto.
9274
3743bb4f
DE
9275 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9276 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9277
8b315be5
PA
92782010-01-21 Pedro Alves <pedro@codesourcery.com>
9279
9280 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9281 target.
9282
85492558
PA
92832010-01-21 Pedro Alves <pedro@codesourcery.com>
9284
9285 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9286 prototype to take a regcache. Adjust.
9287
442ea881
PA
92882010-01-20 Pedro Alves <pedro@codesourcery.com>
9289
9290 * regcache.h (struct thread_info): Forward declare.
9291 (struct regcache): New.
9292 (new_register_cache): Adjust prototype.
9293 (get_thread_regcache): Declare.
9294 (free_register_cache): Adjust prototype.
9295 (registers_to_string, registers_from_string): Ditto.
9296 (supply_register, supply_register_by_name, collect_register)
9297 (collect_register_as_string, collect_register_by_name): Ditto.
9298 * regcache.c (struct inferior_regcache_data): Delete.
9299 (get_regcache): Rename to ...
9300 (get_thread_regcache): ... this. Adjust. Switch inferior before
9301 fetching registers.
9302 (regcache_invalidate_one): Adjust.
9303 (regcache_invalidate): Fix prototype.
9304 (new_register_cache): Return the new register cache.
9305 (free_register_cache): Change prototype.
9306 (realloc_register_cache): Adjust.
9307 (registers_to_string): Change prototype to take a regcache. Adjust.
9308 (registers_from_string): Ditto.
9309 (register_data): Ditto.
9310 (supply_register): Ditto.
9311 (supply_register_by_name): Ditto.
9312 (collect_register): Ditto.
9313 (collect_register_as_string): Ditto.
9314 (collect_register_by_name): Ditto.
9315 * server.c (process_serial_event): Adjust.
9316 * linux-low.h (regset_fill_func, regset_store_func): Change
9317 prototype.
9318 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9319 Change prototype.
9320 * linux-low.c (get_stop_pc): Adjust.
9321 (check_removed_breakpoint): Adjust.
9322 (linux_wait_for_event): Adjust.
9323 (linux_resume_one_lwp): Adjust.
9324 (fetch_register): Add regcache parameter. Adjust.
9325 (usr_store_inferior_registers): Ditto.
9326 (regsets_fetch_inferior_registers): Ditto.
9327 (regsets_store_inferior_registers): Ditto.
9328 (linux_fetch_registers, linux_store_registers): Ditto.
9329 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9330 regcache. Adjust.
43aaf8b6
PA
9331 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9332 Ditto.
442ea881
PA
9333 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9334 prototype to take a regcache.
9335 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9336 * remote-utils.c (convert_ascii_to_int, outreg)
9337 (prepare_resume_reply): Change prototype to take a regcache.
9338 Adjust.
9339 * target.h (struct target_ops) <fetch_registers, store_registers>:
9340 Change prototype to take a regcache.
9341 (fetch_inferior_registers, store_inferior_registers): Change
9342 prototype to take a regcache. Adjust.
9343 * proc-service.c (ps_lgetregs): Adjust.
9344 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9345 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9346 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9347 take a regcache. Adjust.
9348 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9349 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9350 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9351 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9352 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9353 (cris_cannot_fetch_register):
9354 (cris_breakpoint_at): Change prototype to take a regcache.
9355 Adjust.
9356 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9357 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9358 to take a regcache. Adjust.
9359 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9360 Adjust.
9361 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9362 take a regcache. Adjust.
9363 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9364 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9365 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9366 * linux-mips-low.c (mips_get_pc):
9367 (mips_set_pc): Change prototype to take a regcache. Adjust.
9368 (mips_reinsert_addr): Adjust.
9369 (mips_collect_register): Change prototype to take a regcache.
9370 Adjust.
9371 (mips_supply_register):
9372 (mips_collect_register_32bit, mips_supply_register_32bit)
9373 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9374 (mips_store_fpregset): Ditto.
43aaf8b6
PA
9375 * linux-ppc-low.c (ppc_supply_ptrace_register)
9376 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
9377 (parse_spufs_run): Adjust.
9378 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9379 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9380 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9381 take a regcache. Adjust.
9382 * linux-s390-low.c (s390_collect_ptrace_register)
9383 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9384 (s390_set_pc): Change prototype to take a regcache. Adjust.
9385 (s390_arch_setup): Adjust.
9386 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9387 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9388 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9389 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9390 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9391 regcache. Adjust.
9392 (sparc_breakpoint_at): Adjust.
9393 * linux-xtensa-low.c (xtensa_fill_gregset):
9394 (xtensa_store_gregset):
9395 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9396 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9397 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9398 prototype to take a regcache. Adjust.
9399 * win32-arm-low.c (arm_fetch_inferior_register)
9400 (arm_store_inferior_register): Change prototype to take a
9401 regcache. Adjust.
9402 * win32-i386-low.c (i386_fetch_inferior_register)
9403 (i386_store_inferior_register): Change prototype to take a
9404 regcache. Adjust.
9405 * win32-low.c (child_fetch_inferior_registers)
9406 (child_store_inferior_registers): Change prototype to take a
9407 regcache. Adjust.
9408 (win32_wait): Adjust.
9409 (win32_fetch_inferior_registers): Change prototype to take a
9410 regcache. Adjust.
9411 (win32_store_inferior_registers): Adjust.
9412 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9413 store_inferior_register>: Change prototype to take a regcache.
9414
60c3d7b0
DE
94152010-01-20 Doug Evans <dje@google.com>
9416
9417 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9418 #ifdef.
9419 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 9420 (W_STOPCODE): Provide definition if missing.
60c3d7b0 9421
dc146f7c
VP
94222010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9423
9424 * linux-low.c (linux_core_of_thread): New.
9425 (compare_ints, show_process, list_threads): New.
9426 (linux_qxfer_osdata): Report threads and cores.
9427 (linux_target_op): Register linux_core_of_thread.
9428 * remote-utils.c (prepare_resume_reply): Report the core.
9429 (buffer_xml_printf): Support %d specifier.
9430 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9431 New.
9432 (handle_query): Handle qXfer:threads. Announce availability
9433 thereof.
9434 * target.h (struct target_ops): New field core_of_thread.
9435
7803799a
UW
94362010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9437
9438 * Makefile.in (clean): Remove new generated files.
9439 (reg-s390.o, reg-s390.c): Remove rules.
9440 (reg-s390x.o, reg-s390x.c): Likewise.
9441 (s390-linux32.o, s390-linux32.c): Add rules.
9442 (s390-linux64.o, s390-linux64.c): Likewise.
9443 (s390x-linux64.o, s390x-linux64.c): Likewise.
9444 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9445 * linux-s390-low.c: Include <elf.h>.
9446 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9447 (init_registers_s390): Remove prototype.
9448 (init_registers_s390x): Likewise.
9449 (init_registers_s390_linux32): Add prototype.
9450 (init_registers_s390_linux64): Likewise.
9451 (init_registers_s390x_linux64): Likewise.
9452 (s390_num_regs_3264): New define.
9453 (s390_regmap_3264): New global variable.
9454 (s390_cannot_fetch_register): Remove obsolete check.
9455 (s390_cannot_store_register): Likewise.
9456 (s390_collect_ptrace_register): Handle upper/lower register halves.
9457 (s390_supply_ptrace_register): Likewise.
9458 (s390_fill_gregset): Update to register number changes.
9459 (s390_get_hwcap): New routine.
9460 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9461 Install appropriate regmap and register set.
9462
6e7ffa39
JB
94632010-01-01 Joel Brobecker <brobecker@adacore.com>
9464
9465 * server.c (gdbserver_version): Update copyright year to 2010.
9466 * gdbreplay.c (gdbreplay_version): Likewise.
9467
957f3f49
DE
94682009-12-28 Doug Evans <dje@google.com>
9469
9470 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9471 elf/external.h. Include <elf.h> instead but only if necessary.
9472
ca5c370d
PA
94732009-12-28 Pedro Alves <pedro@codesourcery.com>
9474
9475 * linux-low.c (linux_remove_process): Remove `detaching'
9476 parameter. Don't release/detach from thread_db here.
9477 (linux_kill): Release/detach from thread_db here, ...
9478 (linux_detach): ... and here, before actually detaching.
9479 (linux_wait_1): ... and here, when a process exits.
9480 * thread-db.c (any_thread_of): New.
9481 (thread_db_free): Switch the current inferior to a thread of the
9482 passed in process.
9483
4ee62156
DE
94842009-12-21 Doug Evans <dje@google.com>
9485
d90e6a88
DE
9486 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9487
c5f62d5f
DE
9488 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9489 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9490 warning ifndef __NR_tkill. Move setting of errno there too.
9491 Delete unnecessary resetting of errno after syscall.
9492 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9493
10e86dd7
DE
9494 * configure.ac: Check for dladdr.
9495 * config.in: Regenerate.
9496 * configure: Regenerate.
9497 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9498 (try_thread_db_load): Update.
9499
4ee62156
DE
9500 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9501
00f515da
DE
95022009-12-18 Doug Evans <dje@google.com>
9503
e9464885
DE
9504 * event-loop.c: Include unistd.h if it exists.
9505
07d4f67e
DE
9506 * linux-low.c (my_waitpid): Move definition away from being in
9507 between linux_tracefork_child/linux_test_for_tracefork.
9508
00f515da
DE
9509 * gdb_proc_service.h (psaddr_t): Fix type.
9510 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9511 signature to match glibc.
9512
1de1badb
DE
95132009-12-16 Doug Evans <dje@google.com>
9514
9515 * linux-low.c (linux_read_memory): Fix argument to read.
9516
aeeb81d1
PA
95172009-11-26 Pedro Alves <pedro@codesourcery.com>
9518
9519 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9520 events, don't leave current_inferior pointing at null.
9521
10357975
PA
95222009-11-26 Pedro Alves <pedro@codesourcery.com>
9523
9524 * win32-low.c (LOG): Delete.
9525 (OUTMSG): Output to stderr.
9526 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9527 on compile time LOG macro.
9528 (win32_wait): Fix debug output.
9529
cf6e3471
PA
95302009-11-26 Pedro Alves <pedro@codesourcery.com>
9531
9532 * win32-low.c (win32_add_one_solib): If the dll name is
9533 "ntdll.dll", prepend the system directory to the dll path.
9534
0c85e18e
MK
95352009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9536
9537 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9538
9ac544ce 95392009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9540 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9541
9542 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9543 * configure.ac: Check for __mcoldfire__ and set
9544 gdb_cv_m68k_is_coldfire.
9545 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9546 reg-cf.o and reg-m68k.o.
9547 * configure: Regenerated.
9548
fd7dd3e6
PA
95492009-11-16 Pedro Alves <pedro@codesourcery.com>
9550
9551 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9552 Pass it to thread_db_free.
9553 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9554 proper `detaching' argument to linux_remove_process.
9555 * linux-low.h (thread_db_free): Add `detaching' parameter.
9556 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9557 to thread_db_free.
9558 (thread_db_free): Add `detaching' parameter. Only
9559 call td_ta_clear_event if detaching from process.
9560
75aa492e
MK
95612009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9562
9563 * thread-db.c (thread_db_free): Fix typo.
9564
21e1bee4
PP
95652009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9566
9567 PR gdb/10838
9568 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9569
8838b45e
NS
95702009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9571
9572 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9573 with an i686 compiler.
9574 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9575 needed.
9576 * configure: Rebuilt.
9577
8a35fb51
SL
95782009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9579
9580 PR gdb/10783
9581
9582 * server.c (handle_search_memory_1): Correct read_addr initialization
9583 in loop for searching subsequent chunks.
9584
96f15937
PP
95852009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9586
9587 * configure.ac: New --with-libthread-db option.
9588 * thread-db.c: Allow direct dependence on libthread_db.
9589 (thread_db_free): Adjust.
9590 * config.in: Regenerate.
9591 * configure: Likewise.
889bf7c5 9592
5f7d1694
PP
95932009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9594
9595 PR gdb/10757
9596 * thread-db.c (attach_thread): New function.
9597 (maybe_attach_thread): Return success/failure.
9598 (find_new_threads_callback): Adjust.
889bf7c5
PA
9599 (thread_db_find_new_threads): Loop until no new threads.
9600
88e3b899
PA
96012009-10-13 Pedro Alves <pedro@codesourcery.com>
9602
9603 * proc-service.c (ps_lgetregs): Formatting.
9604
cdbfd419
PP
96052009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9606
9607 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9608 * configure.ac: Adjust.
9609 * linux-low.h (struct process_info_private): Move members to struct
9610 thread_db.
9611 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9612 * linux-low.c (linux_remove_process): Adjust.
9613 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9614 * server.c (handle_query): Move code ...
9615 (handle_monitor_command): ... here. New function.
9616 * target.h (struct target_ops): New member.
9617 * thread-db.c (struct thread_db): New.
9618 (libthread_db_search_path): New variable.
9619 (thread_db_create_event, thread_db_enable_reporting)
9620 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9621 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9622 (try_thread_db_load_1, dladdr_to_soname): New functions.
9623 (try_thread_db_load, thread_db_load_search): New functions.
9624 (thread_db_init): Search for libthread_db.
9625 (thread_db_free): New function.
9626 (thread_db_handle_monitor_command): Likewise.
9627 * config.in: Regenerate.
9628 * configure: Regenerate.
889bf7c5 9629
4168d2d6
UW
96302009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9631
9632 * spu-low.c (spu_kill): Wait for inferior to terminate.
9633 Call clear_inferiors.
9634 (spu_detach): Call clear_inferiors.
9635
81ecdfbb
RW
96362009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9637
9638 * aclocal.m4: Regenerate.
9639 * config.in: Likewise.
9640 * configure: Likewise.
9641
0b9ff2c0
UW
96422009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9643
9644 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9645 (parse_spufs_run): New function.
9646 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9647 (ppc_breakpoint_at): Handle SPU breakpoints.
9648
efcbbd14
UW
96492009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9650
9651 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9652 (SPUFS_MAGIC): Define.
9653 (spu_enumerate_spu_ids): New function.
9654 (linux_qxfer_spu): New function.
9655 (linux_target_ops): Install linux_qxfer_spu.
9656
f4d9bade
UW
96572009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9658
9659 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9660 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9661 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9662 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9663 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9664 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9665 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9666 (init_registers_powerpc_cell32l): Add prototype.
9667 (init_registers_powerpc_cell64l): Likewise.
9668 (ppc_arch_setup): Detect Cell/B.E. architecture.
9669
96e946ca
RW
96702009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9671
9672 * Makefile.in (datarootdir): New variable.
9673
58d6951d
DJ
96742009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9675
9676 * linux-low.c (linux_write_memory): Update debugging output.
9677 * Makefile.in (clean): Add new descriptions.
9678 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9679 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9680 * configure.srv: Add new files for arm*-*-linux*.
9681 * linux-arm-low.c: Add new declarations.
9682 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9683 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9684 (HWCAP_VFPv3D16): New.
9685 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9686 instead of __IWMMXT__.
9687 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9688 (arm_arch_setup): New.
9689 (target_regsets): Remove #ifdef. Add VFP regset.
9690 (the_low_target): Use arm_arch_setup.
9691
12b42a12
DJ
96922009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9693
9694 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9695 the main thread again.
9696
ac8c974e
AR
96972009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9698
9699 Adding Neutrino gdbserver.
9700 * configure: Regenerated.
9701 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9702 * configure.srv (i[34567]86-*-nto*): New target.
9703 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9704 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9705 (nto_comctrl) [__QNX__]: New function.
9706 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9707
4424e0c3 97082009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
9709
9710 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9711 srv_tgtobj.
9712
912cf4ba
PA
97132009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9714 Pedro Alves <pedro@codesourcery.com>
9715
9716 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9717 don't support CONTEXT_EXTENDED_REGISTERS.
9718 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9719 (the_low_target): Install them.
9720 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9721 failing with ERROR_PIPE_NOT_CONNECTED.
9722
aa5ca48f
DE
97232009-06-30 Doug Evans <dje@google.com>
9724 Pierre Muller <muller@ics.u-strasbg.fr>
9725
9726 Add h/w watchpoint support to x86-linux, win32-i386.
9727 * Makefile.in (SFILES): Add i386-low.c
9728 (i386_low_h): Define.
9729 (i386-low.o): Add dependencies.
9730 (linux-x86-low.o): Add i386-low.h dependency.
9731 (win32-i386-low.o): Ditto.
9732 * i386-low.c: New file.
9733 * i386-low.h: New file.
9734 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9735 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9736 * linux-low.c (linux_add_process): Initialize arch_private.
9737 (linux_remove_process): Free arch_private.
9738 (add_lwp): Initialize arch_private.
9739 (delete_lwp): Free arch_private.
9740 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9741 provided.
9742 * linux-low.h (process_info_private): New member arch_private.
9743 (lwp_info): New member arch_private.
9744 (linux_target_ops): New members new_process, new_thread,
9745 prepare_to_resume.
9746 (ptid_of): New macro.
9747 * linux-x86-low.c: Include stddef.h, i386-low.h.
9748 (arch_process_info): New struct.
9749 (arch_lwp_info): New struct.
9750 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9751 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9752 (i386_dr_low_get_status): New function.
9753 (x86_insert_point, x86_remove_point): New functions.
9754 (x86_stopped_by_watchpoint): New function.
9755 (x86_stopped_data_address): New function.
9756 (x86_linux_new_process, x86_linux_new_thread): New functions.
9757 (x86_linux_prepare_to_resume): New function.
9758 (the_low_target): Add entries for insert_point, remove_point,
9759 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9760 prepare_to_resume.
9761 * server.c (debug_hw_points): New global.
9762 (monitor_show_help): Document set debug-hw-points.
9763 (handle_query): Process "set debug-hw-points".
9764 * server.h (debug_hw_points): Declare.
9765 (paddress): Declare.
9766 * utils.c (NUMCELLS, CELLSIZE): New macros.
9767 (get_sell, xsnprintf, paddress): New functions.
9768 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9769 remove_point, stopped_by_watchpoint, stopped_data_address.
9770 * win32-i386-low.c: Include i386-low.h.
9771 (debug_reg_state): Replaces dr.
9772 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9773 (i386_dr_low_get_status): New function.
9774 (i386_insert_point, i386_remove_point): New functions.
9775 (i386_stopped_by_watchpoint): New function.
9776 (i386_stopped_data_address): New function.
9777 (i386_initial_stuff): Update.
9778 (get_thread_context,set_thread_context,i386_thread_added): Update.
9779 (the_low_target): Add entries for insert_point,
9780 remove_point, stopped_by_watchpoint, stopped_data_address.
9781 * win32-low.c (win32_insert_watchpoint): New function.
9782 (win32_remove_watchpoint): New function.
9783 (win32_stopped_by_watchpoint): New function.
9784 (win32_stopped_data_address): New function.
9785 (win32_target_ops): Add entries for insert_watchpoint,
9786 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9787 * win32-low.h (win32_target_ops): New members insert_point,
9788 remove_point, stopped_by_watchpoint, stopped_data_address.
9789
d993e290
PA
97902009-06-25 Pedro Alves <pedro@codesourcery.com>
9791
9792 * server.c (process_serial_event): Re-return unsupported, not
9793 error, if the type isn't recognized. Re-allow supporting only
9794 insert or remove packets. Also call require_running for
9795 breakpoints. Add missing break statement to default case. Tidy.
9796 * target.h (struct target_ops): Rename insert_watchpoint to
9797 insert_point, and remove_watchpoint to remove_point.
9798
9799 * linux-low.h (struct linux_target_ops): Likewise.
9800 * linux-low.c (linux_insert_watchpoint): Rename to ...
9801 (linux_insert_point): ... this. Adjust.
9802 (linux_remove_watchpoint): Rename to ...
9803 (linux_remove_point): ... this. Adjust.
9804 (linux_target_ops): Adjust.
9805 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9806 (cris_insert_point): ... this.
9807 (cris_remove_watchpoint): Rename to ...
9808 (cris_remove_point): ... this.
9809 (the_low_target): Adjust.
9810
0f54c268
PM
98112009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9812
9813 * server.c (handle_v_kill): Pass signal_pid to
9814 kill_inferior if multi_process is zero.
9815
c6314022
AR
98162009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9817
9818 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9819 * target.h (target_ops): Comment for *_watchpoint to make it clear
9820 the functions can get types '0' and '1'.
9821
4463ce24
AR
98222009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9823
9824 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9825 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9826 * regcache.c (get_regcache): Likewise.
9827 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9828 * win32-low.c (child_fetch_inferior_registers): Remove check for
9829 regno 0.
9830
cf8fd78b
PA
98312009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9832 Pedro Alves <pedro@codesourcery.com>
9833
9834 * target.h (struct target_ops) <supports_multi_process>: New
9835 callback.
9836 (target_supports_multi_process): New.
9837 * server.c (handle_query): Even if GDB reports support, only
9838 enable multi-process if the target also supports it. Report
9839 multi-process support only if the target backend supports it.
9840 * linux-low.c (linux_supports_multi_process): New function.
9841 (linux_target_ops): Install it as target_supports_multi_process
9842 callback.
9843
47c0c975
DE
98442009-05-24 Doug Evans <dje@google.com>
9845
e09875d4
DE
9846 Global renaming of find_thread_pid to find_thread_ptid.
9847 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9848 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9849 All callers updated.
9850
e27d73f6
DE
9851 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9852 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9853 directly.
9854
47c0c975
DE
9855 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9856 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9857 (linux_resume_one_lwp): Ditto.
9858
2acc282a
DE
98592009-05-23 Doug Evans <dje@google.com>
9860
9861 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9862 from struct inferior_list_entry * to struct lwp_info *.
9863 All callers updated.
9864
9f1036c1
DE
98652009-05-13 Doug Evans <dje@google.com>
9866
9867 * linux-x86-low.c: Don't include assert.h.
9868 (x86_siginfo_fixup): Use fatal, not assert.
9869 (x86_arch_setup): Fix comment.
9870
d0722149
DE
98712009-05-12 Doug Evans <dje@google.com>
9872
9873 Biarch support for i386/amd64 gdbserver.
9874 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9875 Add linux-x86-low.c.
9876 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9877 (linux-x86-low.o): Add.
9878 * linux-x86-64-low.c: Delete.
9879 * linux-i386-low.c: Delete.
9880 * linux-x86-low.c: New file.
9881 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9882 linux-x86-low.o.
9883 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9884 linux-x86-low.o.
9885 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9886 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9887 (linux_child_pid_to_exec_file): New function.
9888 (elf_64_header_p, elf_64_file_p): New functions.
9889 (siginfo_fixup): New function.
9890 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9891 give target a chance to convert layout.
9892 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9893 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9894
fdeb2a12
DE
98952009-05-07 Doug Evans <dje@google.com>
9896
9897 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9898 (regsets_store_inferior_registers): Ditto.
9899
a6dbe5df
PA
99002009-05-06 Pedro Alves <pedro@codesourcery.com>
9901
9902 PR server/10048
9903
9904 * linux-low.c (must_set_ptrace_flags): Delete.
9905 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9906 of the global.
9907 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9908 `lwp->must_set_ptrace_flags' instead.
ba42693b 9909 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
9910 (linux_wait_1): ... not here.
9911
5091eb23
DE
99122009-04-30 Doug Evans <dje@google.com>
9913
9f767825
DE
9914 * inferiors.c (started_inferior_callback): New function.
9915 (attached_inferior_callback): New function.
9916 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9917 * server.c (print_started_pid, print_attached_pid): New functions.
9918 (detach_or_kill_for_exit): New function.
9919 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9920 * server.h (have_started_inferiors_p): Declare.
9921 (have_attached_inferiors_p): Declare.
9922
5091eb23
DE
9923 * inferiors.c (remove_process): Fix memory leak, free process.
9924 * linux-low.c (linux_remove_process): New function.
9925 (linux_kill): Call it instead of remove_process.
9926 (linux_detach, linux_wait_1): Ditto.
9927
155c8968
PA
99282009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9929
9930 * configure.srv: Add x86 Windows CE target.
9931
7fe519cb
UW
99322009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9933
9934 * inferiors.c (get_thread_process): Make global.
9935 * server.h (get_thread_process): Add prototype.
9936 * thread-db.c (find_one_thread): Use get_thread_process
9937 instead of current_process.
9938 (thread_db_get_tls_address): Do not crash if called when
9939 thread layer is not yet initialized.
9940
5472f405
UW
99412009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9942
9943 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9944 * spu-low.c (current_tid): Rename to ...
9945 (current_ptid): ... this.
9946 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9947 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9948 ptid_get_lwp (current_ptid) instead of current_tid.
9949 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9950 instead of current_tid. Use find_process_pid to verify pid
9951 argument is valid. Pass proper argument to remove_process.
9952 (spu_thread_alive): Compare current_ptid instead of current_tid.
9953 (spu_resume): Likewise.
9954
55ac2b99
PA
99552009-04-02 Pedro Alves <pedro@codesourcery.com>
9956
9957 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9958 variable.
9959
95954743
PA
99602009-04-01 Pedro Alves <pedro@codesourcery.com>
9961
9962 Implement the multiprocess extensions, and add linux multiprocess
9963 support.
9964
9965 * server.h (ULONGEST): Declare.
9966 (struct ptid, ptid_t): New.
9967 (minus_one_ptid, null_ptid): Declare.
9968 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9969 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9970 (struct inferior_list_entry): Change `id' type from unsigned from
9971 to ptid_t.
9972 (struct sym_cache, struct breakpoint, struct
9973 process_info_private): Forward declare.
9974 (struct process_info): Declare.
9975 (current_process): Declare.
9976 (all_processes): Declare.
9977 (initialize_inferiors): Declare.
9978 (add_thread): Adjust to use ptid_t.
9979 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9980 (add_process, remove_process, find_thread_pid): Declare.
9981 (find_inferior_id): Adjust to use ptid_t.
9982 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9983 (multi_process): Declare.
9984 (push_event): Adjust to use ptid_t.
9985 (read_ptid, write_ptid): Declare.
9986 (prepare_resume_reply): Adjust to use ptid_t.
9987 (clear_symbol_cache): Declare.
9988 * inferiors.c (all_processes): New.
9989 (null_ptid, minus_one_ptid): New.
9990 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9991 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9992 (add_thread): Change unsigned long to ptid. Remove gdb_id
9993 parameter. Adjust.
9994 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9995 (gdb_id_to_thread): Rename to ...
9996 (find_thread_pid): ... this. Change unsigned long to ptid.
9997 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9998 (loaded_dll, pull_pid_from_list): Adjust.
9999 (add_process, remove_process, find_process_pid)
10000 (get_thread_process, current_process, initialize_inferiors): New.
10001 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10002 (struct target_waitstatus) <related_pid>: Ditto.
10003 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10004 return type to int.
10005 (struct target_ops) <join>: Add `pid' argument.
10006 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10007 (struct target_ops) <wait>: Add `ptid' field. Change return type
10008 to ptid.
10009 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10010 (mywait): Add `ptid' argument. Change return type to ptid_t.
10011 (target_pid_to_str): Declare.
10012 * target.c (set_desired_inferior): Adjust to use ptids.
10013 (mywait): Add new `ptid' argument. Adjust.
10014 (target_pid_to_str): New.
10015 * mem-break.h (free_all_breakpoints): Declare.
10016 * mem-break.c (breakpoints): Delelete.
10017 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10018 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10019 to use per-process breakpoint list.
10020 (free_all_breakpoints): New.
10021 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10022 (symbol_cache, all_symbols_looked_up): Delete.
10023 (hexchars): New.
10024 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10025 read_ptid): New.
10026 (prepare_resume_reply): Change ptid argument's type from unsigned
10027 long to ptid_t. Adjust. Implement W;process and X;process.
10028 (free_sym_cache, clear_symbol_cache): New.
10029 (look_up_one_symbol): Adjust to per-process symbol cache. *
10030 * server.c (cont_thread, general_thread, step_thread): Change type
10031 to ptid_t.
10032 (attached): Delete.
10033 (multi_process): New.
10034 (last_ptid): Change type to ptid_t.
10035 (struct vstop_notif) <ptid>: Change type to ptid_t.
10036 (queue_stop_reply, push_event): Change `ptid' argument's type to
10037 ptid_t.
10038 (discard_queued_stop_replies): Add `pid' argument.
10039 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10040 changes. Don't reference the `attached' global.
10041 (attach_inferior): Adjust to mywait interface changes.
10042 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10043 features. Handle and report "multiprocess+". Handle
10044 "qAttached:PID".
10045 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10046 changes.
10047 (handle_v_kill): New.
10048 (handle_v_stopped): Adjust to use target_pid_to_str.
10049 (handle_v_requests): Allow multiple attaches and runs when
10050 multiprocess extensions are in effect. Handle "vKill".
10051 (myresume): Adjust to use ptids.
10052 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10053 (handle_status): Adjust to discard_queued_stop_replies interface
10054 change.
10055 (first_thread_of, kill_inferior_callback)
10056 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10057 (main): Call initialize_inferiors. Adjust to use ptids, killing
10058 and detaching from all inferiors. Handle multiprocess packet
10059 variants.
10060 * linux-low.h: Include gdb_proc_service.h.
10061 (struct process_info_private): New.
10062 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10063 <lwpid_of>: Use ptid_get_lwp.
10064 (get_lwp_thread): Adjust.
10065 (struct lwp_info): Add `dead' member.
10066 (find_lwp_pid): Declare.
10067 * linux-low.c (thread_db_active): Delete.
10068 (new_inferior): Adjust comment.
10069 (inferior_pid): Delete.
10070 (linux_add_process): New.
10071 (handle_extended_wait): Adjust.
10072 (add_lwp): Change unsigned long to ptid.
10073 (linux_create_inferior): Add process to processes table. Adjust
10074 to use ptids. Don't set new_inferior here.
10075 (linux_attach_lwp): Rename to ...
10076 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10077 it. Adjust to use ptids.
10078 (linux_attach_lwp): New.
10079 (linux_attach): Add process to processes table. Don't set
10080 new_inferior here.
10081 (struct counter): New.
10082 (second_thread_of_pid_p, last_thread_of_process_p): New.
10083 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10084 multiple processes.
10085 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10086 processes. Remove process from process table.
10087 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10088 to multiple processes.
10089 (any_thread_of): New.
10090 (linux_detach): Add `pid' argument, and handle it. Remove process
10091 from processes table.
10092 (linux_join): Add `pid' argument. Handle it.
10093 (linux_thread_alive): Change unsighed long argument to ptid_t.
10094 Consider dead lwps as not being alive.
10095 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10096 threads we're not interested in.
10097 (same_lwp, find_lwp_pid): New.
10098 (linux_wait_for_lwp): Change `pid' argument's type from int to
10099 ptid_t. Adjust.
10100 (linux_wait_for_event): Rename to ...
10101 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10102 from int to ptid_t. Adjust.
10103 (linux_wait_for_event): New.
10104 (linux_wait_1): Add `ptid' argument. Change return type to
10105 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10106 that exit from the process table.
10107 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10108 Adjust.
10109 (mark_lwp_dead): New.
10110 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10111 stopping all threads, mark its main lwp as dead.
10112 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10113 ptids.
10114 (fetch_register, usr_store_inferior_registers)
10115 (regsets_fetch_inferior_registers)
10116 (regsets_store_inferior_registers, linux_read_memory)
10117 (linux_write_memory): Inline `inferior_pid'.
10118 (linux_look_up_symbols): Adjust to use per-process
10119 `thread_db_active'.
10120 (linux_request_interrupt): Adjust to use ptids.
10121 (linux_read_auxv): Inline `inferior_pid'.
10122 (initialize_low): Don't reference thread_db_active.
10123 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10124 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10125 (ps_getpid): Return the pid of the current inferior.
10126 * thread-db.c (proc_handle, thread_agent): Delete.
10127 (thread_db_create_event, thread_db_enable_reporting): Adjust to
10128 per-process data.
10129 (find_one_thread): Change argument type to ptid_t. Adjust to
10130 per-process data.
10131 (maybe_attach_thread): Adjust to per-process data and ptids.
10132 (thread_db_find_new_threads): Ditto.
10133 (thread_db_init): Ditto.
10134 * spu-low.c (spu_create_inferior, spu_attach): Add process to
10135 processes table. Adjust to use ptids.
10136 (spu_kill, spu_detach): Adjust interface. Remove process from
10137 processes table.
10138 (spu_join, spu_thread_alive): Adjust interface.
10139 (spu_wait): Adjust interface. Remove process from processes
10140 table. Adjust to use ptids.
10141 * win32-low.c (current_inferior_tid): Delete.
10142 (current_inferior_ptid): New.
10143 (debug_event_ptid): New.
10144 (thread_rec): Take a ptid. Adjust.
10145 (child_add_thread): Add `pid' argument. Adjust to use ptids.
10146 (child_delete_thread): Ditto.
10147 (do_initial_child_stuff): Add `attached' argument. Add process to
10148 processes table.
10149 (child_fetch_inferior_registers, child_store_inferior_registers):
10150 Adjust.
10151 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10152 (win32_attach): Pass 1 to do_initial_child_stuff.
10153 (win32_kill): Adjust interface. Remove process from processes
10154 table.
10155 (win32_detach): Ditto.
10156 (win32_join): Adjust interface.
10157 (win32_thread_alive): Take a ptid.
10158 (win32_resume): Adjust to use ptids.
10159 (get_child_debug_event): Ditto.
10160 (win32_wait): Adjust interface. Remove exiting process from
10161 processes table.
10162
bd99dc85
PA
101632009-04-01 Pedro Alves <pedro@codesourcery.com>
10164
10165 Non-stop mode support.
10166
10167 * server.h (non_stop): Declare.
10168 (gdb_client_data, handler_func): Declare.
10169 (delete_file_handler, add_file_handler, start_event_loop):
10170 Declare.
10171 (handle_serial_event, handle_target_event, push_event)
10172 (putpkt_notif): Declare.
10173 * target.h (enum resume_kind): New.
10174 (struct thread_resume): Replace `step' field by `kind' field.
10175 (TARGET_WNOHANG): Define.
10176 (struct target_ops) <wait>: Add `options' argument.
10177 <supports_non_stop, async, start_non_stop>: New fields.
10178 (target_supports_non_stop, target_async): New.
10179 (start_non_stop): Declare.
10180 (mywait): Add `options' argument.
10181 * target.c (mywait): Add `options' argument. Print child exit
10182 notifications here.
10183 (start_non_stop): New.
10184 * server.c (non_stop, own_buf, mem_buf): New globals.
10185 (struct vstop_notif): New.
10186 (notif_queue): New global.
10187 (queue_stop_reply, push_event, discard_queued_stop_replies)
10188 (send_next_stop_reply): New.
10189 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10190 interface changes.
10191 (attach_inferior): In non-stop mode, don't wait for the target
10192 here.
10193 (handle_general_set): Handle QNonStop.
10194 (handle_query): When handling qC, return the current general
10195 thread, instead of the first thread of the list.
10196 (handle_query): If the backend supports non-stop mode, include
10197 QNonStop+ in the qSupported query response.
10198 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10199 and non-stop mode.
10200 (handle_v_attach, handle_v_run): Handle non-stop mode.
10201 (handle_v_stopped): New.
10202 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10203 (myresume): Adjust to use resume_kind. Handle non-stop.
10204 (queue_stop_reply_callback): New.
10205 (handle_status): Handle non-stop mode.
10206 (main): Clear non_stop flag on reconnection. Use the event-loop.
10207 Refactor serial protocol handling from here ...
10208 (process_serial_event): ... to this new function. When GDB
10209 selects any thread, select one here. In non-stop mode, wait until
10210 GDB acks all pending events before exiting.
10211 (handle_serial_event, handle_target_event): New.
10212 * remote-utils.c (remote_open): Install remote_desc in the event
10213 loop.
10214 (remote_close): Remove remote_desc from the event loop.
10215 (putpkt_binary): Rename to...
10216 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10217 (putpkt_binary): New as wrapper around putpkt_binary_1.
10218 (putpkt_notif): New.
10219 (prepare_resume_reply): In non-stop mode, don't change the
10220 general_thread.
10221 * event-loop.c: New.
10222 * Makefile.in (OBJ): Add event-loop.o.
10223 (event-loop.o): New rule.
10224
10225 * linux-low.h (pid_of): Moved here.
10226 (lwpid_of): New.
10227 (get_lwp_thread): Use lwpid_of.
10228 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10229 * linux-low.c (pid_of): Delete.
10230 (inferior_pid): Use lwpid_of.
10231 (linux_event_pipe): New.
10232 (target_is_async_p): New.
10233 (delete_lwp): New.
10234 (handle_extended_wait): Use lwpid_of.
10235 (add_lwp): Don't set lwpid field.
10236 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10237 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10238 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10239 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10240 first. Adjust to linux_wait_for_event interface changes. Use
10241 lwpid_of.
10242 (linux_detach): Don't delete the main lwp here.
10243 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10244 (status_pending_p): Don't consider explicitly suspended lwps.
10245 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10246 pointer. Add OPTIONS argument. Change return type to int. Use
10247 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10248 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10249 pointer. Add status pointer argument. Return a pid instead of a
10250 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10251 changes. In non-stop mode, don't switch to a random thread.
10252 (linux_wait): Rename to...
10253 (linux_wait_1): ... this. Add target_options argument, and handle
10254 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10255 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10256 clean exit and signal exit code. Don't stop all threads in
10257 non-stop mode. In all-stop mode, only stop all threads when
10258 reporting a stop to GDB. Handle explicit thread stop requests.
10259 (async_file_flush, async_file_mark): New.
10260 (linux_wait): New.
10261 (send_sigstop): Use lwpid_of.
10262 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10263 interface changes. In non-stop mode, don't switch to a random
10264 thread.
10265 (linux_resume_one_lwp): Use lwpid_of.
10266 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10267 (linux_resume_one_thread): ... this. Handle resume_stop. In
10268 non-stop mode, don't look for pending flag in all threads.
10269 (resume_status_pending_p): Don't consider explicitly suspended
10270 threads.
10271 (my_waitpid): Reimplement. Emulate __WALL.
10272 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10273 Use lwpid_of.
10274 (sigchld_handler, linux_supports_non_stop, linux_async)
10275 (linux_start_non_stop): New.
10276 (linux_target_ops): Register linux_supports_non_stop, linux_async
10277 and linux_start_non_stop.
10278 (initialize_low): Install SIGCHLD handler.
10279 * thread-db.c (thread_db_create_event, find_one_thread)
10280 (thread_db_get_tls_address): Use lwpid_of.
10281 * win32-low.c (win32_detach): Adjust to use resume_kind.
10282 (win32_wait): Add `options' argument.
10283 * spu-low.c (spu_resume): Adjust to use resume_kind.
10284 (spu_wait): Add `options' argument.
10285
5b1c542e
PA
102862009-04-01 Pedro Alves <pedro@codesourcery.com>
10287
10288 Decouple target code from remote protocol.
10289
10290 * target.h (enum target_waitkind): New.
10291 (struct target_waitstatus): New.
10292 (struct target_ops) <wait>: Return an unsigned long. Take a
10293 target_waitstatus pointer instead of a char pointer.
10294 (mywait): Likewise.
10295 * target.c (mywait): Change prototype to return an unsigned long.
10296 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10297 * server.h (thread_from_wait, old_thread_from_wait): Delete
10298 declarations.
10299 (prepare_resume_reply): Change prototype to take a
10300 target_waitstatus.
10301 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10302 (last_status, last_ptid): New.
10303 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10304 pid instead of a signal.
10305 (attach_inferior): Remove "status" and "signal" parameters.
10306 Adjust.
10307 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10308 not as an address.
10309 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10310 (handle_v_requests, myresume): Remove "status" and "signal"
10311 parameters. Adjust.
10312 (handle_status): New.
10313 (main): Delete local `status'. Adjust.
10314 * remote-utils.c: Include target.h.
10315 (prepare_resume_reply): Change prototype to take a
10316 target_waitstatus. Adjust.
10317
10318 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10319 interface.
10320 * spu-low.c (spu_wait): Adjust.
10321 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10322 Delete.
10323 (win32_wait): Adjust.
10324
2bd7c093
PA
103252009-04-01 Pedro Alves <pedro@codesourcery.com>
10326
10327 * target.h (struct thread_resume): Delete leave_stopped member.
10328 (struct target_ops): Add a `n' argument to the `resume' callback.
10329 * server.c (start_inferior): Adjust.
10330 (handle_v_cont, myresume): Adjust.
10331 * linux-low.c (check_removed_breakpoint): Adjust to resume
10332 interface change, and to removed leave_stopped field.
10333 (resume_ptr): Delete.
10334 (struct thread_resume_array): New.
10335 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10336 resume interface change.
10337 (linux_continue_one_thread, linux_queue_one_thread)
10338 (resume_status_pending_p): Check if the resume field is NULL
10339 instead of checking the leave_stopped member.
10340 (linux_resume): Adjust to the target resume interface change.
10341 * spu-low.c (spu_resume): Adjust to the target resume interface
10342 change.
10343 * win32-low.c (win32_detach, win32_resume): Ditto.
10344
c35fafde
PA
103452009-04-01 Pedro Alves <pedro@codesourcery.com>
10346
10347 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10348 flag.
10349 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10350 pending.
10351 (linux_continue_one_thread): Only preserve the stepping flag if
10352 there's a pending breakpoint.
10353
0a59d50b
PA
103542009-03-31 Pedro Alves <pedro@codesourcery.com>
10355
10356 * server.c (main): After the inferior having exited, call
10357 remote_close before exiting gdbserver.
10358
f04c6d38
TJB
103592009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10360
10361 Fix size of FPSCR in Power 7 processors.
10362 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10363 (PPC_FEATURE_HAS_DFP): New #define.
10364 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10365 size of the FPSCR.
10366
78e5cee6
PA
103672009-03-23 Pedro Alves <pedro@codesourcery.com>
10368
10369 * server.c (handle_query) Whitespace and formatting.
10370
1b3f6016
PA
103712009-03-22 Pedro Alves <pedro@codesourcery.com>
10372
10373 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10374 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10375 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10376 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10377 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10378 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10379 Makefile.in, configure.ac: Fix whitespace throughout.
10380 * configure: Regenerate.
10381
a07b2135
PA
103822009-03-22 Pedro Alves <pedro@codesourcery.com>
10383
10384 * inferiors.c (find_inferior): Make it safe for the callback
10385 function to delete the currently iterated inferior.
10386
67cc2626
PA
103872009-03-22 Pedro Alves <pedro@codesourcery.com>
10388
10389 * Makefile.in (linuw_low_h): Move higher.
10390 (thread-db.o): Depend on $(linux_low_h).
10391
54a0b537
PA
103922009-03-17 Pedro Alves <pedro@codesourcery.com>
10393
10394 Rename "process" to "lwp" throughout.
10395
10396 * linux-low.c (all_processes): Rename to...
10397 (all_lwps): ... this.
10398 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10399 (add_process): Rename to ...
10400 (add_lwp): ... this. Adjust.
10401 (linux_create_inferior): Adjust.
10402 (linux_attach_lwp): Adjust.
10403 (linux_attach): Adjust.
10404 (linux_kill_one_process): Rename to ...
10405 (linux_kill_one_lwp): ... this. Adjust.
10406 (linux_kill): Adjust.
10407 (linux_detach_one_process): Rename to ...
10408 (linux_detach_one_lwp): ... this. Adjust.
10409 (linux_detach): Adjust.
10410 (check_removed_breakpoint): Adjust.
10411 (status_pending_p): Adjust.
10412 (linux_wait_for_process): Rename to ...
10413 (linux_wait_for_lwp): ... this. Adjust.
10414 (linux_wait_for_event): Adjust.
10415 (send_sigstop): Adjust.
10416 (wait_for_sigstop): Adjust.
10417 (stop_all_processes): Rename to ...
10418 (stop_all_lwps): ... this.
10419 (linux_resume_one_process): Rename to ...
10420 (linux_resume_one_lwp): ... this. Adjust.
10421 (linux_set_resume_request, linux_continue_one_thread)
10422 (linux_queue_one_thread, resume_status_pending_p)
10423 (usr_store_inferior_registers, regsets_store_inferior_registers)
10424 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10425 Adjust.
10426 * linux-low.h (get_process): Rename to ...
10427 (get_lwp): ... this. Adjust.
10428 (get_thread_process): Rename to ...
10429 (get_thread_lwp): ... this. Adjust.
10430 (get_process_thread): Rename to ...
10431 (get_lwp_thread): ... this. Adjust.
10432 (struct process_info): Rename to ...
10433 (struct lwp_info): ... this.
10434 (all_processes): Rename to ...
10435 (all_lwps): ... this.
10436 * proc-service.c (ps_lgetregs): Adjust.
10437 * thread-db.c (thread_db_create_event, find_one_thread)
10438 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10439
0b16c5cf
PA
104402009-03-14 Pedro Alves <pedro@codesourcery.com>
10441
10442 * server.c (handle_query): Handle "qAttached".
10443
32de4b9d
NS
104442009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10445
10446 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10447 GPLv3, update license URL.
10448
2aecd87f
DE
104492009-03-01 Doug Evans <dje@google.com>
10450
93efd302 10451 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
10452 (server_h): Add gdb_signals.h.
10453 (signals.o): Update.
10454 * server.h (target_signal_from_host,target_signal_to_host_p)
10455 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10456
86b1f9c5
PM
104572009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10458
10459 * remote-utils.c (getpkt): Also generate remote-debug
10460 information if noack_mode is set.
10461
4aa995e1
PA
104622009-02-06 Pedro Alves <pedro@codesourcery.com>
10463
10464 * server.c (handle_query): Report qXfer:siginfo:read and
10465 qXfer:siginfo:write as supported and handle them.
10466 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10467 * linux-low.c (linux_xfer_siginfo): New.
10468 (linux_target_ops): Set it.
10469
62709adf
PA
104702009-01-26 Pedro Alves <pedro@codesourcery.com>
10471
10472 * server.c (gdbserver_usage): Mention --remote-debug.
10473 (main): Accept '--remote-debug' switch.
10474
aef93bd7
DE
104752009-01-18 Doug Evans <dje@google.com>
10476
10477 * regcache.c (new_register_cache): No need to check result of xcalloc.
10478 * server.c (handle_search_memory): Back out calls to xmalloc,
10479 result is checked and error is returned to user upon failure.
10480 (handle_query): Ditto. Add more checks for result of malloc.
10481 (handle_v_cont): Check result of malloc, report error back to
10482 user upon failure.
10483 (handle_v_run): Ditto. Call freeargv.
10484 * server.h (freeargv): Declare.
10485 * utils.c (freeargv): New fn.
10486
54363045
DE
104872009-01-15 Doug Evans <dje@google.com>
10488
f626972c
DE
10489 * gdbreplay.c (perror_with_name): Make arg const char *.
10490 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10491 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10492 * utils.c (perror_with_name): Make arg const char *.
54363045 10493
18aae699
PA
104942009-01-14 Pedro Alves <pedro@codesourcery.com>
10495
10496 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10497 when handling a EXIT_PROCESS_DEBUG_EVENT.
10498
ff703abe
JB
104992009-01-06 Joel Brobecker <brobecker@adacore.com>
10500
10501 * gdbreplay.c (gdbreplay_version): Update copyright year.
10502 * server.c (gdbserver_version): Likewise.
10503
f21cc1a2 105042009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10505
10506 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10507 (handle_extended_wait): Improve comment.
0e21c1ec 10508
bca929d3
DE
105092008-12-13 Doug Evans <dje@google.com>
10510
10511 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10512 * server.h (ATTR_MALLOC): New macro.
10513 (xmalloc,xcalloc,xstrdup): Declare.
10514 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10515 * inferiors.c: Ditto.
10516 * linux-low.c: Ditto.
10517 * mem-break.c: Ditto.
10518 * regcache.c: Ditto.
10519 * remote-utils.c: Ditto.
10520 * server.c: Ditto.
10521 * target.c: Ditto.
10522 * win32-low.c: Ditto.
10523
97438e3f
DE
105242008-12-12 Doug Evans <dje@google.com>
10525
896c7fbb
DE
10526 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10527 in debugging printf.
10528
97438e3f
DE
10529 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10530
e3b886f8
DE
105312008-12-09 Doug Evans <dje@google.com>
10532
10533 * linux-low.h (struct process_info): Delete member tid, unused.
10534 * thread-db.c (find_one_thread): Update.
10535 (maybe_attach_thread): Update.
10536
07e059b5
VP
105372008-12-02 Pedro Alves <pedro@codesourcery.com>
10538
889bf7c5
PA
10539 * target.h (struct target_ops): Add qxfer_osdata member.
10540 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10541 and dirent.h.
10542 (linux_qxfer_osdata): New functions.
10543 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10544 callback.
10545 * server.c (handle_query): Handle "qXfer:osdata:read:".
10546 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10547 (buffer_xml_printf): New functions.
10548 * server.h (struct buffer): New.
10549 (buffer_grow_str, buffer_grow_str0): New macros.
10550 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10551 (buffer_xml_printf): Declare.
07e059b5 10552
4cab47ab
DE
105532008-11-24 Doug Evans <dje@google.com>
10554
10555 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10556
f142445f
DJ
105572008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10558
10559 * server.c (handle_v_run): Always use the supplied argument list.
10560
d0107bb6 105612008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 10562
d0107bb6
BW
10563 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10564 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 10565
2c4ad781
TJB
105662008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10567
10568 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10569 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10570 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10571 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10572 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10573 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10574 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10575 XML target descriptions.
10576 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10577 when inferior is running on an ISA 2.05 or later processor. Add
10578 special case to return offset for full 64-bit slot of FPSCR when
10579 in 32-bits.
10580
dfb64f85
DJ
105812008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10582
10583 * Makefile.in (SFILES, clean): Added sparc64 files.
10584 (reg-sparc64.o, reg-sparc64.c): New.
10585 * configure.srv (sparc*-*-linux*): New configuration.
10586 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10587 syscall arguments for SPARC.
10588 (regsets_store_inferior_registers): Likewise.
10589 * linux-sparc-low.c: New file.
10590
66b6e1dd
DE
105912008-10-21 Doug Evans <dje@google.com>
10592
10593 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10594 (READLINE_DIR,READLINE_DEP): Delete.
10595 (INTERNAL_CFLAGS): Update.
10596 (LINTFLAGS): Update.
10597
9b710a42
PA
105982008-10-10 Pedro Alves <pedro@codesourcery.com>
10599
10600 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10601 whole argv from the last run, not just argv[0].
10602
5822d809
PA
106032008-09-08 Pedro Alves <pedro@codesourcery.com>
10604
10605 * regcache.c (new_register_cache): Return NULL if the register
10606 cache size isn't known yet.
10607 (free_register_cache): Avoid dereferencing a NULL regcache.
10608
74aac56f
DJ
106092008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10610
10611 * configure.srv: Merge MIPS and MIPS64.
10612
400b20f5
MR
106132008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10614
10615 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10616
677c5bb1
LM
106172008-08-18 Luis Machado <luisgpm@br.ibm.com>
10618
10619 * Makefile.in: Add required vsx dependencies.
10620
10621 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10622 Declare init_registers_powerpc_vsx32l.
10623 Declare init_registers_powerpc_vsx64l.
10624 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10625 (ppc_arch_setup): Check for VSX in hwcap.
10626 (ppc_fill_vsxregset): New function.
10627 (ppc_store_vsxregset): New function.
10628 Add new VSX entry in regset_info target_regsets.
10629
10630 * configure.srv: Add new VSX dependencies.
10631
a6f3e723
SL
106322008-08-12 Pedro Alves <pedro@codesourcery.com>
10633
10634 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10635 (remote_open): Set or clear transport_is_reliable.
10636 (putpkt_binary): Don't expect acks in noack mode.
10637 (getpkt): Don't send ack/nac in noack mode.
10638 * server.c (handle_general_set): Handle QStartNoAckMode.
10639 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10640 qSupported.
10641 (main): Reset noack_mode on every connection.
10642 * server.h (noack_mode): Declare.
10643
a417dc56
RW
106442008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10645
10646 * Makefile.in (GDBREPLAY_OBS): New variable.
10647 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10648
3221518c
UW
106492008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10650 Daniel Jacobowitz <dan@codesourcery.com>
10651
10652 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10653 (usr_store_inferior_registers): Likewise.
10654 (regsets_store_inferior_registers): Likewise.
10655
ec56be1b
PA
106562008-07-31 Rolf Jansen <rj@surtec.com>
10657 Pedro Alves <pedro@codesourcery.com>
10658
10659 * configure.ac: Check for memmem declaration.
10660 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10661 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10662 (disable_packet_qfThreadInfo): Unconditionally compile.
10663 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10664 * configure, config.in: Regenerate.
10665
2fe5e3ff
DE
106662008-07-28 Doug Kwan <dougkwan@google.com>
10667
10668 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10669 (linux_write_memory): Remove declaration of errno.
10670
836acd6d
UW
106712008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10672
10673 * linux-low.c (handle_extended_wait): Do not use "status"
10674 variable uninitialized.
10675
aeba519e
PA
106762008-07-07 Pedro Alves <pedro@codesourcery.com>
10677
10678 * server.c (handle_v_attach): Inhibit reporting dll changes.
10679
db42f210
PA
106802008-06-27 Pedro Alves <pedro@codesourcery.com>
10681
10682 * remote-utils.c (prepare_resume_reply): If requested, don't
10683 output "thread:TID" in the T stop reply.
10684
10685 * server.c (disable_packet_vCont, disable_packet_Tthread)
10686 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10687 (handle_query): If requested, disable support for qC, qfThreadInfo
10688 and qsThreadInfo.
10689 (handle_v_requests): If requested, disable support for vCont.
10690 (gdbserver_show_disableable): New.
10691 (main): Handle --disable-packet and --disable-packet=LIST.
10692
10693 * server.h (disable_packet_vCont, disable_packet_Tthread)
10694 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10695
8e4c5421
CD
106962008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10697
10698 * server.c (gdbserver_usage): Mention --version.
10699
6e23a804
DJ
107002008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10701
10702 * Makefile.in (gdbreplay.o): New rule.
10703
90aa6a40
JM
107042008-06-06 Joseph Myers <joseph@codesourcery.com>
10705
10706 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10707 message, not gdbserver.
10708
c16158bc 107092008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
10710 Nathan Sidwell <nathan@codesourcery.com>
10711 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
10712
10713 * acinclude.m4: Include ../../config/acx.m4.
10714 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10715 * configure, config.in: Regenerate.
10716 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10717 * server.c (gdbserver_version): Print PKGVERSION.
10718 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10719 (main): Adjust gdbserver_usage calls.
10720 * gdbreplay.c (version, host_name): Add declarations.
10721 (gdbreplay_version, gdbreplay_usage): New.
10722 (main): Accept --version and --help options.
10723
aeb75bf5
DJ
107242008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10725
10726 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10727 (arm_breakpoint_at): Handle Thumb.
10728 (the_low_target): Add comment.
10729
76b233dd
UW
107302008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10731
10732 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10733
08388c79
DE
107342008-05-09 Doug Evans <dje@google.com>
10735
a3c83fae
DE
10736 * server.h (decode_search_memory_packet): Declare.
10737 * remote-utils.c (decode_search_memory_packet): New fn.
10738 * server.c (handle_search_memory_1): New fn.
08388c79
DE
10739 (handle_search_memory): New fn.
10740 (handle_query): Process qSearch:memory packets.
10741
bb9c3d36
UW
107422008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10743
10744 * regcache.c (registers_length): Remove.
10745 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10746 full register packet.
10747 * regcache.h (registers_length): Remove prototype.
10748 * server.h (PBUFSIZ): Define to 16384.
10749
7284e1be
UW
107502008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10751
10752 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10753 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10754 powerpc-64l.o, and powerpc-altivec64l.o.
10755 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10756 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10757 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10758 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10759 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10760 to srv_xmlfiles.
10761
10762 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10763 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10764 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10765 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10766 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10767 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10768 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10769 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10770 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10771 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10772 (clean): Update.
10773
10774 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10775 (init_registers_powerpc_32l): ... this new prototype.
10776 (init_registers_powerpc_32): Remove, replace by ...
10777 (init_registers_powerpc_altivec32l): ... this new prototype.
10778 (init_registers_powerpc_e500): Remove, replace by ...
10779 (init_registers_powerpc_e500l): ... this new prototype.
10780 (init_registers_ppc64): Remove, replace by ...
10781 (init_registers_powerpc_64l): ... this new prototype.
10782 (init_registers_powerpc_64): Remove, replace by ...
10783 (init_registers_powerpc_altivec64l): ... this new prototype.
10784 (ppc_num_regs): Set to 73.
10785 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10786 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10787 (ppc_cannot_store_register): Handle orig_r3 and trap.
10788 (ppc_arch_setup): Update init_registers_... calls.
10789 (ppc_fill_gregset): Handle orig_r3 and trap.
10790
10791 * inferiors.c (clear_inferiors): Reset current_inferior.
10792
fdc59709
PB
107932008-04-23 Paolo Bonzini <bonzini@gnu.org>
10794
889bf7c5
PA
10795 * acinclude.m4: Add override.m4.
10796 * configure: Regenerate.
fdc59709 10797
c9b2f845
UW
107982008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10799
10800 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10801 initial call to init_register_ppc64.
10802
550512b8
UW
108032008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10804
43aaf8b6
PA
10805 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10806 single powerpc*-*-linux* case.
550512b8
UW
10807 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10808
b6430ec3
UW
108092008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10810
10811 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 10812 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
10813 from reg_xmlfiles.
10814 * linux-ppc-low.c: Include <elf.h>.
10815 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10816 (ppc_hwcap): New global variable.
10817 (ppc_regmap): Remove __SPE__ #ifdef sections.
10818 (ppc_regmap_e500): New global variable.
10819 (ppc_cannot_store_register): Update __SPE__ special case.
10820 (ppc_get_hwcap): New function.
10821 (ppc_arch_setup): Use it to determine whether inferior supports
10822 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10823 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10824 Do not access registers if target does not support AltiVec.
10825 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10826 Do not access registers if target does not support SPE.
10827 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10828
52fa2412
UW
108292008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10830
10831 * linux-low.c (disabled_regsets, num_regsets): New.
10832 (use_regsets_p): Delete.
10833 (linux_wait_for_process): Clear disabled_regsets.
10834 (regsets_fetch_inferior_registers): Check and set it.
10835 (regsets_store_inferior_registers): Likewise.
10836 (linux_fetch_registers, linux_store_registers): Do not use
10837 use_regsets_p.
10838 (initialize_low): Allocate disabled_regsets.
10839
e28b3332
DJ
108402008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10841
10842 * Makefile.in (LIBOBJS): New.
10843 (OBS): Use LIBOBJS.
10844 (memmem.o): New rule.
10845 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10846 * configure: Regenerated.
10847
4536995d
UW
108482008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10849
10850 * server.c (handle_query): Never return "unsupported" for
10851 qXfer:features:read queries.
10852
221c031f
UW
108532008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10854
10855 * server.c (get_features_xml): Fix inverted condition.
10856 (handle_query): Always support qXfer:feature:read.
10857
ccd213ac
DJ
108582008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10859
10860 * server.c (wrapper_argv): New.
10861 (start_inferior): Handle wrapper_argv. If set, expect an extra
10862 trap.
10863 (gdbserver_usage): Document --wrapper.
10864 (main): Parse --wrapper.
10865
6fe305f7
UW
108662008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10867
10868 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10869 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10870 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10871 (ppc_set_pc): Likewise.
10872 (ppc_arch_setup): New function.
10873 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10874 of collect_register.
889bf7c5 10875 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 10876
5b0a002e
UW
108772008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10878
10879 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10880 instead of linux-ppc64-low.o.
10881 * linux-ppc64-low.c: Remove file.
10882 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10883 (linux-ppc64-low.o): Remove rule.
10884
10885 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10886 (init_registers_powerpc_64): Likewise.
10887 (ppc_regmap): Conditionally define depending on __powerpc64__.
10888 (ppc_cannot_store_register): Do not special-case "fpscr" when
10889 compiled on __powerpc64__.
10890 (ppc_collect_ptrace_register): New function.
10891 (ppc_supply_ptrace_register): New function.
10892 (ppc_breakpoint): Change type to "unsigned int".
10893 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10894 (the_low_target): Conditionally provide initializers for the
889bf7c5 10895 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
10896 collect_ptrace_register and supply_ptrace_register members.
10897
9b4b61c8
UW
108982008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10899
10900 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10901 * server.c (gdbserver_xmltarget): Define.
10902 (get_features_xml): Use it to replace "target.xml" and arch_string.
10903
10904 * configure.srv: Remove srv_xmltarget. Add XML files that were
10905 mentioned there to srv_xmlfiles instead. Remove conditional tests
10906 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10907 srv_xmlfiles and srv_regobj to include all possible choices.
10908 * configure.ac (srv_xmltarget): Remove.
10909 (srv_xmlfiles): Do not add "target.xml".
10910 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10911 checks for supplementary target information.
10912 * configure: Regenerate.
10913 * Makefile.in (XML_TARGET): Remove.
10914 (target.xml): Remove rule.
10915 (clean): Do not clean up target.xml.
10916 (.PRECIOUS): Do not mention target.xml.
10917
10918 * target.h (struct target_ops): Remove arch_string member.
10919 * linux-low.c (linux_arch_string): Remove.
10920 (linux_target_ops): Remove arch_string initializer.
10921 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10922 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10923 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10924 * spu-low.c (spu_arch_string): Remove.
10925 (spu_target_ops): Remove arch_string initializer.
10926 * win32-low.c (win32_arch_string): Remove.
10927 (win32_target_ops): Remove arch_string initializer.
10928 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10929 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10930 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10931
ee1a7ae4
UW
109322008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10933
10934 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10935 by collect_ptrace_register and supply_ptrace_register hooks.
10936 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10937 instead of checking for the_low_target.left_pad_xfer.
10938 (usr_store_inferior_registers): Use collect_ptrace_register callback
10939 instead of checking for the_low_target.left_pad_xfer.
10940
10941 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10942 (s390_supply_ptrace_register): Likewise.
10943 (s390_fill_gregset): Call s390_collect_ptrace_register.
10944 (the_low_target): Update.
10945
10946 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10947 (ppc_supply_ptrace_register): Likewise.
10948 (the_low_target): Update.
10949
10950 * linux-i386-low.c (the_low_target): Update.
10951 * linux-x86-64-low.c (the_low_target): Update.
10952
d61ddec4
UW
109532008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10954
10955 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10956 reg-s390.o and reg-s390x.o.
10957
10958 * linux-low.c (new_inferior): New global variable.
10959 (linux_create_inferior, linux_attach): Set it.
10960 (linux_wait_for_process): Call the_low_target.arch_setup after the
10961 target has stopped for the first time.
10962 (initialize_low): Do not call the_low_target.arch_setup.
10963
10964 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10965 (s390_set_pc): Likewise.
10966 (s390_arch_setup): New function.
10967 (the_low_target): Use s390_arch_setup as arch_setup routine.
10968
10969 * regcache.c (realloc_register_cache): New function.
10970 (set_register_cache): Call it for each existing regcache.
10971
d05b4ac3
UW
109722008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10973
10974 * server.h (init_registers): Remove prototype.
10975
10976 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10977 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10978 instead of init_registers ().
10979 * linux-arm-low.c (init_registers_arm): Add prototype.
10980 (init_registers_arm_with_iwmmxt): Likewise.
10981 (the_low_target): Add initializer for arch_setup field.
10982 * linux-cris-low.c (init_registers_cris): Add prototype.
10983 (the_low_target): Add initializer for arch_setup field.
10984 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10985 (the_low_target): Add initializer for arch_setup field.
10986 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10987 (the_low_target): Add initializer for arch_setup field.
10988 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10989 (the_low_target): Add initializer for arch_setup field.
10990 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10991 (the_low_target): Add initializer for arch_setup field.
10992 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10993 (the_low_target): Add initializer for arch_setup field.
10994 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10995 (init_registers_mips64_linux): Likewise.
10996 (the_low_target): Add initializer for arch_setup field.
10997 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10998 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10999 (the_low_target): Add initializer for arch_setup field.
11000 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11001 (init_registers_powerpc_64): Likewise.
11002 (the_low_target): Add initializer for arch_setup field.
11003 * linux-s390-low.c (init_registers_s390): Add prototype.
11004 (init_registers_s390x): Likewise.
11005 (the_low_target): Add initializer for arch_setup field.
11006 * linux-sh-low.c (init_registers_sh): Add prototype.
11007 (the_low_target): Add initializer for arch_setup field.
11008 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11009 (the_low_target): Add initializer for arch_setup field.
11010 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11011 (the_low_target): Add initializer for arch_setup field.
11012
11013 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11014 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11015 instead of init_registers ().
11016 * win32-arm-low.c (init_registers_arm): Add prototype.
11017 (the_low_target): Add initializer for arch_setup field.
11018 * win32-i386-low.c (init_registers_i386): Add prototype.
11019 (the_low_target): Add initializer for arch_setup field.
11020
11021 * spu-low.c (init_registers_spu): Add prototype.
11022 (initialize_low): Call initialie_registers_spu () instead of
11023 initialize_registers ().
11024
fd96d250
PA
110252008-02-19 Pedro Alves <pedro@codesourcery.com>
11026
11027 * server.c (handle_v_requests): When handling the vRun and vAttach
11028 packets, if already debugging a process, don't kill it. Return an
11029 error instead.
11030
d41b6bb4
DJ
110312008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11032
11033 * server.c (handle_query): Correct length check.
11034
5ac588cf
PA
110352008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11036
11037 * win32-low.c (do_initial_child_stuff): Add process handle
11038 parameter. Set current_process_handle and current_process_id from the
11039 parameters. Clear globals.
11040 (win32_create_inferior): Don't set current_process_handle and
11041 current_process_id here. Instead pass them on the call to
11042 do_initial_child_stuff.
11043 (win32_attach): Likewise.
11044 (win32_clear_inferiors): New.
11045 (win32_kill): Don't close the current process handle or the
11046 current thread handle here. Instead call win32_clear_inferiors.
11047 (win32_detach): Don't open a new handle to the process. Call
11048 win32_clear_inferiors.
11049 (win32_join): Don't rely on current_process_handle; open a new
11050 handle using the process id.
11051 (win32_wait): Call win32_clear_inferiors when the inferior process
11052 has exited.
11053
ecd7ecbc
DJ
110542008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11055
11056 * server.c (monitor_show_help): Add "exit".
11057
1525d545
MG
110582008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11059
ecd7ecbc 11060 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
11061 (clean): Add reg-xtensa.c.
11062 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
11063 * configure.srv (xtensa*-*-linux*) New target.
11064 * linux-xtensa-low.c: New.
11065 * xtensa-xtregs.c: New.
1525d545 11066
59a016f0
PA
110672008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11068
11069 * hostio.c: Don't include errno.h.
11070 (errno_to_fileio_errno): Move to hostio-errno.
11071 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11072 error number outputting to the target->hostio_last_error callback.
11073 (hostio_packet_error): Use FILEIO_EINVAL directly.
11074 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11075 calls to hostio_error.
11076 * hostio-errno.c: New.
11077 * server.h (hostio_last_error_from_errno): Declare.
11078 * target.h (target_ops): Add hostio_last_error member.
11079 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11080 as hostio_last_error handler.
889bf7c5 11081 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
11082 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11083 (wince_hostio_last_error): New functions.
11084 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11085 as hostio_last_error handler.
11086 (win32_target_ops) [!_WIN32_WCE]: Register
11087 hostio_last_error_from_errno as hostio_last_error handler.
11088 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11089 (hostio-errno.o): New rule.
11090 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11091 * configure.srv (srv_hostio_err_objs): New variable. Default to
11092 hostio-errno.o.
11093 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11094 * configure: Regenerate.
11095
2d717e4f
DJ
110962008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11097
11098 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11099 (linux_kill, linux_detach): Clean up the process list.
11100 * remote-utils.c (remote_open): Improve port number parsing.
11101 (putpkt_binary, input_interrupt): Only send interrupts if the target
11102 is running.
11103 * server.c (extended_protocol): Make static.
11104 (attached): Define earlier.
11105 (exit_requested, response_needed, program_argv): New variables.
11106 (target_running): New.
11107 (start_inferior): Clear attached here.
11108 (attach_inferior): Set attached here.
11109 (require_running): Define.
11110 (handle_query): Use require_running and target_running. Implement
11111 "monitor exit".
11112 (handle_v_attach, handle_v_run): New.
11113 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11114 (gdbserver_usage): Update.
11115 (main): Redo argument parsing. Handle --debug and --multi. Handle
11116 --attach along with other options or after the port. Save
11117 program_argv. Support no initial program. Resynchronize
11118 communication with GDB after an error. Handle "monitor exit".
11119 Use require_running and target_running. Always allow the extended
11120 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
11121 restart in extended mode.
11122 * README: Refer to the GDB manual. Update --attach usage.
11123
7407e2de
AS
111242007-12-20 Andreas Schwab <schwab@suse.de>
11125
11126 * linux-low.c (STACK_SIZE): Define.
11127 (linux_tracefork_child): Use it. Use __clone2 on ia64.
11128 (linux_test_for_tracefork): Likewise.
11129
b65d95c5
DJ
111302007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
11131
11132 * linux-low.c (linux_wait_for_event): Update messages. Do not
11133 reinsert auto-delete breakpoints.
11134 * mem-break.c (struct breakpoint): Change return type of handler to
11135 int.
11136 (set_breakpoint_at): Update handler type.
11137 (reinsert_breakpoint_handler): Return 1 instead of calling
11138 delete_breakpoint.
11139 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11140 setting a new one.
11141 (check_breakpoints): Delete auto-delete breakpoints and return 2.
11142 * mem-break.h (set_breakpoint_at): Update handler type.
11143 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11144 * win32-low.c (auto_delete_breakpoint): New.
11145 (get_child_debug_event): Use it.
11146
4e799345
DJ
111472007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
11148
11149 * configure.ac: Check for pread and pwrite.
11150 * hostio.c (handle_pread): Fall back to lseek and read.
11151 (handle_pwrite): Fall back to lseek and write.
11152 * config.in, configure: Regenerated.
11153
27524b67
DJ
111542007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
11155
11156 * server.c (myresume): Add own_buf argument.
11157 (main): Update calls.
11158
a20d5e98
DJ
111592007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
11160
11161 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11162 * remote-utils.c (remote_open): Do not call disable_async_io.
11163 (block_async_io): Delete.
11164 (unblock_async_io): Make static.
11165 (initialize_async_io): New.
11166 * server.c (handle_v_cont): Handle async I/O here.
11167 (myresume): Likewise. Move other common resume tasks here...
11168 (main): ... from here. Call initialize_async_io. Disable async
11169 I/O before the main loop.
11170 * server.h (initialize_async_io): Declare.
11171 (block_async_io, unblock_async_io): Delete prototypes.
11172 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11173
b79d787e
DJ
111742007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
11175
11176 * remote-utils.c (readchar): Allow binary data in received messages.
11177
d97903b2
PA
111782007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11179
11180 * win32-low.c (attaching): New global.
11181 (win32_create_inferior): Clear the `attaching' global.
11182 (win32_attach): Set the `attaching' global.
11183 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11184 attaching. Only set a breakpoint at the entry point if not
11185 attaching.
11186
311de423
PA
111872007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11188
11189 * server.c (main): Don't report dll events on the initial
11190 connection on attaches.
11191
6c2d16d2
PA
111922007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11193
11194 * server.c (main): Relax numerical bases supported for the pid of
11195 the --attach command line argument.
11196
5ca906e6
PA
111972007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11198
11199 * win32-low.c (win32_attach): Call OpenProcess before
11200 DebugActiveProcess, not after. Add last error output to error
11201 call.
11202
9c6c8194
PA
112032007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11204
11205 * win32-low.c (win32_get_thread_context)
11206 (win32_set_thread_context): New functions.
11207 (thread_rec): Use win32_get_thread_context.
11208 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11209 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11210 field.
11211
4d5d1aaa
PA
112122007-12-03 Leo Zayas
11213 Pedro Alves <pedro_alves@portugalmail.pt>
11214
11215 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11216 global variables.
11217 (child_add_thread): Minor cleanup.
11218 (child_continue): Resume artificially suspended threads before
11219 calling ContinueDebugEvent.
11220 (suspend_one_thread): New.
11221 (fake_breakpoint_event): New.
11222 (get_child_debug_event): Change return type to int. Check here if
11223 gdb sent an interrupt request. If a soft interrupt was requested,
11224 fake a breakpoint event. Return 0 if there is no event to handle,
11225 and 1 otherwise.
11226 (win32_wait): Don't check here if gdb sent an interrupt request.
11227 Ensure there is a valid event to handle.
11228 (win32_request_interrupt): Add soft interruption method as last
11229 resort.
11230
c436e841
PA
112312007-12-03 Leo Zayas
11232 Pedro Alves <pedro_alves@portugalmail.pt>
11233
11234 * win32-low.h (win32_thread_info): Add descriptions to the
11235 structure members. Replace `suspend_count' counter by a
11236 `suspended' flag.
11237 * win32-low.c (thread_rec): Update condition of when to get the
11238 context from the inferior. Rely on ContextFlags being set if it
11239 has already been retrieved. Only suspend the inferior thread if
11240 we haven't already. Warn if that fails.
11241 (continue_one_thread): s/suspend_count/suspended/. Only call
11242 ResumeThread once. Warn if that fails.
11243
e7b5fa67
PA
112442007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11245
11246 * win32-low.c (win32_wait): Don't read from the inferior when it
11247 has already exited.
11248
a385171d
PA
112492007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11250
11251 * Makefile.in (win32_low_h): New variable.
11252 (win32-low.o): Add dependency on $(win32_low_h).
11253 (win32-arm-low.o, win32-i386-low.o): New rules.
11254
f80c84b3
DJ
112552007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11256
11257 * hostio.c: Correct copyright year.
11258
a6b151f1
DJ
112592007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11260
11261 * Makefile.in (OBS): Add hostio.o.
11262 (hostio.o): New rule.
11263 * server.h (handle_vFile): Declare.
11264 * hostio.c: New file.
11265 * server.c (handle_v_requests): Take packet_len and new_packet_len
11266 for binary packets. Call handle_vFile.
11267 (main): Update call to handle_v_requests.
11268
f9387fc3
DJ
112692007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11270
11271 * linux-low.c: Include <sched.h>.
11272
51c2684e
DJ
112732007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11274
11275 * linux-low.c (linux_tracefork_grandchild): New.
11276 (linux_tracefork_child): Use clone.
11277 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11278
75f83163
JB
112792007-10-31 Joel Brobecker <brobecker@adacore.com>
11280
11281 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11282
da5898ce
DJ
112832007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11284
11285 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11286
24a09b5f
DJ
112872007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11288
11289 * inferiors.c (change_inferior_id): Delete.
11290 (add_pid_to_list, pull_pid_from_list): New.
11291 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11292 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11293 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11294 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11295 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11296 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11297 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11298 (using_threads): Always set to 1.
11299 (handle_extended_wait): New.
11300 (add_process): Do not set TID.
11301 (linux_create_inferior): Set must_set_ptrace_flags.
11302 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11303 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11304 (linux_thread_alive): Rename TID argument to LWPID.
11305 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11306 (linux_wait_for_event): Do not use TID or check using_threads. Update
11307 call to dead_thread_notify. Call handle_extended_wait.
11308 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11309 (send_sigstop): Delete sigstop_sent.
11310 (wait_for_sigstop): Avoid TID.
11311 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11312 (linux_test_for_tracefork): New.
11313 (linux_lookup_signals): Use thread_db_active and
11314 linux_supports_tracefork_flag.
11315 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11316 * linux-low.h (get_process_thread): Avoid TID.
11317 (struct process_ifo): Move thread_known and tid to the end. Remove
11318 sigstop_sent.
11319 (linux_attach_lwp, thread_db_init): Update prototypes.
11320 * server.h (change_inferior_id): Delete prototype.
11321 (add_pid_to_list, pull_pid_from_list): New prototypes.
11322 * thread-db.c (thread_db_use_events): New.
11323 (find_first_thread): Rename to...
11324 (find_one_thread): ...this. Update callers and messages. Do not
11325 call fatal. Check thread_db_use_events. Do not call
11326 change_inferior_id or new_thread_notify.
11327 (maybe_attach_thread): Update. Do not call new_thread_notify.
11328 (thread_db_init): Set thread_db_use_events. Check use_events.
11329 * utils.c (fatal, warning): Correct message prefix.
11330
30ed0a8f
DJ
113312007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11332
11333 * Makefile.in (clean): Remove new files.
11334 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11335 (powerpc-64.o, powerpc-64.c): New rules.
11336 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11337 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11338 with SPE.
11339 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11340 SPE targets.
11341 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11342 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11343 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11344 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11345 (target_regsets): Add AltiVec and SPE register sets.
11346 * configure.ac: Check for AltiVec and SPE.
11347 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11348 (ppc_fill_vrregset, ppc_store_vrregset): New.
11349 (target_regsets): Add AltiVec register set.
11350 * configure: Regenerated.
11351
fd462a61
DJ
113522007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11353
11354 * linux-low.c (O_LARGEFILE): Define.
11355 (linux_read_memory): Use /proc/PID/mem.
11356 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11357 * configure, config.in: Regenerated.
11358
69f223ed
DJ
113592007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11360
11361 * linux-low.c (linux_wait_for_event): Do not pass signals while
11362 single-stepping.
11363
aec18585
PA
113642007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11365
11366 * win32-low.c (create_process): New.
11367 (win32_create_inferior): Use create_process instead of
11368 CreateProcess. If create_process failed retry appending an ".exe"
11369 suffix. Store the GetLastError result immediatelly after
11370 create_process calls and use it on the call to error.
11371
34d86ddd
PA
113722007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11373
11374 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11375
5a0e3bd0
JB
113762007-08-23 Joel Brobecker <brobecker@adacore.com>
11377
11378 * configure.ac: Switch license to GPLv3.
11379
f88c79e6
MS
113802007-08-01 Michael Snyder <msnyder@access-company.com>
11381
11382 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11383
6b3d9b83
PA
113842007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11385
11386 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11387 typedef.
11388 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11389 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11390 CloseToolhelp32Snapshot.
11391 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11392 CloseToolhelp32Snapshot.
11393
c588c53c
MS
113942007-07-27 Michael Snyder <michael.snyder@access-company.com>
11395
11396 * server.c (main): Check for inferior exit before main loop.
11397
aa0403d9
PA
113982007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11399
11400 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11401 instead of on tmp_desc.
11402
255e7678
DJ
114032007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11404 Daniel Jacobowitz <dan@codesourcery.com>
11405
11406 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11407 (add_thread): Minor cleanups.
11408 (clear_inferiors): Move lower in the file. Clear the DLL
11409 list.
11410 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11411 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11412 (xml_escape_text): New.
11413 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11414 for qSupported.
11415 (handle_v_cont): Report errors.
11416 (gdbserver_version): Update.
11417 (main): Correct size of own_buf. Do not report initial DLL events.
11418 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11419 (unloaded_dll, xml_escape_text): New.
11420 * win32-low.c (enum target_waitkind): Update comments.
11421 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11422 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11423 (win32_EnumProcessModules, win32_GetModuleInformation)
11424 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11425 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11426 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11427 (win32_Module32First, win32_Module32Next, load_toolhelp)
11428 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11429 (get_child_debug_event): Handle DLL events.
11430 (win32_wait): Likewise.
11431
0d37add9
DJ
114322007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11433
11434 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11435 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11436
45e2715e
PA
114372007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11438
11439 * win32-low.c (handle_output_debug_string): Ignore event if not
11440 waiting.
11441
c5674cf1
PA
114422007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11443
11444 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11445
2bbe3cc1
DJ
114462007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11447
11448 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11449
ae13219e
DJ
114502007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11451
11452 * inferiors.c (change_inferior_id): Add comment.
11453 * linux-low.c (check_removed_breakpoint): Add an early
11454 prototype. Improve debug output.
11455 (linux_attach): Doc update.
11456 (linux_detach_one_process, linux_detach): Clean up before releasing
11457 each process.
11458 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11459 * linux-low.h (struct process_info): Doc improvement.
11460 * mem-break.c (delete_all_breakpoints): New.
11461 * mem-break.h (delete_all_breakpoints): New prototype.
11462 * thread-db.c (find_first_thread): New.
11463 (thread_db_create_event): Call it instead of
11464 thread_db_find_new_threads. Clean up unused variables.
11465 (maybe_attach_thread): Remove first thread handling.
11466 (thread_db_find_new_threads): Use find_first_thread.
11467 (thread_db_get_tls_address): Likewise.
11468
4105de34
DJ
114692007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11470
11471 * thread-db.c (thread_db_find_new_threads): Add prototype.
11472 (thread_db_create_event): Check for the main thread before adding
11473 a new thread.
11474 (maybe_attach_thread): Only enable event reporting if TID == 0.
11475 (thread_db_get_tls_address): Check for new threads.
11476
2b876972
DJ
114772007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11478
11479 * linux-low.c (linux_create_inferior): Try execv before execvp.
11480 * spu-low.c (spu_create_inferior): Likewise.
11481
7a245884
DJ
114822007-06-13 Mike Frysinger <vapier@gentoo.org>
11483
11484 * linux-low.c (linux_create_inferior): Change execv to execvp.
11485 * spu-low.c (spu_create_inferior): Likewies.
11486
117ce543
DJ
114872007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11488
11489 * Makefile.in (clean): Clean new files instead of deleted ones.
11490 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11491 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11492 rules.
11493 * configure.srv: Specify XML files and new regformats for MIPS and
11494 MIPS64 GNU/Linux.
11495 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11496 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11497 an entry for the restart register.
11498 (mips_cannot_fetch_register, mips_cannot_store_register)
11499 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11500 register names to match the XML descriptions.
11501 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11502 restart register instead of $0.
11503
0e7f50da
UW
115042007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11505 Markus Deuling <deuling@de.ibm.com>
11506
11507 * remote-utils.c (decode_xfer_write): New function.
11508 * server.h (decode_xfer_write): Add prototype.
11509 * server.c (handle_query): Add PACKET_LEN argument. Support
11510 qXfer:spu:read and qXfer:spu:write packets.
11511 (main): Pass packet_len to handle_query.
11512 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11513 * target.h (target_ops): Add qxfer_spu.
11514
374c1d38
UW
115152007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11516
11517 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11518 accessing non-seekable spufs files.
11519
bb63802a
UW
115202007-05-16 Markus Deuling <deuling@de.ibm.com>
11521
889bf7c5 11522 * server.c (handle_query): Add reply for qC packet.
bb63802a 11523
7390519e
PA
115242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11525 Leo Zayas <lerele@champenstudios@com>
11526
11527 * server.h (check_remote_input_interrupt_request): New function.
11528 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11529 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11530 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11531 (check_remote_input_interrupt_request): New function.
11532 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11533 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11534 winapi_GenerateConsoleCtrlEvent): New typedefs.
11535 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11536 to 250 ms.
11537 (win32_wait): Check for remote interrupt request
11538 with check_remote_input_interrupt_request.
11539 (win32_request_interrupt): New function.
11540 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11541
34b34921
PA
115422007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11543
11544 * win32-low.c (debug_registers_changed,
11545 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11546 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11547 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11548 (thread_rec): Get context using the low target.
11549 (child_add_thread): Call thread_added on the low target,
11550 which does the same thing.
11551 (regptr): Delete.
11552 (do_initial_child_stuff): Remove debug registers references.
11553 Set context using the low target. Resume threads after
11554 setting the contexts.
11555 (child_continue): Remove dead variable. Remove debug
11556 registers references.
11557 (child_fetch_inferior_registers): Go through the low target.
11558 (do_child_store_inferior_registers): Remove.
11559 (child_store_inferior_registers): Go through the low target.
11560 (win32_resume): Remove debug registers references.
11561 Set context using the low target.
11562 (handle_exception): Change return type to void. Don't record
11563 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11564 first chance exception.
889bf7c5 11565 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
11566 goto loop. Always return after waiting for debug event.
11567 (win32_wait): Convert to switch statement. Handle spurious
11568 events.
11569
11570 * win32-i386-low.c (debug_registers_changed,
11571 debug_registers_used): New.
11572 (initial_stuff): Rename to ...
11573 (i386_initial_stuff): ... this. Clear debug registers
11574 state variables.
11575 (store_debug_registers): Delete.
11576 (i386_get_thread_context): New.
11577 (load_debug_registers): Delete.
11578 (i386_set_thread_context): New.
11579 (i386_thread_added): New.
11580 (single_step): Rename to ...
11581 (i386_single_step): ... this.
11582 (do_fetch_inferior_registers): Rename to ...
11583 (i386_fetch_inferior_register): ... this.
11584 (i386_store_inferior_register): New.
11585 (the_low_target): Adapt to new interface.
11586
11587 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11588 (arm_get_thread_context): New.
11589 (arm_set_thread_context): New.
11590 (regptr): New.
11591 (do_fetch_inferior_registers): Rename to ...
11592 (arm_fetch_inferior_register): ... this.
11593 (arm_store_inferior_register): New.
11594 (arm_wince_breakpoint): Reimplement as unsigned long.
11595 (arm_wince_breakpoint_len): Define.
11596 (the_low_target): Adapt to new interface.
11597
11598 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11599 load_debug_registers. Add get_thread_context, set_thread_context,
11600 thread_added and store_inferior_register. Rename
11601 fetch_inferior_registers to fetch_inferior_register.
11602 (regptr): Remove declaration.
11603
dd6953e1
PA
116042007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11605
11606 * linux-low.c (linux_detach): Change return type to int. Return 0.
11607 * spu-low.c (spu_detach): Likewise.
11608
444d6139
PA
116092007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11610
11611 * target.h (target_ops): Change return type of detach to int.
11612 Add join.
11613 (join_inferior): New.
11614 * server.c (main): Don't skip detach support on mingw32.
11615 If the inferior doesn't support detaching return error.
11616 Call join_inferior instead of using waitpid.
11617 * linux-low.c (linux_join): New.
11618 (linux_target_op): Add linux_join.
11619 * spu-low.c (spu_join): New.
11620 (spu_target_ops): Add spu_join.
11621 * win32-low.c (win32_detach): Adapt to new interface.
11622 Reopen current_process_handle before detaching. Issue a child
11623 resume before detaching.
11624 (win32_join): New.
11625 (win32_target_op): Add win32_join.
11626
1d5315fe
PA
116272007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11628
11629 * win32-low.c (win32-attach): Fix return value.
11630 * target.h (target_ops): Describe ATTACH return values.
11631
bf914831
PA
116322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11633
11634 * win32-low.c (GETPROCADDRESS): Define.
11635 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11636 (winapi_DebugSetProcessKillOnExit): Likewise.
11637 (win32_create_inferior): Force usage of ansi CreateProcessA.
11638 (win32_attach): Use GETPROCADDRESS.
11639 (win32_detach): Likewise.
11640
f72f3e60
PA
116412007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11642
11643 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11644
ed50f18f
PA
116452007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11646
11647 * win32-low.c: Commit leftover changes from 2007-03-29.
11648
0c2ead7e
DJ
116492007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11650
11651 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11652 fields short instead of int. Add explicit padding.
11653 (i387_cache_to_fsave): Remove unnecessary casts.
11654 (i387_fsave_to_cache): Doc fix.
11655 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11656
73725ff3
DJ
116572007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11658
11659 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11660 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11661
d99f33d8
PA
116622007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11663
11664 * configure.srv (arm*-*-mingw32ce*): Move near the other
11665 arm targets.
11666
68070c10
PA
116672007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11668
2482afc6 11669 * configure.ac: Add errno checking.
68070c10
PA
11670 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11671 sys/file.h and malloc.h.
11672 (AC_CHECK_DECLS): Add perror.
11673 (srv_mingwce): Handle.
2482afc6 11674 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
11675 win32-i386-low.o to srv_tgtobj.
11676 (i[34567]86-*-mingw*): Likewise.
11677 (arm*-*-mingw32ce*): Add case.
11678 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11679 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11680 [__MINGW32CE__] (strerror): New function.
11681 [__MINGW32CE__] (errno): Define to GetLastError.
11682 [__MINGW32CE__] (COUNTOF): New macro.
11683 (remote_open): Remove extra close call.
11684 * mem-break.c (delete_breakpoint_at): New function.
11685 * mem-break.h (delete_breakpoint_at): Declare.
11686 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11687 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11688 [USE_WIN32API] (read, write): Add char* casts.
11689 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11690 * server.h: Include wincecompat.h on Windows CE.
11691 [HAVE_ERRNO_H]: Check.
11692 (perror): Declare if not declared.
11693 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11694 (perror_with_name): Remove errno declaration.
11695 * wincecompat.h: New.
11696 * wincecompat.c: New.
11697 * win32-low.h: New.
11698 * win32-arm-low.c: New.
11699 * win32-i386-low.c: New.
11700 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11701 (OUTMSG2): Make it safe.
11702 (_T): New macro.
11703 (COUNTOF): New macro.
11704 (NUM_REGS): Get it from the low target.
11705 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11706 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11707 (thread_rec): Let low target handle debug registers.
11708 (child_add_thread): Likewise.
11709 (child_init_thread_list): Likewise.
11710 (continue_one_thread): Likewise.
11711 (regptr): New.
11712 (do_child_fetch_inferior_registers): Move to ...
11713 * win32-i386-low.c: ... here, and rename to ...
11714 (do_fetch_inferior_registers): ... this.
889bf7c5 11715 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
11716 Go through the low target.
11717 (do_child_store_inferior_registers): Use regptr.
11718 (strwinerror): New function.
11719 (win32_create_inferior): Handle Windows CE.
11720 Use strwinerror instead of strerror on Windows error
11721 codes. Add program to the error output.
11722 Don't close the main thread handle on Windows CE.
11723 (win32_attach): Use coredll.dll on Windows CE.
11724 (win32_kill): Close current process and current
11725 thread handles.
11726 (win32_detach): Use coredll.dll on Windows CE.
11727 (win32_resume): Let low target handle debug registers, and
11728 step request.
11729 (handle_exception): Add/Remove initial breakpoint. Avoid
11730 non-existant WSTOPSIG on Windows CE.
11731 (win32_read_inferior_memory): Cast to remove warning.
11732 (win32_arch_string): Go through the low target.
11733 (initialize_low): Call set_breakpoint_data with the low
11734 target's breakpoint.
11735 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11736 FOP_REGNUM, mappings): Move to ...
11737 * win32-i386-low.c: ... here.
11738 * win32-low.c (win32_thread_info): Move to ...
11739 * win32-low.h: ... here.
11740 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11741 win32-arm-low.c and wincecompat.c.
11742 (all:): Add $EXEEXT.
11743 (install-only:): Likewise.
11744 (gdbserver:): Likewise.
11745 (gdbreplay:): Likewise.
11746 * config.in: Regenerate.
11747 * configure: Regenerate.
11748
41093d81
PA
117492007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11750
11751 * win32-low.c: Rename typedef thread_info to
11752 win32_thread_info throughout.
11753
544afa54
PA
117542007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11755
11756 * win32-i386-low.c: Rename to ...
11757 * win32-low.c: ... this.
11758 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11759 * Makefile.in: Likewise.
11760
bce7165d
PA
117612007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11762
11763 * remote-utils.c (monitor_output): Constify msg parameter.
11764 * server.h (monitor_output): Likewise.
11765 * win32-i386-low.c (handle_output_debug_string): New.
11766 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11767 handle_output_debug_string.
11768 (get_child_debug_event): Likewise.
11769
506c7aa0
DJ
117702007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11771
11772 * server.c (main): Correct strtoul check.
11773
42c81e2a
DJ
117742007-03-27 Jon Ringle <jon@ringle.org>
11775
11776 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11777
9453113a
DJ
117782007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11779
11780 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11781
64a69107
DJ
117822007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11783
11784 * terminal.h: Check HAVE_SGTTY_H.
11785
117862007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
11787
11788 * remote-utils.c (remote_open): Print out the assigned port number.
11789
c74d0ad8
DJ
117902007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11791
11792 * remote-utils.c (monitor_output): New function.
11793 * server.c (debug_threads): Define here.
11794 (monitor_show_help): New function.
11795 (handle_query): Handle qRcmd.
11796 (main): Do not handle 'd' packet.
11797 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11798 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11799 of debug_threads.
11800
de7c3b4a
PA
118012007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11802
11803 * Makefile.in (EXEEXT): New.
11804 (clean): Use $(EXEEXT).
11805
ef57601b
PA
118062007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11807
11808 * target.h (target_ops): Rename send_signal to request_interrupt,
11809 and remove enum target_signal parameter.
11810 * linux-low.c (linux_request_interrupt): Rename from
11811 linux_send_signal, and always send SIGINT.
11812 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11813 and always send SIGINT.
11814 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11815 of send_signal.
11816 (input_interrupt): Likewise.
11817
820f2bda
PA
118182007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11819
11820 * server.c (get_features_xml): Check if target implemented
11821 arch_string.
11822 * win32-i386-low.c (win32_arch_string): New.
11823 (win32_target_ops): Add win32_arch_string as arch_string member.
11824
ab39bf24
UW
118252007-02-22 Markus Deuling <deuling@de.ibm.com>
11826
11827 * spu-low.c (spu_arch_string): New.
11828 (spu_target_ops): Add spu_arch_string.
11829
61ff6e04
DJ
118302007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11831
11832 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11833 * configure.ac: Do not check for terminal.h.
11834 * configure, config.in: Regenerated.
11835
fb1e4ffc
DJ
118362007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11837
11838 * Makefile.in (OBS): Add $(XML_BUILTIN).
11839 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11840 (clean): Update.
11841 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11842 (arm-with-iwmmxt.c): New.
11843 * config.in, configure: Regenerate.
11844 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11845 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11846 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11847 (arm*-*-linux*): Add iWMMXt and regset support.
11848 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11849 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11850 (arm_store_wmmxregset, target_regsets): New.
11851 * server.c (get_features_xml): Take annex argument. Check builtin
11852 XML documents.
11853 (handle_query): Handle multiple annexes.
11854
0f48aa01
DJ
118552007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11856
11857 * remote-utils.c [USE_WIN32API] (read, write): Define.
11858 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11859 write.
11860
23181151
DJ
118612007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11862
11863 * linux-i386-low.c (the_low_target): Set arch_string.
11864 * linux-x86-64-low.c (the_low_target): Likewise.
11865 * linux-low.c (linux_arch_string): New.
11866 (linux_target_ops): Add it.
11867 * linux-low.h (struct linux_target_ops): Add arch_string.
11868 * server.c (write_qxfer_response): Use const void * for DATA.
11869 (get_features_xml): New.
11870 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11871 * target.h (struct target_ops): Add arch_string method.
11872
9d606399
DJ
118732007-01-03 Denis Pilat <denis.pilat@st.com>
11874 Daniel Jacobowitz <dan@codesourcery.com>
11875
11876 * linux-low.c (linux_kill): Handle being called with no threads.
11877 * win32-i386-low.c (win32_kill): Likewise.
11878 (get_child_debug_event): Clear current_process_handle.
11879
118802006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
11881 Daniel Jacobowitz <dan@codesourcery.com>
11882
11883 * remote-utils.c (remote_open): Check the type of specified
11884 serial port devices before opening them.
11885 * server.c (main): Kill the inferior if an error occurs during
11886 the first remote_open.
11887
a5e13d24
DJ
118882006-12-05 Markus Deuling <deuling@de.ibm.com>
11889
11890 * README: Update supported targets.
11891
186947f7
DJ
118922006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11893
11894 * Makefile.in (clean): Remove reg-mips64.c.
11895 (reg-mips64.c, reg-mips64.o): New rules.
11896 * configure.srv: Handle mips64. Include regset support for mips.
11897 * linux-mips-low.c (union mips_register): New.
11898 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11899 (mips_breakpoint, mips_breakpoint_at): Use int.
11900 (mips_collect_register, mips_supply_register)
11901 (mips_collect_register_32bit, mips_supply_register_32bit)
11902 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11903 (mips_store_fpregset, target_regsets): New.
11904 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11905
a13e2c95
UW
119062006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11907
11908 * configure.srv: Add target "spu*-*-*".
11909 * Makefile.in (clean): Remove reg-spu.c.
11910 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11911 * spu-low.c: New file.
11912
cb7283db
DJ
119132006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11914
11915 * configure.ac: Correct td_thr_tls_get_addr test.
11916 * configure: Regenerated.
11917
89be2091
DJ
119182006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11919
11920 * linux-low.c (linux_wait_for_event): Reformat. Use the
11921 pass_signals array.
11922 * remote-utils.c (decode_address_to_semicolon): New.
11923 * server.c (pass_signals, handle_general_set): New.
11924 (handle_query): Mention QPassSignals for qSupported.
11925 (main): Call handle_general_set.
11926 * server.h (pass_signals, decode_address_to_semicolon): New.
11927
000ef4f0
DJ
119282006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11929
11930 * server.c (handle_query): Correct error handling for read_auxv.
11931
b7149293
UW
119322005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11933
11934 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11935 and srv_linux_thread_db to yes.
11936 * linux-s390-low.c (s390_fill_gregset): New function.
11937 (target_regsets): Define data structure.
11938
dae5f5cf
DJ
119392006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11940
11941 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11942 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11943 * config.in, configure: Regenerated.
11944 * inferiors.c (gdb_id_to_thread): New function.
11945 (gdb_id_to_thread_id): Use it.
11946 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11947 * linux-low.h (struct process_info): Add th member.
11948 (thread_db_get_tls_address): New prototype.
11949 * remote-utils.c (decode_address): Make non-static.
11950 * server.c (handle_query): Handle qGetTLSAddr.
11951 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11952 * target.h (struct target_ops): Add get_tls_address.
11953 * thread-db.c (maybe_attach_thread): Save the thread handle.
11954 (thread_db_get_tls_address): New.
11955
32ca6d61
DJ
119562006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11957
11958 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11959 (linux_resume_one_process): Take a siginfo_t *. Update all
11960 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11961 (struct pending_signals): Add a siginfo_t.
11962 (linux_wait_for_process): Always set last_status.
11963 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11964 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11965 * linux-low.h (struct process_info): Add last_status.
11966
5ffff7c1
DJ
119672006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11968
11969 * remote-utils.c (try_rle): New function.
11970 (putpkt_binary): Use it.
11971
8695c747
DJ
119722006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11973
11974 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11975 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11976 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11977 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11978 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11979 point registers.
11980
290fadea
RS
119812006-08-08 Richard Sandiford <richard@codesourcery.com>
11982
11983 * server.c (terminal_fd): New variable.
11984 (old_foreground_pgrp): Likewise.
11985 (restore_old_foreground_pgrp): New function.
11986 (start_inferior): Record the terminal file descriptor in terminal_fd
11987 and its original foreground group in old_foreground_pgrp. Register
11988 restore_old_foreground_pgrp with atexit().
11989
9f2e1e63
DJ
119902006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11991
11992 * server.c (handle_query): Correct qPart to qXfer.
11993
b80864fb
DJ
119942006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11995
11996 * configure.ac: Check for more headers which are missing on
11997 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11998 * configure.srv: Add Cygwin and mingw32.
11999 * remote-utils.c: Don't include headers unconditionally which
12000 are missing on mingw32. Include <winsock.h> for mingw32.
12001 (remote_open): Adjust for mingw32 support. Flush
12002 standard error after writing to it.
12003 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12004 (unblock_async_io, enable_async_io, disable_async_io)
12005 (readchar, getpkt): Update for Winsock support.
12006 (prepare_resume_reply): Expect a protocol signal number.
12007 * server.c: Disable <sys/wait.h> on mingw32.
12008 (start_inferior): Adjust for mingw32 support. Flush
12009 standard error after writing to it.
12010 (attach_inferior): Likewise. Use protocol signal
12011 numbers.
12012 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12013 and names.
12014 * win32-i386-low.c: New file.
12015 * Makefile.in (XM_CLIBS): Set.
12016 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12017 (win32-i386-low.o): New dependency rule.
12018 * linux-low.c (linux_wait): Use target signal numbers.
12019 * target.h (struct target_ops): Doc fix.
12020 * server.h (target_signal_to_name): New prototype.
12021 * gdbreplay.c: Don't include headers unconditionally which
12022 are missing on mingw32. Include <winsock.h> for mingw32.
12023 (remote_close, remote_open): Adjust for Winsock support.
12024 * configure, config.in: Regenerated.
12025
0876f84a
DJ
120262006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12027
12028 * server.c (decode_xfer_read, write_qxfer_response): New.
12029 (handle_query): Take a packet length argument. Handle
12030 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12031 the qSupported response.
12032 (main): Update call to handle_query.
12033
01f9e8fa
DJ
120342006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12035
12036 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12037 (putpkt_binary): Renamed from putpkt and adjusted for binary
12038 data.
12039 (putpkt): New wrapper for putpkt_binary.
12040 (readchar): Don't mask off the high bit.
12041 (decode_X_packet): New function.
12042 * server.c (main): Call putpkt_binary if a handler sets the packet
12043 length. Save the length of the incoming packet. Handle 'X'.
12044 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12045
be2a5f71
DJ
120462006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12047
12048 * server.c (handle_query): Handle qSupported.
12049
ea025f5f
DJ
120502006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12051
12052 * remote-utils.c (all_symbols_looked_up): New variable.
12053 (look_up_one_symbol): Check it.
12054 * server.h (look_up_one_symbol): New declaration.
12055 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12056
9308fc88
DJ
120572006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12058
12059 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 12060 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
12061 (PTRACE_GET_THREAD_AREA): Define.
12062 (ps_get_thread_area): New function.
12063
52fb6437
NS
120642006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12065
12066 * configure.srv (m68k*-*-uclinux*): New target.
12067 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12068 (linux_resume_one_process): Remove extraneous cast.
12069 (linux_read_offsets): New.
12070 (linux_target_op): Add linux_read_offsets on mmuless systems.
12071 * server.c (handle_query): Add qOffsets logic.
12072 * target.h (struct target_ops): Add read_offsets.
12073
21b0f40c
DJ
120742006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12075
12076 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12077 (PTRACE_GET_THREAD_AREA): Define.
12078 (ps_get_thread_area): New function.
12079 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12080 (linux-x86-64-low.o): Update.
12081
0050a760
DJ
120822006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12083
12084 * configure.ac: Remove checks for prfpregset_t.
12085 * gdb_proc_service.h: New file.
12086 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12087 new "gdb_proc_service.h".
12088 * proc-service.c: Likewise.
12089 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12090 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12091 * Makefile.in (gdb_proc_service_h): Updated.
12092 * configure, config.in: Regenerated.
12093
b92a518e
DJ
120942006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12095
12096 * remote-utils.c (prepare_resume_reply): Move declaration
12097 of gdb_id_from_wait to the top of the block.
12098
545587ee
DJ
120992006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12100
12101 * linux-low.c (regsets_store_inferior_registers): Read the regset
12102 from the target before filling it.
12103
9db87ebd
DJ
121042006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12105
12106 * server.c (attach_inferior): Return SIGTRAP for a successful
12107 attach.
12108
dd24457d
DJ
121092006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12110
12111 * Makefile.in (OBS): Add version.o.
12112 (STAGESTUFF): Delete.
12113 (version.o): Add dependencies.
12114 (version.c): Replace rule.
12115 (clean): Remove version.c.
12116 * server.c (gdbserver_version): New.
12117 (gdbserver_usage): Use printf.
12118 (main): Handle --version and --help.
12119 * server.h (version, host_name): Add declarations.
12120
6f0f660e
EZ
121212005-12-23 Eli Zaretskii <eliz@gnu.org>
12122
889bf7c5
PA
12123 * linux-arm-low.c:
12124 * linux-arm-low.c:
12125 * inferiors.c:
12126 * i387-fp.h:
12127 * i387-fp.c:
12128 * gdbreplay.c:
12129 * regcache.c:
12130 * proc-service.c:
12131 * mem-break.h:
12132 * mem-break.c:
12133 * linux-x86-64-low.c:
12134 * linux-sh-low.c:
12135 * linux-s390-low.c:
12136 * linux-ppc64-low.c:
12137 * linux-ppc-low.c:
12138 * linux-mips-low.c:
12139 * linux-m68k-low.c:
12140 * linux-m32r-low.c:
12141 * linux-low.h:
12142 * linux-low.c:
12143 * linux-ia64-low.c:
12144 * linux-i386-low.c:
12145 * linux-crisv32-low.c:
12146 * thread-db.c:
12147 * terminal.h:
12148 * target.h:
12149 * target.c:
12150 * server.h:
12151 * server.c:
12152 * remote-utils.c:
12153 * regcache.h:
12154 * utils.c:
12155 * Makefile.in:
12156 * configure.ac:
6f0f660e
EZ
12157 * gdbserver.1: Add (C) after Copyright. Update the FSF
12158 address.
12159
9d1fb177
DJ
121602005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
12161
12162 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12163 (arm_breakpoint_at): Recognize both breakpoints.
12164 (the_low_target): Use the correct breakpoint instruction.
12165
011a70c2
DJ
121662005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
12167
12168 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12169 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12170 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12171 (the_low_target): Update.
12172
7fb85e41
AS
121732005-10-25 Andreas Schwab <schwab@suse.de>
12174
12175 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12176
12177 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12178 (ia64_num_regs): Reduce to 462.
12179
3db0444b
DJ
121802005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
12181
12182 * acinclude.m4: Correct quoting.
12183 * aclocal.m4: Regenerated.
12184
12185 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12186 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12187 (thread_db_init): Call thread_db_err_str.
12188 * configure.ac: Check for TD_VERSION.
12189 * config.in, configure: Regenerated.
12190
bee0189a
DJ
121912005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12192
12193 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12194
e9d25b98
DJ
121952005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12196
12197 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12198 is not available. Define HAVE_PTRACE_GETREGS if it is.
12199 * config.in, configure: Regenerated.
12200 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12201 * linux-i386-low.c, linux-m68k-low.c: Update to use
12202 HAVE_PTRACE_GETREGS.
12203 * linux-low.c (regsets_fetch_inferior_registers)
12204 (regsets_store_inferior_registers): Only return 0 if we processed
12205 GENERAL_REGS.
12206 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12207 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12208
a06660f7
DJ
122092005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12210
12211 * inferiors.c (struct thread_info): Add gdb_id.
12212 (add_thread): Add gdb_id argument.
12213 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12214 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12215 calls to add_thread.
12216 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12217 * server.c (handle_query): Use thread_to_gdb_id.
12218 (handle_v_cont, main): Use gdb_id_to_thread_id.
12219 * server.h (add_thread): Update prototype.
12220 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12221 prototypes.
12222
5a1f5858
DJ
122232005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12224
12225 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12226 left-padded registers.
12227 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12228 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12229
e122f1f5
SE
122302005-07-01 Steve Ellcey <sje@cup.hp.com>
12231
12232 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12233 * configure: Regenerate.
12234 * config.in: Regenerate.
12235 * server.h (NEED_DECLARATION_STRERROR):
12236 Replace with !HAVE_DECL_STRERROR.
12237
d592fa2f
DJ
122382005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12239
12240 * linux-low.c (linux_wait, linux_send_signal): Don't test
12241 an unsigned long variable for > 0 if it could be MAX_ULONG.
12242 * server.c (myresume): Likewise.
12243 * target.c (set_desired_inferior): Likewise.
12244
ccbd4912
MK
122452005-06-13 Mark Kettenis <kettenis@gnu.org>
12246
12247 * configure.ac: Simplify and improve check for socklen_t.
12248 * configure, config.in: Regenerate.
12249
f450004a
DJ
122502005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12251
12252 * acconfig.h: Remove.
12253 * configure.ac: Add a test for socklen_t. Use three-argument
12254 AC_DEFINE throughout.
12255 * config.in: Regenerated using autoheader 2.59.
12256 * configure: Regenerated.
12257
12258 * gdbreplay.c (socklen_t): Provide a default.
12259 (remote_open): Use socklen_t.
12260 * remote-utils.c (socklen_t): Provide a default.
12261 (remote_open): Use socklen_t.
12262 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12263 unsigned char.
12264
12265 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12266 char for buffers.
12267 * linux-low.c (linux_read_memory, linux_write_memory)
12268 (linux_read_auxv): Likewise.
12269 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12270 (check_mem_write): Likewise.
12271 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12272 Likewise.
12273 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12274 (registers_from_string, register_data): Likewise.
12275 * server.c (handle_query, main): Likewise.
12276 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12277 (decode_M_packet): Likewise.
12278 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12279 * target.h (struct target_ops): Update read_memory, write_memory,
12280 and read_auxv.
12281 (read_inferior_memory, write_inferior_memory): Update.
12282 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12283 to unsigned char *.
12284 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12285 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12286 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12287 linux-s390-low.c, linux-sh-low.c: Update for changes in
12288 read_inferior_memory and the_low_target->breakpoint.
12289
eee84df1
DJ
122902005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12291
12292 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12293 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12294 * configure.srv: Add powerpc64-*-linux*.
12295 * linux-ppc64-low.c: New file.
12296
45b134e5
OF
122972005-05-23 Orjan Friberg <orjanf@axis.com>
12298
12299 * linux-cris-low.c: New file with support for CRIS.
12300 * linux-crisv32-low.c: Ditto for CRISv32.
12301 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12302 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 12303 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
12304 reg-crisv32.o, and reg-crisv32.c to make rules.
12305 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12306 recognized targets.
12307
48d93c75
UW
123082005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12309
12310 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12311 of sizeof (PTRACE_XFER_TYPE).
12312 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12313
e013ee27
OF
123142005-05-12 Orjan Friberg <orjanf@axis.com>
12315
889bf7c5 12316 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
12317 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12318 pointers for hardware watchpoint support.
12319 * linux-low.h (struct linux_target_ops): Ditto.
12320 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12321 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12322 to linux_target_ops.
12323 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12324 reply packet.
12325 * server.c (main): Recognize 'Z' and 'z' packets.
12326
b0ded00b
UW
123272005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12328
12329 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12330 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12331 (the_low_target): Add new members.
12332
8643e2ad
DJ
123332005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12334
12335 * proc-service.c (ps_lgetregs): Search all_processes instead of
12336 all_threads.
12337
fc620387
DJ
123382005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12339
12340 * server.c (start_inferior): Change return type to int.
12341 (attach_inferior): Change sigptr to int *.
12342 (handle_v_cont, handle_v_requests): Change signal to int *.
12343 (main): Change signal to int.
12344
123452005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
12346
12347 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12348 * configure.srv: Add m32r*-*-linux*.
12349 * linux-m32r-low.c: New file.
12350
e0e76420
DJ
123512005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12352
12353 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12354
a1928bad
DJ
123552005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12356
12357 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12358 Take unsigned long arguments for PIDs.
12359 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12360 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12361 (wait_for_sigstop, linux_resume_one_process)
12362 (regsets_fetch_inferior_registers, linux_send_signal)
12363 (linux_read_auxv): Likewise. Update the types of variables holding
12364 PIDs. Update format string specifiers.
12365 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12366 * remote-utils.c (prepare_resume_reply): Likewise.
12367 * server.c (cont_thread, general_thread, step_thread)
12368 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12369 unsigned long.
12370 (handle_query): Update format specifiers.
12371 (handle_v_cont, main): Use strtoul for thread IDs.
12372 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12373 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12374 (general_thread, step_thread, thread_from_wait)
12375 (old_thread_from_wait): Update.
12376 * target.h (struct thread_resume): Use unsigned long for THREAD.
12377 (struct target_ops): Use unsigned long for arguments to attach and
12378 thread_alive.
12379
dcdb98d2
DJ
123802005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12381
12382 * acinclude.m4: Include bfd/bfd.m4 directly.
12383 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12384 <agriffis@toolchain.org>.
12385 * aclocal.m4, configure: Regenerated.
12386
bec39cab
AC
123872005-01-07 Andrew Cagney <cagney@gnu.org>
12388
12389 * configure.ac: Rename configure.in, require autoconf 2.59.
12390 * configure: Re-generate.
12391
434c4c77
DJ
123922004-12-08 Daniel Jacobowitz <dan@debian.org>
12393
12394 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12395 LIBS when finished.
12396 * aclocal.m4: Regenerated.
12397 * configure: Regenerated.
12398
db1d3e1b
AS
123992004-11-21 Andreas Schwab <schwab@suse.de>
12400
12401 * linux-m68k-low.c (m68k_num_gregs): Define.
12402 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12403 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12404 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12405 (m68k_breakpoint_at): New. Add to the_low_target.
12406
12407 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12408 srv_linux_thread_db to yes.
12409
43360365
JB
124102004-10-20 Joel Brobecker <brobecker@gnat.com>
12411
12412 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12413 (ARCH_SET_FS): Likewise.
12414 (ARCH_GET_FS): Likewise.
12415 (ARCH_GET_GS): Likewise.
12416
fd500816
DJ
124172004-10-16 Daniel Jacobowitz <dan@debian.org>
12418
12419 * linux-i386-low.c (ps_get_thread_area): New.
12420 * linux-x86-64-low.c (ps_get_thread_area): New.
12421 * linux-low.c: Include <sys/syscall.h>.
12422 (linux_kill_one_process): Don't kill the first thread here.
12423 (linux_kill): Kill the first thread here.
12424 (kill_lwp): New function.
12425 (send_sigstop, linux_send_signal): Use it.
12426 * proc-service.c: Clean up #ifdefs.
12427 (fpregset_info): Delete.
12428 (ps_lgetregs): Update and enable implementation.
12429 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12430 implementations.
12431 * remote-utils.c (struct sym_cache, symbol_cache): New.
12432 (input_interrupt): Print a clearer message.
12433 (async_io_enabled): New variable.
12434 (enable_async_io, disable_async_io): Use it. Update comments.
12435 (look_up_one_symbol): Use the symbol cache.
12436 * thread-db.c (thread_db_look_up_symbols): New function.
12437 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12438
f6de3c42
DJ
124392004-10-16 Daniel Jacobowitz <dan@debian.org>
12440
12441 * configure.in: Test for -rdynamic.
12442 * configure: Regenerated.
12443 * Makefile (INTERNAL_LDFLAGS): New.
12444 (gdbserver, gdbreplay): Use it.
12445
2c0fc042
AC
124462004-09-02 Andrew Cagney <cagney@gnu.org>
12447
12448 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12449
075b3282
DJ
124502004-03-23 Daniel Jacobowitz <drow@mvista.com>
12451
12452 * linux-low.c (linux_wait): Clear all_processes list also.
12453
fa6a77dc
DJ
124542004-03-12 Daniel Jacobowitz <drow@mvista.com>
12455
12456 * linux-low.c: Include <errno.h>. Remove extern declaration of
12457 errno.
12458
6d782a97
DJ
124592004-03-12 Daniel Jacobowitz <drow@mvista.com>
12460
12461 * gdbreplay.c, server.h, utils.c: Update copyright years.
12462
3a7fb99b
DJ
124632004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12464
12465 * server.c (main): Print child status or termination signal from
12466 variable 'signal', not 'sig'.
12467
c3e735a6
DJ
124682004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12469
12470 * linux-low.c (linux_read_memory): Change return type to
12471 int. Check for and return error from ptrace().
12472 * target.c (read_inferior_memory): Change return type to int. Pass
12473 back return status from the_target->read_memory().
12474 * target.h (struct target_ops): Adapt *read_memory() prototype.
12475 Update comment.
12476 (read_inferior_memory): Adapt prototype.
12477 * server.c (main): Return an error packet if
12478 read_inferior_memory() returns an error.
12479
a59d1c82
DJ
124802004-03-04 Daniel Jacobowitz <drow@mvista.com>
12481
12482 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12483 Unify with other clean targets.
12484
dc3f8883
DJ
124852004-02-29 Daniel Jacobowitz <drow@mvista.com>
12486
12487 * server.c (handle_v_cont): Call set_desired_inferior.
12488
89a208da
DJ
124892004-02-29 Daniel Jacobowitz <drow@mvista.com>
12490
12491 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12492
62ea82f5
DJ
124932004-02-29 Daniel Jacobowitz <drow@mvista.com>
12494
12495 * linux-low.c (linux_wait): Unblock async I/O.
12496 (linux_resume): Block and enable async I/O.
12497 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12498 * server.h (block_async_io, unblock_async_io): Add prototypes.
12499
6910d122
DJ
125002004-02-29 Daniel Jacobowitz <drow@mvista.com>
12501
12502 * remote-utils.c (remote_open): Print a status notice after
12503 opening a TCP port.
12504 * server.c (attach_inferior): Print a status notice after
12505 attaching.
12506
125072004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12508
12509 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12510
c89dc5d4
DJ
125112004-02-26 Daniel Jacobowitz <drow@mvista.com>
12512
12513 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12514 error packet.
12515 * server.c, target.h: Update copyright years.
12516
4b8dad4a
RM
125172004-02-25 Roland McGrath <roland@redhat.com>
12518
12519 * target.h (struct target_ops): New member `read_auxv'.
12520 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12521 * linux-low.c (linux_read_auxv): New function.
12522 (linux_target_ops): Initialize `read_auxv' member to that.
12523
d7446758
JB
125242004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12525
12526 Committed by Jim Blandy <jimb@redhat.com>.
12527
12528 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12529 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12530 instead of GPR_SIZE to distiguish s390 and s390x targets.
12531
5544ad89
DJ
125322004-01-31 Daniel Jacobowitz <drow@mvista.com>
12533
12534 * linux-low.c: Update copyright year.
12535 (check_removed_breakpoint): Clear pending_is_breakpoint.
12536 (linux_set_resume_request, linux_queue_one_thread)
12537 (resume_status_pending_p): New functions.
12538 (linux_continue_one_thread): Use process->resume.
12539 (linux_resume): Only resume threads if there are no pending events.
12540 * linux-low.h (struct process_info): Add resume request
12541 pointer.
12542
2a68b70e
DJ
125432004-01-30 Daniel Jacobowitz <drow@mvista.com>
12544
12545 * regcache.c (new_register_cache): Clear the allocated register
12546 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12547
64386c31
DJ
125482003-10-13 Daniel Jacobowitz <drow@mvista.com>
12549
12550 * linux-low.c (linux_resume): Take a struct thread_resume *
12551 argument.
12552 (linux_wait): Update call.
12553 (resume_ptr): New static variable.
12554 (linux_continue_one_thread): Renamed from
12555 linux_continue_one_process. Use resume_ptr.
12556 (linux_resume): Use linux_continue_one_thread.
12557 * server.c (handle_v_cont, handle_v_requests): New functions.
12558 (myresume): New function.
12559 (main): Handle 'v' case.
12560 * target.h (struct thread_resume): New type.
12561 (struct target_ops): Change argument of "resume" to struct
12562 thread_resume *.
12563 (myresume): Delete macro.
12564
c938e9b0
L
125652003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12566
12567 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12568 (uninstall): Support DESTDIR.
12569
7f313d07
BC
12570Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12571
12572 * configure.srv: Add xscale*linux copy of arm*linux entry.
12573
3b2fc2ea
DJ
125742003-07-24 Daniel Jacobowitz <drow@mvista.com>
12575
12576 * linux-arm-low.c (arm_reinsert_addr): New function.
12577 (the_low_target): Add arm_reinsert_addr.
12578
1c0a559e
MK
125792003-07-08 Mark Kettenis <kettenis@gnu.org>
12580
12581 * mem-break.c: Remove whitespace at end of file.
12582
43d5792c
DJ
125832003-06-28 Daniel Jacobowitz <drow@mvista.com>
12584
12585 * configure.in: Check whether we need to prototype strerror.
12586 * server.h: Optionally prototype strerror.
12587 * gdbreplay.c (perror_with_name): Use strerror.
12588 * linux-low.c (linux_attach_lwp): Use strerror.
12589 * utils.c (perror_with_name): Use strerror.
12590 * config.in, configure: Regenerated.
12591
c8a86edf
DJ
125922003-06-28 Daniel Jacobowitz <drow@mvista.com>
12593
12594 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12595 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12596
73d37363
DJ
125972003-06-20 Daniel Jacobowitz <drow@mvista.com>
12598
12599 * Makefile.in (SFILES): Update.
12600 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12601 low-sun3.c: Remove files.
12602
6ad8ae5c
DJ
126032003-06-17 Daniel Jacobowitz <drow@mvista.com>
12604
12605 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12606 (linux_detach_one_process, linux_detach): New functions.
12607 (linux_target_ops): Add linux_detach.
12608 * server.c (main): Handle 'D' packet.
12609 * target.h (struct target_ops): Add "detach" member.
12610 (detach_inferior): Define.
12611
1581182a
MK
126122003-06-13 Mark Kettenis <kettenis@gnu.org>
12613
12614 From Kelley Cook <kelleycook@wideopenwest.com>:
12615 * configure.srv: Accept i[34567]86 variants.
12616
e5379b03
DJ
126172003-06-05 Daniel Jacobowitz <drow@mvista.com>
12618
12619 * linux-low.c (linux_wait_for_event): Correct comment typos.
12620 (linux_resume_one_process): Call check_removed_breakpoint.
12621 (linux_send_signal): New function.
12622 (linux_target_ops): Add linux_send_signal.
12623 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12624 of kill.
12625 * target.h (struct target_ops): Add send_signal.
12626
2ff29de4
JB
126272003-05-29 Jim Blandy <jimb@redhat.com>
12628
12629 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12630 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12631 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12632 away part of the register's value.
12633
254787d4
DJ
126342003-03-26 Daniel Jacobowitz <drow@mvista.com>
12635
12636 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12637 (linux_wait_for_event, linux_init_signals): Likewise.
12638
94e10508
DJ
126392003-03-17 Daniel Jacobowitz <drow@mvista.com>
12640
12641 * configure.in: Check for stdlib.h.
12642 * configure: Regenerated.
12643 * config.in: Regenerated.
12644
4c0711e0
DJ
126452003-01-04 Andreas Schwab <schwab@suse.de>
12646
12647 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12648
ef66e766
AC
126492003-01-02 Andrew Cagney <ac131313@redhat.com>
12650
12651 * Makefile.in: Remove obsolete code.
12652
a1358604
DJ
126532002-11-20 Daniel Jacobowitz <drow@mvista.com>
12654
12655 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12656 defined(PT_FPR0_HI).
12657
23ce3b1c
DJ
126582002-11-17 Stuart Hughes <seh@zee2.com>
12659
12660 * linux-arm-low.c (arm_num_regs): Increase.
12661 (arm_regmap): Include status register.
12662
126632002-11-17 Daniel Jacobowitz <drow@mvista.com>
12664
12665 * linux-low.c (register_addr): Remove incorrect -1 check.
12666
a9fa9f7d
DJ
126672002-08-29 Daniel Jacobowitz <drow@mvista.com>
12668
12669 * linux-low.c (linux_create_inferior): Call setpgid. Return
12670 the new PID.
12671 (unstopped_p, linux_signal_pid): Remove.
12672 (linux_target_ops): Remove linux_signal_pid.
12673 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12674 global instead of target method.
12675 * target.h (struct target_ops): Remove signal_pid. Update comment
12676 for create_inferior.
12677 * server.c (signal_pid): New variable.
12678 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 12679 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
12680 (attach_inferior): Set signal_pid.
12681
17574093
DJ
126822002-08-23 Daniel Jacobowitz <drow@mvista.com>
12683
12684 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12685
126862002-08-20 Jim Blandy <jimb@redhat.com>
12687
12688 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12689 default for this.
12690
126912002-08-01 Andrew Cagney <cagney@redhat.com>
12692
12693 * Makefile.in: Make chill references obsolete.
12694
126952002-07-24 Kevin Buettner <kevinb@redhat.com>
12696
12697 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12698 * configure: Regenerate.
12699 * config.in: Regenerate.
12700
127012002-07-09 David O'Brien <obrien@FreeBSD.org>
12702
12703 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12704 (perror_with_name, remote_close, remote_open, expect, play): Static.
12705
127062002-07-04 Michal Ludvig <mludvig@suse.cz>
12707
4b8dad4a 12708 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
12709 byte offsets instead of an array of indexes.
12710 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12711
127122002-06-13 Daniel Jacobowitz <drow@mvista.com>
12713
12714 * regcache.c: Add comment.
12715
127162002-06-11 Daniel Jacobowitz <drow@mvista.com>
12717
12718 * thread-db.c: New file.
12719 * proc-service.c: New file.
12720 * acinclude.m4: New file.
12721 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12722 proc-service.o, and thread-db.o.
12723 (linux-low.o): Add USE_THREAD_DB.
12724 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12725 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12726 * aclocal.m4: Regenerated.
12727 * config.in: Regenerated.
12728 * configure: Regenerated.
12729 * configure.in: Check for proc_service.h, sys/procfs.h,
12730 thread_db.h, and linux/elf.h headrs.
12731 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12732 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12733 Check for -lthread_db and thread support.
12734 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12735 PowerPC, and SuperH.
12736 * i387-fp.c: Constify arguments.
12737 * i387-fp.h: Likewise.
12738 * inferiors.c: (struct thread_info): Renamed from
12739 `struct inferior_info'. Remove PID member. Use generic inferior
12740 list header. All uses updated.
12741 (inferiors, signal_pid): Removed.
12742 (all_threads): New variable.
12743 (get_thread): Define.
12744 (add_inferior_to_list): New function.
12745 (for_each_inferior): New function.
12746 (change_inferior_id): New function.
12747 (add_inferior): Removed.
12748 (remove_inferior): New function.
12749 (add_thread): New function.
12750 (free_one_thread): New function.
12751 (remove_thread): New function.
12752 (clear_inferiors): Use for_each_inferior and free_one_thread.
12753 (find_inferior): New function.
12754 (find_inferior_id): New function.
12755 (inferior_target_data): Update argument type.
12756 (set_inferior_target_data): Likewise.
12757 (inferior_regcache_data): Likewise.
12758 (set_inferior_regcache_data): Likewise.
12759 * linux-low.c (linux_bp_reinsert): Remove.
12760 (all_processes, stopping_threads, using_thrads)
12761 (struct pending_signals, debug_threads, pid_of): New.
12762 (inferior_pid): Replace with macro.
12763 (struct inferior_linux_data): Remove.
12764 (get_stop_pc, add_process): New functions.
12765 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12766 Use add_process and add_thread.
12767 (linux_attach_lwp): New function, based on old linux_attach. Use
12768 add_process and add_thread. Set stop_expected for new threads.
12769 (linux_attach): New function.
12770 (linux_kill_one_process): New function.
12771 (linux_kill): Kill all LWPs.
12772 (linux_thread_alive): Use find_inferior_id.
12773 (check_removed_breakpoints, status_pending_p): New functions.
12774 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12775 Update. Use WNOHANG. Wait for cloned processes also. Update process
12776 struct for the found process.
12777 (linux_wait_for_event): New function.
12778 (linux_wait): Use it. Support LWPs.
12779 (send_sigstop, wait_for_sigstop, stop_all_processes)
12780 (linux_resume_one_process, linux_continue_one_process): New functions.
12781 (linux_resume): Support LWPs.
12782 (REGISTER_RAW_SIZE): Remove.
12783 (fetch_register): Use register_size instead. Call supply_register.
12784 (usr_store_inferior_registers): Likewise. Call collect_register.
12785 Fix recursive case.
12786 (regsets_fetch_inferior_registers): Improve error message.
12787 (regsets_store_inferior_registers): Add debugging.
12788 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12789 (unstopped_p, linux_signal_pid): New functions.
12790 (linux_target_ops): Add linux_signal_pid.
12791 (linux_init_signals): New function.
12792 (initialize_low): Call it. Initialize using_threads.
12793 * regcache.c (inferior_regcache_data): Add valid
12794 flag.
12795 (get_regcache): Fetch registers lazily. Add fetch argument
12796 and update all callers.
12797 (regcache_invalidate_one, regcache_invalidate): New
12798 functions.
12799 (new_register_cache): Renamed from create_register_cache.
12800 Return the new regcache.
12801 (free_register_cache): Change argument to a void *.
12802 (registers_to_string, registers_from_string): Call get_regcache
12803 with fetch flag set.
12804 (register_data): Make static. Pass fetch flag to get_regcache.
12805 (supply_register): Call get_regcache with fetch flag clear.
12806 (collect_register): Call get_regcache with fetch flag set.
12807 (collect_register_as_string): New function.
12808 * regcache.h: Update.
12809 * remote-utils.c (putpkt): Flush after debug output and use
12810 stderr.
12811 Handle input interrupts while waiting for an ACK.
12812 (input_interrupt): Use signal_pid method.
12813 (getpkt): Flush after debug output and use stderr.
12814 (outreg): Use collect_register_as_string.
12815 (new_thread_notify, dead_thread_notify): New functions.
12816 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12817 and general_thread.
12818 (look_up_one_symbol): Flush after debug output.
12819 * server.c (step_thread, server_waiting): New variables.
12820 (start_inferior): Don't use signal_pid. Update call to mywait.
12821 (attach_inferior): Update call to mywait.
12822 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12823 (main): Don't fetch/store registers explicitly. Use
12824 set_desired_inferior. Support proposed ``Hs'' packet. Update
12825 calls to mywait.
12826 * server.h: Update.
12827 (struct inferior_list, struct_inferior_list_entry): New.
12828 * target.c (set_desired_inferior): New.
12829 (write_inferior_memory): Constify.
12830 (mywait): New function.
12831 * target.h: Update.
12832 (struct target_ops): New signal_pid method.
12833 (mywait): Removed macro, added prototype.
12834
12835 * linux-low.h (regset_func): Removed.
12836 (regset_fill_func, regset_store_func): New.
12837 (enum regset_type): New.
12838 (struct regset_info): Add type field. Use new operation types.
12839 (struct linux_target_ops): stop_pc renamed to get_pc.
12840 Add decr_pc_after_break and breakpoint_at.
12841 (get_process, get_thread_proess, get_process_thread)
12842 (strut process_info, all_processes, linux_attach_lwp)
12843 (thread_db_init): New.
12844
12845 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12846 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12847 (the_low_target): Add new members.
12848 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12849 (i386_store_fpxregset): Constify.
12850 (target_regsets): Add new kind identifier.
12851 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12852 (i386_set_pc): Add debugging.
12853 (i386_breakpoint_at): New function.
12854 (the_low_target): Add new members.
12855 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12856 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12857 (mips_breakpoint_at): New.
12858 (the_low_target): Add new members.
12859 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12860 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12861 (the_low_target): Add new members.
12862 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12863 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12864 (the_low_target): Add new members.
12865 * linux-x86-64-low.c (target_regsets): Add new kind
12866 identifier.
12867
128682002-05-15 Daniel Jacobowitz <drow@mvista.com>
12869
12870 From Martin Pool <mbp@samba.org>:
12871 * server.c (gdbserver_usage): New function.
12872 (main): Call it.
12873
128742002-05-14 Daniel Jacobowitz <drow@mvista.com>
12875
12876 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12877 stop_at -> stop_pc.
12878
128792002-05-04 Andrew Cagney <ac131313@redhat.com>
12880
12881 * Makefile.in: Remove obsolete code.
12882
128832002-04-24 Michal Ludvig <mludvig@suse.cz>
12884
12885 * linux-low.c (regsets_fetch_inferior_registers),
12886 (regsets_store_inferior_registers): Removed cast to int from
12887 ptrace() calls.
12888 * regcache.h: Added declaration of struct inferior_info.
12889
128902002-04-20 Daniel Jacobowitz <drow@mvista.com>
12891
12892 * inferiors.c (struct inferior_info): Add regcache_data.
12893 (add_inferior): Call create_register_cache.
12894 (clear_inferiors): Call free_register_cache.
12895 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12896 * regcache.c (struct inferior_regcache_data): New.
12897 (registers): Remove.
12898 (get_regcache): New function.
12899 (create_register_cache, free_register_cache): New functions.
12900 (set_register_cache): Don't initialize the register cache here.
12901 (registers_to_string, registers_from_string, register_data): Call
12902 get_regcache.
12903 * regcache.h: Add prototypes.
12904 * server.h: Likewise.
12905
129062002-04-20 Daniel Jacobowitz <drow@mvista.com>
12907
12908 * mem-break.c: New file.
12909 * mem-break.h: New file.
12910 * Makefile.in: Add mem-break.o rule; update server.h
12911 dependencies.
12912 * inferiors.c (struct inferior_info): Add target_data
12913 member.
12914 (clear_inferiors): Free target_data member if set.
12915 (inferior_target_data, set_inferior_target_data): New functions.
12916 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12917 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12918 * linux-low.c (linux_bp_reinsert): New variable.
12919 (struct inferior_linux_data): New.
12920 (linux_create_inferior): Use set_inferior_target_data.
12921 (linux_attach): Likewise. Call add_inferior.
12922 (linux_wait_for_one_inferior): New function.
12923 (linux_wait): Call it.
12924 (linux_write_memory): Add const.
12925 (initialize_low): Call set_breakpoint_data.
12926 * linux-low.h (struct linux_target_ops): Add breakpoint
12927 handling members.
12928 * server.c (attach_inferior): Remove extra add_inferior
12929 call.
12930 * server.h: Include mem-break.h. Update inferior.c
12931 prototypes.
12932 * target.c (read_inferior_memory)
12933 (write_inferior_memory): New functions.
12934 * target.h (read_inferior_memory)
12935 (write_inferior_memory): Change macros to prototypes.
12936 (struct target_ops): Update comments. Add const to write_memory
12937 definition.
12938
129392002-04-11 Daniel Jacobowitz <drow@mvista.com>
12940
12941 * linux-low.c (usr_store_inferior_registers): Support
12942 registers which are allowed to fail to store.
12943 * linux-low.h (linux_target_ops): Likewise.
12944 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12945 (ppc_cannot_store_register): FPSCR may not be storable.
12946
129472002-04-09 Daniel Jacobowitz <drow@mvista.com>
12948
12949 * server.h: Include <string.h> if HAVE_STRING_H.
12950 * ChangeLog: Correct paths in last ChangeLog entry.
12951
129522002-04-09 Daniel Jacobowitz <drow@mvista.com>
12953
12954 * linux-low.h: Remove obsolete prototypes.
12955 (struct linux_target_ops): New.
12956 (extern the_low_target): New.
12957 * linux-low.c (num_regs, regmap): Remove declarations.
12958 (register_addr): Use the_low_target explicitly.
12959 (fetch_register): Likewise.
12960 (usr_fetch_inferior_registers): Likewise.
12961 (usr_store_inferior_registers): Likewise.
12962 * linux-arm-low.c (num_regs): Remove.
12963 (arm_num_regs): Define.
12964 (arm_regmap): Renamed from regmap, made static.
12965 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12966 made static.
12967 (arm_cannot_store_register): Renamed from cannot_store_register,
12968 made static.
12969 (the_low_target): New.
12970 * linux-i386-low.c (num_regs): Remove.
12971 (i386_num_regs): Define.
12972 (i386_regmap): Renamed from regmap, made static.
12973 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12974 made static.
12975 (i386_cannot_store_register): Renamed from cannot_store_register,
12976 made static.
12977 (the_low_target): New.
12978 * linux-ia64-low.c (num_regs): Remove.
12979 (ia64_num_regs): Define.
12980 (ia64_regmap): Renamed from regmap, made static.
12981 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12982 made static.
12983 (ia64_cannot_store_register): Renamed from cannot_store_register,
12984 made static.
12985 (the_low_target): New.
12986 * linux-m68k-low.c (num_regs): Remove.
12987 (m68k_num_regs): Define.
12988 (m68k_regmap): Renamed from regmap, made static.
12989 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12990 made static.
12991 (m68k_cannot_store_register): Renamed from cannot_store_register,
12992 made static.
12993 (the_low_target): New.
12994 * linux-mips-low.c (num_regs): Remove.
12995 (mips_num_regs): Define.
12996 (mips_regmap): Renamed from regmap, made static.
12997 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12998 made static.
12999 (mips_cannot_store_register): Renamed from cannot_store_register,
13000 made static.
13001 (the_low_target): New.
13002 * linux-ppc-low.c (num_regs): Remove.
13003 (ppc_num_regs): Define.
13004 (ppc_regmap): Renamed from regmap, made static.
13005 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13006 made static.
13007 (ppc_cannot_store_register): Renamed from cannot_store_register,
13008 made static.
13009 (the_low_target): New.
13010 * linux-s390-low.c (num_regs): Remove.
13011 (s390_num_regs): Define.
13012 (s390_regmap): Renamed from regmap, made static.
13013 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13014 made static.
13015 (s390_cannot_store_register): Renamed from cannot_store_register,
13016 made static.
13017 (the_low_target): New.
13018 * linux-sh-low.c (num_regs): Remove.
13019 (sh_num_regs): Define.
13020 (sh_regmap): Renamed from regmap, made static.
13021 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13022 made static.
13023 (sh_cannot_store_register): Renamed from cannot_store_register,
13024 made static.
13025 (the_low_target): New.
13026 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13027 (the_low_target): New.
13028
130292002-04-09 Daniel Jacobowitz <drow@mvista.com>
13030
13031 * Makefile.in: Add stamp-h target.
13032 * configure.in: Create stamp-h.
13033 * configure: Regenerated.
13034
130352002-04-09 Daniel Jacobowitz <drow@mvista.com>
13036
13037 * inferiors.c: New file.
13038 * target.c: New file.
13039 * target.h: New file.
13040 * Makefile.in: Add target.o and inferiors.o. Update
13041 dependencies.
13042 * linux-low.c (inferior_pid): New static variable,
13043 moved from server.c.
13044 (linux_create_inferior): Renamed from create_inferior.
13045 Call add_inferior. Return 0 on success instead of a PID.
13046 (linux_attach): Renamed from myattach.
13047 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13048 (linux_thread_alive): Renamed from mythread_alive.
13049 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13050 child dies.
13051 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13052 (regsets_store_inferior_registers): Correct error message.
13053 Add missing ``return 0''.
13054 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13055 (linux_store_registers): Renamed from store_inferior_registers.
13056 (linux_read_memory): Renamed from read_inferior_memory.
13057 (linux_write_memory): Renamed from write_inferior_memory.
13058 (linux_target_ops): New structure.
13059 (initialize_low): Call set_target_ops ().
13060 * remote-utils.c (unhexify): New function.
13061 (hexify): New function.
13062 (input_interrupt): Send signals to ``signal_pid''.
13063 * server.c (inferior_pid): Remove.
13064 (start_inferior): Update create_inferior call.
13065 (attach_inferior): Call add_inferior.
13066 (handle_query): New function.
13067 (main): Call handle_query for `q' packets.
13068 * server.h: Include "target.h". Remove obsolete prototypes.
13069 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13070
130712002-04-09 Daniel Jacobowitz <drow@mvista.com>
13072
13073 * Makefile.in: Add WARN_CFLAGS. Update configury
13074 dependencies.
13075 * configure.in: Check for <string.h>
13076 * configure: Regenerate.
13077 * config.in: Regenerate.
13078 * gdbreplay.c: Include needed system headers.
13079 (remote_open): Remove strchr prototype.
13080 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13081 * regcache.c (supply_register): Change buf argument to const void *.
13082 (supply_register_by_name): Likewise.
13083 (collect_register): Change buf argument to void *.
13084 (collect_register_by_name): Likewise.
13085 * regcache.h: Add missing prototypes.
13086 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13087 * server.c (handle_query): New function.
13088 (attached): New static variable, moved out of main.
13089 (main): Quiet longjmp clobber warnings.
13090 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13091 * utils.c (error): Remove NORETURN.
13092 (fatal): Likewise.
This page took 1.643185 seconds and 4 git commands to generate.