Implement TARGET_WAITKIND_NO_RESUMED in the remote protocol
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
f2faf941
PA
12015-11-30 Pedro Alves <palves@redhat.com>
2
3 PR 14618
4 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5 report TARGET_WAITKIND_NO_RESUMED.
6 * remote-utils.c (prepare_resume_reply): Handle
7 TARGET_WAITKIND_NO_RESUMED.
8 * server.c (report_no_resumed): New global.
9 (handle_query) <qSupported>: Handle "no-resumed+". Report
10 "no-resumed+" support.
11 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
12 return error if the client doesn't support no-resumed events.
13 (push_stop_notification): New function.
14 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
15 events if the client supports them.
16
a681f9c9
PA
172015-11-30 Pedro Alves <palves@redhat.com>
18
19 * linux-low.c (thread_still_has_status_pending_p): Don't check
20 vCont;t here.
21 (lwp_resumed): New function.
22 (status_pending_p_callback): Return early if the LWP is not
23 supposed to be resumed.
24
65706a29
PA
252015-11-30 Pedro Alves <palves@redhat.com>
26
27 * linux-low.c (handle_extended_wait): Assert that the LWP's
28 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
29 thread create events, leave the new child's status pending.
30 (linux_low_filter_event): If GDB wants to hear about thread exit
31 events, leave the LWP marked dead and don't delete it.
32 (linux_wait_for_event_filtered): Don't check for thread exit.
33 (filter_exit_event): New function.
34 (linux_wait_1): Use it, when returning an exit event.
35 (linux_resume_one_lwp_throw): Assert that the LWP's
36 waitstatus is TARGET_WAITKIND_IGNORE.
37 * remote-utils.c (prepare_resume_reply): Handle
38 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
39 * server.c (report_thread_events): New global.
40 (handle_general_set): Handle QThreadEvents.
41 (handle_query) <qSupported>: Handle and report QThreadEvents+;
42 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
43 TARGET_WAITKIND_THREAD_EXITED.
44 * server.h (report_thread_events): Declare.
45
56cf4bed
PA
462015-11-30 Pedro Alves <palves@redhat.com>
47
48 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
49 the thread's last_resume_kind was resume_stop.
50
500c1d85
PA
512015-11-30 Pedro Alves <palves@redhat.com>
52
53 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
54 before returning.
55
de979965
PA
562015-11-30 Pedro Alves <palves@redhat.com>
57
58 * server.c (handle_v_requests): Handle vCtrlC.
59
34c65914
PA
602015-11-30 Pedro Alves <palves@redhat.com>
61
62 * gdbthread.h (find_any_thread_of_pid): Declare.
63 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
64 functions.
65 * server.c (handle_query): If current_thread is NULL, look for
66 another thread of the selected process.
67
79efa585 682015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 69 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
70
71 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
72 * server.c (handle_qxfer_threads_worker): Refactor to include thread
73 name in reply.
74 * target.h (struct target_ops) <thread_name>: New field.
75 (target_thread_name): New macro.
76
80d82c19
JB
772015-11-23 Joel Brobecker <brobecker@adacore.com>
78
79 * regcache.h (regcache_invalidate_pid): Add declaration.
80 * regcache.c (regcache_invalidate_pid): New function, extracted
81 from regcache_invalidate.
82 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
83 Add trivial documentation comment.
84 * lynx-low.c: Use regcache_invalidate_pid instead of
85 regcache_invalidate.
86
64da5dd5
JB
872015-11-23 Joel Brobecker <brobecker@adacore.com>
88
89 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
90 and Elf64_auxv_t if the target is Android.
91
37ce4055
DE
922015-11-22 Doug Evans <xdje42@gmail.com>
93
94 * target.h: #include <sys/types.h>.
95
06e03fff
PA
962015-11-19 Pedro Alves <palves@redhat.com>
97
98 * linux-low.c (linux_process_qsupported): Change prototype.
99 Adjust.
100 * linux-low.h (struct linux_target_ops) <process_qsupported>:
101 Change prototype.
102 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
103 and adjust to loop over all features.
104 * server.c (handle_query) <qSupported>: Adjust to call
105 target_process_qsupported once, passing it a vector of unprocessed
106 features.
107 * target.h (struct target_ops) <process_qsupported>: Change
108 prototype.
109 (target_process_qsupported): Adjust.
110
9a084706
PA
1112015-11-19 Pedro Alves <palves@redhat.com>
112
113 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
114 mode.
115 * configure: Regenerate.
116
dad44a1f
PA
1172015-11-19 Pedro Alves <palves@redhat.com>
118
119 * configure: Regenerate.
120
231c0592
YQ
1212015-11-19 Yao Qi <yao.qi@linaro.org>
122
123 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
124 type to uint32_t.
125
6c1c9a8b
YQ
1262015-11-19 Yao Qi <yao.qi@linaro.org>
127
128 * linux-aarch64-low.c (enum aarch64_operand_type): New.
129 (struct aarch64_operand): Move enum out.
130
9caa3311
YQ
1312015-11-19 Yao Qi <yao.qi@linaro.org>
132
133 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
134 struct user_fpsimd_state *.
135 (aarch64_store_fpregset): Likewise.
136
6a69a054
YQ
1372015-11-19 Yao Qi <yao.qi@linaro.org>
138
139 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
140 struct user_pt_regs *.
141 (aarch64_store_gregset): Likewise.
142
1798301e
PA
1432015-11-18 Pedro Alves <palves@redhat.com>
144
145 * Makefile.in (all_object_files): Add $IPA_OBJS.
146
ce7715e2
PA
1472015-11-17 Pedro Alves <palves@redhat.com>
148
149 * win32-low.c (win32_resume): Use gdb_signal_from_host,
150 GDB_SIGNAL_0 and gdb_signal_to_string.
151
c0879059
PA
1522015-11-17 Pedro Alves <palves@redhat.com>
153
154 * win32-low.c (handle_output_debug_string): Remove parameter.
155 (win32_kill): Remove our_status local and adjust call to
156 handle_output_debug_string.
157 (get_child_debug_event): Adjust call to
158 handle_output_debug_string.
159
1996e237
SM
1602015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
161
162 * linux-mips-low.c (mips_fill_gregset): Add cast.
163 (mips_store_gregset): Likewise.
164 (mips_fill_fpregset): Likewise.
165 (mips_store_fpregset): Likewise.
166
cbec665b
SM
1672015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
168
169 * linux-mips-low.c (mips_add_watchpoint): Rename private to
170 priv.
171
eb3e3c67
SM
1722015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
173
174 * linux-mips-low.c (mips_linux_new_thread): Change type of
175 watch_type to enum target_hw_bp_type.
176
171de4b8
SM
1772015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
178
179 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
180 Change return type to arm_hwbp_type.
181
04248ead
SM
1822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
183
184 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
185 (arm_store_gregset): Likewise.
186 * linux-arm-low.c (arm_get_hwcap): Likewise.
187 (arm_read_description): Likewise.
188
04b3479c
SM
1892015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
190
191 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
192
2bc84e8a
SM
1932015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
194
195 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
196 (ppc_fill_vsxregset): Likewise.
197 (ppc_store_vsxregset): Likewise.
198 (ppc_fill_vrregset): Likewise.
199 (ppc_store_vrregset): Likewise.
200 (ppc_fill_evrregset): Likewise.
201 (ppc_store_evrregset): Likewise.
202
e6c5bb05
SM
2032015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
204
205 * linux-ppc-low.c (ppc_usrregs_info): Remove
206 forward-declaration.
207 (ppc_arch_setup): Move lower in file.
208
7ea45d72
SM
2092015-10-30 Simon Marchi <simon.marchi@ericsson.com>
210
211 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
212 (ps_pdwrite): Likewise.
213
69291610
HW
2142015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
215
216 * linux-arm-low.c (arm_new_thread): Move pointer dereference
217 to after assert checks.
218
b42945fd
SM
2192015-10-29 Simon Marchi <simon.marchi@ericsson.com>
220
221 * proc-service.c (ps_pdread): Add/adjust casts.
222 (ps_pdwrite): Add/adjust casts.
223
d6f85c84
SM
2242015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
225
226 * server.c (handle_search_memory_1): Cast return value of
227 memmem.
228
f98cd059
SM
2292015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
230
231 * server.c (write_qxfer_response): Change type of data to
232 gdb_byte *.
233
d2412fa5
PA
2342015-10-29 Pedro Alves <palves@redhat.com>
235
236 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
237
c17414a2
PA
2382015-10-29 Pedro Alves <palves@redhat.com>
239
240 * tracepoint.c (clear_installed_tracepoints): Add casts.
241
e053fbc4
PA
2422015-10-29 Pedro Alves <palves@redhat.com>
243
244 * server.c (handle_v_cont, process_serial_event): Add enum
245 gdb_signal casts to signal parsing code.
246
add67df8
PA
2472015-10-29 Pedro Alves <palves@redhat.com>
248
249 * linux-low.h (NULL_REGSET): Define.
250 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
251 * linux-arm-low.c (arm_regsets): Likewise.
252 * linux-crisv32-low.c (cris_regsets): Likewise.
253 * linux-m68k-low.c (m68k_regsets): Likewise.
254 * linux-mips-low.c (mips_regsets): Likewise.
255 * linux-nios2-low.c (nios2_regsets): Likewise.
256 * linux-ppc-low.c (ppc_regsets): Likewise.
257 * linux-s390-low.c (s390_regsets): Likewise.
258 * linux-sh-low.c (sh_regsets): Likewise.
259 * linux-sparc-low.c (sparc_regsets): Likewise.
260 * linux-tic6x-low.c (tic6x_regsets): Likewise.
261 * linux-tile-low.c (tile_regsets): Likewise.
262 * linux-x86-low.c (x86_regsets): Likewise.
263 * linux-xtensa-low.c (xtensa_regsets): Likewise.
264
50bc912a
PA
2652015-10-29 Pedro Alves <palves@redhat.com>
266
267 * linux-low.h (NULL_REGSET): Define.
268 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
269 * linux-arm-low.c (arm_regsets): Likewise.
270 * linux-crisv32-low.c (cris_regsets): Likewise.
271 * linux-m68k-low.c (m68k_regsets): Likewise.
272 * linux-mips-low.c (mips_regsets): Likewise.
273 * linux-nios2-low.c (nios2_regsets): Likewise.
274 * linux-ppc-low.c (ppc_regsets): Likewise.
275 * linux-s390-low.c (s390_regsets): Likewise.
276 * linux-sh-low.c (sh_regsets): Likewise.
277 * linux-sparc-low.c (sparc_regsets): Likewise.
278 * linux-tic6x-low.c (tic6x_regsets): Likewise.
279 * linux-tile-low.c (tile_regsets): Likewise.
280 * linux-x86-low.c (x86_regsets): Likewise.
281 * linux-xtensa-low.c (xtensa_regsets): Likewise.
282
682b2546
DE
2832015-10-26 Doug Evans <dje@google.com>
284
285 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
286
963843d4
DE
2872015-10-26 Doug Evans <dje@google.com>
288
289 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
290
d41401ac
DE
2912015-10-26 Doug Evans <dje@google.com>
292
293 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
294 for debug_printf.
295 (attach_thread, find_new_threads_callback): Ditto.
296
3db28855
AT
2972015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
298
299 * mem-break.h (set_breakpoint_data): Remove.
300
fb78e89c
AT
3012015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
302
303 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
304 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
305 (initialize_low): Remove set_breakpoint_data call.
306 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
307 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
308 (initialize_low): Remove set_breakpoint_data call.
309 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
310 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
311 (initialize_low): Remove set_breakpoint_data call.
312
2e6ee069
AT
3132015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
314
315 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
316 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
317 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
318 * target.h (target_breakpoint_kind_from_pc): New macro.
319
1652a986
AT
3202015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
321
322 * linux-low.c (default_breakpoint_kind_from_pc): New function.
323 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
324 the default breakpoint kind.
325
abeead09
AT
3262015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
327
328 * linux-arm-low.c (arm_supports_z_point_type): Add software
329 breakpoint support.
330
b0b4b501
AT
3312015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
332
333 * linux-arm-low.c: Refactor breakpoint definitions.
334 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
335 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
336
8689682c
AT
3372015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
338
339 * Makefile.in: Add arm.c/o.
340 * configure.srv: Likewise.
341 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
342 (arm_breakpoint_kind_from_pc): New function.
343 (arm_sw_breakpoint_from_kind): Return proper kind.
344 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
345
27165294
AT
3462015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
347
348 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
349 removal.
350 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
351 (struct raw_breakpoint) <size>: Remove.
352 (struct raw_breakpoint) <kind>: Add.
353 (bp_size): New function.
354 (bp_opcode): Likewise.
355 (find_raw_breakpoint_at): Adjust for kind.
356 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
357 (remove_memory_breakpoint): Adjust for kind call bp_size.
358 (set_raw_breakpoint_at): Adjust for kind.
359 (set_breakpoint): Likewise.
360 (set_breakpoint_at): Call breakpoint_kind_from_pc.
361 (delete_raw_breakpoint): Adjust for kind.
362 (delete_breakpoint): Likewise.
363 (find_gdb_breakpoint): Likewise.
364 (set_gdb_breakpoint_1): Likewise.
365 (set_gdb_breakpoint): Likewise.
366 (delete_gdb_breakpoint_1): Likewise.
367 (delete_gdb_breakpoint): Likewise.
368 (uninsert_raw_breakpoint): Likewise.
369 (reinsert_raw_breakpoint): Likewise.
370 (set_breakpoint_data): Remove.
371 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
372 (check_mem_read): Adjust for kind call bp_size.
373 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
374 (clone_one_breakpoint): Adjust for kind.
375 * mem-break.h (set_gdb_breakpoint): Likewise.
376 (delete_gdb_breakpoint): Likewise.
377 * server.c (process_serial_event): Likewise.
378
dd373349
AT
3792015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
380
381 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
382 (struct linux_target_ops) <breakpoint>: Remove.
383 (struct linux_target_ops) <breakpoint_len>: Remove.
384 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
385 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
386 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
387 (arm_sw_breakpoint_from_kind): New function.
388 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
389 (struct linux_target_ops) <breakpoint>: Remove.
390 (struct linux_target_ops) <breakpoint_len>: Remove.
391 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
392 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
393 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
394 (struct linux_target_ops) <breakpoint>: Remove.
395 (struct linux_target_ops) <breakpoint_len>: Remove.
396 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
397 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
398 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
399 (struct linux_target_ops) <breakpoint>: Remove.
400 (struct linux_target_ops) <breakpoint_len>: Remove.
401 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
402 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
403 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
404 and sw_breakpoint_from_kind to increment the pc.
405 (linux_breakpoint_kind_from_pc): New function.
406 (linux_sw_breakpoint_from_kind): New function.
407 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
408 (initialize_low): Call breakpoint_kind_from_pc and
409 sw_breakpoint_from_kind to replace breakpoint_data/len.
410 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
411 New field.
412 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
413 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
414 (struct linux_target_ops) <breakpoint>: Remove.
415 (struct linux_target_ops) <breakpoint_len>: Remove.
416 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
417 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
418 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
419 (struct linux_target_ops) <breakpoint>: Remove.
420 (struct linux_target_ops) <breakpoint_len>: Remove.
421 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
422 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
423 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
424 (struct linux_target_ops) <breakpoint>: Remove.
425 (struct linux_target_ops) <breakpoint_len>: Remove.
426 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
427 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
428 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
429 (struct linux_target_ops) <breakpoint>: Remove.
430 (struct linux_target_ops) <breakpoint_len>: Remove.
431 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
432 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
433 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
434 (struct linux_target_ops) <breakpoint>: Remove.
435 (struct linux_target_ops) <breakpoint_len>: Remove.
436 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
437 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
438 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
439 (struct linux_target_ops) <breakpoint>: Remove.
440 (struct linux_target_ops) <breakpoint_len>: Remove.
441 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
442 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
443 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
444 (struct linux_target_ops) <breakpoint>: Remove.
445 (struct linux_target_ops) <breakpoint_len>: Remove.
446 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
447 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
448 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
449 (struct linux_target_ops) <breakpoint>: Remove.
450 (struct linux_target_ops) <breakpoint_len>: Remove.
451 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
452 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
453 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
454 (struct linux_target_ops) <breakpoint>: Remove.
455 (struct linux_target_ops) <breakpoint_len>: Remove.
456 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
457 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
458 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
459 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
460 (struct linux_target_ops) <breakpoint>: Remove.
461 (struct linux_target_ops) <breakpoint_len>: Remove.
462 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
463 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
464 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
465 (struct linux_target_ops) <breakpoint>: Remove.
466 (struct linux_target_ops) <breakpoint_len>: Remove.
467 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
468 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
469
4cd98a19
AT
4702015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
471
472 * linux-cris-low.c (cris_get_pc): Remove void arg.
473
774ee6d2
AR
4742015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
475
476 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
477 variable name.
478
833dcd29
AR
4792015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
480
481 * inferiors.c (thread_pid_matches_callback): New function.
482 (find_thread_process): New function.
483 (remove_thread): Reset current_thread.
484 (remove_process): Assert threads have been removed first.
485
8d689ee5
YQ
4862015-10-15 Yao Qi <yao.qi@linaro.org>
487
488 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
489 if it is 3.
490 (aarch64_remove_point): Likewise.
491 * regcache.c (regcache_register_size): New function.
492
1c2e1515
YQ
4932015-10-12 Yao Qi <yao.qi@linaro.org>
494
495 * linux-aarch64-low.c: Update all callers as emit_load_store
496 is renamed to aarch64_emit_load_store.
497
e1c587c3
YQ
4982015-10-12 Yao Qi <yao.qi@linaro.org>
499
500 * linux-aarch64-low.c: Update all callers of function renaming
501 from emit_insn to aarch64_emit_insn.
502
b6542f81
YQ
5032015-10-12 Yao Qi <yao.qi@linaro.org>
504
505 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
506 arch/aarch64-insn.h.
507 (struct aarch64_memory_operand): Likewise.
508 (ENCODE): Likewise.
509 (emit_insn): Move to arch/aarch64-insn.c.
510 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
511 (emit_load_store): Move to arch/aarch64-insn.c.
512 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
513 (can_encode_int32): Remove.
514
246994ce
YQ
5152015-10-12 Yao Qi <yao.qi@linaro.org>
516
517 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
518 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
519 (aarch64_relocate_instruction): Likewise.
520 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
521 (struct aarch64_insn_visitor): Likewise.
522
0badd99f
YQ
5232015-10-12 Yao Qi <yao.qi@linaro.org>
524
525 * linux-aarch64-low.c (struct aarch64_insn_data): New.
526 (struct aarch64_insn_visitor): New.
527 (struct aarch64_insn_relocation_data): New.
528 (aarch64_ftrace_insn_reloc_b): New function.
529 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
530 (aarch64_ftrace_insn_reloc_cb): Likewise.
531 (aarch64_ftrace_insn_reloc_tb): Likewise.
532 (aarch64_ftrace_insn_reloc_adr): Likewise.
533 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
534 (aarch64_ftrace_insn_reloc_others): Likewise.
535 (visitor): New.
536 (aarch64_relocate_instruction): Use visitor.
537
dfaffe9d
YQ
5382015-10-12 Yao Qi <yao.qi@linaro.org>
539
540 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
541 int. Add argument buf.
542 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
543 aarch64_relocate_instruction.
544
70b439f0
YQ
5452015-10-12 Yao Qi <yao.qi@linaro.org>
546
547 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
548 argument insn. Remove local variable insn. Don't call
549 target_read_uint32.
550 (aarch64_install_fast_tracepoint_jump_pad): Call
551 target_read_uint32.
552
7781c06f
YQ
5532015-09-30 Yao Qi <yao.qi@linaro.org>
554
555 * linux-aarch64-low.c (emit_movk): Shorten a long line.
556 (emit_load_store_pair): Likewise.
557
9a3c8263
SM
5582015-09-25 Simon Marchi <simon.marchi@ericsson.com>
559
560 * dll.c (match_dll): Add cast(s).
561 (unloaded_dll): Likewise.
562 * linux-low.c (second_thread_of_pid_p): Likewise.
563 (delete_lwp_callback): Likewise.
564 (count_events_callback): Likewise.
565 (select_event_lwp_callback): Likewise.
566 (linux_set_resume_request): Likewise.
567 * server.c (accumulate_file_name_length): Likewise.
568 (emit_dll_description): Likewise.
569 (handle_qxfer_threads_worker): Likewise.
570 (visit_actioned_threads): Likewise.
571 * thread-db.c (any_thread_of): Likewise.
572 * tracepoint.c (same_process_p): Likewise.
573 (match_blocktype): Likewise.
574 (build_traceframe_info_xml): Likewise.
575
224c3ddb
SM
5762015-09-25 Simon Marchi <simon.marchi@ericsson.com>
577
578 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
579 assignment.
580 (gdb_unparse_agent_expr): Likewise.
581 * hostio.c (require_data): Likewise.
582 (handle_pread): Likewise.
583 * linux-low.c (disable_regset): Likewise.
584 (fetch_register): Likewise.
585 (store_register): Likewise.
586 (get_dynamic): Likewise.
587 (linux_qxfer_libraries_svr4): Likewise.
588 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
589 (set_fast_tracepoint_jump): Likewise.
590 (uninsert_fast_tracepoint_jumps_at): Likewise.
591 (reinsert_fast_tracepoint_jumps_at): Likewise.
592 (validate_inserted_breakpoint): Likewise.
593 (clone_agent_expr): Likewise.
594 * regcache.c (init_register_cache): Likewise.
595 * remote-utils.c (putpkt_binary_1): Likewise.
596 (decode_M_packet): Likewise.
597 (decode_X_packet): Likewise.
598 (look_up_one_symbol): Likewise.
599 (relocate_instruction): Likewise.
600 (monitor_output): Likewise.
601 * server.c (handle_search_memory): Likewise.
602 (handle_qxfer_exec_file): Likewise.
603 (handle_qxfer_libraries): Likewise.
604 (handle_qxfer): Likewise.
605 (handle_query): Likewise.
606 (handle_v_cont): Likewise.
607 (handle_v_run): Likewise.
608 (captured_main): Likewise.
609 * target.c (write_inferior_memory): Likewise.
610 * thread-db.c (try_thread_db_load_from_dir): Likewise.
611 * tracepoint.c (init_trace_buffer): Likewise.
612 (add_tracepoint_action): Likewise.
613 (add_traceframe): Likewise.
614 (add_traceframe_block): Likewise.
615 (cmd_qtdpsrc): Likewise.
616 (cmd_qtdv): Likewise.
617 (cmd_qtstatus): Likewise.
618 (response_source): Likewise.
619 (response_tsv): Likewise.
620 (cmd_qtnotes): Likewise.
621 (gdb_collect): Likewise.
622 (initialize_tracepoint): Likewise.
623
afbe19f8
PL
6242015-09-21 Pierre Langlois <pierre.langlois@arm.com>
625
626 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
627 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
628 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
629 <NOP>: New.
630 (enum aarch64_condition_codes): New enum.
631 (w0): New static global.
632 (fp): Likewise.
633 (lr): Likewise.
634 (struct aarch64_memory_operand) <type>: New
635 MEMORY_OPERAND_POSTINDEX type.
636 (postindex_memory_operand): New helper function.
637 (emit_ret): New function.
638 (emit_load_store_pair): New function, factored out of emit_stp
639 with support for MEMORY_OPERAND_POSTINDEX.
640 (emit_stp): Rewrite using emit_load_store_pair.
641 (emit_ldp): New function.
642 (emit_load_store): Likewise.
643 (emit_ldr): Mention post-index instruction in comment.
644 (emit_ldrh): New function.
645 (emit_ldrb): New function.
646 (emit_ldrsw): Mention post-index instruction in comment.
647 (emit_str): Likewise.
648 (emit_subs): New function.
649 (emit_cmp): Likewise.
650 (emit_and): Likewise.
651 (emit_orr): Likewise.
652 (emit_orn): Likewise.
653 (emit_eor): Likewise.
654 (emit_mvn): Likewise.
655 (emit_lslv): Likewise.
656 (emit_lsrv): Likewise.
657 (emit_asrv): Likewise.
658 (emit_mul): Likewise.
659 (emit_sbfm): Likewise.
660 (emit_sbfx): Likewise.
661 (emit_ubfm): Likewise.
662 (emit_ubfx): Likewise.
663 (emit_csinc): Likewise.
664 (emit_cset): Likewise.
665 (emit_nop): Likewise.
666 (emit_ops_insns): New helper function.
667 (emit_pop): Likewise.
668 (emit_push): Likewise.
669 (aarch64_emit_prologue): New function.
670 (aarch64_emit_epilogue): Likewise.
671 (aarch64_emit_add): Likewise.
672 (aarch64_emit_sub): Likewise.
673 (aarch64_emit_mul): Likewise.
674 (aarch64_emit_lsh): Likewise.
675 (aarch64_emit_rsh_signed): Likewise.
676 (aarch64_emit_rsh_unsigned): Likewise.
677 (aarch64_emit_ext): Likewise.
678 (aarch64_emit_log_not): Likewise.
679 (aarch64_emit_bit_and): Likewise.
680 (aarch64_emit_bit_or): Likewise.
681 (aarch64_emit_bit_xor): Likewise.
682 (aarch64_emit_bit_not): Likewise.
683 (aarch64_emit_equal): Likewise.
684 (aarch64_emit_less_signed): Likewise.
685 (aarch64_emit_less_unsigned): Likewise.
686 (aarch64_emit_ref): Likewise.
687 (aarch64_emit_if_goto): Likewise.
688 (aarch64_emit_goto): Likewise.
689 (aarch64_write_goto_address): Likewise.
690 (aarch64_emit_const): Likewise.
691 (aarch64_emit_call): Likewise.
692 (aarch64_emit_reg): Likewise.
693 (aarch64_emit_pop): Likewise.
694 (aarch64_emit_stack_flush): Likewise.
695 (aarch64_emit_zero_ext): Likewise.
696 (aarch64_emit_swap): Likewise.
697 (aarch64_emit_stack_adjust): Likewise.
698 (aarch64_emit_int_call_1): Likewise.
699 (aarch64_emit_void_call_2): Likewise.
700 (aarch64_emit_eq_goto): Likewise.
701 (aarch64_emit_ne_goto): Likewise.
702 (aarch64_emit_lt_goto): Likewise.
703 (aarch64_emit_le_goto): Likewise.
704 (aarch64_emit_gt_goto): Likewise.
705 (aarch64_emit_ge_got): Likewise.
706 (aarch64_emit_ops_impl): New static global variable.
707 (aarch64_emit_ops): New target function, return
708 &aarch64_emit_ops_impl.
709 (struct linux_target_ops): Install it.
710
bb903df0
PL
7112015-09-21 Pierre Langlois <pierre.langlois@arm.com>
712
713 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
714 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
715 aarch64-ipa.o.
716 * linux-aarch64-ipa.c: New file.
717 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
718 and endian.h.
719 (aarch64_get_thread_area): New target method.
720 (extract_signed_bitfield): New helper function.
721 (aarch64_decode_ldr_literal): New function.
722 (enum aarch64_opcodes): New enum.
723 (struct aarch64_register): New struct.
724 (struct aarch64_operand): New struct.
725 (x0): New static global.
726 (x1): Likewise.
727 (x2): Likewise.
728 (x3): Likewise.
729 (x4): Likewise.
730 (w2): Likewise.
731 (ip0): Likewise.
732 (sp): Likewise.
733 (xzr): Likewise.
734 (aarch64_register): New helper function.
735 (register_operand): Likewise.
736 (immediate_operand): Likewise.
737 (struct aarch64_memory_operand): New struct.
738 (offset_memory_operand): New helper function.
739 (preindex_memory_operand): Likewise.
740 (enum aarch64_system_control_registers): New enum.
741 (ENCODE): New macro.
742 (emit_insn): New helper function.
743 (emit_b): New function.
744 (emit_bcond): Likewise.
745 (emit_cb): Likewise.
746 (emit_tb): Likewise.
747 (emit_blr): Likewise.
748 (emit_stp): Likewise.
749 (emit_ldp_q_offset): Likewise.
750 (emit_stp_q_offset): Likewise.
751 (emit_load_store): Likewise.
752 (emit_ldr): Likewise.
753 (emit_ldrsw): Likewise.
754 (emit_str): Likewise.
755 (emit_ldaxr): Likewise.
756 (emit_stxr): Likewise.
757 (emit_stlr): Likewise.
758 (emit_data_processing_reg): Likewise.
759 (emit_data_processing): Likewise.
760 (emit_add): Likewise.
761 (emit_sub): Likewise.
762 (emit_mov): Likewise.
763 (emit_movk): Likewise.
764 (emit_mov_addr): Likewise.
765 (emit_mrs): Likewise.
766 (emit_msr): Likewise.
767 (emit_sevl): Likewise.
768 (emit_wfe): Likewise.
769 (append_insns): Likewise.
770 (can_encode_int32_in): New helper function.
771 (aarch64_relocate_instruction): New function.
772 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
773 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
774 (struct linux_target_ops): Install aarch64_get_thread_area,
775 aarch64_install_fast_tracepoint_jump_pad and
776 aarch64_get_min_fast_tracepoint_insn_len.
777
787749ea
PL
7782015-09-21 Pierre Langlois <pierre.langlois@arm.com>
779
780 * Makefile.in (aarch64-insn.o): New rule.
781 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
782
9812b2e6
YQ
7832015-09-21 Yao Qi <yao.qi@linaro.org>
784
785 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
786
18fe412b
YQ
7872015-09-21 Yao Qi <yao.qi@linaro.org>
788
789 * tracepoint.c (max_jump_pad_size): Remove.
790
a0cc84cd
YQ
7912015-09-18 Yao Qi <yao.qi@linaro.org>
792
793 * linux-aarch64-low.c: Don't include sys/uio.h.
794 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
795
d78908cf
WW
7962015-09-16 Wei-cheng Wang <cole945@gmail.com>
797
798 * tracepoint.c (eval_result_type): Change prototype.
799 (condition_true_at_tracepoint): Fix argument to compiled_cond.
800
d57e0d50
PA
8012015-09-15 Pedro Alves <palves@redhat.com>
802
803 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
804 Check whether to report exec events instead of checking whether
805 multiprocess is enabled.
806
5a676acc
PA
8072015-09-15 Pedro Alves <palves@redhat.com>
808
809 PR remote/18965
810 * remote-utils.c (prepare_resume_reply): Merge
811 TARGET_WAITKIND_VFORK_DONE switch case with the
812 TARGET_WAITKIND_FORKED case.
813
7c5d0fad
YQ
8142015-09-15 Yao Qi <yao.qi@linaro.org>
815
816 * server.c (handle_query): Check string comparison using
817 "else if" instead of "if".
818
750ce8d1
YQ
8192015-09-15 Yao Qi <yao.qi@linaro.org>
820
821 * server.c (vCont_supported): New global variable.
822 (handle_query): Set vCont_supported to 1 if "vContSupported+"
823 matches. Append ";vContSupported+" to own_buf.
824 (handle_v_requests): Append ";s;S" to own_buf if target supports
825 hardware single step or vCont_supported is false.
826 (capture_main): Set vCont_supported to zero.
827
70b90b91
YQ
8282015-09-15 Yao Qi <yao.qi@linaro.org>
829
830 * linux-low.c (linux_supports_conditional_breakpoints): Rename
831 it to ...
832 (linux_supports_hardware_single_step): ... New function.
833 (linux_target_ops): Update.
834 * lynx-low.c (lynx_target_ops): Set field
835 supports_hardware_single_step to target_can_do_hardware_single_step.
836 * nto-low.c (nto_target_ops): Likewise.
837 * spu-low.c (spu_target_ops): Likewise.
838 * win32-low.c (win32_target_ops): Likewise.
839 * target.c (target_can_do_hardware_single_step): New function.
840 * target.h (struct target_ops) <supports_conditional_breakpoints>:
841 Remove. <supports_hardware_single_step>: New field.
842 (target_supports_conditional_breakpoints): Remove.
843 (target_supports_hardware_single_step): New macro.
844 (target_can_do_hardware_single_step): Declare.
845 * server.c (handle_query): Use target_supports_hardware_single_step
846 instead of target_supports_conditional_breakpoints.
847
ade90bde
YQ
8482015-09-15 Yao Qi <yao.qi@linaro.org>
849
850 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
851 function.
852 (struct linux_target_ops the_low_target): Install
853 aarch64_linux_siginfo_fixup.
854
94585166
DB
8552015-09-11 Don Breazeal <donb@codesourcery.com>
856 Luis Machado <lgustavo@codesourcery.com>
857
858 * linux-low.c (linux_mourn): Static declaration.
859 (linux_arch_setup): Move in front of
860 handle_extended_wait.
861 (linux_arch_setup_thread): New function.
862 (handle_extended_wait): Handle exec events. Call
863 linux_arch_setup_thread. Make event_lwp argument a
864 pointer-to-a-pointer.
865 (check_zombie_leaders): Do not check stopped threads.
866 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
867 (linux_low_filter_event): Add lwp and thread for exec'ing
868 non-leader thread if leader thread has been deleted.
869 Refactor code into linux_arch_setup_thread and call it.
870 Pass child lwp pointer by reference to handle_extended_wait.
871 (linux_wait_for_event_filtered): Update comment.
872 (linux_wait_1): Prevent clobbering exec event status.
873 (linux_supports_exec_events): New function.
874 (linux_target_ops) <supports_exec_events>: Initialize new member.
875 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
876 new member.
877 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
878 * server.c (report_exec_events): New global variable.
879 (handle_query): Handle qSupported query for exec-events feature.
880 (captured_main): Initialize report_exec_events.
881 * server.h (report_exec_events): Declare new global variable.
882 * target.h (struct target_ops) <supports_exec_events>: New
883 member.
884 (target_supports_exec_events): New macro.
885 * win32-low.c (win32_target_ops) <supports_exec_events>:
886 Initialize new member.
887
0568462b
MM
8882015-09-09 Markus Metzger <markus.t.metzger@intel.com>
889
890 * linux-low.c (linux_low_enable_btrace): Remove.
891 (linux_target_ops): Replace linux_low_enable_btrace with
892 linux_enable_btrace.
893
39edd165
YQ
8942015-09-03 Yao Qi <yao.qi@linaro.org>
895
896 * linux-aarch64-low.c (aarch64_insert_point): Call
897 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
898 returns true.
899
1db33b5a
UW
9002015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
901
902 * linux-low.c (check_stopped_by_breakpoint): Use
903 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
904
ab290430
PA
9052015-08-27 Pedro Alves <palves@redhat.com>
906
907 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
908
8d749320
SM
9092015-08-26 Simon Marchi <simon.marchi@ericsson.com>
910
6711b7f8
SM
911 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
912 the XNEW-family equivalent.
8d749320
SM
913 (compile_bytecodes): Likewise.
914 * dll.c (loaded_dll): Likewise.
915 * event-loop.c (append_callback_event): Likewise.
916 (create_file_handler): Likewise.
917 (create_file_event): Likewise.
918 * hostio.c (handle_open): Likewise.
919 * inferiors.c (add_thread): Likewise.
920 (add_process): Likewise.
921 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
922 * linux-arm-low.c (arm_new_process): Likewise.
923 (arm_new_thread): Likewise.
924 * linux-low.c (add_to_pid_list): Likewise.
925 (linux_add_process): Likewise.
926 (handle_extended_wait): Likewise.
927 (add_lwp): Likewise.
928 (enqueue_one_deferred_signal): Likewise.
929 (enqueue_pending_signal): Likewise.
930 (linux_resume_one_lwp_throw): Likewise.
931 (linux_resume_one_thread): Likewise.
932 (linux_read_memory): Likewise.
933 (linux_write_memory): Likewise.
934 * linux-mips-low.c (mips_linux_new_process): Likewise.
935 (mips_linux_new_thread): Likewise.
936 (mips_add_watchpoint): Likewise.
937 * linux-x86-low.c (initialize_low_arch): Likewise.
938 * lynx-low.c (lynx_add_process): Likewise.
939 * mem-break.c (set_raw_breakpoint_at): Likewise.
940 (set_breakpoint): Likewise.
941 (add_condition_to_breakpoint): Likewise.
942 (add_commands_to_breakpoint): Likewise.
943 (clone_agent_expr): Likewise.
944 (clone_one_breakpoint): Likewise.
945 * regcache.c (new_register_cache): Likewise.
946 * remote-utils.c (look_up_one_symbol): Likewise.
947 * server.c (queue_stop_reply): Likewise.
948 (start_inferior): Likewise.
949 (queue_stop_reply_callback): Likewise.
950 (handle_target_event): Likewise.
951 * spu-low.c (fetch_ppc_memory): Likewise.
952 (store_ppc_memory): Likewise.
953 * target.c (set_target_ops): Likewise.
954 * thread-db.c (thread_db_load_search): Likewise.
955 (try_thread_db_load_1): Likewise.
956 * tracepoint.c (add_tracepoint): Likewise.
957 (add_tracepoint_action): Likewise.
958 (create_trace_state_variable): Likewise.
959 (cmd_qtdpsrc): Likewise.
960 (cmd_qtro): Likewise.
961 (add_while_stepping_state): Likewise.
962 * win32-low.c (child_add_thread): Likewise.
963 (get_image_name): Likewise.
964
ed8b7b42
YQ
9652015-08-25 Yao Qi <yao.qi@linaro.org>
966
967 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
968
db3cb7cb
YQ
9692015-08-25 Yao Qi <yao.qi@linaro.org>
970
971 * Makefile.in (aarch64-linux.o): New rule.
972 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
973 srv_tgtobj.
974 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
975 (aarch64_init_debug_reg_state): Make it extern.
976 (aarch64_linux_prepare_to_resume): Remove.
977
f6011a1c
YQ
9782015-08-25 Yao Qi <yao.qi@linaro.org>
979
980 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
981 lwp_arch_private_info and ptid_of_lwp.
982
88e2cf7e
YQ
9832015-08-25 Yao Qi <yao.qi@linaro.org>
984
985 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
986 Find proc_info by find_process_pid. All callers updated.
987
5e35436e
YQ
9882015-08-25 Yao Qi <yao.qi@linaro.org>
989
990 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
991 Remove.
992 (debug_reg_change_callback): Remove.
993 (aarch64_notify_debug_reg_change): Remove.
994
4a8a7965
YQ
9952015-08-25 Yao Qi <yao.qi@linaro.org>
996
997 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
998 Call current_lwp_ptid.
999
32a271ee
YQ
10002015-08-25 Yao Qi <yao.qi@linaro.org>
1001
1002 * linux-aarch64-low.c (debug_reg_change_callback): Use
1003 debug_printf.
1004
0d51c8d7
YQ
10052015-08-25 Yao Qi <yao.qi@linaro.org>
1006
1007 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1008
31a43dd5
YQ
10092015-08-25 Yao Qi <yao.qi@linaro.org>
1010
1011 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1012
8ee52567
YQ
10132015-08-25 Yao Qi <yao.qi@linaro.org>
1014
1015 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1016 the code.
1017
ff3f0f45
YQ
10182015-08-25 Yao Qi <yao.qi@linaro.org>
1019
1020 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1021 Remove.
1022 (debug_reg_change_callback): Remove argument entry and add argument
1023 lwp. Remove local variable thread. Don't print thread id in the
1024 debugging output. Don't check whether pid of thread equals to pid.
1025 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1026 iterate_over_lwps instead find_inferior.
1027
3d40fbb5
PA
10282015-08-24 Pedro Alves <palves@redhat.com>
1029
1030 * inferiors.c (get_first_process): New function.
1031 * inferiors.h (get_first_process): New declaration.
1032 * remote-utils.c (read_ptid): Default to the first process in the
1033 list, instead of to the current thread's process.
1034
438e1e42
PA
10352015-08-24 Pedro Alves <palves@redhat.com>
1036
1037 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1038 * event-loop.c: Likewise.
1039 * remote-utils.c: Likewise.
1040 * tracepoint.c: Likewise.
1041
a8c6d4fc
PA
10422015-08-24 Pedro Alves <palves@redhat.com>
1043
1044 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1045 ptid_get_lwp.
1046
99b0bb12
PA
10472015-08-21 Pedro Alves <palves@redhat.com>
1048
1049 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1050 instead of literal 1.
1051
f8904751
PA
10522015-08-21 Pedro Alves <palves@redhat.com>
1053
1054 * tdesc.c (default_description): Explicitly zero-initialize.
1055
465a859e
PA
10562015-08-21 Pedro Alves <palves@redhat.com>
1057
1058 PR gdb/18749
1059 * inferiors.c (remove_thread): Discard any pending stop reply for
1060 this thread.
1061 * server.c (remove_all_on_match_pid): Rename to ...
1062 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1063 instead of a pid.
1064 (discard_queued_stop_replies): Change parameter to a ptid. Now
1065 extern.
1066 (handle_v_kill, kill_inferior_callback, captured_main)
1067 (process_serial_event): Adjust.
1068 * server.h (discard_queued_stop_replies): Declare.
1069
f0db101d
PA
10702015-08-21 Pedro Alves <palves@redhat.com>
1071
1072 * linux-low.c (wait_for_sigstop): Always switch to no thread
1073 selected if the previously current thread dies.
1074 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1075 process instead of the current thread's.
1076 * remote-utils.c (input_interrupt): Don't check if there's no
1077 current thread.
1078 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1079 current thread to the general thread fails, error out.
1080 (handle_qxfer_auxv, handle_qxfer_libraries)
1081 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1082 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1083 (handle_query): Check if there's a thread selected instead of
1084 checking whether there's any thread in the thread list.
1085 (handle_qxfer_threads, handle_qxfer_btrace)
1086 (handle_qxfer_btrace_conf): Don't error out early if there's no
1087 thread in the thread list.
1088 (handle_v_cont, myresume): Don't set the current thread to the
1089 continue thread.
1090 (process_serial_event) <Hg handling>: Also set thread_id if the
1091 previous general thread is still alive.
1092 (process_serial_event) <g/G handling>: If setting the current
1093 thread to the general thread fails, error out.
1094 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1095 thread's lwp instead of the current thread's.
1096 * target.c (set_desired_thread): If the desired thread was not
1097 found, leave the current thread pointing to NULL. Return an int
1098 (boolean) indicating success.
1099 * target.h (set_desired_thread): Change return type to int.
1100
40045d91
MF
11012015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1102
1103 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1104 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1105 #includes.
1106 (ps_get_thread_area): New function.
1107
45face3b
GB
11082015-08-19 Gary Benson <gbenson@redhat.com>
1109
1110 * hostio.c (handle_pread): Do not attempt to read more data
1111 than hostio_reply_with_data can fit in a packet.
1112
16d5f642
JB
11132015-08-18 Joel Brobecker <brobecker@adacore.com>
1114
1115 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1116
a738da3a
MF
11172015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1118
1119 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1120
33ebda9d
PA
11212015-08-06 Pedro Alves <palves@redhat.com>
1122
1123 * tracepoint.c (expr_eval_result): Now an int.
1124
a44892be
PA
11252015-08-06 Pedro Alves <palves@redhat.com>
1126
1127 * gdbthread.h (struct regcache): Forward declare.
1128 (struct thread_info) <regcache_data>: Now a struct regcache
1129 pointer.
1130 * inferiors.c (inferior_regcache_data)
1131 (set_inferior_regcache_data): Now work with struct regcache
1132 pointers.
1133 * inferiors.h (struct regcache): Forward declare.
1134 (inferior_regcache_data, set_inferior_regcache_data): Now work
1135 with struct regcache pointers.
1136 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1137 (free_register_cache_thread): Remove struct regcache pointer
1138 casts.
1139
608a1e46
PA
11402015-08-06 Pedro Alves <palves@redhat.com>
1141
1142 * server.c (captured_main): On error, print the exception message
1143 to stderr, and if run_once is set, throw a quit.
1144
f0ce0d3a
PA
11452015-08-06 Pedro Alves <palves@redhat.com>
1146
1147 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1148 the current thread.
1149
bf47e248
PA
11502015-08-06 Pedro Alves <palves@redhat.com>
1151
1152 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1153 reading beyond the passed in buffer length.
1154
b6b9ffcc
PL
11552015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1156
1157 * tracepoint.c (symbol_list) <required>: Remove.
1158
863d01bd
PA
11592015-08-06 Pedro Alves <palves@redhat.com>
1160
1161 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1162 count if stopping and suspending threads.
1163 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1164 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1165 (linux_detach): Complete an ongoing step-over.
1166 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1167 throughout.
1168 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1169 (linux_wait_1): If passing a signal to the inferior after
1170 finishing a step-over, unsuspend and re-resume all lwps. If we
1171 see a single-step event but the thread should be continuing, don't
1172 pass the trap to gdb.
1173 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1174 internal_error instead of gdb_assert.
1175 (enqueue_pending_signal): New function.
1176 (check_ptrace_stopped_lwp_gone): Add debug output.
1177 (start_step_over): Use internal_error instead of gdb_assert.
1178 (complete_ongoing_step_over): New function.
1179 (linux_resume_one_thread): Don't resume a suspended thread.
1180 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1181 it stepping.
1182
00db26fa
PA
11832015-08-06 Pedro Alves <palves@redhat.com>
1184
1185 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1186 (linux_thread_alive): Use lwp_is_marked_dead.
1187 (extended_event_reported): Delete.
1188 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1189 instead of extended_event_reported.
1190 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1191 as well.
1192 (lwp_is_marked_dead): New function.
1193 (lwp_running): Use lwp_is_marked_dead.
1194 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1195 comment.
1196
ad071a30
PA
11972015-08-06 Pedro Alves <palves@redhat.com>
1198
1199 * linux-low.c (linux_wait_1): Move fork event output out of the
1200 !report_to_gdb check. Pass event_child->waitstatus to
1201 target_waitstatus_to_string instead of ourstatus.
1202
524b57e6
YQ
12032015-08-04 Yao Qi <yao.qi@linaro.org>
1204
1205 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1206 if current_thread is 32 bit.
1207
6085d6f6
YQ
12082015-08-04 Yao Qi <yao.qi@linaro.org>
1209
1210 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1211 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1212 * server.c (extended_protocol): Remove "static".
1213 * server.h (extended_protocol): Declare it.
1214
8a7e4587
YQ
12152015-08-04 Yao Qi <yao.qi@linaro.org>
1216
1217 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1218 both aarch64 and aarch32.
1219 (aarch64_set_pc): Likewise.
1220
3b53ae99
YQ
12212015-08-04 Yao Qi <yao.qi@linaro.org>
1222
1223 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1224 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1225 arm-with-neon.xml to srv_xmlfiles.
1226 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1227 (is_64bit_tdesc): New function.
1228 (aarch64_linux_read_description): New function.
1229 (aarch64_arch_setup): Call aarch64_linux_read_description.
1230 (regs_info): Rename to regs_info_aarch64.
1231 (aarch64_regs_info): Return right regs_info.
1232 (initialize_low_arch): Call initialize_low_arch_aarch32.
1233
bd9e6534
YQ
12342015-08-04 Yao Qi <yao.qi@linaro.org>
1235
1236 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1237 * linux-aarch32-low.c: New file.
1238 * linux-aarch32-low.h: New file.
1239 * linux-arm-low.c (arm_fill_gregset): Move it to
1240 linux-aarch32-low.c.
1241 (arm_store_gregset): Likewise.
1242 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1243 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1244 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1245 (regs_info): Rename to regs_info_arm.
1246 (arm_regs_info): Return regs_info_aarch32 if
1247 have_ptrace_getregset is 1 and target description is
1248 arm_with_neon or arm_with_vfpv3.
1249 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1250 Call initialize_low_arch_aarch32 instead.
1251
ded48a5e
YQ
12522015-08-04 Yao Qi <yao.qi@linaro.org>
1253
1254 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1255 * linux-low.c: ... here.
1256 * linux-low.h (have_ptrace_getregset): Declare it.
1257
96e9210f
PA
12582015-08-04 Pedro Alves <palves@redhat.com>
1259
1260 * thread-db.c (struct thread_db): Use new typedefs.
1261 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1262 CHK calls.
1263 (disable_thread_event_reporting): Cast result of dlsym to
1264 destination function pointer type.
1265 (thread_db_mourn): Use td_ta_delete_ftype.
1266
af60a1ef
SL
12672015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1268
1269 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1270 arch variant.
1271 (CDX_BREAKPOINT): Define for R2.
1272 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1273 (the_low_target): Add comments.
1274
e8b41681
YQ
12752015-07-30 Yao Qi <yao.qi@linaro.org>
1276
1277 * linux-arm-low.c (arm_hwcap): Remove it.
1278 (arm_read_description): New local variable arm_hwcap. Don't
1279 set arm_hwcap to zero.
1280
89abb039
YQ
12812015-07-30 Yao Qi <yao.qi@linaro.org>
1282
1283 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1284 Use regcache->tdesc instead.
1285 (arm_store_wmmxregset): Likewise.
1286 (arm_fill_vfpregset): Likewise.
1287 (arm_store_vfpregset): Likewise.
1288
deca266c
YQ
12892015-07-30 Yao Qi <yao.qi@linaro.org>
1290
1291 * linux-arm-low.c: Include arch/arm.h.
1292 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1293 (arm_store_gregset): Likewise.
1294
aa58a496
SM
12952015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1296
1297 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1298 ptrace's 4th parameter.
1299
50904b25
YQ
13002015-07-27 Yao Qi <yao.qi@linaro.org>
1301
1302 * configure.srv (case aarch64*-*-linux*): Don't set
1303 srv_linux_usrregs.
1304
5826e159
PA
13052015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1306
1307 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1308 sys/ptrace.h.
1309 * linux-arm-low.c: Likewise.
1310 * linux-cris-low.c: Likewise.
1311 * linux-crisv32-low.c: Likewise.
1312 * linux-low.c: Likewise.
1313 * linux-m68k-low.c: Likewise.
1314 * linux-mips-low.c: Likewise.
1315 * linux-nios2-low.c: Likewise.
1316 * linux-s390-low.c: Likewise.
1317 * linux-sparc-low.c: Likewise.
1318 * linux-tic6x-low.c: Likewise.
1319 * linux-tile-low.c: Likewise.
1320 * linux-x86-low.c: Likewise.
1321
54019719
PA
13222015-07-24 Pedro Alves <palves@redhat.com>
1323
1324 * config.in: Regenerate.
1325 * configure: Regenerate.
1326
eb7aa561
PA
13272015-07-24 Pedro Alves <palves@redhat.com>
1328
1329 * acinclude.m4: Include ../ptrace.m4.
1330 * configure.ac: Call GDB_AC_PTRACE.
1331 * config.in, configure: Regenerate.
1332
55d7b841
YQ
13332015-07-24 Yao Qi <yao.qi@linaro.org>
1334
1335 * linux-low.c (linux_create_inferior): Remove setting to
1336 proc->priv->new_inferior.
1337 (linux_attach): Likewise.
1338 (linux_low_filter_event): Likewise.
1339 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1340
c06cbd92
YQ
13412015-07-24 Yao Qi <yao.qi@linaro.org>
1342
1343 * linux-low.c (linux_arch_setup): New function.
1344 (linux_low_filter_event): If proc->tdesc is NULL and
1345 proc->attached is true, call the_low_target.arch_setup.
1346 Otherwise, keep status pending, and return.
1347 (linux_resume_one_lwp_throw): Don't call get_pc if
1348 thread->while_stepping isn't NULL. Don't call
1349 get_thread_regcache if proc->tdesc is NULL.
1350 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1351 (linux_target_ops): Install arch_setup.
1352 * server.c (start_inferior): Call the_target->arch_setup.
1353 * target.h (struct target_ops) <arch_setup>: New field.
1354 (target_arch_setup): New marco.
1355 * lynx-low.c (lynx_target_ops): Update.
1356 * nto-low.c (nto_target_ops): Update.
1357 * spu-low.c (spu_target_ops): Update.
1358 * win32-low.c (win32_target_ops): Update.
1359
5ae3ebba
YQ
13602015-07-24 Yao Qi <yao.qi@linaro.org>
1361
1362 * linux-low.c (linux_add_process): Don't set
1363 proc->priv->new_inferior.
1364 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1365 (linux_attach): Likewise.
1366
eb97750b
YQ
13672015-07-24 Yao Qi <yao.qi@linaro.org>
1368
1369 * server.c (start_inferior): Code refactor.
1370
51aee833
YQ
13712015-07-24 Yao Qi <yao.qi@linaro.org>
1372
1373 * server.c (process_serial_event): Set general_thread.
1374
af1b22f3
YQ
13752015-07-21 Yao Qi <yao.qi@linaro.org>
1376
1377 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1378 aarch64_linux_get_debug_reg_capacity.
1379
554717a3
YQ
13802015-07-17 Yao Qi <yao.qi@linaro.org>
1381
1382 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1383 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1384 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1385 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1386 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1387 (AARCH64_HWP_ALIGNMENT): Likewise.
1388 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1389 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1390 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1391 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1392 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1393 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1394 (struct aarch64_debug_reg_state): Likewise.
1395 (struct arch_lwp_info): Likewise.
1396 (aarch64_align_watchpoint): Likewise.
1397 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1398 (aarch64_watchpoint_length): Likewise.
1399 (aarch64_point_encode_ctrl_reg): Likewise
1400 (aarch64_point_is_aligned): Likewise.
1401 (aarch64_align_watchpoint): Likewise.
1402 (aarch64_linux_set_debug_regs):
1403 (aarch64_dr_state_insert_one_point): Likewise.
1404 (aarch64_dr_state_remove_one_point): Likewise.
1405 (aarch64_handle_breakpoint): Likewise.
1406 (aarch64_handle_aligned_watchpoint): Likewise.
1407 (aarch64_handle_unaligned_watchpoint): Likewise.
1408 (aarch64_handle_watchpoint): Likewise.
1409
c67ca4de
YQ
14102015-07-17 Yao Qi <yao.qi@linaro.org>
1411
1412 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1413 and don't aarch64_get_debug_reg_state. All callers update.
1414 (aarch64_handle_aligned_watchpoint): Likewise.
1415 (aarch64_handle_unaligned_watchpoint): Likewise.
1416 (aarch64_handle_watchpoint): Likewise.
1417 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1418 (aarch64_remove_point): Likewise.
1419
25abf979
YQ
14202015-07-17 Yao Qi <yao.qi@linaro.org>
1421
1422 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1423 debug_printf.
1424 (aarch64_handle_unaligned_watchpoint): Likewise.
1425
db1ff28b
JK
14262015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1427
1428 Revert the previous 3 commits:
1429 Move gdb_regex* to common/
1430 Move linux_find_memory_regions_full & co.
1431 gdbserver build-id attribute generator
1432
700ca40f
JK
14332015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1434 Jan Kratochvil <jan.kratochvil@redhat.com>
1435
1436 gdbserver build-id attribute generator.
1437 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1438 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1439 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1440 (find_phdr): New.
1441 (get_dynamic): Use find_pdhr to traverse program headers.
1442 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1443 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1444 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1445 (get_hex_build_id): New.
1446 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1447 to reply XML document.
1448
9904185c
JK
14492015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1450 Jan Kratochvil <jan.kratochvil@redhat.com>
1451
1452 * target.c: Include target/target-utils.h and fcntl.h.
1453 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1454 (target_fileio_read_stralloc): New functions.
1455
6e5b4429
JK
14562015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1457
1458 * Makefile.in (OBS): Add gdb_regex.o.
1459 (gdb_regex.o): New.
1460 * config.in: Rebuilt.
1461 * configure: Rebuilt.
1462
ddc98fbf
JK
14632015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1464 Jan Kratochvil <jan.kratochvil@redhat.com>
1465
1466 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1467 * Makefile.in (OBS): Add target-utils.o.
1468 (linux-maps.o, target-utils.o): New.
1469 * configure.srv (srv_linux_obj): Add linux-maps.o.
1470
e57bb7a0
PL
14712015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1472
1473 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1474 function, return 1.
1475 (the_low_target): Install it.
1476
586b02a9
PA
14772015-07-14 Pedro Alves <palves@redhat.com>
1478
1479 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1480 Instead, ignore ECHILD, and throw an error for other errnos.
1481
58c1b36c
PA
14822015-07-10 Pedro Alves <palves@redhat.com>
1483
1484 * event-loop.c (struct callback_event) <data>: Change type to
1485 gdb_client_data instance instead of gdb_client_data pointer.
1486 (append_callback_event): Adjust.
1487
421530db
PL
14882015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1489
1490 * linux-aarch64-low.c: Add comments for each linux_target_ops
1491 method. Remove comments already covered in target_ops and
1492 linux_target_ops definitions.
1493 (the_low_target): Add comments for each unimplemented method.
1494
c2d65f38
YQ
14952015-07-09 Yao Qi <yao.qi@linaro.org>
1496
1497 * linux-aarch64-low.c (aarch64_regmap): Remove.
1498 (aarch64_usrregs_info): Remove.
1499 (regs_info): Set field usrregs to NULL.
1500
b20a6524
MM
15012015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1502
1503 * linux-low.c: Include "rsp-low.h"
1504 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1505 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1506 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1507 (handle_btrace_enable_pt): New.
1508 (handle_btrace_general_set): Support "pt".
1509 (handle_btrace_conf_general_set): Support "pt:size".
1510
96c97461
PL
15112015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1512
1513 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1514 Z_PACKET_SW_BP.
1515
37d66942
PL
15162015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1517
1518 * linux-aarch64-low.c: Remove comment about endianness.
1519 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1520 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1521 memcmp.
1522
dc06243f
GB
15232015-06-24 Gary Benson <gbenson@redhat.com>
1524
1525 * linux-i386-ipa.c (stdint.h): Do not include.
1526 * lynx-i386-low.c (stdint.h): Likewise.
1527 * lynx-ppc-low.c (stdint.h): Likewise.
1528 * mem-break.c (stdint.h): Likewise.
1529 * thread-db.c (stdint.h): Likewise.
1530 * tracepoint.c (stdint.h): Likewise.
1531 * win32-low.c (stdint.h): Likewise.
1532
124e13d9
SM
15332015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1534
1535 * server.c (write_qxfer_response): Update call to
1536 remote_escape_output.
1537
909c2cda
JK
15382015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1539 Jan Kratochvil <jan.kratochvil@redhat.com>
1540
1541 Merge multiple hex conversions.
1542 * gdbreplay.c (tohex): Rename to 'fromhex'.
1543 (logchar): Use fromhex.
1544
24c05f46
JK
15452015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1546
1547 * server.c (handle_qxfer_libraries): Set `version' attribute for
1548 <library-list>.
1549
14d2069a
GB
15502015-06-10 Gary Benson <gbenson@redhat.com>
1551
1552 * target.h (struct target_ops) <multifs_open>: New field.
1553 <multifs_unlink>: Likewise.
1554 <multifs_readlink>: Likewise.
1555 * linux-low.c (nat/linux-namespaces.h): New include.
1556 (linux_target_ops): Initialize the_target->multifs_open,
1557 the_target->multifs_unlink and the_target->multifs_readlink.
1558 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1559 * hostio.c (hostio_fs_pid): New static variable.
1560 (hostio_handle_new_gdb_connection): New function.
1561 (handle_setfs): Likewise.
1562 (handle_open): Use the_target->multifs_open as appropriate.
1563 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1564 (handle_readlink): Use the_target->multifs_readlink as
1565 appropriate.
1566 (handle_vFile): Handle vFile:setfs packets.
1567 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1568 after target_handle_new_gdb_connection.
1569
4b8b5e72
GB
15702015-06-10 Gary Benson <gbenson@redhat.com>
1571
1572 * configure.ac (AC_CHECK_FUNCS): Add setns.
1573 * config.in: Regenerate.
1574 * configure: Likewise.
1575 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1576 (linux-namespaces.o): New rule.
1577 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1578
3ac2e371
GB
15792015-06-09 Gary Benson <gbenson@redhat.com>
1580
1581 * hostio.c (handle_open): Process mode argument with
1582 fileio_to_host_mode.
1583
ca9b78ce
YQ
15842015-06-01 Yao Qi <yao.qi@linaro.org>
1585
1586 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1587 * linux-x86-low.c: Likewise.
1588
bfacd19d
DB
15892015-05-28 Don Breazeal <donb@codesourcery.com>
1590
1591 * linux-low.c (handle_extended_wait): Initialize
1592 thread_info.last_resume_kind for new fork children.
1593
452003ef
PA
15942015-05-15 Pedro Alves <palves@redhat.com>
1595
1596 * target.h (target_handle_new_gdb_connection): Rewrite using if
1597 wrapped in do/while.
1598
1041a03c
JB
15992015-05-14 Joel Brobecker <brobecker@adacore.com>
1600
1601 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1602 * configure, config.in: Regenerate.
1603 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1604 Declare typedef.
1605
c269dbdb
DB
16062015-05-12 Don Breazeal <donb@codesourcery.com>
1607
1608 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1609 PTRACE_EVENT_VFORK_DONE.
1610 (linux_low_ptrace_options, extended_event_reported): Add vfork
1611 events.
1612 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1613 and "vforkdone" for RSP 'T' Stop Reply Packet.
1614 * server.h (report_vfork_events): Declare
1615 global variable.
1616
3a8a0396
DB
16172015-05-12 Don Breazeal <donb@codesourcery.com>
1618
1619 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1620 (the_low_target) <new_fork>: Initialize new member.
1621 * linux-arm-low.c (arm_new_fork): New function.
1622 (the_low_target) <new_fork>: Initialize new member.
1623 * linux-low.c (handle_extended_wait): Call new target function
1624 new_fork.
1625 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1626 * linux-mips-low.c (mips_add_watchpoint): New function
1627 extracted from mips_insert_point.
1628 (the_low_target) <new_fork>: Initialize new member.
1629 (mips_linux_new_fork): New function.
1630 (mips_insert_point): Call mips_add_watchpoint.
1631 * linux-x86-low.c (x86_linux_new_fork): New function.
1632 (the_low_target) <new_fork>: Initialize new member.
1633
de0d863e
DB
16342015-05-12 Don Breazeal <donb@codesourcery.com>
1635
1636 * linux-low.c (handle_extended_wait): Implement return value,
1637 rename argument 'event_child' to 'event_lwp', handle
1638 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1639 (linux_low_ptrace_options): New function.
1640 (linux_low_filter_event): Call linux_low_ptrace_options,
1641 use different argument fo linux_enable_event_reporting,
1642 use return value from handle_extended_wait.
1643 (extended_event_reported): New function.
1644 (linux_wait_1): Call extended_event_reported and set
1645 status to report fork events.
1646 (linux_write_memory): Add pid to debug message.
1647 (reset_lwp_ptrace_options_callback): New function.
1648 (linux_handle_new_gdb_connection): New function.
1649 (linux_target_ops): Initialize new structure member.
1650 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1651 * lynx-low.c: Initialize new structure member.
1652 * remote-utils.c (prepare_resume_reply): Implement stop reason
1653 "fork" for "T" stop message.
1654 * server.c (handle_query): Call handle_new_gdb_connection.
1655 * server.h (report_fork_events): Declare global flag.
1656 * target.h (struct target_ops) <handle_new_gdb_connection>:
1657 New member.
1658 (target_handle_new_gdb_connection): New macro.
1659 * win32-low.c: Initialize new structure member.
1660
ddcbc397
DB
16612015-05-12 Don Breazeal <donb@codesourcery.com>
1662
1663 * mem-break.c (APPEND_TO_LIST): Define macro.
1664 (clone_agent_expr): New function.
1665 (clone_one_breakpoint): New function.
1666 (clone_all_breakpoints): New function.
1667 * mem-break.h: Declare new functions.
1668
89245bc0
DB
16692015-05-12 Don Breazeal <donb@codesourcery.com>
1670
1671 * linux-low.c (linux_supports_fork_events): New function.
1672 (linux_supports_vfork_events): New function.
1673 (linux_target_ops): Initialize new structure members.
1674 (initialize_low): Call linux_check_ptrace_features.
1675 * lynx-low.c (lynx_target_ops): Initialize new structure
1676 members.
1677 * server.c (report_fork_events, report_vfork_events):
1678 New global flags.
1679 (handle_query): Add new features to qSupported packet and
1680 response.
1681 (captured_main): Initialize new global variables.
1682 * target.h (struct target_ops) <supports_fork_events>:
1683 New member.
1684 <supports_vfork_events>: New member.
1685 (target_supports_fork_events): New macro.
1686 (target_supports_vfork_events): New macro.
1687 * win32-low.c (win32_target_ops): Initialize new structure
1688 members.
1689
835205d0
GB
16902015-05-12 Gary Benson <gbenson@redhat.com>
1691
1692 * server.c (handle_qxfer_exec_file): Use current process
1693 if annex is empty.
1694
21e94bd9
SL
16952015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1696
1697 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1698 Remove HAVE_PTRACE_GETREGS conditionals.
1699 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1700 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1701
45614f15
YQ
17022015-05-08 Yao Qi <yao.qi@linaro.org>
1703
1704 * linux-low.c (linux_supports_conditional_breakpoints): New
1705 function.
1706 (linux_target_ops): Install new target method.
1707 * lynx-low.c (lynx_target_ops): Install NULL hook for
1708 supports_conditional_breakpoints.
1709 * nto-low.c (nto_target_ops): Likewise.
1710 * spu-low.c (spu_target_ops): Likewise.
1711 * win32-low.c (win32_target_ops): Likewise.
1712 * server.c (handle_query): Check
1713 target_supports_conditional_breakpoints.
1714 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1715 New field.
1716 (target_supports_conditional_breakpoints): New macro.
1717
80ad801e
PA
17182015-05-06 Pedro Alves <palves@redhat.com>
1719
1720 PR server/18081
1721 * server.c (start_inferior): If the process exits, mourn it.
1722
819843c7
GB
17232015-04-21 Gary Benson <gbenson@redhat.com>
1724
1725 * hostio.c (fileio_open_flags_to_host): Factored out to
1726 fileio_to_host_openflags in common/fileio.c. Single use
1727 updated.
1728
a2d5a9d7
MF
17292015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1730
1731 * linux-xtensa-low.c (xtensa_fill_gregset)
1732 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1733 XCHAL_HAVE_LOOP.
1734
deb44829
MF
17352015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1736
1737 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1738 (regs_info): Replace usrregs pointer with NULL.
1739
e57f1de3
GB
17402015-04-17 Gary Benson <gbenson@redhat.com>
1741
1742 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1743 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1744 * server.c (handle_qxfer_exec_file): New function.
1745 (qxfer_packets): Add exec-file entry.
1746 (handle_query): Report qXfer:exec-file:read as supported packet.
1747
62828379
RN
17482015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1749
1750 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1751
b88bb450
GB
17522015-04-09 Gary Benson <gbenson@redhat.com>
1753
1754 * hostio-errno.c (errno_to_fileio_error): Remove function.
1755 Update caller to use remote_fileio_to_fio_error.
1756
c8f4bfdd
YQ
17572015-04-09 Yao Qi <yao.qi@linaro.org>
1758
1759 * linux-low.c (linux_insert_point): Call
1760 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1761 (linux_remove_point): Call remove_memory_breakpoint if type is
1762 raw_bkpt_type_sw.
1763 * linux-x86-low.c (x86_insert_point): Don't call
1764 insert_memory_breakpoint.
1765 (x86_remove_point): Don't call remove_memory_breakpoint.
1766
41f98f02
PA
17672015-04-01 Pedro Alves <palves@redhat.com>
1768 Cleber Rosa <crosa@redhat.com>
1769
1770 * server.c (gdbserver_usage): Reorganize and extend the usage
1771 message.
1772
2bf6fb9d
PA
17732015-03-24 Pedro Alves <palves@redhat.com>
1774
1775 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1776 output. Also dump TRAP_TRACE.
1777 (linux_low_filter_event): In debug output, distinguish a
1778 resume_stop SIGSTOP from a delayed SIGSTOP.
1779
369f6daa
GB
17802015-03-24 Gary Benson <gbenson@redhat.com>
1781
1782 * linux-x86-low.c (x86_linux_new_thread): Moved to
1783 nat/x86-linux.c.
1784 (x86_linux_prepare_to_resume): Likewise.
1785
8e5d4070
GB
17862015-03-24 Gary Benson <gbenson@redhat.com>
1787
1788 * Makefile.in (x86-linux-dregs.o): New rule.
1789 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1790 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1791 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1792 (x86_linux_dr_get): Likewise.
1793 (x86_linux_dr_set): Likewise.
1794 (update_debug_registers_callback): Likewise.
1795 (x86_linux_dr_set_addr): Likewise.
1796 (x86_linux_dr_get_addr): Likewise.
1797 (x86_linux_dr_set_control): Likewise.
1798 (x86_linux_dr_get_control): Likewise.
1799 (x86_linux_dr_get_status): Likewise.
1800 (x86_linux_update_debug_registers): Likewise.
1801
2b95d440
GB
18022015-03-24 Gary Benson <gbenson@redhat.com>
1803
1804 * linux-x86-low.c (x86_linux_update_debug_registers):
1805 New function, factored out from...
1806 (x86_linux_prepare_to_resume): ...this.
1807
14b0bc68
GB
18082015-03-24 Gary Benson <gbenson@redhat.com>
1809
1810 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1811 (x86_linux_dr_set): Likewise.
1812 (update_debug_registers_callback): Likewise.
1813 (x86_linux_dr_set_addr): Likewise.
1814 (x86_linux_dr_get_addr): Likewise.
1815 (x86_linux_dr_set_control): Likewise.
1816 (x86_linux_dr_get_control): Likewise.
1817 (x86_linux_dr_get_status): Likewise.
1818 (x86_linux_prepare_to_resume): Likewise.
1819
5dfe6ca8
GB
18202015-03-24 Gary Benson <gbenson@redhat.com>
1821
1822 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1823 Use perror_with_name. Pass string through gettext.
1824 (x86_linux_dr_set): Likewise.
1825
d33472ad
GB
18262015-03-24 Gary Benson <gbenson@redhat.com>
1827
1828 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1829 (x86_linux_dr_set_addr): ...this.
1830 (x86_dr_low_get_addr): Rename to...
1831 (x86_linux_dr_get_addr): ...this.
1832 (x86_dr_low_set_control): Rename to...
1833 (x86_linux_dr_set_control): ...this.
1834 (x86_dr_low_get_control): Rename to...
1835 (x86_linux_dr_get_control): ...this.
1836 (x86_dr_low_get_status): Rename to...
1837 (x86_linux_dr_get_status): ...this.
1838 (x86_dr_low): Update with new function names.
1839
4b134ca1
GB
18402015-03-24 Gary Benson <gbenson@redhat.com>
1841
1842 * Makefile.in (x86-linux.o): New rule.
1843 * configure.srv: Add x86-linux.o to relevant targets.
1844 * linux-low.c (lwp_set_arch_private_info): New function.
1845 (lwp_arch_private_info): Likewise.
1846 * linux-x86-low.c: Include nat/x86-linux.h.
1847 (arch_lwp_info): Removed structure.
1848 (update_debug_registers_callback):
1849 Use lwp_set_debug_registers_changed.
1850 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1851 and lwp_set_debug_registers_changed.
1852 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1853
34c703da
GB
18542015-03-24 Gary Benson <gbenson@redhat.com>
1855
1856 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1857 * linux-arm-low.c (arm_new_thread): Likewise.
1858 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1859 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1860 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1861 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1862
cff068da
GB
18632015-03-24 Gary Benson <gbenson@redhat.com>
1864
1865 * linux-low.c (ptid_of_lwp): New function.
1866 (lwp_is_stopped): Likewise.
1867 (lwp_stop_reason): Likewise.
1868 * linux-x86-low.c (update_debug_registers_callback):
1869 Use lwp_is_stopped.
1870 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1871 lwp_stop_reason.
1872
b2f7c7e8
GB
18732015-03-24 Gary Benson <gbenson@redhat.com>
1874
1875 * linux-low.h (linux_stop_lwp): Remove declaration.
1876
6d4ee8c6
GB
18772015-03-24 Gary Benson <gbenson@redhat.com>
1878
1879 * linux-low.h: Include nat/linux-nat.h.
1880 * linux-low.c (iterate_over_lwps_args): New structure.
1881 (iterate_over_lwps_filter): New function.
1882 (iterate_over_lwps): Likewise.
1883 * linux-x86-low.c (update_debug_registers_callback):
1884 Update signature to what iterate_over_lwps expects.
1885 Remove PID check that iterate_over_lwps now performs.
1886 (x86_dr_low_set_addr): Use iterate_over_lwps.
1887 (x86_dr_low_set_control): Likewise.
1888
70a0bb6b
GB
18892015-03-24 Gary Benson <gbenson@redhat.com>
1890
1891 * linux-x86-low.c (x86_debug_reg_state): New function.
1892 (x86_linux_prepare_to_resume): Use the above.
1893
7b669087
GB
18942015-03-24 Gary Benson <gbenson@redhat.com>
1895
1896 * linux-low.c (current_lwp_ptid): New function.
1897 * linux-x86-low.c: Include nat/linux-nat.h.
1898 (x86_dr_low_get_addr): Use current_lwp_ptid.
1899 (x86_dr_low_get_control): Likewise.
1900 (x86_dr_low_get_status): Likewise.
1901
eef49a3d
PA
19022015-03-20 Pedro Alves <palves@redhat.com>
1903
1904 * tracepoint.c (cmd_qtstatus): Make "str" const.
1905
b2333d22
PA
19062015-03-20 Pedro Alves <palves@redhat.com>
1907
1908 * server.c (handle_general_set): Make "req_str" const.
1909
23f238d3
PA
19102015-03-19 Pedro Alves <palves@redhat.com>
1911
1912 * linux-low.c (linux_resume_one_lwp): Rename to ...
1913 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1914 instead call perror_with_name.
1915 (check_ptrace_stopped_lwp_gone): New function.
1916 (linux_resume_one_lwp): Reimplement as wrapper around
1917 linux_resume_one_lwp_throw that swallows errors if the LWP is
1918 gone.
1919
91baf43f
PA
19202015-03-19 Pedro Alves <palves@redhat.com>
1921
1922 * linux-low.c (count_events_callback, select_event_lwp_callback):
1923 No longer check whether the thread has resume_stop as last resume
1924 kind.
1925
8bf3b159
PA
19262015-03-19 Pedro Alves <palves@redhat.com>
1927
1928 * linux-low.c (count_events_callback, select_event_lwp_callback):
1929 Use the lwp's status_pending_p field, not the thread's.
1930
b90fc188
PA
19312015-03-19 Pedro Alves <palves@redhat.com>
1932
1933 * linux-low.c (select_event_lwp_callback): Update comments to
1934 no longer mention SIGTRAP.
1935
464b0089
GB
19362015-03-18 Gary Benson <gbenson@redhat.com>
1937
1938 * server.c (handle_query): Do not report vFile:fstat as supported.
1939
aa9e327f
GB
19402015-03-11 Gary Benson <gbenson@redhat.com>
1941
1942 * hostio.c (sys/types.h): New include.
1943 (sys/stat.h): Likewise.
1944 (common-remote-fileio.h): Likewise.
1945 (handle_fstat): New function.
1946 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 1947
791c0056
GB
19482015-03-11 Gary Benson <gbenson@redhat.com>
1949
1950 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1951 struct stat.st_blocks and struct stat.st_blksize.
1952 * configure: Regenerate.
1953 * config.in: Likewise.
1954 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1955 (OBS): Add common-remote-fileio.o.
1956 (common-remote-fileio.o): New rule.
1957
9a9df970
PA
19582015-03-09 Pedro Alves <palves@redhat.com>
1959
1960 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1961 'struct sockaddr' pointer in 'accept' call.
1962
9eb1356e
PA
19632015-03-09 Pedro Alves <palves@redhat.com>
1964
1965 Revert:
1966 2015-03-07 Pedro Alves <palves@redhat.com>
1967 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1968 or <winsock2.h> here. Instead include "gdb_socket.h".
1969 (remote_open): Use union gdb_sockaddr_u.
1970 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1971 or <winsock2.h> here. Instead include "gdb_socket.h".
1972 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1973 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1974 or <sys/un.h>.
1975 (init_named_socket, gdb_agent_helper_thread): Use union
1976 gdb_sockaddr_u.
1977
aac331e4
PA
19782015-03-07 Pedro Alves <palves@redhat.com>
1979
1980 * configure.ac (build_warnings): Move
1981 -Wdeclaration-after-statement to the C-specific set.
1982 * configure: Regenerate.
1983
366c75fc
PA
19842015-03-07 Pedro Alves <palves@redhat.com>
1985
1986 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1987 or <winsock2.h> here. Instead include "gdb_socket.h".
1988 (remote_open): Use union gdb_sockaddr_u.
1989 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1990 or <winsock2.h> here. Instead include "gdb_socket.h".
1991 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1992 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1993 or <sys/un.h>.
1994 (init_named_socket, gdb_agent_helper_thread): Use union
1995 gdb_sockaddr_u.
1996
492d29ea
PA
19972015-03-07 Pedro Alves <palves@redhat.com>
1998
1999 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2000 instead.
2001
60a191ed
YQ
20022015-03-06 Yao Qi <yao.qi@linaro.org>
2003
2004 * linux-aarch64-low.c (aarch64_insert_point): Use
2005 show_debug_regs as a boolean.
2006 (aarch64_remove_point): Likewise.
2007
f5771b1d
PA
20082015-03-05 Pedro Alves <palves@redhat.com>
2009
2010 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2011 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2012 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2013 * nto-low.c (nto_target_ops): Likewise.
2014 * spu-low.c (spu_target_ops): Likewise.
2015 * win32-low.c (win32_target_ops): Likewise.
2016
3e572f71
PA
20172015-03-04 Pedro Alves <palves@redhat.com>
2018
72f4393d 2019 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
2020 Decide whether a breakpoint triggered based on the SIGTRAP's
2021 siginfo.si_code.
72f4393d
L
2022 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2023 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
2024 (linux_low_filter_event): Check for breakpoints before checking
2025 watchpoints.
2026 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2027 siginfo.si_code.
72f4393d
L
2028 (linux_stopped_by_sw_breakpoint)
2029 (linux_supports_stopped_by_sw_breakpoint)
2030 (linux_stopped_by_hw_breakpoint)
2031 (linux_supports_stopped_by_hw_breakpoint): New functions.
2032 (linux_target_ops): Install new target methods.
3e572f71 2033
1ec68e26
PA
20342015-03-04 Pedro Alves <palves@redhat.com>
2035
2036 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2037 * server.c (swbreak_feature, hwbreak_feature): New globals.
2038 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2039 (captured_main): Clear swbreak_feature and hwbreak_feature.
2040 * server.h (swbreak_feature, hwbreak_feature): Declare.
2041 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2042 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2043 supports_stopped_by_hw_breakpoint>: New fields.
2044 (target_supports_stopped_by_sw_breakpoint)
2045 (target_stopped_by_sw_breakpoint)
2046 (target_supports_stopped_by_hw_breakpoint)
2047 (target_stopped_by_hw_breakpoint): Declare.
2048
15c66dd6
PA
20492015-03-04 Pedro Alves <palves@redhat.com>
2050
2051 enum lwp_stop_reason -> enum target_stop_reason
2052 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2053 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2054 (linux_wait_1, stuck_in_jump_pad_callback)
2055 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2056 (linux_stopped_by_watchpoint):
2057 * linux-low.h (enum lwp_stop_reason): Delete.
2058 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2059 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2060
98fc70d6
YQ
20612015-03-04 Yao Qi <yao.qi@linaro.org>
2062
2063 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2064
dd2ac174
GB
20652015-03-03 Gary Benson <gbenson@redhat.com>
2066
2067 * hostio.c (handle_vFile): Fix prefix lengths.
2068
d68e53f4
MM
20692015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2070
2071 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2072 ptr_bits.
2073
bf2d68ab
AA
20742015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2075
2076 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2077 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2078 (clean): Add "rm -f" for above C files.
2079 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2080 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2081 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2082 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2083 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2084 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2085 (init_registers_s390x_vx_linux64)
2086 (init_registers_s390x_tevx_linux64)
2087 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2088 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2089 declarations.
2090 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2091 (s390_store_vxrs_high): New functions.
2092 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2093 NT_S390_VXRS_HIGH.
2094 (s390_arch_setup): Add logic for selecting one of the new target
2095 descriptions. Activate the new vector regsets if applicable.
2096 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2097 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2098 and init_registers_s390x_tevx_linux64.
2099
c966a859
PA
21002015-03-01 Pedro Alves <palves@redhat.com>
2101
2102 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2103 parameter.
2104
4180215b
PA
21052015-02-27 Pedro Alves <palves@redhat.com>
2106
2107 * linux-x86-low.c (u_debugreg_offset): New function.
2108 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2109
749bab01
PA
21102015-02-27 Pedro Alves <palves@redhat.com>
2111
2112 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2113 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2114 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2115 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2116 (ps_lsetfpregs, ps_getpid)
2117 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2118 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2119 (ps_lsetxregs, ps_plog): Declare.
2120
3c14e5a3
PA
21212015-02-27 Pedro Alves <palves@redhat.com>
2122
2123 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2124 IP_AGENT_EXPORT_FUNC.
2125 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2126 IP_AGENT_EXPORT_FUNC.
2127 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2128 (IP_AGENT_EXPORT): Delete.
2129 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2130 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2131 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2132 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2133 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2134 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2135 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2136 (traceframe_read_count, traceframe_write_count)
2137 (traceframes_created, trace_state_variables, get_raw_reg)
2138 (get_trace_state_variable_value, set_trace_state_variable_value)
2139 (ust_loaded, helper_thread_id, cmd_buf): Use
2140 IPA_SYM_EXPORTED_NAME.
2141 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2142 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2143 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2144 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2145 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2146 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2147 EXTERN_C_PUSH/EXTERN_C_POP.
2148 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2149 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2150 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2151 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2152 (traceframe_write_count, traceframe_read_count)
2153 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2154 (about_to_request_buffer_space, get_trace_state_variable_value)
2155 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2156 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2157 EXTERN_C_PUSH/EXTERN_C_POP.
2158 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2159 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2160 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2161 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2162 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2163 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2164 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2165 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2166 Define.
2167 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2168 (IP_AGENT_EXPORT_VAR_DECL): Define.
2169 (tracing): Declare.
2170 (gdb_agent_get_raw_reg): Declare.
2171
fe978cb0
PA
21722015-02-27 Tom Tromey <tromey@redhat.com>
2173 Pedro Alves <palves@redhat.com>
2174
2175 Rename symbols whose names are reserved C++ keywords throughout.
2176
3bc3d82a
PA
21772015-02-27 Pedro Alves <palves@redhat.com>
2178
2179 * Makefile.in (COMPILER): New, get it from autoconf.
2180 (CXX): Get from autoconf instead.
2181 (COMPILE.pre): Use COMPILER.
2182 (CC-LD): Rename to ...
2183 (CC_LD): ... this. Use COMPILER.
2184 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2185 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2186 * acinclude.m4: Include build-with-cxx.m4.
2187 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2188 Disable -Werror by default if building in C++ mode.
2189 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2190 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2191 the C++ compiler. Save/restore CXXFLAGS too.
2192 * configure: Regenerate.
2193
07697489
PA
21942015-02-27 Pedro Alves <palves@redhat.com>
2195
2196 * acinclude.m4: Include libiberty.m4.
2197 * configure.ac: Call libiberty_INIT.
2198 * config.in, configure: Regenerate.
2199
9beb7c4e
PA
22002015-02-26 Pedro Alves <palves@redhat.com>
2201
2202 * linux-low.c (linux_wait_1): When incrementing the PC past a
2203 program breakpoint always use the_low_target.breakpoint_len as
2204 increment, rather than the maximum between that and
2205 the_low_target.decr_pc_after_break.
2206
8090aef2
PA
22072015-02-23 Pedro Alves <palves@redhat.com>
2208
2209 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2210 thread was doing a step-over; always adjust the PC if
2211 we stepped over a permanent breakpoint.
2212 (linux_wait_1): If we stepped over breakpoint that was on top of a
2213 permanent breakpoint, manually advance the PC past it.
2214
bc9540e8
PA
22152015-02-23 Pedro Alves <palves@redhat.com>
2216
2217 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2218 modes.
2219 (x86_fill_gregset, x86_store_gregset): Use it when handling
2220 $orig_eax.
2221
2db9a427
PA
22222015-02-20 Pedro Alves <palves@redhat.com>
2223
2224 * thread-db.c: Include "nat/linux-procfs.h".
2225 (thread_db_init): Skip listing new threads if the kernel supports
2226 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2227
afa8d396
PA
22282015-02-20 Pedro Alves <palves@redhat.com>
2229
2230 * linux-low.c (status_pending_p_callback): Use ptid_match.
2231
c9587f88
AT
22322015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2233
2234 PR breakpoints/16812
2235 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2236 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2237 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2238
b05ec7a5
AT
22392015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2240
2241 PR breakpoints/15956
2242 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2243
d33501a5
MM
22442015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2245
2246 * linux-low.c (linux_low_btrace_conf): Print size.
2247 * server.c (handle_btrace_conf_general_set): New.
2248 (hanle_general_set): Call handle_btrace_conf_general_set.
2249 (handle_query): Report Qbtrace-conf:bts:size as supported.
2250
f4abbc16
MM
22512015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2252
2253 * linux-low.c (linux_low_enable_btrace): Update parameters.
2254 (linux_low_btrace_conf): New.
2255 (linux_target_ops)<to_btrace_conf>: Initialize.
2256 * server.c (current_btrace_conf): New.
2257 (handle_btrace_enable): Rename to ...
2258 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2259 to target_enable_btrace. Update comment. Update users.
2260 (handle_qxfer_btrace_conf): New.
2261 (qxfer_packets): Add btrace-conf entry.
2262 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2263 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2264 (target_ops)<read_btrace_conf>: New.
2265 (target_enable_btrace): Update parameters.
2266 (target_read_btrace_conf): New.
2267
043c3577
MM
22682015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2269
2270 * server.c (handle_btrace_general_set): Remove call to
2271 target_supports_btrace.
2272 (supported_btrace_packets): New.
2273 (handle_query): Call supported_btrace_packets.
2274 * target.h: include btrace-common.h.
2275 (btrace_target_info): Removed.
2276 (supports_btrace, target_supports_btrace): Update parameters.
2277
734b0e4b
MM
22782015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2279
2280 * Makefile.in (SFILES): Add common/btrace-common.c.
2281 (OBS): Add common/btrace-common.o.
2282 (btrace-common.o): Add build rules.
2283 * linux-low: Include btrace-common.h.
2284 (linux_low_read_btrace): Use struct btrace_data. Call
2285 btrace_data_init and btrace_data_fini.
2286
d6c146e9
PA
22872015-02-06 Pedro Alves <palves@redhat.com>
2288
2289 * thread-db.c (find_new_threads_callback): Add debug output.
2290
20ba1ce6
PA
22912015-02-04 Pedro Alves <palves@redhat.com>
2292
2293 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2294 (resume_stopped_resumed_lwps): New function.
2295 (linux_wait_for_event_filtered): Use it.
2296
8cc73a39
SDJ
22972015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2298
2299 * Makefile.in (SFILES): Add linux-personality.c.
2300 (linux-personality.o): New rule.
2301 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2302 list of objects to be built.
2303 * linux-low.c: Include nat/linux-personality.h.
2304 (linux_create_inferior): Remove code to disable address space
2305 randomization (moved to ../nat/linux-personality.c). Create
2306 cleanup to disable address space randomization.
2307
fb23d554
SDJ
23082015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2309
2310 * Makefile.in (posix-strerror.o): New rule.
2311 (mingw-strerror.o): Likewise.
2312 * configure: Regenerated.
2313 * configure.ac: Source file ../common/common.host. Initialize new
2314 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2315
cdf43629
YQ
23162015-01-14 Yao Qi <yao@codesourcery.com>
2317
2318 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2319 (ppc-linux.o): New rule.
2320 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2321 * configure.ac: AC_CHECK_FUNCS(getauxval).
2322 * config.in: Re-generated.
2323 * configure: Re-generated.
2324 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2325 ppc64_64bit_inferior_p
2326
514c5338
YQ
23272015-01-14 Yao Qi <yao@codesourcery.com>
2328
2329 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2330 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2331 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2332 (PT_ORIG_R3, PT_TRAP): Likewise.
2333 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2334 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2335 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2336
3368c1e5
JB
23372015-01-10 Joel Brobecker <brobecker@adacore.com>
2338
2339 * i387-fp.c (i387_cache_to_xsave): In look over
2340 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2341 zmmh_low_space field by use of zmmh_high_space.
2342
582511be
PA
23432015-01-09 Pedro Alves <palves@redhat.com>
2344
2345 * linux-low.c (step_over_bkpt): Move higher up in the file.
2346 (handle_extended_wait): Don't store the stop_pc here.
2347 (get_stop_pc): Adjust comments and rename to ...
2348 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2349 stopped for a software breakpoint or hardware breakpoint.
2350 (thread_still_has_status_pending_p): New function.
2351 (status_pending_p_callback): Use
2352 thread_still_has_status_pending_p. If the event is no longer
2353 interesting, resume the LWP.
2354 (handle_tracepoints): Add assert.
2355 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2356 (wstatus_maybe_breakpoint): New function.
2357 (cancel_breakpoint): Delete function.
2358 (check_stopped_by_watchpoint): New function, factored out from
2359 linux_low_filter_event.
2360 (lp_status_maybe_breakpoint): Delete function.
2361 (linux_low_filter_event): Remove filter_ptid argument.
2362 Leave thread group exits pending here. Store the LWP's stop PC.
2363 Always leave events pending.
2364 (linux_wait_for_event_filtered): Pull all events out of the
2365 kernel, and leave them all pending.
2366 (count_events_callback, select_event_lwp_callback): Consider all
2367 events.
2368 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2369 (select_event_lwp): Only give preference to the stepping LWP in
2370 all-stop mode. Adjust comments.
2371 (ignore_event): New function.
2372 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2373 references to cancel_breakpoints. Adjust to renames. Also give
2374 equal priority to all LWPs that have had events in non-stop mode.
2375 If reporting a software breakpoint event, unadjust the LWP's PC.
2376 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2377 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2378 Adjust.
2379 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2380 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2381 (linux_stopped_by_watchpoint): Adjust.
2382 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2383 * linux-low.h (enum lwp_stop_reason): New.
2384 (struct lwp_info) <stop_pc>: Adjust comment.
2385 <stopped_by_watchpoint>: Delete field.
2386 <stop_reason>: New field.
2387 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2388 * mem-break.c (software_breakpoint_inserted_here)
2389 (hardware_breakpoint_inserted_here): New function.
2390 * mem-break.h (software_breakpoint_inserted_here)
2391 (hardware_breakpoint_inserted_here): Declare.
2392 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2393 (cancel_breakpoints): Delete.
2394 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2395 (upload_fast_traceframes): Remove references to
2396 cancel_breakpoints.
2397
a33e3959
PA
23982015-01-09 Pedro Alves <palves@redhat.com>
2399
2400 * thread-db.c (find_new_threads_callback): Ignore thread if the
2401 kernel thread ID is -1.
2402
8784d563
PA
24032015-01-09 Pedro Alves <palves@redhat.com>
2404
2405 * linux-low.c (linux_attach_fail_reason_string): Move to
2406 nat/linux-ptrace.c, and rename.
2407 (linux_attach_lwp): Update comment.
2408 (attach_proc_task_lwp_callback): New function.
2409 (linux_attach): Adjust to rename and use
2410 linux_proc_attach_tgid_threads.
2411 (linux_attach_fail_reason_string): Delete declaration.
2412
76f2b779
JB
24132015-01-01 Joel Brobecker <brobecker@adacore.com>
2414
2415 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2416 * server.c (gdbserver_version): Likewise.
2417
fafcc06a
SDJ
24182014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2419
2420 * remote-utils.c: Include ctype.h.
2421 (input_interrupt): Explicitly handle the case when the char
2422 received is the NUL byte. Improve the printing of non-ASCII
2423 characters.
2424
beed38b8
JB
24252014-12-16 Joel Brobecker <brobecker@adacore.com>
2426
2427 * linux-low.c (linux_low_filter_event): Update call to
2428 linux_enable_event_reporting following the addition of
2429 a new parameter to that function.
2430
bf330350
CU
24312014-12-16 Catalin Udma <catalin.udma@freescale.com>
2432
2433 PR server/17457
2434 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2435 (AARCH64_FPCR_REGNO): Likewise.
2436 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2437 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2438 (aarch64_store_fpregset): Likewise.
2439
5227d625
JB
24402014-12-15 Joel Brobecker <brobecker@adacore.com>
2441
2442 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2443 Remove FIXME comment about assumption about N.
2444
f93b65a0
JB
24452014-12-13 Joel Brobecker <brobecker@adacore.com>
2446
2447 * configure.ac: If large-file support is disabled in GDBserver,
2448 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2449 * configure: Regenerate.
2450
e5a9158d
AA
24512014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2452
2453 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2454 warning upon ENODATA from ptrace.
2455 * linux-s390-low.c (s390_store_tdb): New.
2456 (s390_regsets): Add regset for NT_S390_TDB.
2457
feea5f36
AA
24582014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2459
2460 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2461 without a fill_function.
2462 * linux-s390-low.c (s390_fill_last_break): Remove.
2463 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2464 (s390_arch_setup): Use regset's size instead of fill_function for
2465 loop end condition.
2466
098dbe61
AA
24672014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2468
2469 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2470 the regset's store function when ptrace returned an error.
2471 * regcache.c (get_thread_regcache): Invalidate register cache
2472 before fetching inferior's registers.
2473
28eef672
AA
24742014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2475
2476 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2477 while-loop as for-loop.
2478 (regsets_store_inferior_registers): Likewise.
2479
bdca27a2
YQ
24802014-11-28 Yao Qi <yao@codesourcery.com>
2481
2482 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2483 * config.in, configure: Re-generate.
2484 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2485 is defined.
2486
9c232dda
YQ
24872014-11-21 Yao Qi <yao@codesourcery.com>
2488
2489 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2490 (AC_CHECK_HEADERS): Remove malloc.h.
2491 * configure: Re-generated.
2492 * config.in: Re-generated.
2493 * server.h: Don't include alloca.h and malloc.h.
2494 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2495 Don't include malloc.h.
2496
43968415
JB
24972014-11-17 Joel Brobecker <brobecker@adacore.com>
2498
2499 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2500 corresponding ERRNO check in same block.
2501
40e91bc7
PA
25022014-11-12 Pedro Alves <palves@redhat.com>
2503
2504 * server.c (cont_thread): Update comment.
2505 (start_inferior, attach_inferior): No longer clear cont_thread.
2506 (handle_v_cont): No longer set cont_thread.
2507 (captured_main): Clear cont_thread each time a GDB connects.
2508
c2c118cf
PA
25092014-11-12 Pedro Alves <palves@redhat.com>
2510
2511 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2512 thread, and don't resume all threads if the Hc thread has exited.
2513
78708b7c
PA
25142014-11-12 Pedro Alves <palves@redhat.com>
2515
2516 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2517 the process group instead of to a specific LWP.
2518
a2abc7de
PA
25192014-10-15 Pedro Alves <palves@redhat.com>
2520
2521 PR server/17487
2522 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2523 parameter.
2524 (arm_set_thread_context): Delete.
2525 (the_low_target): Adjust.
2526 * win32-i386-low.c (debug_registers_changed)
2527 (debug_registers_used): Delete.
2528 (update_debug_registers_callback): New function.
2529 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2530 needing to update their debug registers.
2531 (win32_get_current_dr): New function.
2532 (x86_dr_low_get_addr, x86_dr_low_get_control)
2533 (x86_dr_low_get_status): Fetch the debug register from the thread
2534 record's context.
2535 (i386_initial_stuff): Adjust.
2536 (i386_get_thread_context): Remove current_event parameter. Don't
2537 clear debug_registers_changed nor copy DR values to
2538 debug_reg_state.
2539 (i386_set_thread_context): Delete.
2540 (i386_prepare_to_resume): New function.
2541 (i386_thread_added): Mark the thread as needing to update irs
2542 debug registers.
2543 (the_low_target): Remove i386_set_thread_context and install
2544 i386_prepare_to_resume.
2545 * win32-low.c (win32_get_thread_context): Adjust.
2546 (win32_set_thread_context): Use SetThreadContext
2547 directly.
2548 (win32_prepare_to_resume): New function.
2549 (win32_require_context): New function, factored out from ...
2550 (thread_rec): ... this.
2551 (continue_one_thread): Call win32_prepare_to_resume on each thread
2552 we're about to continue.
2553 (win32_resume): Call win32_prepare_to_resume on the event thread.
2554 * win32-low.h (struct win32_thread_info)
2555 <debug_registers_changed>: New field.
2556 (struct win32_target_ops): Change prototype of set_thread_context,
2557 delete set_thread_context and add prepare_to_resume.
2558 (win32_require_context): New declaration.
2559
a442d071
GB
25602014-10-08 Gary Benson <gbenson@redhat.com>
2561
2562 * server.h: Do not include common-exceptions.h.
2563
6f1947e8
GB
25642014-10-08 Gary Benson <gbenson@redhat.com>
2565
2566 * server.h: Do not include cleanups.h.
2567
63b434a4
JH
25682014-09-30 James Hogan <james.hogan@imgtec.com>
2569
2570 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2571 mips64-dsp-linux.c.
2572
c4d9ceb6
YQ
25732014-09-23 Yao Qi <yao@codesourcery.com>
2574
2575 * linux-low.c (lp_status_maybe_breakpoint): New function.
2576 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2577 (count_events_callback): Likewise.
2578 (select_event_lwp_callback): Likewise.
2579 (cancel_breakpoints_callback): Likewise.
2580
89a5711c
DB
25812014-09-19 Don Breazeal <donb@codesourcery.com>
2582
2583 * linux-low.c (handle_extended_wait): Call
2584 linux_ptrace_get_extended_event.
2585 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2586 linux_is_extended_waitstatus.
2587
bffc0964
JB
25882014-09-16 Joel Brobecker <brobecker@adacore.com>
2589
2590 * Makefile.in (CPPFLAGS): Define.
2591 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2592 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2593
0bfdf32f
GB
25942014-09-16 Gary Benson <gbenson@redhat.com>
2595
2596 * inferiors.h (current_inferior): Renamed as...
2597 (current_thread): New variable. All uses updated.
2598 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2599 (maybe_move_out_of_jump_pad): Likewise.
2600 (cancel_breakpoint): Likewise.
2601 (linux_low_filter_event): Likewise.
2602 (wait_for_sigstop): Likewise.
2603 (linux_resume_one_lwp): Likewise.
2604 (need_step_over_p): Likewise.
2605 (start_step_over): Likewise.
2606 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2607 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2608 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2609 and save_inferior as saved_thread.
2610 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2611 saved_thread.
2612 (regcache_invalidate_thread): Likewise.
2613 * remote-utils.c (prepare_resume_reply): Likewise.
2614 * thread-db.c (thread_db_get_tls_address): Likewise.
2615 (disable_thread_event_reporting): Likewise.
2616 (remove_thread_event_breakpoints): Likewise.
2617 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2618 as saved_thread.
2619 * target.h (set_desired_inferior): Renamed as...
2620 (set_desired_thread): New declaration. All uses updated.
2621 * server.c (myresume): Updated comment to reference thread instead
2622 of inferior.
2623 (handle_serial_event): Likewise.
2624 (handle_target_event): Likewise.
2625
361c8ade
GB
26262014-09-12 Tom Tromey <tromey@redhat.com>
2627 Gary Benson <gbenson@redhat.com>
2628
2629 * regcache.h: Include common-regcache.h.
2630 (regcache_read_pc): Don't declare.
2631 * regcache.c (get_thread_regcache_for_ptid): New function.
2632
bd9269f7
GB
26332014-09-11 Tom Tromey <tromey@redhat.com>
2634 Gary Benson <gbenson@redhat.com>
2635
2636 * symbol.c: New file.
2637 * Makefile.in (SFILES): Add symbol.c.
2638 (OBS): Add symbol.o.
2639
f8c1d06b
GB
26402014-09-11 Gary Benson <gbenson@redhat.com>
2641
2642 * target.c (target_stop_ptid, target_continue_ptid): New
2643 functions.
2644
721ec300
GB
26452014-09-11 Tom Tromey <tromey@redhat.com>
2646 Gary Benson <gbenson@redhat.com>
2647
2648 * target.h: Include target/target.h.
2649 * target.c (target_read_memory, target_read_uint32)
2650 (target_write_memory): New functions.
2651
c5e92cca
GB
26522014-09-11 Gary Benson <gbenson@redhat.com>
2653
2654 * server.h (debug_hw_points): Don't declare.
2655 * server.c (debug_hw_points): Don't define. Replace all uses
2656 with show_debug_regs.
2657 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2658 all uses with show_debug_regs.
2659
2e4bb98a
EBM
26602014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2661
2662 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2663 endianness into account.
2664 (ppc_supply_ptrace_register): Likewise.
2665
ac740bc7
JH
26662014-09-03 James Hogan <james.hogan@imgtec.com>
2667
2668 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2669 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2670
97ea6506
GB
26712014-09-03 Gary Benson <gbenson@redhat.com>
2672
2673 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2674 ALL_DEBUG_ADDRESS_REGISTERS.
2675
df7e5265
GB
26762014-09-02 Gary Benson <gbenson@redhat.com>
2677
2678 * i386-low.h: Renamed as...
2679 * x86-low.h: New file. All type, function and variable name
2680 prefixes changed from "i386_" to "x86_". All references updated.
2681 * i386-low.c: Renamed as...
2682 * x86-low.c: New file. All type, function and variable name
2683 prefixes changed from "i386_" to "x86_". All references updated.
2684
ed859da7
GB
26852014-09-02 Gary Benson <gbenson@redhat.com>
2686
2687 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2688 (x86_linux_new_thread): Likewise.
2689
860789c7
GB
26902014-08-29 Gary Benson <gbenson@redhat.com>
2691
2692 * server.h (setjmp.h): Do not include.
2693 (toplevel): Do not declare.
2694 (common-exceptions.h): Include.
2695 (cleanups.h): Likewise.
2696 * server.c (toplevel): Do not define.
2697 (exit_code): New static global.
2698 (detach_or_kill_for_exit_cleanup): New function.
2699 (main): New function. Original main renamed to...
2700 (captured_main): New function.
2701 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2702
ff55e1b5
GB
27032014-08-29 Gary Benson <gbenson@redhat.com>
2704
2705 * Makefile.in (SFILES): Add common/common-exceptions.c.
2706 (OBS): Add common-exceptions.o.
2707 (common-exceptions.o): New rule.
2708 * utils.c (prepare_to_throw_exception): New function.
2709
e9bcb658
GB
27102014-08-29 Gary Benson <gbenson@redhat.com>
2711
2712 * config.in: Regenerate.
2713 * configure: Likewise.
2714
e3180625
GB
27152014-08-29 Gary Benson <gbenson@redhat.com>
2716
2717 * Makefile.in (SFILES): Add common/cleanups.c.
2718 (OBS): cleanups.o.
2719 (cleanups.o): New rule.
2720
e3d6ba5d
GB
27212014-08-29 Gary Benson <gbenson@redhat.com>
2722
2723 * utils.c (internal_vwarning): New function.
2724
7096e886
GB
27252014-08-28 Gary Benson <gbenson@redhat.com>
2726
2727 * utils.h (fatal): Remove declaration.
2728 * utils.c (fatal): Remove function.
2729
14ce3192
GB
27302014-08-28 Gary Benson <gbenson@redhat.com>
2731
2732 * tracepoint.c (gdb_agent_init): Replace fatal with
2733 perror_with_name.
2734 (initialize_tracepoint): Likewise.
2735
50278d59
GB
27362014-08-28 Gary Benson <gbenson@redhat.com>
2737
2738 * remote-utils.c (remote_prepare): Replace fatal with error.
2739
aa96c426
GB
27402014-08-28 Gary Benson <gbenson@redhat.com>
2741
2742 * linux-low.c (linux_async): Replace fatal with warning.
2743 Tidy up and return.
2744 (linux_start_non_stop): Return -1 if linux_async failed.
2745
f7160e97
GB
27462014-08-28 Gary Benson <gbenson@redhat.com>
2747
2748 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2749 gdb_assert.
2750 (i386_dr_low_get_addr): Remove vague comment.
2751 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2752 gdb_assert.
2753
38e08fca
GB
27542014-08-28 Gary Benson <gbenson@redhat.com>
2755
2756 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2757 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2758 internal_error.
2759 (linux_resume_one_lwp): Likewise.
2760 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2761 gdb_assert.
2762 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2763 with internal_error.
2764 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2765 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2766 (find_register_by_name): Replace fatal with internal_error.
2767 (find_regno): Likewise.
2768 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2769 * thread-db.c (thread_db_create_event): Likewise.
2770 (thread_db_load_search): Likewise.
2771 (try_thread_db_load_1): Likewise.
2772 * tracepoint.c (get_jump_space_head): Replace fatal with
2773 internal_error.
2774 (claim_trampoline_space): Likewise.
2775 (have_fast_tracepoint_trampoline_buffer): Likewise.
2776 (cmd_qtstart): Likewise.
2777 (stop_tracing): Likewise.
2778 (fast_tracepoint_collecting): Likewise.
2779 (target_malloc): Likewise.
2780 (download_tracepoint): Likewise.
2781 (download_trace_state_variables): Replace check with gdb_assert.
2782 (upload_fast_traceframes): Replace fatal with internal_error.
2783
34abf635
GB
27842014-08-19 Tom Tromey <tromey@redhat.com>
2785 Gary Benson <gbenson@redhat.com>
2786
2787 * Makefile.in (SFILES): Add common/common-debug.c.
2788 (OBS): Add common-debug.o.
2789 (common-debug.o): New rule.
2790 * debug.h (debug_printf): Don't declare.
2791 * debug.c (debug_printf): Renamed and rewritten as...
2792 (debug_vprintf): New function.
2793
f6e94d78
GB
27942014-08-19 Gary Benson <gbenson@redhat.com>
2795
2796 * utils.h: Do not include print-utils.h.
2797
9239eeab
GB
27982014-08-19 Tom Tromey <tromey@redhat.com>
2799 Gary Benson <gbenson@redhat.com>
2800
2801 * server.h: Add static assertion.
2802 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2803
ef87c8bb
GB
28042014-08-19 Tom Tromey <tromey@redhat.com>
2805 Gary Benson <gbenson@redhat.com>
2806
2807 * Makefile.in (SFILES): Add common/errors.c.
2808 (OBS): Add errors.o.
2809 (IPA_OBS): Add errors-ipa.o.
2810 (errors.o): New rule.
2811 (errors-ipa.o): Likewise.
2812 * utils.h (perror_with_name, error, warning): Don't declare.
2813 * utils.c (warning): Renamed and rewritten as...
2814 (vwarning): New function.
2815 (error): Renamed and rewritten as...
2816 (verror): New function.
2817 (internal_error): Renamed and rewritten as...
2818 (internal_verror): New function.
2819
bb974a24
GB
28202014-08-07 Gary Benson <gbenson@redhat.com>
2821
2822 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2823 * configure: Regenerate.
2824 * config.in: Likewise.
2825 * server.h: Do not include errno.h.
2826 * event-loop.c: Likewise.
2827 * hostio-errno.c: Likewise.
2828 * linux-low.c: Likewise.
2829 * remote-utils.c: Likewise.
2830 * spu-low.c: Likewise.
2831 * utils.c: Likewise.
2832 * gdbreplay.c: Unconditionally include errno.h.
2833
6d3d12eb
GB
28342014-08-07 Gary Benson <gbenson@redhat.com>
2835
2836 * server.h: Do not include string.h.
2837 * event-loop.c: Likewise.
2838 * linux-low.c: Likewise.
2839 * regcache.c: Likewise.
2840 * remote-utils.c: Likewise.
2841 * spu-low.c: Likewise.
2842 * utils.c: Likewise.
2843
dccbb609
GB
28442014-08-07 Gary Benson <gbenson@redhat.com>
2845
2846 * server.h: Do not include gdb_assert.h.
2847
e76df0d0
GB
28482014-08-07 Gary Benson <gbenson@redhat.com>
2849
2850 * server.h: Do not include common-utils.h.
2851
4cb9c816
GB
28522014-08-07 Gary Benson <gbenson@redhat.com>
2853
2854 * server.h: Do not include ptid.h.
2855 * notif.h: Likewise.
2856
3995eeee
GB
28572014-08-07 Gary Benson <gbenson@redhat.com>
2858
2859 * server.h: Do not include gdb_locale.h.
2860
cb9f1a9b
GB
28612014-08-07 Gary Benson <gbenson@redhat.com>
2862
2863 * server.h: Do not include gdb/signals.h.
2864 * win32-low.c: Likewise.
2865
a5fceff8
GB
28662014-08-07 Gary Benson <gbenson@redhat.com>
2867
2868 * server.h: Do not include pathmax.h.
2869
b9391142
GB
28702014-08-07 Gary Benson <gbenson@redhat.com>
2871
2872 * server.h: Do not include libiberty.h.
2873 * linux-bfin-low.c: Likewise.
2874
0e443c87
GB
28752014-08-07 Gary Benson <gbenson@redhat.com>
2876
2877 * server.h: Do not include ansidecl.h.
2878
8ebb3f56
GB
28792014-08-07 Gary Benson <gbenson@redhat.com>
2880
2881 * linux-x86-low.c: Do not include stddef.h.
2882 * lynx-ppc-low.c: Likewise.
2883 * tracepoint.c: Likewise.
2884
8980bdf6
GB
28852014-08-07 Gary Benson <gbenson@redhat.com>
2886
2887 * server.h: Do not include stdarg.h.
2888 * nto-low.c: Likewise.
2889
d7096f71
GB
28902014-08-07 Gary Benson <gbenson@redhat.com>
2891
2892 * server.h: Do not include stdlib.h.
2893 * inferiors.c: Likewise.
2894 * linux-low.c: Likewise.
2895 * regcache.c: Likewise.
2896 * spu-low.c: Likewise.
2897 * tracepoint.c: Likewise.
2898 * utils.c: Likewise.
2899
d02f550d
GB
29002014-08-07 Gary Benson <gbenson@redhat.com>
2901
2902 * server.h: Do not include stdio.h.
2903 * linux-low.c: Likewise.
2904 * remote-utils.c: Likewise.
2905 * spu-low.c: Likewise.
2906 * utils.c: Likewise.
2907 * wincecompat.c: Likewise.
2908
87f6c4e3
GB
29092014-08-06 Gary Benson <gbenson@redhat.com>
2910
2911 * regcache.c (init_register_cache): Move conditionals inside if.
2912
7089dca4
GB
29132014-08-06 Gary Benson <gbenson@redhat.com>
2914
2915 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2916
462f517e
GB
29172014-07-31 Gary Benson <gbenson@redhat.com>
2918
2919 * ax.h: Do not include server.h.
2920 * gdbthread.h: Likewise.
2921 * lynx-low.h: Likewise.
2922 * notif.h: Likewise.
2923
976411d6
GB
29242014-07-30 Gary Benson <gbenson@redhat.com>
2925
2926 * server.h: Include common-defs.h.
2927 Do not include config.h or build-gnulib-gdbserver/config.h.
2928
d41f6d8e
GB
29292014-07-30 Gary Benson <gbenson@redhat.com>
2930
2931 * hostio-errno.c: Move server.h to top of includes list.
2932 * inferiors.c: Likewise.
2933 * linux-x86-low.c: Likewise.
2934 * notif.c: Include server.h.
2935
314c6a35
TT
29362014-07-24 Tom Tromey <tromey@redhat.com>
2937 Gary Benson <gbenson@redhat.com>
2938
2939 * server.h (CORE_ADDR): Now unsigned.
2940
69ff6be5
PA
29412014-07-16 Pedro Alves <palves@redhat.com>
2942
2943 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2944
ce9e3fe7
PA
29452014-07-15 Pedro Alves <palves@redhat.com>
2946
2947 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2948 copy.
2949
e76126e8
PA
29502014-07-11 Pedro Alves <palves@redhat.com>
2951
2952 * linux-low.c (kill_wait_lwp): New function, based on
2953 kill_one_lwp_callback, but use my_waitpid directly.
2954 (kill_one_lwp_callback, linux_kill): Use it.
2955
8e9db26e
PA
29562014-06-23 Pedro Alves <palves@redhat.com>
2957
2958 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2959 before setting DR0..DR3.
2960
698b3e08
GB
29612014-06-20 Gary Benson <gbenson@redhat.com>
2962
2963 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2964 * configure: Regenerated.
2965 * config.in: Likewise.
2966
125f8a3d
GB
29672014-06-20 Gary Benson <gbenson@redhat.com>
2968
2969 * Makefile.in (SFILES): Update locations for files moved
2970 from common to nat.
2971 (object file files): Reordered.
2972
42995dbd
GB
29732014-06-20 Gary Benson <gbenson@redhat.com>
2974
2975 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2976 (i386_dr_low_set_addr): Likewise.
2977 (i386_dr_low_get_addr): Likewise.
2978 (i386_dr_low_can_set_control): Likewise.
2979 (i386_dr_low_set_control): Likewise.
2980 (i386_dr_low_get_control): Likewise.
2981 (i386_dr_low_get_status): Likewise.
2982 (i386_get_debug_register_length): Likewise.
2983 * linux-x86-low.c (i386_dr_low_set_addr):
2984 Changed signature. Made static.
2985 (i386_dr_low_get_addr): Likewise.
2986 (i386_dr_low_set_control): Likewise.
2987 (i386_dr_low_get_control): Likewise.
2988 (i386_dr_low_get_status): Likewise.
2989 (i386_dr_low): New global variable.
2990 * win32-i386-low.c (i386_dr_low_set_addr):
2991 Changed signature. Made static.
2992 (i386_dr_low_get_addr): Likewise.
2993 (i386_dr_low_set_control): Likewise.
2994 (i386_dr_low_get_control): Likewise.
2995 (i386_dr_low_get_status): Likewise.
2996 (i386_dr_low): New global variable.
2997
e1d2394b
MS
29982014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2999
3000 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3001 * Makefile.in (AR, AR_FLAGS): Define.
3002 * configure: Regenerate.
3003
3a8ee006
GB
30042014-06-19 Gary Benson <gbenson@redhat.com>
3005
3006 * Makefile.in (i386-dregs.o): New rule.
3007 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3008 * i386-low.c (target.h): Remove include.
3009 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3010 (DR_CONTROL_SHIFT): Likewise.
3011 (DR_CONTROL_SIZE): Likewise.
3012 (DR_RW_EXECUTE): Likewise.
3013 (DR_RW_WRITE): Likewise.
3014 (DR_RW_READ): Likewise.
3015 (DR_RW_IORW): Likewise.
3016 (DR_LEN_1): Likewise.
3017 (DR_LEN_2): Likewise.
3018 (DR_LEN_4): Likewise.
3019 (DR_LEN_8): Likewise.
3020 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3021 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3022 (DR_ENABLE_SIZE): Likewise.
3023 (DR_LOCAL_SLOWDOWN): Likewise.
3024 (DR_GLOBAL_SLOWDOWN): Likewise.
3025 (DR_CONTROL_RESERVED): Likewise.
3026 (I386_DR_CONTROL_MASK): Likewise.
3027 (I386_DR_VACANT): Likewise.
3028 (I386_DR_LOCAL_ENABLE): Likewise.
3029 (I386_DR_GLOBAL_ENABLE): Likewise.
3030 (I386_DR_DISABLE): Likewise.
3031 (I386_DR_SET_RW_LEN): Likewise.
3032 (I386_DR_GET_RW_LEN): Likewise.
3033 (I386_DR_WATCH_HIT): Likewise.
3034 (i386_wp_op_t): Likewise.
3035 (i386_show_dr): Likewise.
3036 (i386_length_and_rw_bits): Likewise.
3037 (i386_insert_aligned_watchpoint): Likewise.
3038 (i386_remove_aligned_watchpoint): Likewise.
3039 (i386_handle_nonaligned_watchpoint): Likewise.
3040 i386_update_inferior_debug_regs(): Likewise.
3041 (i386_dr_insert_watchpoint): Likewise.
3042 (i386_dr_remove_watchpoint): Likewise.
3043 (i386_dr_region_ok_for_watchpoint): Likewise.
3044 (i386_dr_stopped_data_address): Likewise.
3045 (i386_dr_stopped_by_watchpoint): Likewise.
3046
8f26655c
GB
30472014-06-19 Gary Benson <gbenson@redhat.com>
3048
3049 * i386-low.c (i386_dr_show): Renamed to
3050 i386_show_dr and made static. All uses updated.
3051 (i386_dr_length_and_rw_bits): Renamed to
3052 i386_length_and_rw_bits and made static.
3053 All uses updated.
3054 (i386_dr_insert_aligned_watchpoint): Renamed to
3055 i386_insert_aligned_watchpoint and made static.
3056 All uses updated.
3057 (i386_dr_remove_aligned_watchpoint): Renamed to
3058 i386_remove_aligned_watchpoint and made static.
3059 All uses updated.
3060 (i386_dr_update_inferior_debug_regs): Renamed to
3061 i386_update_inferior_debug_regs and made static.
3062 All uses updated.
3063
b9228891
GB
30642014-06-18 Gary Benson <gbenson@redhat.com>
3065
5171def3
GB
3066 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3067 (i386_dr_low_can_set_control): Likewise.
3068 (i386_get_debug_register_length): Likewise.
3069 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3070 (i386_dr_low_can_set_control): Likewise.
3071 (i386_get_debug_register_length): Likewise.
3072
30732014-06-17 Gary Benson <gbenson@redhat.com>
3074
b9228891
GB
3075 * i386-low.h (i386-dregs.h): New include.
3076 (DR_FIRSTADDR): Now in i386-dregs.h.
3077 (DR_LASTADDR): Likewise.
3078 (DR_NADDR): Likewise.
3079 (DR_STATUS): Likewise.
3080 (DR_CONTROL): Likewise.
3081 (i386_debug_reg_state): Likewise.
3082 (i386_dr_insert_watchpoint): Likewise.
3083 (i386_dr_remove_watchpoint): Likewise.
3084 (i386_dr_region_ok_for_watchpoint): Likewise.
3085 (i386_dr_stopped_data_address): Likewise.
3086 (i386_dr_stopped_by_watchpoint): Likewise.
3087 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3088
4be83cc2
GB
30892014-06-18 Gary Benson <gbenson@redhat.com>
3090
3091 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3092 i386_dr_insert_watchpoint.
3093 (i386_low_remove_watchpoint): Renamed to
3094 i386_dr_remove_watchpoint.
3095 (i386_low_region_ok_for_watchpoint): Renamed to
3096 i386_dr_region_ok_for_watchpoint.
3097 (i386_low_stopped_data_address): Renamed to
3098 i386_dr_stopped_data_address.
3099 (i386_low_stopped_by_watchpoint): Renamed to
3100 i386_dr_stopped_by_watchpoint.
3101 * i386-low.c (i386_show_dr): Renamed to
3102 i386_dr_show and made nonstatic. All uses updated.
3103 (i386_length_and_rw_bits): Renamed to
3104 i386_dr_length_and_rw_bits and made nonstatic.
3105 All uses updated.
3106 (i386_insert_aligned_watchpoint): Renamed to
3107 i386_dr_insert_aligned_watchpoint and made nonstatic.
3108 All uses updated.
3109 (i386_remove_aligned_watchpoint): Renamed to
3110 i386_dr_remove_aligned_watchpoint and made nonstatic.
3111 All uses updated.
3112 (i386_update_inferior_debug_regs): Renamed to
3113 i386_dr_update_inferior_debug_regs and made nonstatic.
3114 All uses updated.
3115 (i386_low_insert_watchpoint): Renamed to
3116 i386_dr_insert_watchpoint. All uses updated.
3117 (i386_low_remove_watchpoint): Renamed to
3118 i386_dr_remove_watchpoint. All uses updated.
3119 (i386_low_region_ok_for_watchpoint): Renamed to
3120 i386_dr_region_ok_for_watchpoint. All uses updated.
3121 (i386_low_stopped_data_address): Renamed to
3122 i386_dr_stopped_data_address. All uses updated.
3123 (i386_low_stopped_by_watchpoint): Renamed to
3124 i386_dr_stopped_by_watchpoint. All uses updated.
3125
131aa0d4
GB
31262014-06-18 Gary Benson <gbenson@redhat.com>
3127
3128 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3129 (i386_dr_low_can_set_control): Likewise.
3130 (i386_insert_aligned_watchpoint): New check.
3131
d9305f7f
GB
31322014-06-18 Gary Benson <gbenson@redhat.com>
3133
3134 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3135 Renamed to state.
3136
e927c9fc
GB
31372014-06-18 Gary Benson <gbenson@redhat.com>
3138
3139 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3140 instead of fatal and error.
3141 (i386_handle_nonaligned_watchpoint): Likewise.
3142
1b6d4134
GB
31432014-06-18 Gary Benson <gbenson@redhat.com>
3144
3145 * i386-low.c (i386_get_debug_register_length): New macro.
3146 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3147 (i386_show_dr): Use debug_printf instead of fprintf. Use
3148 phex to format values.
3149
6e62758f
GB
31502014-06-18 Gary Benson <gbenson@redhat.com>
3151
3152 * i386-low.h: Comment changes.
3153 * i386-low.c: Likewise.
3154
fc6e2f03
GB
31552014-06-18 Gary Benson <gbenson@redhat.com>
3156
3157 * i386-low.c: Whitespace changes.
3158
f9d1eeed
TT
31592014-06-12 Tom Tromey <tromey@redhat.com>
3160
3161 * utils.c (freeargv): Remove.
3162
0b04e523
TT
31632014-06-12 Tom Tromey <tromey@redhat.com>
3164
3165 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3166 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3167 (parse_debug_format_options): Likewise.
3168 (gdbserver_usage): Likewise.
3169 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3170 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3171 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3172 against libiberty.
3173 ($(LIBGNU)): Depend on libiberty.
3174 (all-lib): Recurse into all subdirs.
3175 (install-only): Invoke "install" target in subdirs.
3176 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3177 targets.
3178 * configure: Rebuild.
3179 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3180 for vasprintf, vsnprintf, or gettimeofday.
3181 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3182 srv_tgtobj.
3183
270c9937
JB
31842014-06-05 Joel Brobecker <brobecker@adacore.com>
3185
3186 * development.sh: Delete.
3187 * Makefile.in (config.status): Adjust dependency on development.sh.
3188 * configure.ac: Adjust development.sh source call.
3189 * configure: Regenerate.
3190
0a261ed8
PA
31912014-06-02 Pedro Alves <palves@redhat.com>
3192
3193 * ax.c (gdb_free_agent_expr): New function.
3194 * ax.h (gdb_free_agent_expr): New declaration.
3195 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3196 list.
3197 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3198 static.
3199 (clear_breakpoint_conditions_and_commands): New function.
3200 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3201 (clear_breakpoint_conditions_and_commands): New declaration.
3202
e9dae05e
RR
32032014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3204
3205 * linux-aarch64-low.c (asm/ptrace.h): Include.
3206
5876f503
JK
32072014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3208
3209 Fix TLS access for -static -pthread.
3210 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3211 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3212 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3213
802e8e6d
PA
32142014-05-20 Pedro Alves <palves@redhat.com>
3215
3216 * linux-aarch64-low.c (aarch64_insert_point)
3217 (aarch64_remove_point): No longer check whether the type is
3218 supported here. Adjust to new interface.
3219 (the_low_target): Install aarch64_supports_z_point_type as
3220 supports_z_point_type method.
3221 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3222 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3223 instead of a Z packet char. Adjust.
3224 (arm_supports_z_point_type): New function.
3225 (arm_insert_point, arm_remove_point): Adjust to new interface.
3226 (the_low_target): Install arm_supports_z_point_type.
3227 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3228 (cris_insert_point, cris_remove_point): Adjust to new interface.
3229 Don't check whether the type is supported here.
3230 (the_low_target): Install cris_supports_z_point_type.
3231 * linux-low.c (linux_supports_z_point_type): New function.
3232 (linux_insert_point, linux_remove_point): Adjust to new interface.
3233 * linux-low.h (struct linux_target_ops) <insert_point,
3234 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3235 raw_breakpoint pointer parameter.
3236 <supports_z_point_type>: New method.
3237 * linux-mips-low.c (mips_supports_z_point_type): New function.
3238 (mips_insert_point, mips_remove_point): Adjust to new interface.
3239 Use mips_supports_z_point_type.
3240 (the_low_target): Install mips_supports_z_point_type.
3241 * linux-ppc-low.c (the_low_target): Install NULL as
3242 supports_z_point_type method.
3243 * linux-s390-low.c (the_low_target): Install NULL as
3244 supports_z_point_type method.
3245 * linux-sparc-low.c (the_low_target): Install NULL as
3246 supports_z_point_type method.
3247 * linux-x86-low.c (x86_supports_z_point_type): New function.
3248 (x86_insert_point): Adjust to new insert_point interface. Use
3249 insert_memory_breakpoint. Adjust to new
3250 i386_low_insert_watchpoint interface.
3251 (x86_remove_point): Adjust to remove_point interface. Use
3252 remove_memory_breakpoint. Adjust to new
3253 i386_low_remove_watchpoint interface.
3254 (the_low_target): Install x86_supports_z_point_type.
3255 * lynx-low.c (lynx_target_ops): Install NULL as
3256 supports_z_point_type callback.
3257 * nto-low.c (nto_supports_z_point_type): New.
3258 (nto_insert_point, nto_remove_point): Adjust to new interface.
3259 (nto_target_ops): Install nto_supports_z_point_type.
3260 * mem-break.c: Adjust intro comment.
3261 (struct raw_breakpoint) <raw_type, size>: New fields.
3262 <inserted>: Update comment.
3263 <shlib_disabled>: Delete field.
3264 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3265 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3266 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3267 (raw_bkpt_type_to_target_hw_bp_type): New function.
3268 (find_enabled_raw_code_breakpoint_at): New function.
3269 (find_raw_breakpoint_at): New type and size parameters. Use them.
3270 (insert_memory_breakpoint): New function, based off
3271 set_raw_breakpoint_at.
3272 (remove_memory_breakpoint): New function.
3273 (set_raw_breakpoint_at): Reimplement.
3274 (set_breakpoint): New, based on set_breakpoint_at.
3275 (set_breakpoint_at): Reimplement.
3276 (delete_raw_breakpoint): Go through the_target->remove_point
3277 instead of assuming memory breakpoints.
3278 (find_gdb_breakpoint_at): Delete.
3279 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3280 (find_gdb_breakpoint): New function.
3281 (set_gdb_breakpoint_at): Delete.
3282 (z_type_supported): New function.
3283 (set_gdb_breakpoint_1): New function, loosely based off
3284 set_gdb_breakpoint_at.
3285 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3286 (delete_gdb_breakpoint_at): Delete.
3287 (delete_gdb_breakpoint_1): New function, loosely based off
3288 delete_gdb_breakpoint_at.
3289 (delete_gdb_breakpoint): New function.
3290 (clear_gdb_breakpoint_conditions): Rename to ...
3291 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3292 breakpoint.
3293 (add_condition_to_breakpoint): Make static.
3294 (add_breakpoint_condition): Take a struct breakpoint pointer
3295 instead of an address. Adjust.
3296 (gdb_condition_true_at_breakpoint): Rename to ...
3297 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3298 z_type parameter.
3299 (gdb_condition_true_at_breakpoint): Reimplement.
3300 (add_breakpoint_commands): Take a struct breakpoint pointer
3301 instead of an address. Adjust.
3302 (gdb_no_commands_at_breakpoint): Rename to ...
3303 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3304 parameter. Return true if no breakpoint was found. Change debug
3305 output.
3306 (gdb_no_commands_at_breakpoint): Reimplement.
3307 (run_breakpoint_commands): Rename to ...
3308 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3309 and change return type to boolean.
3310 (run_breakpoint_commands): New function.
3311 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3312 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3313 breakpoint. Go through the_target->remove_point instead of
3314 assuming memory breakpoint.
3315 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3316 software and hardware breakpoints.
3317 (reinsert_raw_breakpoint): Go through the_target->insert_point
3318 instead of assuming memory breakpoint.
3319 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3320 software and hardware breakpoints.
3321 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3322 Check both software and hardware breakpoints.
3323 (validate_inserted_breakpoint): Assert the breakpoint is a
3324 software breakpoint. Set the inserted flag to -1 instead of
3325 setting shlib_disabled.
3326 (delete_disabled_breakpoints): Adjust.
3327 (validate_breakpoints): Only validate software breakpoints.
3328 Adjust to inserted flag change.
3329 (check_mem_read, check_mem_write): Skip breakpoint types other
3330 than software breakpoints. Adjust to inserted flag change.
3331 * mem-break.h (enum raw_bkpt_type): New enum.
3332 (raw_breakpoint, struct process_info): Forward declare.
3333 (Z_packet_to_target_hw_bp_type): Delete declaration.
3334 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3335 (set_gdb_breakpoint, delete_gdb_breakpoint)
3336 (clear_breakpoint_conditions): New declarations.
3337 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3338 (breakpoint_inserted_here): Update comment.
3339 (add_breakpoint_condition, add_breakpoint_commands): Replace
3340 address parameter with a breakpoint pointer parameter.
3341 (gdb_breakpoint_here): Update comment.
3342 (delete_gdb_breakpoint_at): Delete.
3343 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3344 * server.c (process_point_options): Take a struct breakpoint
3345 pointer instead of an address. Adjust.
3346 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3347 delete_gdb_breakpoint.
3348 * spu-low.c (spu_target_ops): Install NULL as
3349 supports_z_point_type method.
3350 * target.h: Include mem-break.h.
3351 (struct target_ops) <prepare_to_access_memory>: Update comment.
3352 <supports_z_point_type>: New field.
3353 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3354 instead of a char. Also take a raw breakpoint pointer.
3355 * win32-arm-low.c (the_low_target): Install NULL as
3356 supports_z_point_type.
3357 * win32-i386-low.c (i386_supports_z_point_type): New function.
3358 (i386_insert_point, i386_remove_point): Adjust to new interface.
3359 (the_low_target): Install i386_supports_z_point_type.
3360 * win32-low.c (win32_supports_z_point_type): New function.
3361 (win32_insert_point, win32_remove_point): Adjust to new interface.
3362 (win32_target_ops): Install win32_supports_z_point_type.
3363 * win32-low.h (struct win32_target_ops):
3364 <supports_z_point_type>: New method.
3365 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3366 instead of a char. Also take a raw breakpoint pointer.
3367
932539e3
PA
33682014-05-20 Pedro Alves <palves@redhat.com>
3369
3370 * mem-break.h: Include break-common.h.
3371 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3372 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3373 (Z_packet_to_target_hw_bp_type): New declaration.
3374 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3375 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3376 (Z_PACKET_ACCESS_WP): Delete macros.
3377 (Z_packet_to_hw_type): Delete function.
3378 * i386-low.h: Don't include break-common.h here.
3379 (Z_packet_to_hw_type): Delete declaration.
3380 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3381 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3382 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3383 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3384 * linux-aarch64-low.c: Don't include break-common.h here.
3385 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3386 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3387 (Z_packet_to_target_hw_bp_type): Delete function.
3388 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3389 function.
3390 (mips_insert_point, mips_remove_point): Use
3391 Z_packet_to_target_hw_bp_type.
3392
4ff0d3d8
PA
33932014-05-20 Pedro Alves <palves@redhat.com>
3394
3395 * linux-aarch64-low.c: Include break-common.h.
3396 (enum target_point_type): Delete.
3397 (Z_packet_to_point_type): Rename to ...
3398 (Z_packet_to_target_hw_bp_type): ... this, and return a
3399 target_hw_bp_type instead.
3400 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3401 instead of an enum target_point_type.
3402 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3403 breakpoint type.
3404 (aarch64_dr_state_insert_one_point)
3405 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3406 (aarch64_handle_aligned_watchpoint)
3407 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3408 Take an enum target_hw_bp_type instead of an enum
3409 target_point_type.
3410 (aarch64_supports_z_point_type): New function.
3411 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3412 use Z_packet_to_target_hw_bp_type.
3413
786dc519
JB
34142014-05-20 Joel Brobecker <brobecker@adacore.com>
3415
3416 * configure.ac: Only use -Werror by default when DEVELOPMENT
3417 is true.
3418 * configure: Regenerate.
3419
9e0aa64f
JK
34202014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3421
3422 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3423 * linux-x86-low.c (X86_64_USER_REGS): New.
3424 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3425
2b577b92
YQ
34262014-04-28 Yao Qi <yao@codesourcery.com>
3427
3428 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3429 name.
3430
94611da2
PA
34312014-04-25 Pedro Alves <palves@redhat.com>
3432
3433 PR server/16255
3434 * linux-low.c (linux_attach_fail_reason_string): New function.
3435 (linux_attach_lwp): Delete.
3436 (linux_attach_lwp_1): Rename to ...
3437 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3438 argument. Remove "initial" parameter. Return int instead of
3439 void. Don't error or warn here.
3440 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3441 failure to attach to the tgid. Call warning when failing to
3442 attach to an lwp.
3443 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3444 argument. Remove "initial" parameter. Return int instead of
3445 void. Don't error or warn here.
3446 (linux_attach_fail_reason_string): New declaration.
3447 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3448 interface change. Use linux_attach_fail_reason_string.
3449
01f9f808
MS
34502014-04-24 Michael Sturm <michael.sturm@mintel.com>
3451 Walfred Tedeschi <walfred.tedeschi@intel.com>
3452
3453 * Makefile.in: Added rules to handle new files
3454 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3455 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3456 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3457 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3458 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3459 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3460 x32-avx512-linux.o.
3461 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3462 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3463 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3464 i386/x32-avx512.xml.
3465 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3466 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3467 i386/x32-avx512-linux.xml.
3468 * i387-fp.c (num_avx512_k_registers): New constant for number
3469 of K registers.
3470 (num_avx512_zmmh_low_registers): New constant for number of
3471 lower ZMM registers (0-15).
3472 (num_avx512_zmmh_high_registers): New constant for number of
3473 higher ZMM registers (16-31).
3474 (num_avx512_ymmh_registers): New contant for number of higher
3475 YMM registers (ymm16-31 added by avx521 on x86_64).
3476 (num_avx512_xmm_registers): New constant for number of higher
3477 XMM registers (xmm16-31 added by AVX512 on x86_64).
3478 (struct i387_xsave): Add space for AVX512 registers.
3479 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3480 Add code to handle AVX512 registers.
3481 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3482 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3483 prototypei from generated file.
3484 (tdesc_amd64_avx512_linux): Likewise.
3485 (init_registers_x32_avx512_linux): Likewise.
3486 (tdesc_x32_avx512_linux): Likewise.
3487 (init_registers_i386_avx512_linux): Likewise.
3488 (tdesc_i386_avx512_linux): Likewise.
3489 (x86_64_regmap): Add AVX512 registers.
3490 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3491 mask.
3492 (initialize_low_arch): Add code to initialize AVX512 registers.
3493
51aa91f9
PA
34942014-04-23 Pedro Alves <palves@redhat.com>
3495
3496 * mem-break.c (find_gdb_breakpoint_at): Make static.
3497 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3498
a4165e94
PA
34992014-04-23 Pedro Alves <palves@redhat.com>
3500
3501 * i386-low.c: Don't include break-common.h here.
3502 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3503 prototype to take target_hw_bp_type as argument instead of a Z
3504 packet char.
3505 * i386-low.h: Include break-common.h here.
3506 (Z_packet_to_hw_type): Declare.
3507 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3508 prototypes.
3509 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3510 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3511 (x86_remove_point): Convert the packet number to a
3512 target_hw_bp_type before calling i386_low_remove_watchpoint.
3513 * win32-i386-low.c (i386_insert_point): Convert the packet number
3514 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3515 (i386_remove_point): Convert the packet number to a
3516 target_hw_bp_type before calling i386_low_remove_watchpoint.
3517
b8acf843
PA
35182014-04-23 Pedro Alves <palves@redhat.com>
3519
3520 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3521
d708bcd1
PA
35222014-04-10 Pedro Alves <palves@redhat.com>
3523
3524 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3525 Check if the condition or command is NULL before checking if the
3526 breakpoint is known. On success, return true.
3527 * mem-break.h (add_breakpoint_condition): Document return.
3528 (add_breakpoint_commands): Add describing comment.
3529 * server.c (skip_to_semicolon): New function.
3530 (process_point_options): Use it.
3531
2eec7d5b
PA
35322014-04-09 Pedro Alves <palves@redhat.com>
3533
3534 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3535 to lwpid_of.
3536
fa96cb38
PA
35372014-02-27 Pedro Alves <palves@redhat.com>
3538
3539 PR 12702
3540 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3541 macros.
3542 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3543 output.
3544 (last_thread_of_process_p): Take a PID argument instead of a
3545 thread pointer.
3546 (linux_wait_for_lwp): Delete.
3547 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3548 functions.
3549 (linux_low_filter_event): New function, party factored out from
3550 linux_wait_for_event.
3551 (linux_wait_for_event): Rename to ...
3552 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3553 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3554 sigsuspend. Check for zombie leaders.
3555 (linux_wait_for_event): Reimplement as wrapper around
3556 linux_wait_for_event_filtered.
3557 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3558 a normal or signal exit is seen, it's the whole process exiting.
3559 (wait_for_sigstop): No longer a for_each_inferior callback.
3560 Rewrite on top of linux_wait_for_event_filtered.
3561 (stop_all_lwps): Call wait_for_sigstop directly.
3562 * server.c (resume, handle_target_event): Handle
3563 TARGET_WAITKIND_NO_RESUMED.
3564
d763de10
JB
35652014-02-26 Joel Brobecker <brobecker@adacore.com>
3566
3567 * win32-low.c (psapi_get_dll_name,
3568 * win32_CreateToolhelp32Snapshot): Delete.
3569 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3570 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3571 Delete.
3572 (handle_load_dll): Add function description.
3573 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3574
850a0f76
JB
35752014-02-26 Joel Brobecker <brobecker@adacore.com>
3576
3577 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3578 Add comment.
3579 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3580 base address when calling win32_add_one_solib.
3581 (handle_load_dll): Delete local variable load_addr.
3582 Remove 0x1000 offset applied to DLL base address when calling
3583 win32_add_one_solib.
3584 (handle_unload_dll): Add comment.
3585
f25b3fc3
JB
35862014-02-26 Joel Brobecker <brobecker@adacore.com>
3587
3588 * win32-low.c (win32_add_all_dlls): Renames
3589 win32_ensure_ntdll_loaded. Rewrite function documentation.
3590 Adjust implementation to always load all DLLs.
3591 Add 0x1000 offset to DLL base address when calling
3592 win32_add_one_solib.
3593 (child_initialization_done): New static global.
3594 (do_initial_child_stuff): Set child_initialization_done to
3595 zero during child initialization, and 1 after. Replace call
3596 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3597 Add comment.
3598 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3599 (handle_unload_dll): Add function documentation.
3600 (get_child_debug_event): Ignore load and unload DLL events
3601 during child initialization.
3602
d86d4aaf
DE
36032014-02-20 Doug Evans <dje@google.com>
3604
3bc32da3 3605 Remove global all_lwps.
d86d4aaf
DE
3606 * inferiors.h (ptid_of): Move here from linux-low.h.
3607 (pid_of, lwpid_of): Ditto.
3608 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3609 parameter is a struct thread_info * now.
3610 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3611 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3612 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3613 directly.
3614 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3615 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3616 * linux-arm-low.c (update_registers_callback): Update, "entry"
3617 parameter is a struct thread_info * now.
3618 Fetch lwpid from current_inferior directly.
3619 (arm_insert_point): Pass &all_threads to find_inferior instead of
3620 &all_lwps.
3621 (arm_remove_point): Ditto.
3622 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3623 (arm_prepare_to_resume): Fetch pid from thread.
3624 (arm_read_description): Fetch lwpid from current_inferior directly.
3625 * linux-low.c (all_lwps): Delete.
3626 (delete_lwp): Delete call to remove_inferior.
3627 (handle_extended_wait): Fetch lwpid from thread.
3628 (add_lwp): Don't set lwp->entry.id. Remove call to
3629 add_inferior_to_list.
3630 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3631 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3632 (kill_one_lwp_callback): Ditto.
3633 (linux_kill): Don't dereference NULL pointer.
3634 Fetch ptid,lwpid from thread.
3635 (get_detach_signal): Fetch ptid from thread.
3636 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3637 Simplify call to regcache_invalidate_thread.
3638 (delete_lwp_callback): Update, "entry" parameter is a
3639 struct thread_info * now. Fetch pid from thread.
3640 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3641 (status_pending_p_callback): Update, "entry" parameter is a
3642 struct thread_info * now. Fetch ptid from thread.
3643 (find_lwp_pid): Update, "entry" parameter is a
3644 struct thread_info * now.
3645 (linux_wait_for_lwp): Fetch pid from thread.
3646 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3647 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3648 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3649 (dequeue_one_deferred_signal): Ditto.
3650 (cancel_breakpoint): Fetch ptid from current_inferior.
3651 (linux_wait_for_event): Pass &all_threads to find_inferior,
3652 not &all_lwps. Fetch ptid, lwpid from thread.
3653 (count_events_callback): Update, "entry" parameter is a
3654 struct thread_info * now.
3655 (select_singlestep_lwp_callback): Ditto.
3656 (select_event_lwp_callback): Ditto.
3657 (cancel_breakpoints_callback): Ditto.
3658 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3659 not &all_lwps.
3660 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3661 (unsuspend_one_lwp): Update, "entry" parameter is a
3662 struct thread_info * now.
3663 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3664 not &all_lwps.
3665 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3666 Fetch lwpid from thread, not lwp.
3667 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3668 Pass &all_threads to find_inferior, not &all_lwps.
3669 (send_sigstop): Fetch lwpid from thread, not lwp.
3670 (send_sigstop_callback): Update, "entry" parameter is a
3671 struct thread_info * now.
3672 (suspend_and_send_sigstop_callback): Ditto.
3673 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3674 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3675 struct thread_info * now.
3676 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3677 from thread, lwp.
3678 (lwp_running): Update, "entry" parameter is a
3679 struct thread_info * now.
3680 (stop_all_lwps): Fetch ptid from thread.
3681 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3682 (linux_resume_one_lwp): Fetch lwpid from thread.
3683 (linux_set_resume_request): Update, "entry" parameter is a
3684 struct thread_info * now. Fetch pid, lwpid from thread.
3685 (resume_status_pending_p): Update, "entry" parameter is a
3686 struct thread_info * now.
3687 (need_step_over_p): Ditto. Fetch lwpid from thread.
3688 (start_step_over): Fetch lwpid from thread.
3689 (linux_resume_one_thread): Update, "entry" parameter is a
3690 struct thread_info * now. Fetch lwpid from thread.
3691 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3692 (proceed_one_lwp): Update, "entry" parameter is a
3693 struct thread_info * now. Fetch lwpid from thread.
3694 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3695 struct thread_info * now.
3696 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3697 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3698 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3699 directly.
3700 (regsets_store_inferior_registers): Ditto.
3701 (fetch_register, store_register): Ditto.
3702 (linux_read_memory, linux_write_memory): Ditto.
3703 (linux_request_interrupt): Ditto.
3704 (linux_read_auxv): Ditto.
3705 (linux_xfer_siginfo): Ditto.
3706 (linux_qxfer_spu): Ditto.
3707 (linux_qxfer_libraries_svr4): Ditto.
3708 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3709 moved to inferiors.h.
3710 (get_lwp): Delete.
3711 (get_thread_lwp): Update.
3712 (struct lwp_info): Delete member "entry". Simplify comment for
3713 member "thread".
3714 (all_lwps): Delete.
3715 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3716 current_inferior directly.
3717 (update_watch_registers_callback): Update, "entry" parameter is a
3718 struct thread_info * now. Fetch pid from thread.
3719 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3720 (mips_insert_point): Fetch lwpid from current_inferior.
3721 Pass &all_threads to find_inferior, not &all_lwps.
3722 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3723 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3724 directly.
3725 (mips_stopped_data_address): Ditto.
3726 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3727 directly.
3728 * linux-tile-low.c (tile_arch_setup): Ditto.
3729 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3730 (update_debug_registers_callback): Update, "entry" parameter is a
3731 struct thread_info * now. Fetch pid from thread.
3732 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3733 Pass &all_threads to find_inferior, not &all_lwps.
3734 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3735 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3736 Pass &all_threads to find_inferior, not &all_lwps.
3737 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3738 (i386_dr_low_get_status): Ditto.
3739 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3740 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3741 (x86_linux_read_description): Ditto.
3742 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3743
3b8361aa
DE
37442014-02-20 Doug Evans <dje@google.com>
3745
3746 * inferiors.c (get_first_inferior): Fix buglet.
3747
f7667f0d
DE
37482014-02-19 Doug Evans <dje@google.com>
3749
3750 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3751 * inferiors.c (add_thread): Change result type to struct thread_info *.
3752 All callers updated.
3753 (add_lwp): Call add_thread here instead of in callers.
3754 All callers updated.
3755 * linux-low.h (get_lwp_thread): Rewrite.
3756 (struct lwp_info): New member "thread".
3757
b3312d80
DE
37582014-02-19 Doug Evans <dje@google.com>
3759
3760 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3761 All callers updated.
3762
ecc6f45c
DE
37632014-02-19 Doug Evans <dje@google.com>
3764
3765 * inferiors.c (add_thread): Fix whitespace.
3766
649ebbca
DE
37672014-02-19 Doug Evans <dje@google.com>
3768
3769 * dll.c (clear_dlls): Replace accessing list implemention details
3770 with API function.
3771 * gdbthread.h (get_first_thread): Declare.
3772 * inferiors.c (for_each_inferior_with_data): New function.
3773 (get_first_thread): New function.
3774 (find_thread_ptid): Simplify.
3775 (get_first_inferior): New function.
3776 (clear_list): Delete.
3777 (one_inferior_p): New function.
3778 (clear_inferior_list): New function.
3779 (clear_inferiors): Update.
3780 * inferiors.h (for_each_inferior_with_data): Declare.
3781 (clear_inferior_list): Declare.
3782 (one_inferior_p): Declare.
3783 (get_first_inferior): Declare.
3784 * linux-low.c (linux_wait_for_event): Replace accessing list
3785 implemention details with API function.
3786 * server.c (target_running): Ditto.
3787 (accumulate_file_name_length): New function.
3788 (emit_dll_description): New function.
3789 (handle_qxfer_libraries): Replace accessing list implemention
3790 details with API function.
3791 (handle_qxfer_threads_worker): New function.
3792 (handle_qxfer_threads_proper): Replace accessing list implemention
3793 details with API function.
3794 (handle_query): Ditto.
3795 (visit_actioned_threads_callback_ftype): New typedef.
3796 (visit_actioned_threads_data): New struct.
3797 (visit_actioned_threads): Rewrite to be find_inferior callback.
3798 (resume): Call find_inferior.
3799 (handle_status): Replace accessing list implemention
3800 details with API function.
3801 (process_serial_event): Replace accessing list implemention details
3802 with API function.
3803 * target.c (set_desired_inferior): Replace accessing list implemention
3804 details with API function.
3805 * tracepoint.c (same_process_p): New function.
3806 (gdb_agent_about_to_close): Replace accessing list implemention
3807 details with API function.
3808 * win32-low.c (child_delete_thread): Replace accessing list
3809 implemention details with API function.
3810 (match_dll_by_basename): New function.
3811 (dll_is_loaded_by_basename): New function.
3812 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3813 details call to dll_is_loaded_by_basename.
3814
80894984
DE
38152014-02-19 Doug Evans <dje@google.com>
3816
3817 * dll.h (struct dll_info): Add comment.
3818 * gdbthread.h (struct thread_info): Add comment.
3819 (current_ptid): Simplify.
3820 * inferiors.c (add_process): Update.
3821 (remove_process): Update.
3822 * inferiors.h (struct process_info): Rename member "head" to "entry".
3823 * linux-low.c (delete_lwp): Update.
3824 (add_lwp): Update.
3825 (last_thread_of_process_p): Update.
3826 (kill_one_lwp_callback, linux_kill): Update.
3827 (status_pending_p_callback): Update.
3828 (wait_for_sigstop): Update. Simplify read of ptid.
3829 (start_step_over): Update.
3830 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3831 (get_lwp_thread): Update.
3832 (struct lwp_info): Rename member "head" to "entry".
3833 * regcache.h (inferior_list_entry): Delete.
3834 * server.c (kill_inferior_callback): Update.
3835 (detach_or_kill_inferior_callback): Update.
3836 (print_started_pid): Update.
3837 (print_attached_pid): Update.
3838 (process_serial_event): Simplify read of ptid.
3839 * thread-db.c (thread_db_create_event): Update.
3840 (thread_db_get_tls_address): Update.
3841 * win32-low.c (current_inferior_ptid): Simplify.
3842
46917d26
TT
38432014-02-19 Tom Tromey <tromey@redhat.com>
3844
3845 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3846 argument.
3847 (target_supports_btrace): Update.
3848
0759a81e
YQ
38492014-02-14 Yao Qi <yao@codesourcery.com>
3850
3851 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3852 (rsp-low-ipa.o): New target.
3853
a7191e8b
TT
38542014-02-12 Tom Tromey <tromey@redhat.com>
3855
3856 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3857 convert_ascii_to_int.
3858 * regcache.c (registers_to_string): Likewise.
3859 * remote-utils.c (decode_M_packet): Likewise.
3860 * server.c (process_serial_event): Likewise.
3861
ff0e980e
TT
38622014-02-12 Tom Tromey <tromey@redhat.com>
3863
3864 * server.c (handle_query, handle_v_run): Use hex2bin, not
3865 unhexify.
3866 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3867
e9371aff
TT
38682014-02-12 Tom Tromey <tromey@redhat.com>
3869
3870 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3871 convert_int_to_ascii.
3872 * regcache.c (registers_to_string, collect_register_as_string):
3873 Likewise.
3874 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3875 Likewise.
3876 * server.c (process_serial_event): Likewise.
3877 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3878 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3879
971dc0b8
TT
38802014-02-12 Tom Tromey <tromey@redhat.com>
3881
3882 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3883 bin2hex, not hexify.
3884 * tracepoint.c (cmd_qtstatus): Likewise.
3885
0a822afb
TT
38862014-02-12 Tom Tromey <tromey@redhat.com>
3887
3888 * remote-utils.c (monitor_output): Pass explicit length to
3889 hexify.
3890
9c3d6531
TT
38912014-02-12 Tom Tromey <tromey@redhat.com>
3892
3893 * tracepoint.c: Include rsp-low.h.
3894 * server.c: Include rsp-low.h.
3895 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3896 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3897 declare.
3898 * remote-utils.c: Include rsp-low.h.
3899 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3900 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3901 (convert_int_to_ascii, convert_ascii_to_int): Move to
3902 common/rsp-low.c.
3903 * regcache.c: Include rsp-low.h.
3904 * ax.c: Include rsp-low.h.
3905 * Makefile.in (SFILES): Add common/rsp-low.c.
3906 (OBS): Add rsp-low.o.
3907 (rsp-low.o): New target.
3908
01fd3ea5
TT
39092014-02-12 Tom Tromey <tromey@redhat.com>
3910
3911 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3912 Include print-utils.h.
3913 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3914 (plongest, thirty_two, phex_nz): Remove.
3915 * Makefile.in (SFILES): Add common/print-utils.c.
3916 (OBS): Add print-utils.o.
3917 (print-utils-ipa.o): New target.
3918 (print-utils.o): New target.
3919 (IPA_OBJS): Add print-utils-ipa.o.
3920
e99dc820
TT
39212014-02-06 Tom Tromey <tromey@redhat.com>
3922
3923 * Makefile.in (SFILES): Fix indentation.
3924
ee1e2d4f
DE
39252014-02-05 Doug Evans <dje@google.com>
3926
3927 * linux-low.c (linux_wait_for_event): Improve comment.
3928 (linux_wait_1): Keep current_inferior in sync with event_child.
3929
f5a02773
DE
39302014-01-22 Doug Evans <dje@google.com>
3931
3932 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3933
87ce2a04
DE
39342014-01-22 Doug Evans <dje@google.com>
3935
3936 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3937 * configure: Regenerate.
3938 * config.in: Regenerate.
3939 * Makefile.in (SFILES): Add debug.c.
3940 (OBS): Add debug.o.
3941 * debug.c: New file.
3942 * debug.h: New file.
3943 * linux-aarch64-low.c (*): Update all debugging printfs to use
3944 debug_printf instead of fprintf.
3945 * linux-arm-low.c (*): Ditto.
3946 * linux-cris-low.c (*): Ditto.
3947 * linux-crisv32-low.c (*): Ditto.
3948 * linux-m32r-low.c (*): Ditto.
3949 * linux-sparc-low.c (*): Ditto.
3950 * linux-x86.c (*): Ditto.
3951 * linux-low.c (*): Ditto.
3952 (linux_wait_1): Add calls to debug_enter, debug_exit.
3953 (linux_wait): Remove redundant debugging printf.
3954 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3955 (linux_resume, unstop_all_lwps): Ditto.
3956 * mem-break.c (*): Update all debugging printfs to use
3957 debug_printf instead of fprintf.
3958 * remote-utils.c (*): Ditto.
3959 * thread-db.c (*): Ditto.
3960 * server.c #include <ctype.h>, "gdb_vecs.h".
3961 (debug_threads): Moved to debug.c.
3962 (*): Update all debugging printfs to use debug_printf instead of
3963 fprintf.
3964 (start_inferior): Replace call to fflush with call to debug_flush.
3965 (monitor_show_help): Mention set debug-format.
3966 (parse_debug_format_options): New function.
3967 (handle_monitor_command): Handle "monitor set debug-format".
3968 (gdbserver_usage): Mention --debug-format.
3969 (main): Parse --debug-format.
3970 * server.h (debug_threads): Declaration moved to debug.h.
3971 #include "debug.h".
3972 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3973 trace_debug_1 that uses debug_printf.
3974 (tracepoint_look_up_symbols): Update all debugging printfs to use
3975 debug_printf instead of fprintf.
3976
e671835b
BS
39772014-01-20 Baruch Siach <baruch@tkos.co.il>
3978
3979 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3980 sys/ptrace.h.
3981
b5737fa9
PA
39822014-01-17 Pedro Alves <palves@redhat.com>
3983
ea38d2a9 3984 PR build/16445
c7faa97a
PA
3985 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3986 defined after including gdb_proc_service.h.
b5737fa9 3987
40ed484e
DE
39882014-01-16 Doug Evans <dje@google.com>
3989
3990 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3991 (match_dll): Use it.
3992
969c39fb
MM
39932014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3994
3995 * target.h (target_ops) <read_btrace>: Change parameters and
3996 return type to allow error reporting.
3997 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3998 trace reading errors on.
3999 * linux-low.c (linux_low_read_btrace): Pass trace reading
4000 errors on.
4001 (linux_low_disable_btrace): New.
4002
ab7f45ba
DE
40032014-01-15 Doug Evans <dje@google.com>
4004
4005 * inferiors.c (thread_id_to_gdb_id): Delete.
4006 * inferiors.h (thread_id_to_gdb_id): Delete.
4007
66af0f44
EZ
40082014-01-13 Eli Zaretskii <eliz@gnu.org>
4009
4010 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4011 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4012 versions.
4013
9939e131
PA
40142014-01-08 Pedro Alves <palves@redhat.com>
4015
4016 * server.c (handle_status): Don't discard previous queued stop
4017 replies or thread's pending status here.
4018 (main) <disconnection>: Do it here instead.
4019
b7ea362b
PA
40202014-01-08 Pedro Alves <palves@redhat.com>
4021
4022 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4023 * server.c (visit_actioned_threads, handle_pending_status): New
4024 function.
4025 (handle_v_cont): Factor out parts to ...
4026 (resume): ... this new function. If in all-stop, and a thread
4027 being resumed has a pending status, report it without actually
4028 resuming.
4029 (myresume): Adjust to use the new 'resume' function.
4030 (clear_pending_status_callback, set_pending_status_callback)
4031 (find_status_pending_thread_callback): New functions.
4032 (handle_status): Handle the case of multiple threads having
4033 interesting statuses to report. Report threads' real last signal
4034 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4035 with an interesting thread to report the status for, instead of
4036 always reporting the status of the first thread.
4037
28498c42
JB
40382014-01-01 Joel Brobecker <brobecker@adacore.com>
4039
4040 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4041 * gdbreplay.c (gdbreplay_version): Likewise.
4042
f45c82da
YZ
40432013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4044
4045 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4046 iov.iov_len with the real length in use.
4047
379a5e2d
JB
40482013-12-13 Joel Brobecker <brobecker@adacore.com>
4049
4050 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4051 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4052 for all targets that use win32-low.c.
4053 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4054 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4055
4210d83e
PA
40562013-12-13 Pedro Alves <palves@redhat.com>
4057
4058 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4059 if equal to TARGET_WAITKIND_LOADED.
4060 * win32-low.c (cached_status): New static global.
4061 (win32_wait): Add declaration.
4062 (do_initial_child_stuff): Flush all initial pending debug events
4063 up to the initial breakpoint.
4064 (win32_wait): If CACHED_STATUS was set, return that instead
4065 of doing a real wait. Remove the code resuming the execution
4066 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4067 during the initial phase. Also remove the code changing
4068 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4069 TARGET_WAITKIND_STOPPED.
4070
e7f0d979
YQ
40712013-12-11 Yao Qi <yao@codesourcery.com>
4072
4073 * notif.c (handle_notif_ack): Return 0 if no notification
4074 matches.
4075
ebcf782c
DE
40762013-11-20 Doug Evans <dje@google.com>
4077
4078 * linux-low.c (linux_set_resume_request): Fix comment.
4079
20ad9378
DE
40802013-11-20 Doug Evans <dje@google.com>
4081
4082 * linux-low.c (resume_status_pending_p): Tweak comment.
4083
a196ebeb
WT
40842013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4085
4086 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4087 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4088 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4089 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4090 (srv_amd64_regobj): Add amd64-mpx.o.
4091 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4092 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4093 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4094 * i387-fp.c (num_pl_bnd_register) Added constant.
4095 (num_pl_bnd_cfg_registers) Added constant.
4096 (struct i387_xsave) Added reserved area and MPX fields.
4097 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4098 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4099 function.
4100 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4101 (init_registers_amd64_mpx_linux): Declare new function.
4102 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4103 (x86_64_regmap): Add MPX registers.
4104 (x86_linux_read_description): Add MPX case.
4105 (initialize_low_arch): Initialize MPX targets.
4106
0080a2f6
TT
41072013-11-18 Tom Tromey <tromey@redhat.com>
4108
4109 * configure: Rebuild.
4110 * configure.ac: Don't check for stdlib.h.
4111 * gdbreplay.c: Unconditionally include stdlib.h.
4112
2978b111
TT
41132013-11-18 Tom Tromey <tromey@redhat.com>
4114
4115 * config.in: Rebuild.
4116 * configure: Rebuild.
4117 * configure.ac: Don't use AC_HEADER_DIRENT.
4118
a3d08894
TT
41192013-11-18 Tom Tromey <tromey@redhat.com>
4120
4121 * server.h: Don't check HAVE_STRING_H.
4122 * gdbreplay.c: Don't check HAVE_STRING_H.
4123 * configure: Rebuild.
4124
0a5dd17d
TT
41252013-11-18 Tom Tromey <tromey@redhat.com>
4126
4127 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4128 LIBGNU.
4129
1bd2f0ba
TT
41302013-11-08 Tom Tromey <tromey@redhat.com>
4131
4132 * configure, config.in: Rebuild.
4133 * configure.ac: Remove unused configury.
4134
3266f10b
TT
41352013-11-08 Tom Tromey <tromey@redhat.com>
4136
4137 * acinclude.m4: Include common.m4, codeset.m4.
4138 * configure, config.in: Rebuild.
4139 * configure.ac: Use GDB_AC_COMMON.
4140
6682d959
AA
41412013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4142
4143 * linux-s390-low.c (HWCAP_S390_TE): New define.
4144 (s390_arch_setup): Consider the TE field in the HWCAP for
4145 determining 'have_regset_tdb'.
4146
fd0a4d76
SDJ
41472013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4148
4149 PR gdb/16014
4150 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4151 call to sizeof.
4152
1a3d890b
PA
41532013-10-02 Pedro Alves <palves@redhat.com>
4154
4155 * server.c (process_serial_event): Don't output "GDBserver
4156 exiting" if GDB is connected through stdio.
4157 * target.c (mywait): Likewise, be silent if GDB is connected
4158 through stdio.
4159
97ad4581
JB
41602013-10-01 Joel Brobecker <brobecker@adacore.com>
4161
4162 * lynx-low.c (lynx_add_threads_after_attach): New function.
4163 (lynx_attach): Remove call to add_thread. Add call to
4164 lynx_add_threads_after_attach instead.
4165
5b4e221c
MF
41662013-09-28 Mike Frysinger <vapier@gentoo.org>
4167
4168 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4169 * config.in, configure: Regenerated.
4170
ee47b2f8
YQ
41712013-09-18 Yao Qi <yao@codesourcery.com>
4172
4173 PR server/15959
4174 * server.c (start_inferior): Clear 'resume_info'.
4175
d6707650 41762013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4177
d6707650
JW
4178 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4179 for each register.
4180
9243dd0e 41812013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4182
9243dd0e
JW
4183 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4184 linux-tile-low.o to srv_tgtobj.
4185
c623a6ef
WN
41862013-09-16 Will Newton <will.newton@linaro.org>
4187
4188 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4189 out regs.
4190
fb71d39e
PA
41912013-09-06 Pedro Alves <palves@redhat.com>
4192
4193 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4194 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4195 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4196 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4197 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4198 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4199
8e7e9910
PA
42002013-09-06 Pedro Alves <palves@redhat.com>
4201
4202 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4203 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4204
7c3a12ca
PA
42052013-09-06 Pedro Alves <palves@redhat.com>
4206
4207 * linux-amd64-ipa.c: Include tracepoint.h.
4208 * linux-i386-ipa.c: Include tracepoint.h.
4209
8eb3d7b6
RW
42102013-09-06 Ricard Wanderlof <ricardw@axis.com>
4211
4212 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4213 (ps_get_thread_area): New function.
4214
eddddb9d
RW
42152013-09-06 Ricard Wanderlof <ricardw@axis.com>
4216
4217 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4218 (initialize_low_arch): Call init_registers_crisv32 rather than
4219 init_register_crisv32.
4220
533b0600
PA
42212013-09-05 Pedro Alves <palves@redhat.com>
4222
4223 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4224 to ...
4225 * hostio.h: ... this new file.
4226 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4227 win32-low.c: Include hostio.h.
4228
0ce3d3b5
PA
42292013-09-05 Pedro Alves <palves@redhat.com>
4230
4231 * server.h (gdb_client_data, handler_func, callback_handler_func)
4232 (delete_file_handler, add_file_handler, append_callback_event)
4233 (delete_callback_event, start_event_loop, initialize_event_loop):
4234 Move to event-loop.h and include it.
4235 * event-loop.h: New file.
4236
799cdc37
PA
42372013-09-05 Pedro Alves <palves@redhat.com>
4238
4239 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4240 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4241 (loaded_dll, unloaded_dll): Move to ...
4242 * dll.h: ... this new file.
4243 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4244
6a6bbd9d
PA
42452013-09-05 Pedro Alves <palves@redhat.com>
4246
4247 * server.h (current_process, get_thread_process, all_processes)
4248 (add_inferior_to_list, for_each_inferior, current_inferior)
4249 (remove_inferior, add_process, remove_process, find_process_pid)
4250 (have_started_inferiors_p, have_attached_inferiors_p)
4251 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4252 (clear_inferiors, find_inferior, find_inferior_id)
4253 (inferior_target_data, set_inferior_target_data)
4254 (inferior_regcache_data, set_inferior_regcache_data): Move to
4255 inferiors.h, and include it.
4256 * inferiors.h: New file.
4257
f699aaba
PA
42582013-09-05 Pedro Alves <palves@redhat.com>
4259
4260 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4261 Move ...
72f4393d 4262 * ax.h: ... here.
f699aaba 4263
c144c7a0
PA
42642013-09-05 Pedro Alves <palves@redhat.com>
4265
4266 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4267 tracepoint.h.
4268 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4269 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4270 (handle_tracepoint_general_set, handle_tracepoint_query)
4271 (tracepoint_finished_step, tracepoint_was_hit)
4272 (release_while_stepping_state_list, current_traceframe)
4273 (in_readonly_region, traceframe_read_mem)
4274 (fetch_traceframe_registers, traceframe_read_sdata)
4275 (traceframe_read_info, struct fast_tpoint_collect_status)
4276 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4277 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4278 (supply_fast_tracepoint_registers)
4279 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4280 (ipa_tdesc, claim_trampoline_space)
4281 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4282 (agent_mem_read, agent_get_trace_state_variable_value)
4283 (agent_set_trace_state_variable_value, agent_tsv_read)
4284 (agent_mem_read_string, get_raw_reg_func_addr)
4285 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4286 * tracepoint.h: ... this new file.
4287
ff42e6ab
PA
42882013-09-05 Pedro Alves <palves@redhat.com>
4289
4290 * server.h (perror_with_name, error, fatal, warning, paddress)
4291 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4292 include it.
4293 * utils.h: New file.
4294
541af0f4
PA
42952013-09-05 Pedro Alves <palves@redhat.com>
4296
4297 * server.h (remote_debug, noack_mode, transport_is_reliable)
4298 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4299 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4300 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4301 (write_enn, initialize_async_io, enable_async_io)
4302 (disable_async_io, check_remote_input_interrupt_request)
4303 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4304 (dead_thread_notify, prepare_resume_reply)
4305 (decode_address_to_semicolon, decode_address, decode_m_packet)
4306 (decode_M_packet, decode_X_packet, decode_xfer_write)
4307 (decode_search_memory_packet, unhexify, hexify)
4308 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4309 (look_up_one_symbol, relocate_instruction)
4310 (monitor_output): Move to remote-utils.h, and include it.
4311 * remote-utils.h: New file.
4312
eebdf26b
PA
43132013-09-05 Pedro Alves <palves@redhat.com>
4314
4315 * server.h (_): Delete.
4316
3aafd2ff
PA
43172013-09-02 Pedro Alves <palves@redhat.com>
4318
4319 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4320 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4321 allocated.
4322 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4323
cee83bcb
PM
43242013-09-02 Pierre Muller <muller@sourceware.org>
4325
4326 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4327 or WriteProcessMemory complete successfully and handle
4328 ERROR_PARTIAL_COPY error.
4329
9a13b2fa
PA
43302013-09-02 Pedro Alves <palves@redhat.com>
4331
4332 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4333 error instead of EIO.
4334
602e3198
JK
43352013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4336
4337 PR server/15604
4338 * linux-low.c: Include filestuff.h.
4339 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4340 * lynx-low.c: Include filestuff.h.
4341 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4342 * server.c: Include filestuff.h.
4343 (main): Call notice_open_fds.
4344 * spu-low.c: Include filestuff.h.
4345 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4346
96d7229d
LM
43472013-08-22 Luis Machado <lgustavo@codesourcery.com>
4348
4349 * Makefile.in: Explain why ../target and ../nat are not
4350 listed as include file search paths.
4351 (linux-waitpid.o): New object file rule.
4352 * configure.srv (srv_native_linux_obj): New variable.
4353 Replace all occurrences of linux native object files with
4354 $srv_native_linux_obj.
4355 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4356 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4357 (linux_enable_event_reporting): Remove declaration.
4358 (my_waitpid): Moved to common/linux-waitpid.c.
4359 (linux_wait_for_event): Pass ptid when calling
4360 linux_enable_event_reporting.
4361 (linux_supports_tracefork_flag): Remove.
4362 (linux_enable_event_reporting): Likewise.
4363 (linux_tracefork_grandchild): Remove.
4364 (STACK_SIZE): Moved to common/linux-ptrace.c.
4365 (linux_tracefork_child): Remove.
4366 (linux_test_for_tracefork): Remove.
4367 (linux_look_up_symbols): Call linux_supports_traceclone.
4368 (initialize_low): Remove call to linux_test_for_tracefork.
4369 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4370 common/linux-ptrace.h.
4371 (PTRACE_TYPE_ARG4): Likewise.
4372 Include linux-ptrace.h.
4373
32940073
PA
43742013-08-21 Pedro Alves <palves@redhat.com>
4375
4376 * config.in: Renegerate.
4377
33b60d58 43782013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4379
33b60d58
LM
4380 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4381 (SFILES): Remove $(srcdir)/common/target-common.c and
4382 add $(srcdir)/target/waitstatus.c.
4383 (OBS): Remove target-common.o and add waitstatus.o.
4384 (server_h): Remove $(srcdir)/../common/target-common.h and
4385 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4386 and $(srcdir)/../target/waitstatus.h.
4387 (target-common.o): Remove.
4388 (waitstatus.o): New target object file.
4389 * target.h: Do not include target-common.h and
4390 include target/resume.h, target/wait.h and
4391 target/waitstatus.h.
4392
b8e1b30e
LM
43932013-08-13 Luis Machado <lgustavo@codesourcery.com>
4394
4395 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4396 to PTRACE_TYPE_ARG3.
4397 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4398 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4399 PTRACE_TYPE_ARG4.
4400 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4401 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4402
7a60ad40
YQ
44032013-07-27 Jie Zhang <jie@codesourcery.com>
4404 Daniel Jacobowitz <dan@codesourcery.com>
4405 Yao Qi <yao@codesourcery.com>
4406
4407 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4408 (mips-linux-watch.o): New rule.
4409 (mips_linux_watch_h): New variable.
4410 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4411 srv_tgtobj.
4412 * linux-mips-low.c: Include mips-linux-watch.h.
4413 (struct arch_process_info, struct arch_lwp_info): New.
4414 (update_watch_registers_callback): New function.
4415 (mips_linux_new_process, mips_linux_new_thread) New functions.
4416 (mips_linux_prepare_to_resume, mips_insert_point): New
4417 functions.
4418 (mips_remove_point, mips_stopped_by_watchpoint): New
4419 functions.
4420 (rsp_bp_type_to_target_hw_bp_type): New function.
4421 (mips_stopped_data_address): New function.
4422 (the_low_target): Add watchpoint support functions.
4423
de6f69ad
YQ
44242013-07-27 Yao Qi <yao@codesourcery.com>
4425
4426 * i386-low.c: Include break-common.h.
4427 (enum target_hw_bp_type): Remove.
4428
3360c0bf
LM
44292013-07-24 Luis Machado <lgustavo@codesourcery.com>
4430
4431 * Makefile.in (SFILES): /common/target-common.c.
4432 (OBS): Add target-common.o.
4433 (server_h): Add $(srcdir)/../common/target-common.h.
4434 (target-common.o): New target.
4435 * server.c (queue_stop_reply_callback): Free
4436 status string after use.
4437 * target.c (target_waitstatus_to_string): Remove.
4438 * target.h: Include target-common.h.
4439 (resume_kind): Likewise.
4440 (target_waitkind): Likewise.
4441 (target_waitstatus): Likewise.
4442 (TARGET_WNOHANG): Likewise.
4443
bd885420
YQ
44442013-07-04 Yao Qi <yao@codesourcery.com>
4445
4446 * Makefile.in (host_alias): Use @host_noncanonical@.
4447 (target_alias): Use @target_noncanonical@.
4448 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4449 ACX_NONCANONICAL_HOST.
4450 * configure: Regenerated.
4451
4452 Revert:
4453 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4454
4455 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4456 * configure: Rebuild.
4457 * Makefile.in (version_host, version_target): Get from configure.
4458 (version.c): Use $(version_host) and $(version_target).
4459
17ef446e
PA
44602013-07-03 Pedro Alves <palves@redhat.com>
4461
4462 * Makefile.in (config.status): Depend on development.sh.
4463 * acinclude.m4: Include libmcheck.m4.
4464 * configure: Regenerate.
4465
7a9a7487
MG
44662013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4467
4468 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4469 attribute inside the parentheses.
4470 (winapi_DebugSetProcessKillOnExit): Ditto.
4471 (winapi_DebugBreakProcess): Ditto.
4472 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 4473
49b64de6
MG
44742013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4475
4476 * notif.h (notif_event): Add a dummy member to avoid compiler
4477 errors.
4478
d5749ee7
PA
44792013-07-01 Pedro Alves <palves@redhat.com>
4480
4481 * hostio.c (HOSTIO_PATH_MAX): Define.
4482 (require_filename, handle_open, handle_unlink, handle_readlink):
4483 Use it.
4484
d8d2a3ee
PA
44852013-07-01 Pedro Alves <palves@redhat.com>
4486
4487 * server.h: Include "pathmax.h".
4488 * linux-low.c: Don't include sys/param.h.
4489 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4490 MAXPATHLEN.
4491 * win32-low.c: Don't include sys/param.h.
4492 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4493
bc7dea8d
PA
44942013-07-01 Pedro Alves <palves@redhat.com>
4495
4496 * event-loop.c: Don't check HAVE_UNISTD_H before including
4497 <unistd.h>.
4498 * gdbreplay.c: Likewise.
4499 * remote-utils.c: Likewise.
4500 * server.c: Likewise.
4501 * configure.ac: Don't check for unistd.h.
4502 * configure: Regenerate.
4503
d6c2da54
TT
45042013-06-28 Tom Tromey <tromey@redhat.com>
4505
4506 * Makefile.in (version.c): Use version.in, not
4507 common/version.in.
4508
257b6bec
MG
45092013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4510
4511 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4512 * configure: Rebuild.
4513 * Makefile.in (version_host, version_target): Get from configure.
4514 (version.c): Use $(version_host) and $(version_target).
4515
86ebe149
DK
45162013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4517
4518 Fix trace-status to output user name without trailing colon.
4519 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4520
f30aa5af
DK
45212013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4522
4523 Fix trace-status to output proper start-time and stop-time.
4524 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4525 output start time and stop time in hex as gdb expects.
4526
28a93511
YQ
45272013-06-26 Pedro Alves <pedro@codesourcery.com>
4528
4529 * tracepoint.c (build_traceframe_info_xml): Output trace state
4530 variables present in the trace buffer.
4531
01208463
TT
45322013-06-24 Tom Tromey <tromey@redhat.com>
4533
4534 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4535 create-version.sh.
4536 (version.o): Remove.
4537 * gdbreplay.c: Include version.h.
4538 (version, host_name): Don't declare.
4539 * server.h: Include version.h.
4540 (version, host_name): Don't declare.
4541
760256f9
PA
45422013-06-12 Pedro Alves <palves@redhat.com>
4543
4544 * linux-x86-low.c (linux_is_elf64): Delete global.
4545 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4546 with local linux_pid_exe_is_elf_64_file use.
4547
030031ee
PA
45482013-06-11 Pedro Alves <palves@redhat.com>
4549
4550 * linux-low.c (regset_disabled, disable_regset): New functions.
4551 (regsets_fetch_inferior_registers)
4552 (regsets_store_inferior_registers): Use them.
4553 (initialize_regsets_info); Don't allocate the disabled_regsets
4554 array here.
4555 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4556 comment.
4557
5da6eb0a
PA
45582013-06-11 Pedro Alves <palves@redhat.com>
4559
4560 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4561 xmalloc.
4562
7e5aaa09
PA
45632013-06-11 Pedro Alves <palves@redhat.com>
4564
4565 * linux-x86-low.c (initialize_low_arch): Call
4566 init_registers_x32_avx_linux.
4567
d878444c
JK
45682013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4569
4570 Fix compatibility with Android Bionic.
4571 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4572 it is not empty.
4573
3aee8918
PA
45742013-06-07 Pedro Alves <palves@redhat.com>
4575
5f2b57b5 4576 PR server/14823
3aee8918
PA
4577 * Makefile.in (OBS): Add tdesc.o.
4578 (IPA_OBJS): Add tdesc-ipa.o.
4579 (tdesc-ipa.o): New rule.
4580 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4581 interface.
4582 * linux-low.c (new_inferior): Delete.
4583 (disabled_regsets, num_regsets): Delete.
4584 (linux_add_process): Adjust to set the new per-process
4585 new_inferior flag.
4586 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4587 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4588 was a stop. When calling arch_setup, switch the current inferior
4589 to the thread that got an event.
4590 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4591 (regsets_fetch_inferior_registers)
4592 (regsets_store_inferior_registers): New regsets_info parameter.
4593 Adjust to use it.
4594 (linux_register_in_regsets): New regs_info parameter. Adjust to
4595 use it.
4596 (register_addr, fetch_register, store_register): New usrregs_info
4597 parameter. Adjust to use it.
4598 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4599 parameter regs_info. Adjust to use it.
4600 (linux_fetch_registers): Get the current inferior's regs_info, and
4601 adjust to use it.
4602 (linux_store_registers): Ditto.
4603 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4604 (initialize_low): Don't initialize the target_regsets here. Call
4605 initialize_low_arch.
4606 * linux-low.h (target_regsets): Delete declaration.
4607 (struct regsets_info): New.
4608 (struct usrregs_info): New.
4609 (struct regs_info): New.
4610 (struct process_info_private) <new_inferior>: New field.
4611 (struct linux_target_ops): Delete the num_regs, regmap, and
4612 regset_bitmap fields. New field regs_info.
4613 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4614 * i387-fp.c (num_xmm_registers): Delete.
4615 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4616 calls to new interface.
4617 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4618 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4619 Infer the number of xmm registers from the regcache's target
4620 description.
4621 * i387-fp.h (num_xmm_registers): Delete.
4622 * inferiors.c (add_thread): Don't install the thread's regcache
4623 here.
4624 * proc-service.c (gregset_info): Fetch the current inferior's
4625 regs_info. Adjust to use it.
4626 * regcache.c: Include tdesc.h.
4627 (register_bytes, reg_defs, num_registers)
4628 (gdbserver_expedite_regs): Delete.
4629 (get_thread_regcache): If the thread doesn't have a regcache yet,
4630 create one, instead of aborting gdbserver.
4631 (regcache_invalidate_one): Rename to ...
4632 (regcache_invalidate_thread): ... this.
4633 (regcache_invalidate_one): New.
4634 (regcache_invalidate): Only invalidate registers of the current
4635 process.
4636 (init_register_cache): Add target_desc parameter, and use it.
4637 (new_register_cache): Ditto. Assert the target description has a
4638 non zero registers_size.
4639 (regcache_cpy): Add assertions. Adjust.
4640 (realloc_register_cache, set_register_cache): Delete.
4641 (registers_to_string, registers_from_string): Adjust.
4642 (find_register_by_name, find_regno, find_register_by_number)
4643 (register_cache_size): Add target_desc parameter, and use it.
4644 (free_register_cache_thread, free_register_cache_thread_one)
4645 (regcache_release, register_cache_size): New.
4646 (register_size): Add target_desc parameter, and use it.
4647 (register_data, supply_register, supply_register_zeroed)
4648 (supply_regblock, supply_register_by_name, collect_register)
4649 (collect_register_as_string, collect_register_by_name): Adjust.
4650 * regcache.h (struct target_desc): Forward declare.
4651 (struct regcache) <tdesc>: New field.
4652 (init_register_cache, new_register_cache): Add target_desc
4653 parameter.
4654 (regcache_invalidate_thread): Declare.
4655 (regcache_invalidate_one): Delete declaration.
4656 (regcache_release): Declare.
4657 (find_register_by_number, register_cache_size, register_size)
4658 (find_regno): Add target_desc parameter.
4659 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4660 declarations.
4661 * remote-utils.c: Include tdesc.h.
4662 (outreg, prepare_resume_reply): Adjust.
4663 * server.c: Include tdesc.h.
4664 (gdbserver_xmltarget): Delete declaration.
4665 (get_features_xml, process_serial_event): Adjust.
4666 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4667 declare.
4668 (struct process_info) <tdesc>: New field.
4669 (ipa_tdesc): Declare.
4670 * tdesc.c: New file.
4671 * tdesc.h: New file.
4672 * tracepoint.c: Include tdesc.h.
4673 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4674 (get_context_regcache): Adjust to pass ipa_tdesc down.
4675 (do_action_at_tracepoint): Adjust to get the register cache size
4676 from the context regcache's description.
4677 (traceframe_walk_blocks): Adjust to get the register cache size
4678 from the current trace frame's description.
4679 (traceframe_get_pc): Adjust to get current trace frame's
4680 description and pass it down.
4681 (gdb_collect): Adjust to get the register cache size from the
4682 IPA's description.
4683 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4684 (gdbserver_xmltarget): Delete.
4685 (initialize_low_tracepoint): Set the ipa's target description.
4686 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4687 (initialize_low_tracepoint): Set the ipa's target description.
4688 * linux-x86-low.c: Include tdesc.h.
4689 [__x86_64__] (is_64bit_tdesc): New.
4690 (ps_get_thread_area, x86_get_thread_area): Use it.
4691 (i386_cannot_store_register): Rename to ...
4692 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4693 (i386_cannot_fetch_register): Rename to ...
4694 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4695 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4696 to new interface.
4697 (target_regsets): Rename to ...
4698 (x86_regsets): ... this.
4699 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4700 interface.
4701 (x86_siginfo_fixup): Use is_64bit_tdesc.
4702 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4703 (tdesc_x32_avx_linux, tdesc_x32_linux)
4704 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4705 Declare.
4706 (x86_linux_update_xmltarget): Delete.
4707 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4708 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4709 (AMD64_LINUX_USER64_CS): New.
4710 (x86_linux_read_description): New, based on
4711 x86_linux_update_xmltarget.
4712 (same_process_callback): New.
4713 (x86_arch_setup_process_callback): New.
4714 (x86_linux_update_xmltarget): New.
4715 (x86_regsets_info): New.
4716 (amd64_linux_regs_info): New.
4717 (i386_linux_usrregs_info): New.
4718 (i386_linux_regs_info): New.
4719 (x86_linux_regs_info): New.
4720 (x86_arch_setup): Reimplement.
4721 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4722 (x86_emit_ops): Ditto.
4723 (the_low_target): Adjust. Install x86_linux_regs_info,
4724 x86_cannot_fetch_register, and x86_cannot_store_register.
4725 (initialize_low_arch): New.
4726 * linux-ia64-low.c (tdesc_ia64): Declare.
4727 (ia64_fetch_register): Adjust.
4728 (ia64_usrregs_info, regs_info): New globals.
4729 (ia64_regs_info): New function.
4730 (the_low_target): Adjust.
4731 (initialize_low_arch): New function.
4732 * linux-sparc-low.c (tdesc_sparc64): Declare.
4733 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4734 Adjust.
4735 (sparc_arch_setup): New function.
4736 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4737 (the_low_target): Adjust.
4738 (initialize_low_arch): New function.
4739 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4740 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4741 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4742 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4743 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4744 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4745 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4746 (tdesc_powerpc_isa205_vsx64l): Declare.
4747 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4748 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4749 (ppc_set_pc, ppc_get_hwcap): Adjust.
4750 (ppc_usrregs_info): Forward declare.
4751 (!__powerpc64__) ppc_regmap_adjusted: New global.
4752 (ppc_arch_setup): Adjust to the current process'es target
4753 description.
4754 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4755 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4756 (ppc_store_evrregset): Adjust.
4757 (target_regsets): Rename to ...
4758 (ppc_regsets): ... this, and make static.
4759 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4760 (ppc_regs_info): New function.
4761 (the_low_target): Adjust.
4762 (initialize_low_arch): New function.
4763 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4764 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4765 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4766 (tdesc_s390x_linux64v2): Declare.
4767 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4768 (s390_fill_gregset, s390_store_last_break): Adjust.
4769 (target_regsets): Rename to ...
4770 (s390_regsets): ... this, and make static.
4771 (s390_get_pc, s390_set_pc): Adjust.
4772 (s390_get_hwcap): New target_desc parameter, and use it.
4773 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4774 (s390_arch_setup): Adjust to set the current process'es target
4775 description. Don't adjust the regmap.
4776 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4777 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4778 (regs_info_3264): New globals.
4779 (s390_regs_info): New function.
4780 (the_low_target): Adjust.
4781 (initialize_low_arch): New function.
4782 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4783 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4784 [__mips64] (init_registers_mips_linux)
4785 (init_registers_mips_dsp_linux): Delete defines.
4786 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4787 (have_dsp): New global.
4788 (mips_read_description): New, based on mips_arch_setup.
4789 (mips_arch_setup): Reimplement.
4790 (get_usrregs_info): New function.
4791 (mips_cannot_fetch_register, mips_cannot_store_register)
4792 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4793 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4794 (target_regsets): Rename to ...
4795 (mips_regsets): ... this, and make static.
4796 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4797 (dsp_regs_info, regs_info): New globals.
4798 (mips_regs_info): New function.
4799 (the_low_target): Adjust.
4800 (initialize_low_arch): New function.
4801 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4802 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4803 Declare.
4804 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4805 (arm_read_description): New, with bits factored from
4806 arm_arch_setup.
4807 (arm_arch_setup): Reimplement.
4808 (target_regsets): Rename to ...
4809 (arm_regsets): ... this, and make static.
4810 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4811 (arm_regs_info): New function.
4812 (the_low_target): Adjust.
4813 (initialize_low_arch): New function.
4814 * linux-m68k-low.c (tdesc_m68k): Declare.
4815 (target_regsets): Rename to ...
4816 (m68k_regsets): ... this, and make static.
4817 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4818 (m68k_regs_info): New function.
4819 (m68k_arch_setup): New function.
4820 (the_low_target): Adjust.
4821 (initialize_low_arch): New function.
4822 * linux-sh-low.c (tdesc_sharch): Declare.
4823 (target_regsets): Rename to ...
4824 (sh_regsets): ... this, and make static.
4825 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4826 (sh_regs_info, sh_arch_setup): New functions.
4827 (the_low_target): Adjust.
4828 (initialize_low_arch): New function.
4829 * linux-bfin-low.c (tdesc_bfin): Declare.
4830 (bfin_arch_setup): New function.
4831 (bfin_usrregs_info, regs_info): New globals.
4832 (bfin_regs_info): New function.
4833 (the_low_target): Adjust.
4834 (initialize_low_arch): New function.
4835 * linux-cris-low.c (tdesc_cris): Declare.
4836 (cris_arch_setup): New function.
4837 (cris_usrregs_info, regs_info): New globals.
4838 (cris_regs_info): New function.
4839 (the_low_target): Adjust.
4840 (initialize_low_arch): New function.
4841 * linux-cris-low.c (tdesc_crisv32): Declare.
4842 (cris_arch_setup): New function.
4843 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4844 (cris_regs_info): New function.
4845 (the_low_target): Adjust.
4846 (initialize_low_arch): New function.
4847 * linux-m32r-low.c (tdesc_m32r): Declare.
4848 (m32r_arch_setup): New function.
4849 (m32r_usrregs_info, regs_info): New globals.
4850 (m32r_regs_info): Adjust.
4851 (initialize_low_arch): New function.
4852 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4853 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4854 (tic6x_usrregs_info): Forward declare.
4855 (tic6x_read_description): New function, based on ...
4856 (tic6x_arch_setup): ... this. Reimplement.
4857 (target_regsets): Rename to ...
4858 (tic6x_regsets): ... this, and make static.
4859 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4860 (tic6x_regs_info): New function.
4861 (the_low_target): Adjust.
4862 (initialize_low_arch): New function.
4863 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4864 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4865 (target_regsets): Rename to ...
4866 (xtensa_regsets): ... this, and make static.
4867 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4868 globals.
4869 (xtensa_arch_setup, xtensa_regs_info): New functions.
4870 (the_low_target): Adjust.
4871 (initialize_low_arch): New function.
4872 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4873 (nios2_arch_setup): Set the current process'es tdesc.
4874 (target_regsets): Rename to ...
4875 (nios2_regsets): ... this.
4876 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4877 (nios2_regs_info): New function.
4878 (the_low_target): Adjust.
4879 (initialize_low_arch): New function.
a261b8f5
PA
4880 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4881 (aarch64_arch_setup): Set the current process'es tdesc.
4882 (target_regsets): Rename to ...
4883 (aarch64_regsets): ... this.
4884 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4885 (aarch64_regs_info): New function.
4886 (the_low_target): Adjust.
4887 (initialize_low_arch): New function.
3aee8918
PA
4888 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4889 globals.
4890 (target_regsets): Rename to ...
4891 (tile_regsets): ... this.
4892 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4893 (tile_regs_info): New function.
4894 (tile_arch_setup): Set the current process'es tdesc.
4895 (the_low_target): Adjust.
4896 (initialize_low_arch): New function.
4897 * spu-low.c (tdesc_spu): Declare.
4898 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4899 * win32-arm-low.c (tdesc_arm): Declare.
4900 (arm_arch_setup): New function.
4901 (the_low_target): Install arm_arch_setup instead of
4902 init_registers_arm.
4903 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4904 (init_windows_x86): Rename to ...
4905 (i386_arch_setup): ... this. Set `win32_tdesc'.
4906 (the_low_target): Adjust.
4907 * win32-low.c (win32_tdesc): New global.
4908 (child_add_thread): Don't create the thread cache here.
4909 (do_initial_child_stuff): Set the new process'es tdesc.
4910 * win32-low.h (struct target_desc): Forward declare.
4911 (win32_tdesc): Declare.
4912 * lynx-i386-low.c (tdesc_i386): Declare global.
4913 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4914 * lynx-low.c (lynx_tdesc): New global.
4915 (lynx_add_process): Set the new process'es tdesc.
4916 * lynx-low.h (struct target_desc): Forward declare.
4917 (lynx_tdesc): Declare global.
4918 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4919 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4920 * nto-low.c (nto_tdesc): New global.
4921 (do_attach): Set the new process'es tdesc.
4922 * nto-low.h (struct target_desc): Forward declare.
4923 (nto_tdesc): Declare.
4924 * nto-x86-low.c (tdesc_i386): Declare.
4925 (nto_x86_arch_setup): Set `nto_tdesc'.
4926
b1fbec62
GB
49272013-06-04 Gary Benson <gbenson@redhat.com>
4928
4929 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4930 to qSupported response when appropriate.
4931 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4932 with nonzero-length annex.
4933 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4934 arguments supplied in annex.
4935
d1ec4ce7
DE
49362013-05-31 Doug Evans <dje@google.com>
4937
ac44adcb 4938 PR server/15594
d1ec4ce7
DE
4939 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4940 64 bits in 64-cross-32 environment.
4941
9b25f2d3
PA
49422013-05-28 Pedro Alves <palves@redhat.com>
4943
4944 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4945 (aarch64-without-fpu.c): Delete rule.
4946 * configure.srv (aarch64*-*-linux*): Remove references to
4947 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4948 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4949 declaration.
4950
6740dc9c
PA
49512013-05-24 Pedro Alves <palves@redhat.com>
4952
4953 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4954 instead of strchr/decode_address. Error if the range isn't split
4955 with a ','. Don't assume there's be a ':' in the action.
4956
c2d6af84
PA
49572013-05-23 Yao Qi <yao@codesourcery.com>
4958 Pedro Alves <palves@redhat.com>
4959
4960 * linux-low.c (lwp_in_step_range): New function.
4961 (linux_wait_1): If the thread was range stepping and stopped
4962 outside the stepping range, report the stop to GDB. Otherwise,
4963 continue stepping. Add range stepping debug output.
4964 (linux_set_resume_request): Copy the step range from the resume
4965 request to the lwp.
4966 (linux_supports_range_stepping): New.
4967 (linux_target_ops) <supports_range_stepping>: Set to
4968 linux_supports_range_stepping.
4969 * linux-low.h (struct linux_target_ops)
4970 <supports_range_stepping>: New field.
4971 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4972 * linux-x86-low.c (x86_supports_range_stepping): New.
4973 (the_low_target) <supports_range_stepping>: Set to
4974 x86_supports_range_stepping.
4975 * server.c (handle_v_cont): Handle 'r' action.
4976 (handle_v_requests): Append ";r" if the target supports range
4977 stepping.
4978 * target.h (struct thread_resume) <step_range_start,
4979 step_range_end>: New fields.
4980 (struct target_ops) <supports_range_stepping>:
4981 New field.
4982 (target_supports_range_stepping): New macro.
4983
58794e1a
JB
49842013-05-17 Joel Brobecker <brobecker@adacore.com>
4985
4986 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4987 confusion in comment.
4988
d631c5a7
JB
49892013-05-17 Joel Brobecker <brobecker@adacore.com>
4990
4991 * lynx-low.c (struct process_info_private): New type.
4992 (lynx_add_process): New function.
4993 (lynx_create_inferior, lynx_attach): Replace calls to
4994 add_process by calls to lynx_add_process.
4995 (lynx_resume): If PTID is null, then try using
4996 current_process()->private->last_wait_event_ptid.
4997 Add comments.
4998 (lynx_clear_inferiors): Delete. The contents of that function
4999 has been inlined in lynx_mourn;
5000 (lynx_wait_1): Save the ptid in the process's private data.
5001 (lynx_mourn): Free the process' private data. Replace call
5002 to lynx_clear_inferiors by call to clear_inferiors.
5003
96f7a20f
YQ
50042013-05-17 Yao Qi <yao@codesourcery.com>
5005
5006 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5007 the right place.
5008
db0dfaa0
LM
50092013-05-16 Luis Machado <lgustavo@codesourcery.com>
5010
5011 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5012 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5013 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5014 PT_TEXT_END_ADDR guards. Update comments.
5015 (linux_target_op) <read_offsets>: Conditionally define to
5016 linux_read_offsets if the target is UCLIBC and if it defines
5017 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5018
68f5f838
SL
50192013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5020 Andrew Jenner <andrew@codesourcery.com>
5021
5022 * Makefile.in (SFILES): Add linux-nios2-low.c.
5023 (clean): Add action to delete nios2-linux.c.
5024 (nios2-linux.c): New rule.
5025 * configure.srv: Add nios2*-*-linux*.
5026 * linux-nios2-low.c: New.
5027
1ebff1fd
HAQ
50282013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5029
5030 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5031
f6150862
HZ
50322013-04-25 Hui Zhu <hui@codesourcery.com>
5033
5034 PR gdb/15186
f6150862
HZ
5035 * ax.c (ax_printf): Add fflush.
5036
614c279d
TT
50372013-04-22 Tom Tromey <tromey@redhat.com>
5038
5039 * Makefile.in (SFILES): Add filestuff.c.
5040 (OBS): Add filestuff.o.
5041 (filestuff.o): New target.
5042 * config.in, configure: Rebuild.
5043 * configure.ac: Check for fdwalk, pipe2.
5044
7d4e5717
PA
50452013-04-17 Pedro Alves <palves@redhat.com>
5046
5047 * configure.ac (USE_THREAD_DB): Delete variable.
5048 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5049 Don't AC_SUBST USE_THREAD_DB.
5050 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5051 * config.in, configure: Regenerate.
5052
d5c93e41
PA
50532013-04-16 Pedro Alves <palves@redhat.com>
5054
5055 * linux-low.h (struct lwp_info) <thread_known>: Move under
5056 the USE_THREAD_DB #ifdef.
5057
04f5fe89
PA
50582013-04-16 Pedro Alves <palves@redhat.com>
5059
5060 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5061 (linux-low.o): Delete rule.
5062 * linux-low.h: Always include "gdb_thread_db.h" instead of
5063 conditionally including thread_db.h.
5064 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5065 HAVE_THREAD_DB_H.
5066
480b27bf
JK
50672013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5068
5069 * Makefile.in (install-only): Fix make install regression.
5070
43662968
JK
50712013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5072
5073 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5074 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5075 installation.
5076 * gdbserver.1: Remove.
5077
3e74e146
PA
50782013-03-22 Pedro Alves <palves@redhat.com>
5079
5080 * linux-low.c (handle_extended_wait): Don't call
5081 linux_enable_event_reporting.
5082
a8347a2a
TT
50832013-03-15 Tony Theodore <tonyt@logyst.com>
5084
5085 PR build/9098:
5086 * Makefile.in (SHELL): Use @SHELL@.
5087
eeb56fa7
SDJ
50882013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5089
5090 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5091 compiler warning.
5092
4fa7e2ff
JB
50932013-03-13 Joel Brobecker <brobecker@adacore.com>
5094
5095 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5096 Remove extraneous NULL element.
5097
8ddb1965
YQ
50982013-03-13 Yao Qi <yao@codesourcery.com>
5099
5100 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5101 'V' block in trace frame.
5102
9accd112
MM
51032013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5104
5105 * target.h (struct target_ops): Add btrace ops.
5106 (target_supports_btrace): New macro.
5107 (target_enable_btrace): New macro.
5108 (target_disable_btrace): New macro.
5109 (target_read_btrace): New macro.
5110 * gdbthread.h (struct thread_info): Add btrace field.
5111 * server.c: Include btrace-common.h.
5112 (handle_btrace_general_set): New function.
5113 (handle_btrace_enable): New function.
5114 (handle_btrace_disable): New function.
5115 (handle_general_set): Call handle_btrace_general_set.
5116 (handle_qxfer_btrace): New function.
5117 (struct qxfer qxfer_packets[]): Add btrace entry.
5118 * inferiors.c (remove_thread): Disable btrace.
5119 * linux-low: Include linux-btrace.h.
5120 (linux_low_enable_btrace): New function.
5121 (linux_low_read_btrace): New function.
5122 (linux_target_ops): Add btrace ops.
5123 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5124 Add srv_linux_btrace=yes.
5125 (x86_64-*-linux*): Add linux-btrace.o.
5126 Add srv_linux_btrace=yes.
5127 * configure.ac: Define HAVE_LINUX_BTRACE.
5128 * config.in: Regenerated.
5129 * configure: Regenerated.
5130
5cc22e4c
MM
51312013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5132
5133 * server.c (handle_qxfer): Preserve error message if -3 is
5134 returned.
5135 (qxfer): Document the -3 return value.
5136
7c97f91e
MM
51372013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5138
5139 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5140 (linux_btrace_h): New variable.
5141 (linux-btrace.o): New rule.
5142
be9a119c 51432013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
5144 Hafiz Abid Qadeer <abidh@codesourcery.com>
5145
5146 * tracepoint.c (trace_buffer_size): New global.
5147 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5148 (init_trace_buffer): Change to one-argument function. Allocate
5149 trace buffer memory.
5150 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5151 handle QTBuffer:size packet.
5152 (cmd_bigqtbuffer_size): New function.
5153 (initialize_tracepoint): Call init_trace_buffer with
5154 DEFAULT_TRACE_BUFFER_SIZE.
5155 * server.c (handle_query): Add QTBuffer:size in the
5156 supported packets.
5157
e64f7499
YQ
51582013-03-07 Yao Qi <yao@codesourcery.com>
5159
5160 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5161 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5162 of -1.
5163 (cmd_qtsp): Adjust condition. Do post increment.
5164 Set cur_action and cur_step_action back to 0.
5165
f0ae6fc3
PA
51662013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5167
5168 PR server/15236
5169 * linux-low.c (linux_write_memory): Return early success if LEN is
5170 zero.
5171
b5b0b0af
CV
51722013-03-05 Corinna Vinschen <vinschen@redhat.de>
5173
334ad4a8 5174 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 5175
589bc927
TT
51762013-02-28 Tom Tromey <tromey@redhat.com>
5177
5178 * configure.ac: Invoke AC_SYS_LARGEFILE.
5179 * configure, config.in: Rebuild.
5180
dfe07582
CV
51812013-02-28 Corinna Vinschen <vinschen@redhat.com>
5182
5183 * win32-low.c: Throughout, fix format strings and casts of
5184 printf-like functions to avoid type related warnings on all
5185 platforms.
5186 (get_child_debug_event): Print dwDebugEventCode as hex since
5187 that's how it's usually documented.
5188
736cd585
YQ
51892013-02-28 Yao Qi <yao@codesourcery.com>
5190
5191 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5192 pulongest.
5193
e1f58301
JW
51942013-02-27 Jiong Wang <jiwang@tilera.com>
5195
5196 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5197 (reg-tilegx32.c): New rule.
5198 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5199 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5200 different register info initializer according to elf class.
5201 (init_registers_tilgx32): New function. The tilegx32 register info
5202 initializer.
5203 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5204 (tile_store_gregset): Likewise.
5205
d171ca78
YQ
52062013-02-27 Yao Qi <yao@codesourcery.com>
5207
5208 * server.c (process_point_options): Print debug message when
5209 debug_threads is true.
5210
282bbdf3
YQ
52112013-02-26 Yao Qi <yao@codesourcery.com>
5212
5213 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5214
aca22551
PA
52152013-02-19 Pedro Alves <palves@redhat.com>
5216 Kai Tietz <ktietz@redhat.com>
5217
5218 PR gdb/15161
5219
5220 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5221 instead of strtoul to extract address from packet.
5222 (process_serial_event) <'z'>: Likewise.
5223
4f3cee1c
YQ
52242013-02-18 Yao Qi <yao@codesourcery.com>
5225
5226 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5227
8e1d55a3
PA
52282013-02-14 Pedro Alves <palves@redhat.com>
5229
5230 Plug memory leak.
5231
5232 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5233 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5234
458820da
PA
52352013-02-14 Pedro Alves <palves@redhat.com>
5236
5237 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5238
baea0dae
PA
52392013-02-14 Pedro Alves <palves@redhat.com>
5240
5241 * tracepoint.c (save_string): Delete.
5242 (add_tracepoint_action): Use savestring instead of save_string.
5243
0b1afbb3
PA
52442013-02-12 Pedro Alves <palves@redhat.com>
5245
5246 * linux-xtensa-low.c: Ditto.
5247 * xtensa-xtregs.c: Ditto.
5248
8a4ac37e
PA
52492013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5250
5251 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5252 thread_db.
5253
148de6bb
MS
52542013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5255
5256 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5257 aarch64_num_wp_regs and aarch64_num_bp_regs to
5258 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5259
55fac6e0
MS
52602013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5261
5262 * linux-aarch64-low.c (ps_get_thread_area): Replace
5263 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5264
176eb98c
MS
52652013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5266 Marcus Shawcroft <marcus.shawcroft@arm.com>
5267 Nigel Stephens <nigel.stephens@arm.com>
5268 Yufeng Zhang <yufeng.zhang@arm.com>
5269
5270 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5271 (aarch64.c, aarch64-without-fpu.c): New targets.
5272 * configure.srv (aarch64*-*-linux*): New.
5273 * linux-aarch64-low.c: New file.
5274
56f7af9c
MS
52752013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5276
43aaf8b6 5277 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5278 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5279 (dequeue_one_deferred_signal, linux_resume_one_thread)
5280 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5281 (linux_tracefork_grandchild, linux_test_for_tracefork)
5282 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5283 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5284 where the argument is 0.
5285
60f662b0
YQ
52862013-01-25 Yao Qi <yao@codesourcery.com>
5287
5288 * event-loop.c: Include "queue.h".
5289 (gdb_event_p): New typedef.
5290 (struct gdb_event) <next_event>: Remove.
5291 (event_queue): Change to QUEUE(gdb_event_p).
5292 (async_queue_event): Remove.
5293 (gdb_event_xfree): New.
5294 (initialize_event_loop): New.
5295 (process_event): Use API from QUEUE.
5296 (wait_for_event): Likewise.
5297 * server.c (main): Call initialize_event_loop.
5298 * server.h (initialize_event_loop): Declare.
5299
5ae4861a
YQ
53002013-01-18 Yao Qi <yao@codesourcery.com>
5301
5302 * ax.h (struct eval_agent_expr_context): New.
5303 (gdb_eval_agent_expr): Update declaration.
5304 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5305 TFRAME. Add new argument CTX.
5306 * server.h (struct eval_agent_expr_context): Declare.
5307 (agent_mem_read, agent_tsv_read): Update declaration.
5308 (agent_mem_read_string): Likewise.
5309 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5310 (add_traceframe_block): Add new argument TPOINT.
5311 Increase TPOINT->traceframe_usage.
5312 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5313 eval_tracepoint_agent_expr.
5314 (condition_true_at_tracepoint): Likewise.
5315 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5316 (agent_mem_read_string, agent_tsv_read): Likewise.
5317
85e00e85
YQ
53182013-01-16 Yao Qi <yao@codesourcery.com>
5319
5320 * linux-low.c (linux_resume_one_lwp): Don't check
5321 'lwp->bp_reinsert != 0'.
5322
4039cf45
JB
53232013-01-07 Joel Brobecker <brobecker@adacore.com>
5324 Pedro Alves <palves@redhat.com>
5325
5326 * lynx-low.c (ptrace_request_to_str): Define a temporary
5327 macro and use it to simplify this function's implementation.
5328
9044dee2
JB
53292013-01-07 Joel Brobecker <brobecker@adacore.com>
5330
5331 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5332 sets errno.
5333
e6352c8f
JB
53342013-01-07 Joel Brobecker <brobecker@adacore.com>
5335
5336 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5337
50681a27
JB
53382013-01-07 Joel Brobecker <brobecker@adacore.com>
5339
5340 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5341
3f6e77ef
JB
53422013-01-07 Joel Brobecker <brobecker@adacore.com>
5343
5344 * lynx-low.c (lynx_resume): Use the resume_info parameter
5345 to determine the ptid for the lynx_ptrace call, unless
5346 it is equal to minus_one_ptid, in which case we use the
5347 ptid of the current_inferior.
5348 (lynx_wait_1): After having received a thread create/exit
5349 event, resume the inferior's execution using the signaling
5350 thread's ptid, rather than the old ptid.
5351
7fda33ae
JB
53522013-01-07 Joel Brobecker <brobecker@adacore.com>
5353
5354 * lynx-low.c (lynx_resume): Delete variable ret.
5355
b9786c74
JB
53562013-01-01 Joel Brobecker <brobecker@adacore.com>
5357
5358 * gdbreplay.c (gdbreplay_version): Update copyright year.
5359 * server.c (gdbserver_version): Likewise.
5360
8b93d60f
JB
53612012-12-17 Joel Brobecker <brobecker@adacore.com>
5362
5363 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5364 new thread.
5365
037335a7
JB
53662012-12-17 Joel Brobecker <brobecker@adacore.com>
5367
5368 * lynx-low.c (ptrace_request_to_str): Add handling for
5369 PTRACE_GETTRACESIG.
5370
52d4cbd8
JB
53712012-12-17 Joel Brobecker <brobecker@adacore.com>
5372
5373 * lynx-low.c (lynx_attach): Delete variable new_process.
5374
ab8f6ca9
JB
53752012-12-17 Joel Brobecker <brobecker@adacore.com>
5376
5377 * lynx-low.c (lynx_create_inferior): Delete variable
5378 new_process.
5379
78cbc024
JB
53802012-12-17 Joel Brobecker <brobecker@adacore.com>
5381
5382 * lynx-low.c (ptrace_request_to_str): Do not handle
5383 PTRACE_GETTHREADLIST if this macro does not exist.
5384
14a00470
YQ
53852012-12-15 Yao Qi <yao@codesourcery.com>
5386
5387 * Makefile.in (OBS): Add notif.o.
5388 * notif.c, notif.h: New.
5389 * server.c: Include "notif.h".
5390 (struct vstop_notif) <next>: Remove.
5391 <base>: New field.
5392 (queue_stop_reply): Update.
5393 (push_event, send_next_stop_reply): Remove.
5394 (discard_queued_stop_replies): Update.
5395 (notif_stop): New variable.
5396 (handle_v_stopped): Remove.
5397 (handle_v_requests): Don't call handle_v_stopped. Call
5398 handle_ack_notif instead.
5399 (queue_stop_reply_callback): Call notif_event_enque instead
5400 of queue_stop_reply.
5401 (handle_status): Don't call send_next_stop_reply, call
5402 notif_write_event instead.
5403 (kill_inferior_callback): Likewise.
5404 (detach_or_kill_inferior_callback): Likewise.
5405 (main): Call initialize_notif.
5406 (process_serial_event): Call QUEUE_is_empty.
5407 (handle_target_event): Call notif_push instead of push event.
5408 * server.h (push_event): Remove declaration.
5409
61c125b9
TT
54102012-12-10 Tom Tromey <tromey@redhat.com>
5411
5412 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5413 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5414 macros.
5415 (.c.o): Rewrite.
5416 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5417 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5418 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5419 (amd64-linux-ipa.o, ax.o): Rewrite.
5420 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5421 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5422 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5423 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5424 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5425 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5426 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5427 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5428 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5429 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5430 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5431 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5432 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5433 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5434 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5435 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5436 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5437 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5438 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5439 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5440 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5441 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5442 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5443 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5444 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5445 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5446 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5447 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5448 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5449 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5450 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5451 (reg-tilegx.o): Remove.
5452 (all_object_files): New macro.
5453 Include .deps files.
5454 * aclocal.m4, configure: Rebuild.
5455 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5456 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5457 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5458
e90e9ad9
TT
54592012-12-05 Tom Tromey <tromey@redhat.com>
5460
5461 PR gdb/14917:
5462 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5463
02d403bf 54642012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
5465
5466 * configure.ac: Check for linux/perf_event.h.
5467 * config.in: Regenerated.
5468 * configure: Regenerated.
5469
0270a750
PA
54702012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5471
5472 * hostio.c (handle_readlink): Decrease buffer size
5473 parameter passed to readlink by one byte.
5474
8c29b58e
YQ
54752012-11-26 Yao Qi <yao@codesourcery.com>
5476
5477 * configure.ac (build_warnings): Append '-Wempty-body'.
5478 * configure: Regenerated.
5479 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5480 body.
5481
8bdce1ff
PM
54822012-11-15 Pierre Muller <muller@sourceware.org>
5483
5484 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5485 * config.in: Regenerate.
5486 * configure: Regenerate.
5487 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5488 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5489 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5490 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5491 header.
5492 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5493 instead of <sys/wait.h> header.
5494 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5495
02d403bf 54962012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
5497
5498 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5499 (various make rules): Remove -DGDBSERVER
5500
fbd5db48
YQ
55012012-11-09 Yao Qi <yao@codesourcery.com>
5502
5503 * spu-low.c (current_ptid): Move it to ..
5504 * gdbthread.h: ... here. New.
5505 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5506 * server.c (myresume, process_serial_event): Likewise.
5507 * thread-db.c (thread_db_find_new_threads): Likewise.
5508 * tracepoint.c (run_inferior_command): Likewise.
5509
b3dc46ff
AB
55102012-10-01 Andrew Burgess <aburgess@broadcom.com>
5511
5512 * server.c (handle_search_memory_1): Include access length in
5513 warning message.
5514
07c04788
HPN
55152012-09-05 Michael Brandt <michael.brandt@axis.com>
5516
5517 * linux-crisv32-low.c: Fix compile errors.
5518
918d227b
YQ
55192012-09-04 Yao Qi <yao@codesourcery.com>
5520
5521 * tracepoint.c (cmd_qtsv): Adjust debug message.
5522 Don't check CUR_TPOINT.
5523
18c1b81a
YQ
55242012-08-28 Yao Qi <yao@codesourcery.com>
5525
5526 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5527 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5528 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5529 Remove declarations of xmalloc, xreallloc, xstrdup and
5530 freeargv.
5531 * Makefile.in (libiberty_h): New.
5532 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5533 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5534
dc82f37b
YQ
55352012-08-23 Yao Qi <yao@codesourcery.com>
5536
5537 * server.h: Remove declaration of 'xsnprintf'.
5538
406b1477
KS
55392012-08-22 Keith Seitz <keiths@redhat.com>
5540
5541 * server.h: Include build-gnulib-gbserver/config.h.
5542 * gdbreplay.c: Likewise.
5543
e6712ff1
DE
55442012-08-08 Doug Evans <dje@google.com>
5545
5546 * Makefile.in (SFILES): Add gdb_vecs.c.
5547 (OBS): Add gdb_vecs.o.
5548 (gdb_vecs_h, host_defs_h): New variables.
5549 (thread-db.o): Add $(gdb_vecs_h) dependency.
5550 (gdb_vecs.o): New rule.
5551 * thread-db.c: #include "gdb_vecs.h".
5552 (thread_db_load_search): Use a vector to iterate over path elements.
5553 Handle text appearing after "$pdir".
5554
5555 * configure.ac: Add check for strstr.
5556 * config.in: Regenerate.
5557 * configure: Regenerate.
5558
7c3270ae
UW
55592012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5560
5561 * hostio.c (handle_pread): If pread fails, fall back to attempting
5562 lseek/read.
5563 (handle_pwrite): Likewise for pwrite.
5564
b62e2b27
UW
55652012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5566
5567 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5568 between unsupported TYPE and unimplementable ADDR/LEN combination.
5569 (arm_insert_point): Act on new return value.
5570
78a99e91
PA
55712012-07-31 Pedro Alves <palves@redhat.com>
5572
5573 * server.c (process_point_options): Only skip tokens if we find
5574 one that is unrecognized. Don't treat 'X' specially while
5575 skipping unrecognized tokens.
5576
fcf303ab
UW
55772012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5578
5579 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5580 to 4-byte-align HW breakpoint addresses for Thumb.
5581
7255706c
YQ
55822012-07-27 Yao Qi <yao@codesourcery.com>
5583
5584 PR remote/14161.
5585
5586 * server.h: Declare gdb_agent_about_to_close.
5587 * target.c (kill_inferior): Include "agent.h".
5588 New. Send command 'kill'.
5589 * target.h (kill_inferior): Removed macro.
5590 * tracepoint.c (gdb_agent_about_to_close): New.
5591 (gdb_agent_helper_thread): Handle command 'close'.
5592 Wait endlessly until the inferior stops.
5593 Install gdb_agent_remove_socket to atexit hook.
5594 (agent_socket_name): New static variable.
5595 (gdb_agent_socket_init): Replace local variable 'name' with
5596 'agent_socket_name'.
5597 (gdb_agent_remove_socket): New.
5598
5a3f286f
YQ
55992012-07-27 Yao Qi <yao@codesourcery.com>
5600
5601 * server.c (process_point_options): Stop at 'X' when parsing.
5602
961bd387
ME
56032012-07-19 Michael Eager <eager@eagercon.com>
5604
a261b8f5 5605 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
5606 to hw_execute.
5607 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5608 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5609 hardware breakpoint.
5610
aa7c7447
JK
56112012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5612
5613 * gdbserver/linux-low.c (initialize_low): Call
5614 linux_ptrace_init_warnings.
5615
7f216e7c
DE
56162012-07-02 Doug Evans <dje@google.com>
5617
5618 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5619 pointer to int.
5620
d3ce09f5
SS
56212012-07-02 Stan Shebs <stan@codesourcery.com>
5622
5623 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5624 (ax.o): Add it to build rule.
5625 (ax-ipa.o): Ditto.
5626 (OBS): Add format.o.
5627 (IPA_OBS): Add format.o.
5628 * server.c (handle_query): Claim support for breakpoint commands.
5629 (process_point_options): Add command case.
5630 (process_serial_event): Leave running if there are printfs in
5631 effect.
5632 * mem-break.h (any_persistent_commands): Declare.
5633 (add_breakpoint_commands): Declare.
5634 (gdb_no_commands_at_breakpoint): Declare.
5635 (run_breakpoint_commands): Declare.
5636 * mem-break.c (struct point_command_list): New struct.
5637 (struct breakpoint): New field command_list.
5638 (any_persistent_commands): New function.
5639 (add_commands_to_breakpoint): New function.
5640 (add_breakpoint_commands): New function.
5641 (gdb_no_commands_at_breakpoint): New function.
5642 (run_breakpoint_commands): New function.
5643 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5644 locally.
5645 * ax.c: Include format.h.
5646 (ax_printf): New function.
5647 (gdb_eval_agent_expr): Add printf opcode.
5648
2f8f6aed
YQ
56492012-06-13 Yao Qi <yao@codesourcery.com>
5650
5651 * server.c (start_inferior): Remove duplicated writes to fields
5652 'last_resume_kind' and 'last_status' of 'current_inferior'.
5653
0c9070b3
YQ
56542012-06-12 Yao Qi <yao@codesourcery.com>
5655 Pedro Alves <palves@redhat.com>
5656
5657 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5658 comment.
5659 * server.c (handle_v_cont): Extend comment.
5660
c52daf70
YQ
56612012-06-11 Yao Qi <yao@codesourcery.com>
5662
5663 * linux-low.c (linux_attach): Add 'static'.
5664
d38bbb0a
YQ
56652012-06-06 Yao Qi <yao@codesourcery.com>
5666
5667 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5668
89dc0afd
JK
56692012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5670
5671 Fix gcc -flto compilation warning.
5672 * server.c (main): Make variable multi_mode and attach volatile.
5673
75f62ce7
TJB
56742012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5675
5676 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5677 if the platform doesn't know about it.
5678
65f479b6
PA
56792012-05-30 Jeff Kenton <jkenton@tilera.com>
5680
5681 * Makefile.in (SFILES): Add linux-tile-low.c.
5682 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5683 * configure.srv: Handle tilegx-*-linux*.
5684 * linux-tile-low.c: New file.
5685
0c5bf5a9
JK
56862012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5687
5688 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5689
a493e3e2
PA
56902012-05-24 Pedro Alves <palves@redhat.com>
5691
5692 PR gdb/7205
5693
43aaf8b6 5694 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 5695
2ea28649
PA
56962012-05-24 Pedro Alves <palves@redhat.com>
5697
5698 PR gdb/7205
5699
5700 Replace target_signal with gdb_signal throughout.
5701
8d409d16
MR
57022012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5703
5704 * linux-low.c (linux_store_registers): Avoid the copying sequence
5705 when no data has been retrieved by ptrace.
5706
23512c01
MGD
57072012-05-22 Will Deacon <will.deacon@arm.com>
5708
5709 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5710 Include asm/ptrace.h.
5711 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5712 already defined.
5713
4934b29e
MR
57142012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5715
5716 * linux-low.c (linux_store_registers): Don't re-retrieve data
5717 with ptrace that has already been obtained from /proc. Always
5718 copy any data retrieved with ptrace to the buffer supplied.
5719
bde24c0a
PA
57202012-05-11 Yao Qi <yao@codesourcery.com>
5721 Pedro Alves <palves@redhat.com>
5722
5723 * linux-low.c (enum stopping_threads_kind): New.
5724 (stopping_threads): Change type to `enum stopping_threads_kind'.
5725 (handle_extended_wait): If stopping and suspending threads, leave
5726 the new_lwp suspended too.
5727 (linux_wait_for_event): Adjust.
5728 (stop_all_lwps): Set `stopping_threads' to
5729 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5730 whether we're suspending threads or just stopping them. Assert no
5731 recursion happens.
5732
623b6bdf
YQ
57332012-04-29 Yao Qi <yao@codesourcery.com>
5734
5735 * server.h: Move some code to ...
5736 * gdbthread.h: ... here. New.
5737 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5738 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5739 (nto-low.o, win32-low.o): Likewise.
5740 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5741 * regcache.c, remote-utils.c, server.c: Likewise.
5742 * target.c, tracepoint.c, win32-low.c: Likewise.
5743
f15f9948
TJB
57442012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5745
5746 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5747 (PTRACE_ARG4_TYPE): Likewise.
5748 (PTRACE_XFER_TYPE): Likewise.
5749 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5750 ptrace to PTRACE_ARG3_TYPE.
5751 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5752 (PTRACE_ARG4_TYPE): Likewise.
5753 (PTRACE_XFER_TYPE): Likewise.
5754 (linux_detach_one_lwp): Cast fourth argument of
5755 ptrace to long then PTRACE_ARG4_TYPE.
5756 (regsets_fetch_inferior_registers): Cast third argument of
5757 ptrace to long then PTRACE_ARG3_TYPE.
5758 (regsets_store_inferior_registers): Likewise.
5759
38ea300a
PA
57602012-04-20 Pedro Alves <palves@redhat.com>
5761
5762 * configure: Regenerate.
5763
c971b7fa
PA
57642012-04-19 Pedro Alves <palves@redhat.com>
5765
43aaf8b6 5766 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 5767 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
5768 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5769 (all, install-only, uninstall, clean-info, all-lib, clean): No
5770 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5771 (maintainer-clean realclean distclean): Use subdir_do.
5772 (subdir_do): New.
5773 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 5774 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
5775 * acinclude.m4: Include acx_configure_dir.m4.
5776 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5777 calls. Call AC_PROG_RANLIB. Configure gnulib using
5778 ACX_CONFIGURE_DIR.
5779 (GNULIB): New.
5780 (GNULIB_STDINT_H): Adjust.
5781 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5782 * gdbreplay.c: Include build-gnulib/config.h.
5783 * server.h: Likewise.
5784 * aclocal.m4: Regenerate.
5785 * config.in: Regenerate.
5786 * configure: Regenerate.
c971b7fa 5787
809277f8
PA
57882012-04-19 Pedro Alves <palves@redhat.com>
5789
5790 * Makefile.in (LIBGNU, INCGNU): Adjust.
5791 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5792 (all, install-only, uninstall, clean-info, all-lib, clean)
5793 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5794 * configure.ac: Adjust AC_OUTPUT output.
5795 * aclocal.m4: Regenerate.
5796 * configure: Regenerate.
5797
fd9bb8b8
PA
57982012-04-19 Pedro Alves <palves@redhat.com>
5799
5800 * Makefile.in (generated_files): New.
5801 (server_h): Remove the explicit dependency on config.h, and depend
5802 on $generated_files.
5803
1c298c66
PA
58042012-04-19 Pedro Alves <palves@redhat.com>
5805
5806 * Makefile.in (INCGNU): Add -Ignulib.
5807
57c4b50b
PA
58082012-04-19 Pedro Alves <palves@redhat.com>
5809
5810 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5811 (INCGNU): ... this, and spell out -I here.
5812 (GNULIB_LIB): Rename to ...
5813 (LIBGNU): ... this.
5814 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5815
1030e047
PA
58162012-04-19 Pedro Alves <palves@redhat.com>
5817
5818 * config.in: Regenerate.
5819
447d4319
PA
58202012-04-19 Pedro Alves <palves@redhat.com>
5821
5822 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5823 * server.h (memmem): Remove declaration.
5824 * config.in: Regenerate.
5825 * configure: Regenerate.
5826
aad9eab9
YQ
58272012-04-19 Yao Qi <yao@codesourcery.com>
5828
5829 * Makefile.in (SFILES): Add common/vec.c.
5830 (OBS): Add vec.o.
5831 (vec.o): New rule.
5832
3e10640f
YQ
58332012-04-19 Yao Qi <yao@codesourcery.com>
5834
5835 * remote-utils.c (prepare_resume_reply): Replace with macro
5836 target_core_of_thread.
5837 * server.c (handle_qxfer_threads_proper): Likewise.
5838 * target.h (traget_core_of_thread): New macro.
5839
71622373
PA
58402012-04-18 Pedro Alves <palves@redhat.com>
5841
5842 * aclocal.m4: Regenerate.
5843 * configure: Regenerate.
5844
80d26939
YQ
58452012-04-16 Yao Qi <yao@codesourcery.com>
5846
5847 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5848 duplicated on address.
5849
42476b70
YQ
58502012-04-16 Yao Qi <yao@codesourcery.com>
5851
5852 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5853 (struct tracepoint_action_ops) <send>: New field.
5854 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5855 (agent_expr_send, x_tracepoint_action_send): New.
5856 (l_tracepoint_action_send): New.
5857 (cmd_qtdp): Download and install tracepoint
5858 according to `use_agent'.
5859 (run_inferior_command): Add one more parameter `len'.
5860 Update callers.
5861 (tracepoint_send_agent): New.
5862 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5863
7bc83639
YQ
58642012-04-16 Yao Qi <yao@codesourcery.com>
5865
5866 * tracepoint.c (download_tracepoints): Moved to ...
5867 (cmd_qtstart): ... here.
5868
5f18041e
YQ
58692012-04-14 Yao Qi <yao@codesourcery.com>
5870
5871 * tracepoint.c: Include inttypes.h.
5872 (struct collect_memory_action): Use sized types.
5873 (struct tracepoint): Likewise.
5874 (cmd_qtdp, stop_tracing): Update print specifiers.
5875 (cmd_qtp, response_tracepoint): Likewise.
5876 (collect_data_at_tracepoint): Likewise.
5877 (collect_data_at_step): Likewise.
5878
55a8c076
YQ
58792012-04-14 Yao Qi <yao@codesourcery.com>
5880
5881 Import gnulib module inttypes.
5882 * aclocal.m4, config.in, configure: Regenerated.
5883
dc750257
YQ
58842012-04-14 Yao Qi <yao@codesourcery.com>
5885
5886 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5887 Makefile and config.status at last.
5888
0ab5faf9
YQ
58892012-04-13 Yao Qi <yao@codesourcery.com>
5890
5891 * tracepoint.c: Include stdint.h unconditionally.
5892
18f5fd81
TJB
58932012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5894
5895 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5896 on BFD_HAVE_SYS_PROCFS_TYPE.
5897 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5898 * configure: Regenerate.
5899 * config.in: Likewise.
5900
4d47af5c
L
59012012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5902
5903 * Makefile.in (clean): Also remove x32.c x32-linux.c
5904 x32-avx.c x32-avx-linux.c.
5905 (x32.o): New target.
5906 (x32.c): Likewise.
5907 (x32-linux.o): Likewise.
5908 (x32-linux.c): Likewise.
5909 (x32-avx.o): Likewise.
5910 (x32-avx.c): Likewise.
5911 (x32-avx-linux.o): Likewise.
5912 (x32-avx-linux.c): Likewise.
5913
5914 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5915 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5916 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5917 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5918 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5919 i386/x32-avx-linux.xml.
5920
5921 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5922 (init_registers_x32_avx_linux): Likwise.
5923 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5924 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5925
ecedbe58
PA
59262012-04-13 Pedro Alves <palves@redhat.com>
5927
5928 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5929 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5930 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5931 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5932 the sub-make.
5933
c92b5177
L
59342012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5935
5936 * linux-x86-low.c (compat_x32_clock_t): New.
5937 (compat_x32_siginfo_t): Likewise.
5938 (compat_x32_siginfo_from_siginfo): Likewise.
5939 (siginfo_from_compat_x32_siginfo): Likewise.
5940 (linux_is_elf64): Likewise.
5941 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5942 and siginfo_from_compat_x32_siginfo for x32.
5943 (x86_arch_setup): Set linux_is_elf64.
5944
214d508e
L
59452012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5946
5947 PR gdb/13969
5948 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5949 e_machine field.
5950 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5951 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5952 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5953 compatible with process.
5954
c9a1864a
YQ
59552012-04-12 Yao Qi <yao@codesourcery.com>
5956
5957 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5958 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5959 (install-only, install-info, clean): Handle sub dir gnulib.
5960 (all-lib, am--refresh): New targets.
5961 (memmem.o): Remove target.
5962 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5963 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5964 (AC_REPLACE_FUNCS): Remove memmem.
5965 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5966 (AC_OUTPUT): Generate Makefile in gnulib/.
5967 * aclocal.m4, config.in, configure: Regenerated.
5968
367ba2c2
MR
59692012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5970
5971 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5972
9d236627
PA
59732012-04-05 Pedro Alves <palves@redhat.com>
5974
5975 -Werror=strict-aliasing
5976
5977 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5978 pointer.
5979
111217b3
PA
59802012-04-04 Pedro Alves <palves@redhat.com>
5981
5982 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5983 (sparc_store_gregset_from_stack, sparc_store_gregset)
5984 (sparc_breakpoint_at): Fix formatting.
5985
8365dcf5
TJB
59862012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5987
5988 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5989 are available.
5990 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5991 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5992 * config.in: Regenerate.
5993 * configure: Likewise.
5994
689cc2ae
PA
59952012-03-29 Pedro Alves <palves@redhat.com>
5996
5997 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5998 Correct ptrace arguments.
5999
c14dfd32
PA
60002012-03-28 Pedro Alves <palves@redhat.com>
6001
6002 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6003 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6004 (IA64_FR1_REGNUM): New defines.
6005 (ia64_fetch_register): New.
6006 (the_low_target): Install it.
6007 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6008 field.
6009 * linux-low.c (linux_fetch_registers): Try the
6010 the_low_target.fetch_register hook first.
6011
6012 * linux-arm-low.c (the_low_target): Adjust.
6013 * linux-bfin-low.c (the_low_target): Adjust.
6014 * linux-cris-low.c (the_low_target): Adjust.
6015 * linux-crisv32-low.c (the_low_target): Adjust.
6016 * linux-m32r-low.c (the_low_target): Adjust.
6017 * linux-m68k-low.c (the_low_target): Adjust.
6018 * linux-mips-low.c (the_low_target): Adjust.
6019 * linux-ppc-low.c (the_low_target): Adjust.
6020 * linux-s390-low.c (the_low_target): Adjust.
6021 * linux-sh-low.c (the_low_target): Adjust.
6022 * linux-sparc-low.c (the_low_target): Adjust.
6023 * linux-tic6x-low.c (the_low_target): Adjust.
6024 * linux-x86-low.c (the_low_target): Adjust.
6025 * linux-xtensa-low.c (the_low_target): Adjust.
6026
63c88e13
PA
60272012-03-26 Pedro Alves <palves@redhat.com>
6028
6029 * server.c (handle_qxfer_libraries): Don't bail early if
6030 the_target->qxfer_libraries_svr4 is not NULL.
6031
fb723180
PA
60322012-03-26 Pedro Alves <palves@redhat.com>
6033
6034 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6035
0afae3cf
PA
60362012-03-23 Pedro Alves <palves@redhat.com>
6037
6038 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6039 "library-list-svr4" element's start tag when the the DSO list is
6040 empty.
6041
485f1ee4
PA
60422012-03-23 Pedro Alves <palves@redhat.com>
6043
6044 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6045 a variable whose type size is the same as the inferior's pointer
6046 size.
6047
a5362b9a
TS
60482012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6049
6050 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6051 struct siginfo.
6052 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6053 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6054 * linux-low.h: Include <signal.h>.
6055 (struct siginfo): Remove forward declaration.
6056 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6057 struct siginfo.
6058
d226c142
MF
60592012-03-21 Mike Frysinger <vapier@gentoo.org>
6060
6061 * .gitignore: Ignore more files.
6062
122f36ef
PA
60632012-03-19 Pedro Alves <palves@redhat.com>
6064 Jan Kratochvil <jan.kratochvil@redhat.com>
6065
6066 * server.c (cont_thread, general_thread): Add describing comments.
6067 (start_inferior): Clear `cont_thread'.
6068 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6069 of a process.
6070
fc3e5175
YQ
60712012-03-15 Yao Qi <yao@codesourcery.com>
6072
6073 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6074 handling to ...
6075 (cmd_qtdp): ... here.
6076
8d0d92cd
YQ
60772012-03-15 Yao Qi <yao@codesourcery.com>
6078
6079 * tracepoint.c (struct tracepoint_action_ops): New.
6080 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6081 (m_tracepoint_action_download): New.
6082 (r_tracepoint_action_download): New.
6083 (x_tracepoint_action_download): New.
6084 (l_tracepoint_action_download): New.
6085 (add_tracepoint_action): Install `action->ops' according type.
6086 (download_tracepoint_1): Move code `download' function pointer
6087 of various tracepoint_action_ops.
6088
87b0bb13
JK
60892012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6090
6091 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6092 linux_ptrace_attach_warnings.
6093
5f572dec
JK
60942012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6095
6096 * Makefile.in (linux-ptrace.o): New.
6097 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6098 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6099 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6100 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6101 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6102 of these targets.
6103 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6104
f4647387
YQ
61052012-03-08 Yao Qi <yao@codesourcery.com>
6106 Pedro Alves <palves@redhat.com>
6107
6108 Fix PR server/13392.
6109 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6110 offset of JMP insn.
6111 * tracepoint.c (remove_tracepoint): New.
6112 (cmd_qtdp): Call remove_tracepoint when failed to install.
6113
9b224c5e
PA
61142012-03-07 Pedro Alves <palves@redhat.com>
6115
6116 * linux-low.c (get_detach_signal): New.
6117 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6118 Pass on pending signals to PTRACE_DETACH. Check the result of the
6119 ptrace call.
6120 * server.c (program_signals, program_signals_p): New.
6121 (handle_general_set): Handle QProgramSignals.
6122 * server.h (program_signals, program_signals_p): Declare.
6123
e237a7e2
JK
61242012-03-05 Pedro Alves <palves@redhat.com>
6125 Jan Kratochvil <jan.kratochvil@redhat.com>
6126
6127 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6128 New comment why.
6129
5808517f
YQ
61302012-03-03 Yao Qi <yao@codesourcery.com>
6131
6132 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6133 agent_look_up_symbols.
6134
58b4daa5
YQ
61352012-03-03 Yao Qi <yao@codesourcery.com>
6136
6137 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6138 (linux-x86-low.o): Likewise.
6139 * server.h: Remove in_process_agent_loaded.
6140 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6141 common/agent.c.
6142 Update callers.
6143
8ffcbaaf
YQ
61442012-03-03 Yao Qi <yao@codesourcery.com>
6145
6146 * tracepoint.c (gdb_agent_capability): New global.
6147 (in_process_agent_loaded_ust): Renamed to
6148 `in_process_agent_supports_ust'.
6149 Update callers.
6150 (in_process_agent_supports_ust): Call agent_capability_check.
6151 (clear_installed_tracepoints): Assert that agent supports
6152 agent.
6153
d1feda86
YQ
61542012-03-03 Yao Qi <yao@codesourcery.com>
6155
6156 * linux-low.c (linux_supports_agent): New.
6157 (linux_target_ops): Initialize field `supports_agent' with
6158 linux_supports_agent.
6159 * target.h (struct target_ops) <supports_agent>: New.
6160 (target_supports_agent): New macro.
6161 * server.c (handle_general_set): Handle packet 'QAgent'.
6162 (handle_query): Send `QAgent+'.
6163 * Makefile.in (server.o): Depends on agent.h.
6164
2fa291ac
YQ
61652012-03-03 Yao Qi <yao@codesourcery.com>
6166
6167 * Makefile.in (OBS): Add agent.o.
6168 Add new rule for agent.o.
6169 Track dependence of tracepoint.c on agent.h.
6170 * tracepoint.c (run_inferior_command_1):
6171 (run_inferior_command): Call agent_run_command.
6172 (gdb_ust_connect_sync_socket): Deleted. Move it to
6173 common/agent.c.
6174 (resume_thread, stop_thread): Likewise.
6175 (gdb_ust_socket_init): Renamed to ...
6176 (gdb_agent_socket_init): ... New.
6177 (gdb_ust_thread): Renamed to ...
6178 (gdb_agent_helper_thread): ... New.
6179 (gdb_ust_init): Move some code to ...
6180 (gdb_agent_init): ... here. New.
6181 [HAVE_UST]: Call gdb_ust_init.
6182 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6183 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6184 * config.in, configure: Regenerated.
6185
05044653
PA
61862012-03-02 Pedro Alves <palves@redhat.com>
6187
6188 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6189 * linux-low.c (struct simple_pid_list): New.
6190 (stopped_pids): New a struct simple_pid_list pointer.
6191 (add_to_pid_list, pull_pid_from_list): New.
6192 (handle_extended_wait): Don't assume the first signal new children
6193 report is SIGSTOP. Adjust call to pull_pid_from_list.
6194 (linux_wait_for_lwp): Adjust.
6195
8d00225b
YQ
61962012-03-02 Yao Qi <yao@codesourcery.com>
6197
6198 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6199 debug log.
6200
19560ba5
YQ
62012012-03-02 Yao Qi <yao@codesourcery.com>
6202
6203 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6204 `stop_pc' and `tpoint'. Update caller.
6205
1faeff08
MR
62062012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6207
6208 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6209 * linux-low.c (use_linux_regsets): New macro.
6210 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6211 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6212 (linux_register_in_regsets): New function.
6213 (usr_fetch_inferior_registers): Skip registers covered by
6214 regsets.
6215 (usr_store_inferior_registers): Likewise.
6216 (usr_fetch_inferior_registers): New macro.
6217 (usr_store_inferior_registers): Likewise.
6218 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6219 (linux_store_registers): Likewise.
6220 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6221 prototype.
6222 (init_registers_mips64_dsp_linux): Likewise.
6223 (init_registers_mips_linux): New macro.
6224 (init_registers_mips_dsp_linux): Likewise.
6225 (mips_dsp_num_regs): Likewise.
6226 (DSP_BASE, DSP_CONTROL): New fallback macros.
6227 (mips_base_regs): New macro.
6228 (mips_regmap): Use it. Fix the size.
6229 (mips_dsp_regmap): New variable.
6230 (mips_dsp_regset_bitmap): Likewise.
6231 (mips_arch_setup): New function.
6232 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6233 than mips_regmap.
6234 (mips_cannot_store_register): Likewise.
6235 (the_low_target): Update .arch_setup, .num_regs and .regmap
6236 initializers. Add .regset_bitmap initializer.
6237 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6238 initializer.
6239 * linux-bfin-low.c (the_low_target): Likewise.
6240 * linux-cris-low.c (the_low_target): Likewise.
6241 * linux-crisv32-low.c (the_low_target): Likewise.
6242 * linux-ia64-low.c (the_low_target): Likewise.
6243 * linux-m32r-low.c (the_low_target): Likewise.
6244 * linux-m68k-low.c (the_low_target): Likewise.
6245 * linux-ppc-low.c (the_low_target): Likewise.
6246 * linux-s390-low.c (the_low_target): Likewise.
6247 * linux-sh-low.c (the_low_target): Likewise.
6248 * linux-sparc-low.c (the_low_target): Likewise.
6249 * linux-tic6x-low.c (the_low_target): Likewise.
6250 * linux-x86-low.c (the_low_target): Likewise.
6251 * linux-xtensa-low.c (the_low_target): Likewise.
6252 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6253 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6254 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6255 srv_xmlfiles.
6256 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6257 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6258
c03e6ccc
YQ
62592012-02-29 Yao Qi <yao@codesourcery.com>
6260 Pedro Alves <palves@redhat.com>
6261
6262 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6263 `step_over_finished' is true.
6264
644cebc9
PA
62652012-02-27 Pedro Alves <palves@redhat.com>
6266
6267 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6268 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6269
c14d7ab2
PA
62702012-02-27 Pedro Alves <palves@redhat.com>
6271
6272 PR server/9684
6273 * linux-low.c (pid_is_stopped): New.
6274 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6275
412c89dd
LM
62762012-02-25 Luis Machado <lgustavo@codesourcery.com>
6277
6278 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6279 of conditions.
6280
b745defe
MR
62812012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6282
6283 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6284
9f3a5c85
LM
62852012-02-24 Luis Machado <lgustavo@codesourcery>
6286
6287 * server.c (handle_query): Advertise support for target-side
6288 breakpoint condition evaluation.
6289 (process_point_options): New function.
6290 (process_serial_event): When inserting a breakpoint, check for
6291 a target-side condition that should be evaluated.
6292
6293 * mem-break.c: Include regcache.h and ax.h.
6294 (point_cond_list_t): New data structure.
6295 (breakpoint) <cond_list>: New field.
6296 (find_gdb_breakpoint_at): Make non-static.
6297 (delete_gdb_breakpoint_at): Clear any target-side
6298 conditions.
6299 (clear_gdb_breakpoint_conditions): New function.
6300 (add_condition_to_breakpoint): Likewise.
6301 (add_breakpoint_condition): Likewise.
6302 (gdb_condition_true_at_breakpoint): Likewise.
6303 (gdb_breakpoint_here): Return result directly instead
6304 of going through a local variable.
6305
6306 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6307 (clear_gdb_breakpoint_conditions): Likewise.
6308 (add_breakpoint_condition): Likewise.
6309 (gdb_condition_true_at_breakpoint): Likewise.
6310
6311 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6312 (need_step_over_p): Take target-side breakpoint condition into
6313 consideration.
6314
5e1dc496
LM
63152012-02-24 Luis Machado <lgustavo@codesourcery>
6316
6317 * server.h: Include tracepoint.h.
6318 (agent_mem_read, agent_get_trace_state_variable_value,
6319 agent_set_trace_state_variable_value,
6320 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6321 get_set_tsv_func_addr): New prototypes.
6322
6323 * ax.h: New include file.
6324 * ax.c: New source file.
6325
6326 * tracepoint.c: Include ax.h.
6327 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6328 agent_expr, eval_result_type): Move to ax.h.
6329 (parse_agent_expr): Rename to ...
6330 (gdb_parse_agent_expr): ... this, make it non-static and move
6331 to ax.h.
6332 (unparse_agent_expr) Rename to ...
6333 (gdb_unparse_agent_expr): ... this, make it non-static and move
6334 to ax.h.
6335 (eval_agent_expr): Rename to ...
6336 (eval_tracepoint_agent_expr): ... this.
6337 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6338 forward declarations.
6339 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6340 (agent_get_trace_state_variable_value): New function.
6341 (agent_set_trace_state_variable_value): New function.
6342 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6343 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6344 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6345 (condition_true_at_tracepoint): Likewise.
6346 (parse_agent_expr): Rename to ...
6347 (gdb_parse_agent_expr): ... this and move to ax.c.
6348 (unparse_agent_expr): Rename to ...
6349 (gdb_unparse_agent_expr): ... this and move to ax.c.
6350 (gdb_agent_op_name): Move to ax.c.
6351 (eval_agent_expr): Rename to ...
6352 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6353 and move to ax.c.
6354 (eval_tracepoint_agent_expr): New function.
6355 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 6356 non-static.
5e1dc496
LM
6357 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6358 ax.c.
6359 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6360 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6361 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6362 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6363 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6364 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6365 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6366 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6367 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6368 (compile_bytecodes): Remove forward declaration.
6369 (is_goto_target): Move to ax.c.
6370 (compile_bytecodes): Move to ax.c and call
6371 agent_get_trace_state_variable_value (...) and
6372 agent_set_trace_state_variable_value (...).
6373
6374 * Makefile.in: Update ax.c and IPA dependencies.
6375
277e4e52
PA
63762012-02-24 Pedro Alves <palves@redhat.com>
6377
6378 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6379 (cmd_bigqtbuffer_circular): ... this. Only handle
6380 'QTBuffer:circular:'.
6381 (handle_tracepoint_general_set): Adjust.
6382
bf4c19f7
YQ
63832012-02-16 Yao Qi <yao@codesourcery.com>
6384
6385 * inferiors.c: Move code to ...
6386 * dll.c: .... here. New.
6387 * server.h: Declare clear_dlls.
6388 * Makefile.in (SFILES): Add dll.c.
6389 (OBS): Add dll.o
6390 (dll.o): New rule.
6391
d73f2619
YQ
63922012-02-11 Yao Qi <yao@codesourcery.com>
6393
6394 * server.c: (handle_monitor_command): Add a new parameter
6395 `own_buf'.
6396 (handle_query): Update caller.
6397
f8255c2a
JB
63982012-02-09 Joel Brobecker <brobecker@adacore.com>
6399
6400 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6401 * configure, config.in: Regenerate.
6402 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6403 is not defined.
6404
da84f473
PA
64052012-02-02 Pedro Alves <palves@redhat.com>
6406
6407 Try SIGKILL first, then PTRACE_KILL.
6408 * linux-low.c (linux_kill_one_lwp): New.
6409 (linux_kill_one_lwp): Rename to ...
6410 (kill_one_lwp_callback): ... this. Use the new
6411 linux_kill_one_lwp.
6412
e886a173
PA
64132012-02-02 Pedro Alves <palves@redhat.com>
6414
6415 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6416 inferior.
6417
be07f1a2
PA
64182012-01-27 Pedro Alves <palves@redhat.com>
6419
6420 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6421 (elf_64_file_p): Make static.
6422 (linux_pid_exe_is_elf_64_file): New.
6423 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6424 Delete declarations.
6425 (linux_pid_exe_is_elf_64_file): Declare.
6426 * linux-x86-low.c (x86_arch_setup): Use
6427 linux_pid_exe_is_elf_64_file.
6428
d8301ad1
JK
64292012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6430
6431 * linux-low.c (linux_wait_for_event_1): Rename to ...
6432 (linux_wait_for_event): ... here and merge it with former
6433 linux_wait_for_event - new variable wait_ptid, use it.
6434 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6435
01b17894
PA
64362012-01-23 Pedro Alves <palves@redhat.com>
6437
6438 * server.c (main): Avoid yet another case of infinite loop while
6439 detaching/killing after a longjmp.
6440
e825046f
JK
64412012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6442
6443 Code cleanup.
6444 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6445
b9e7b9c3
UW
64462012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6447
6448 * hostio.c (handle_readlink): New function.
6449 (handle_vFile): Call it to handle "vFile:readlink" packets.
6450
901f9912
UW
64512012-01-20 Pedro Alves <palves@redhat.com>
6452 Ulrich Weigand <ulrich.weigand@linaro.org>
6453
6454 * server.c (handle_v_requests): Only support vAttach and vRun to
6455 start multiple processes when in extended protocol mode.
6456
fc1ab1a0
PA
64572012-01-17 Pedro Alves <palves@redhat.com>
6458
6459 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6460 memalign plus mprotect to allocate the scratch buffer.
6461
7d5d4e98
PA
64622012-01-13 Pedro Alves <palves@redhat.com>
6463
6464 * server.c (attach_inferior): Clear `cont_thread'.
6465
f128d5e9
PA
64662012-01-13 Pedro Alves <palves@redhat.com>
6467
6468 * server.c (main): Avoid infinite loop while detaching/killing
6469 after a longjmp.
6470
06db92f0
DE
64712012-01-09 Doug Evans <dje@google.com>
6472
6473 * server.c (start_inferior): Set last_ptid in --wrapper case.
6474
32d92999
YQ
64752012-01-06 Yao Qi <yao@codesourcery.com>
6476
6477 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6478 defined.
6479 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6480
5e0a92a9
YQ
64812012-01-04 Yao Qi <yao@codesourcery.com>
6482
6483 * tracepoint.c (cmd_qtdp): Print debug message
6484 for static tracepoint.
6485
ae639e8c
YQ
64862012-01-04 Yao Qi <yao@codesourcery.com>
6487
6488 * tracepoint.c (trace_vdebug): Differentiate debug message
6489 between gdbserver and IPA.
6490
f72429c5
YQ
64912012-01-03 Yao Qi <yao@codesourcery.com>
6492
6493 * tracepoint.c (tracepoint_was_hit): Don't collect for
6494 static tracepoint.
6495
12c3e59c
JB
64962012-01-02 Joel Brobecker <brobecker@adacore.com>
6497
6498 * terminal.h: Reformat copyright header.
6499
67827812
JB
65002012-01-02 Joel Brobecker <brobecker@adacore.com>
6501
6502 * server.c (gdbserver_version): Update copyright year.
6503 * gdbreplay.c (gdbreplay_version): Likewise.
6504
3e52c33d
JK
65052011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6506
6507 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6508
6509 Revert:
6510 2011-12-18 Hui Zhu <teawater@gmail.com>
6511 * linux-low.c (linux_create_inferior): Save return value to ret.
6512
66f1260e
HZ
65132011-12-18 Hui Zhu <teawater@gmail.com>
6514
6515 * linux-low.c (linux_create_inferior): Save return value to ret.
6516
e77616d7
DE
65172011-12-16 Doug Evans <dje@google.com>
6518
e7b06c57
DE
6519 * linux-low.c (linux_create_inferior): If stdio connection,
6520 redirect stdin from /dev/null, stdout to stderr.
6521 * remote-utils.c (remote_is_stdio): New static global.
6522 (remote_connection_is_stdio): New function.
6523 (remote_prepare): Handle stdio connection.
6524 (remote_open): Ditto.
6525 (remote_close): Don't close stdin for stdio connections.
6526 (read_prim,write_prim): New functions. Replace all calls to
6527 read/write to these.
6528 * server.c (main): Watch for "-" argument. Move call to
6529 remote_prepare before start_inferior.
6530 * server.h (STDIO_CONNECTION_NAME): New macro.
6531 (remote_connection_is_stdio): Declare.
6532
e77616d7
DE
6533 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6534 in debugging output.
6535
82067193
YQ
65362011-12-15 Yao Qi <yao@codesourcery.com>
6537
6538 * tracepoint.c: Include sys/syscall.h.
6539 (gdb_ust_thread): Remove preprocessor conditional.
6540
82bfbe7e
PA
65412011-12-14 Pedro Alves <pedro@codesourcery.com>
6542
6543 * linux-low.c (linux_detach_one_lwp): Call
6544 the_low_target.prepare_to_resume before detaching.
6545
712c6575
YQ
65462011-12-14 Yao Qi <yao@codesourcery.com>
6547
6548 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6549 of write.
6550
d54d1edf
YQ
65512011-12-14 Yao Qi <yao@codesourcery.com>
6552
6553 * i386-low.c (i386_low_stopped_data_address): Initialize local
6554 variable `control'.
6555
6210a125
PA
65562011-12-13 Pedro Alves <pedro@codesourcery.com>
6557
6558 PR remote/13492
6559
6560 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6561 DR_CONTROL unless necessary. Extend comments.
6562 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6563 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6564
2ece8244
YQ
65652011-12-13 Yao Qi <yao@codesourcery.com>
6566
6567 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6568 macros.
6569 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6570
784867a5
JK
65712011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6572
6573 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6574 Print new debug message for such case.
6575
6bf36717
JK
65762011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6577
6578 Fix overlapping memcpy.
6579 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6580 the read_inferior_memory transfer.
6581 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6582 write_inferior_memory transfer.
6583 (set_fast_tracepoint_jump): New variable buf. Use it for the
6584 read_inferior_memory and write_inferior_memory transfers.
6585 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6586 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6587 Use it for the write_inferior_memory transfer.
6588 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6589 buffers.
6590
50275556
MR
65912011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6592
6593 * linux-low.c (fetch_register, store_register): Make code
6594 consistent, fix formatting.
6595
7325beb4
MR
65962011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6597
6598 * linux-low.c (usr_store_inferior_registers): Factor out code
6599 to handle individual registers into...
6600 (store_register): ... this new function.
6601
c642a434
UW
66022011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6603
6604 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6605 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6606 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6607 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6608 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6609 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6610 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6611 (srv_xmlfiles): Add new XML files.
6612
6613 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6614 and <sys/uio.h>.
6615 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6616 (init_registers_s390_linux32v1): Add prototype.
6617 (init_registers_s390_linux32v2): Likewise.
6618 (init_registers_s390_linux64v1): Likewise.
6619 (init_registers_s390_linux64v2): Likewise.
6620 (init_registers_s390x_linux64v1): Likewise.
6621 (init_registers_s390x_linux64v2): Likewise.
6622 (s390_num_regs): Increment to 52.
6623 (s390_regmap): Add orig_r2 register.
6624 (s390_num_regs_3264): Increment to 68.
6625 (s390_regmap_3264): Add orig_r2 register.
6626 (s390_collect_ptrace_register): Handle orig_r2 register.
6627 (s390_supply_ptrace_register): Likewise.
6628 (s390_fill_last_break): New function.
6629 (s390_store_last_break): Likewise.
6630 (s390_fill_system_call): New function.
6631 (s390_store_system_call): Likewise.
6632 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6633 register sets.
6634 (s390_check_regset): New function.
6635 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6636 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6637 Update target_regsets for available register sets.
6638
2268b414
JK
66392011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6640 Jan Kratochvil <jan.kratochvil@redhat.com>
6641
6642 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6643 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6644 New.
6645 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6646 * linux-low.h (struct process_info_private): New member r_debug.
6647 * server.c (handle_qxfer_libraries): Call
6648 the_target->qxfer_libraries_svr4.
6649 (handle_qxfer_libraries_svr4): New function.
6650 (qxfer_packets): New entry "libraries-svr4".
6651 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6652 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6653 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6654 PACKET_qXfer_libraries_svr4.
6655
d6db1fab
UW
66562011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6657
6658 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6659 PSW address/mask between 8-byte and 16-byte formats.
6660 (s390_supply_ptrace_register): Likewise.
6661 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6662 basic addressing mode bit.
6663
242f5f1c
SS
66642011-11-24 Stan Shebs <stan@codesourcery.com>
6665
6666 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6667
f196051f
SS
66682011-11-17 Stan Shebs <stan@codesourcery.com>
6669
6670 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6671 (tracing_start_time): New global.
6672 (tracing_stop_time): New global.
6673 (tracing_user_name): New global.
6674 (tracing_notes): New global.
6675 (tracing_stop_note): New global.
6676 (cmd_qtstart): Set traceframe_usage, start_time.
6677 (stop_tracing): Set stop_time.
6678 (cmd_qtstatus): Report additional status.
6679 (cmd_qtp): New function.
6680 (handle_tracepoint_query): Call it.
6681 (cmd_qtnotes): New function.
6682 (handle_tracepoint_general_set): Call it.
6683 (get_timestamp): Rename from tsv_get_timestamp.
6684
405f8e94
SS
66852011-11-14 Stan Shebs <stan@codesourcery.com>
6686 Kwok Cheung Yeung <kcy@codesourcery.com>
6687
6688 * linux-x86-low.c (small_jump_insn): New.
6689 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6690 trampoline and error message, build a trampoline and issue a small
6691 jump instruction to it.
6692 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6693 trampoline and error message.
6694 (x86_get_min_fast_tracepoint_insn_len): New.
6695 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6696 * linux-low.h (struct linux_target_ops): Add arguments to
6697 install_fast_tracepoint_jump_pad operation, add new operation.
6698 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6699 arguments.
6700 (linux_get_min_fast_tracepoint_insn_len): New function.
6701 (linux_target_op): Add new operation.
6702 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6703 (gdb_trampoline_buffer_end): Ditto.
6704 (gdb_trampoline_buffer_error): Ditto.
6705 (struct ipa_sym_addresses): Add fields for new IPA variables.
6706 (symbol_list): Add entries for new IPA variables.
6707 (struct tracepoint): Add fields to hold the address range of the
6708 trampoline used by the tracepoint.
6709 (trampoline_buffer_head): New static variable.
6710 (trampoline_buffer_tail): Ditto.
6711 (claim_trampoline_space): New function.
6712 (have_fast_tracepoint_trampoline_buffer): New function.
6713 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6714 structure.
6715 (install_fast_tracepoint): Ditto, also add error buffer argument.
6716 (cmd_qtminftpilen): New function.
6717 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6718 (fast_tracepoint_from_trampoline_address): New function.
6719 (fast_tracepoint_collecting): Handle trampoline as part of jump
6720 pad space.
6721 (set_trampoline_buffer_space): New function.
6722 (initialize_tracepoint): Initialize new IPA variables.
6723 * target.h (struct target_ops): Add arguments to
6724 install_fast_tracepoint_jump_pad operation, add new
6725 get_min_fast_tracepoint_insn_len operation.
6726 (target_get_min_fast_tracepoint_insn_len): New.
6727 (install_fast_tracepoint_jump_pad): Add arguments.
6728 * server.h (IPA_BUFSIZ): Define.
6729 * linux-i386-ipa.c: Include extra header files.
6730 (initialize_fast_tracepoint_trampoline_buffer): New function.
6731 (initialize_low_tracepoint): Call it.
6732 * server.h (set_trampoline_buffer_space): Declare.
6733 (claim_trampoline_space): Ditto.
6734 (have_fast_tracepoint_trampoline_buffer): Ditto.
6735
1e4d1764
YQ
67362011-11-14 Yao Qi <yao@codesourcery.com>
6737
6738 * server.c (handle_query): Handle InstallInTrace for qSupported.
6739 * tracepoint.c (add_tracepoint): Sort list.
6740 (install_tracepoint, download_tracepoint): New.
6741 (cmd_qtdp): Call them to install and download tracepoints.
6742 (sort_tracepoints): Removed.
6743 (cmd_qtstart): Update.
6744
5c73ff4e
YQ
67452011-11-14 Yao Qi <yao@codesourcery.com>
6746
6747 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6748 * mem-break.h: Declare.
6749 * tracepoint.c (cmd_qtstart): Move some code to ...
6750 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6751 New.
6752 (download_tracepoints): Move some code to ...
6753 (download_tracepoint_1): ... here. New.
6754
86a30030
YQ
67552011-11-08 Yao Qi <yao@codesourcery.com>
6756
6757 * remote-utils.c (relocate_instruction): A comment fix.
6758
8d26e50c
JB
67592011-11-07 Joel Brobecker <brobecker@adacore.com>
6760
6761 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6762 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6763 dr_status_mirror and dr_control_mirror from debug_reg_state.
6764 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6765 (i386_initial_stuff): Remove use of deleted globals.
6766 (i386_get_thread_context, i386_set_thread_context,
6767 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6768 from debug_reg_state.
6769
a59306a3
YQ
67702011-11-05 Yao Qi <yao@codesourcery.com>
6771
6772 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6773 address as TPOINT's.
6774
3065dfb6
SS
67752011-11-02 Stan Shebs <stan@codesourcery.com>
6776
6777 * tracepoint.c (agent_mem_read_string): New function.
6778 (eval_agent_expr): Call it for tracenz.
6779 * server.c (handle_query): Report support for tracenz.
6780
fd0d8c7c
YQ
67812011-11-02 Yao Qi <yao@codesourcery.com>
6782
6783 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6784
609086b1
YQ
67852011-11-02 Yao Qi <yao@codesourcery.com>
6786
6787 * target.h: Fix a typo in comment.
6788
b9fd1791
PA
67892011-10-31 Pedro Alves <pedro@codesourcery.com>
6790
6791 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6792 clobber the breakpoints' shadows with fast tracepoint jumps.
6793 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6794 * target.c (write_inferior_memory): Also pass MYADDR down to
6795 check_mem_write.
6796
03583c20
UW
67972011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6798
6799 * configure.ac: Check support for personality routine.
6800 * configure: Regenerate.
6801 * config.in: Likewise.
6802 * linux-low.c: Include <sys/personality.h>.
6803 Define ADDR_NO_RANDOMIZE if necessary.
6804 (linux_create_inferior): Disable address space randomization when
6805 forking inferior, if requested.
6806 (linux_supports_disable_randomization): New function.
6807 (linux_target_ops): Install it.
6808 * server.h (disable_randomization): Declare.
6809 * server.c (disable_randomization): New global variable.
6810 (handle_general_set): Handle QDisableRandomization.
6811 (handle_query): Likewise for qSupported.
6812 (main): Support --disable-randomization and --no-disable-randomization
6813 command line arguments.
6814 * target.h (struct target_ops): Add supports_disable_randomization.
6815 (target_supports_disable_randomization): New macro.
6816
723b724b
MF
68172011-09-29 Mike Frysinger <vapier@gentoo.org>
6818
6819 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6820 ifdef check.
6821 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6822 [!PT_GETDSBT] (target_loadmap): New definition.
6823 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6824 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6825 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6826 and PT_GETDSBT to LINUX_LOADMAP.
6827 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6828 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6829
55329a5c 68302011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
6831
6832 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6833 (arm_linux_hwbp_cap): New static variable.
6834 (arm_linux_get_hwbp_cap): Replace by ...
6835 (arm_linux_init_hwbp_cap): ... this new function.
6836 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6837 (arm_linux_get_hw_watchpoint_count): Likewise.
6838 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6839 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6840 (arm_prepare_to_resume): Use perror_with_name instead of error.
6841
55329a5c 68422011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
6843
6844 * linux-arm-low.c: Include <signal.h>.
6845 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6846 (struct arm_linux_hwbp_cap): New data type.
6847 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6848 (struct arm_linux_hw_breakpoint): New data type.
6849 (MAX_BPTS, MAX_WPTS): Define.
6850 (struct arch_process_info, struct arch_lwp_info): New data types.
6851 (arm_linux_get_hwbp_cap): New function.
6852 (arm_linux_get_hw_breakpoint_count): Likewise.
6853 (arm_linux_get_hw_watchpoint_count): Likewise.
6854 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6855 (arm_hwbp_control_initialize): Likewise.
6856 (arm_hwbp_control_is_enabled): Likewise.
6857 (arm_hwbp_control_is_initialized): Likewise.
6858 (arm_hwbp_control_disable): Likewise.
6859 (arm_linux_hw_breakpoint_equal): Likewise.
6860 (arm_linux_hw_point_initialize): Likewise.
6861 (struct update_registers_data): New data structure.
6862 (update_registers_callback: New function.
6863 (arm_insert_point): Likewise.
6864 (arm_remove_point): Likewise.
6865 (arm_stopped_by_watchpoint): Likewise.
6866 (arm_stopped_data_address): Likewise.
6867 (arm_new_process): Likewise.
6868 (arm_new_thread): Likewise.
6869 (arm_prepare_to_resume): Likewise.
6870 (the_low_target): Register arm_insert_point, arm_remove_point,
6871 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6872 arm_new_thread, and arm_prepare_to_resume.
6873
6b9801d4
SS
68742011-09-15 Stan Shebs <stan@codesourcery.com>
6875
6876 * server.h (struct emit_ops): Add compare-goto fields.
6877 * tracepoint.c (gdb_agent_op_sizes): New table.
6878 (emit_eq_goto): New function.
6879 (emit_ne_goto): New function.
6880 (emit_lt_goto): New function.
6881 (emit_le_goto): New function.
6882 (emit_gt_goto): New function.
6883 (emit_ge_goto): New function.
6884 (is_goto_target): New function.
6885 (compile_bytecodes): Recognize special cases of compare-goto
6886 combinations and call specialized emitters for them.
6887 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6888 (amd64_emit_ne_goto): New function.
6889 (amd64_emit_lt_goto): New function.
6890 (amd64_emit_le_goto): New function.
6891 (amd64_emit_gt_goto): New function.
6892 (amd64_emit_ge_goto): New function.
6893 (amd64_emit_ops): Add the new functions.
6894 (i386_emit_eq_goto): New function.
6895 (i386_emit_ne_goto): New function.
6896 (i386_emit_lt_goto): New function.
6897 (i386_emit_le_goto): New function.
6898 (i386_emit_gt_goto): New function.
6899 (i386_emit_ge_goto): New function.
6900 (i386_emit_ops): Add the new functions.
6901
bf15cbda
SS
69022011-09-08 Stan Shebs <stan@codesourcery.com>
6903
6904 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6905 (i386_emit_epilogue): Restore %ebx.
6906
943ca1dd
JZ
69072011-08-31 Jie Zhang <jzhang918@gmail.com>
6908
6909 * server.c (step_thread): Remove definition.
6910 (process_serial_event): Don't handle Hs.
6911 * server.h (step_thread): Remove declaration.
6912 * target.c (set_desired_inferior): Remove use of step_thread.
6913
e3deef73
LM
69142011-08-24 Luis Machado <lgustavo@codesourcery.com>
6915
6916 * linux-low.c: Include linux-procfs.h.
6917 (linux_attach_lwp_1): Update comments.
6918 (linux_attach): Scan for existing threads when attaching to a
6919 process that is the tgid.
6920 * Makefile.in: Update dependencies.
6921
13da1c97
LM
69222011-08-24 Luis Machado <lgustavo@codesourcery.com>
6923
6924 * configure.srv: Add linux-procfs.o dependencies.
6925
881127c9
YQ
69262011-08-14 Yao Qi <yao@codesourcery.com>
6927
6928 * target.h (struct target_ops): Fix indent.
6929 * win32-low.c (win32_target_ops): Fix comment.
6930
58dbd541
YQ
69312011-08-14 Andrew Jenner <andrew@codesourcery.com>
6932 Yao Qi <yao@codesourcery.com>
6933
6934 * Makefile.in (clean): Remove tic6x-*.c files.
6935 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6936 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6937 (tic6x-c64xp-linux.c): Likewise.
6938 * configure.srv: Add support for tic6x-*-uclinux.
6939 * linux-tic6x-low.c: New.
6940 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6941
78d85199
YQ
69422011-08-14 Andrew Stubbs <ams@codesourcery.com>
6943 Yao Qi <yao@codesourcery.com>
6944
6945 * target.h (struct target_ops): Add read_loadmap.
6946 * linux-low.c (struct target_loadseg): New type.
6947 (struct target_loadmap): New type.
6948 (linux_read_loadmap): New function.
6949 (linux_target_ops): Add linux_read_loadmap.
6950 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
6951 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6952 to NULL.
78d85199 6953
a959a88d
EZ
69542011-08-05 Eli Zaretskii <eliz@gnu.org>
6955
6956 * win32-low.c: Include <stdint.h>.
6957
1ced966e
PA
69582011-07-22 Pedro Alves <pedro@codesourcery.com>
6959
6960 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6961 to the inferior here.
6962 (i386_remove_aligned_watchpoint): Ditto.
6963 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6964 fit part of the watchpoint in the debug registers.
6965 (i386_update_inferior_debug_regs): New.
6966 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6967 registers, and only update the inferior on success.
6968 (i386_low_remove_watchpoint): Ditto.
6969
d26e3629
KY
69702011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6971
6972 * linux-low.c (compare_ints, unique, list_threads, show_process,
6973 linux_core_of_thread): Delete.
6974 (linux_target_ops): Change linux_core_of_thread to
6975 linux_common_core_of_thread.
6976 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6977 * utils.c (malloc_failure): Change type of argument.
6978 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6979 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6980 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6981 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6982 (IPA_OBJS): Add common-utils-ipa.o.
6983 (ptid_h, linux_osdata_h): New macros.
6984 (server_h): Add common/common-utils.h, common/xml-utils.h,
6985 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6986 common/ptid.h.
6987 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6988 ptid.o, buffer.o): New rules.
6989 (linux-low.o): Add common/linux-osdata.h as a dependency.
6990 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6991 * configure.ac: Add AC_HEADER_DIRENT check.
6992 * config.in: Regenerate.
6993 * configure: Regenerate.
6994 * remote-utils.c (xml_escape_text): Delete.
6995 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6996 buffer_xml_printf): Move to common/buffer.c.
6997 * server.c (main): Remove call to initialize_inferiors.
6998 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6999 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7000 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7001 internal_error, gdb_assert, gdb_assert_fail): Delete.
7002 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7003 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7004 common/buffer.h.
7005 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7006 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7007 initialize_inferiors): Delete.
7008
2275a1a7
PA
70092011-07-20 Pedro Alves <pedro@codesourcery.com>
7010
7011 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7012 symbol error.
7013
0a5b1e09
PA
70142011-05-31 Pedro Alves <pedro@codesourcery.com>
7015
7016 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7017 assertion.
7018 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7019
6938fd34
YQ
70202011-05-26 Yao Qi <yao@codesourcery.com>
7021
7022 * Makefile.in (thread-db.o): Track dependence to
7023 common/gdb_thread_db.h.
7024 * thread-db.c: include gdb_thread_db.h from right place.
7025
b481f9e0
TT
70262011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7027
7028 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7029 __FILE__ and __LINE__ to internal_error.
7030
98a5dd13
DE
70312011-05-13 Doug Evans <dje@google.com>
7032
7033 * thread-db.c (try_thread_db_load_from_sdir): New function.
7034 (try_thread_db_load_from_dir): New function.
7035 (thread_db_load_search): Handle $sdir, ignore $pdir.
7036 Remove trying of system directories if search of
7037 libthread-db-search-path fails, that is now done via $sdir.
7038
d248b706
KY
70392011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7040
7041 * server.c (handle_query): Add EnableDisableTracepoints to the list
7042 of supported features.
43aaf8b6 7043 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 7044 tracepoints.
43aaf8b6
PA
7045 (cmd_qtenable_disable): New.
7046 (cmd_qtstart): Install tracepoints even if disabled.
7047 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7048 receiving a QTEnable or QTDisable packet.
7049 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7050 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7051 tracepoints.
7052 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 7053
84e578fb
DE
70542011-05-10 Doug Evans <dje@google.com>
7055
7056 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7057
71f55dd8
DE
70582011-05-04 Doug Evans <dje@google.com>
7059
7060 * linux-low.c (linux_join): Skip process lookup.
7061 * spu-low.c (spu_join): Ditto.
7062 * server.c (join_inferiors_callback): Delete.
7063 (process_serial_event): For 'D' packet (detach) call join_inferior
7064 directly.
7065
4d393d60
JM
70662011-05-04 Joseph Myers <joseph@codesourcery.com>
7067
7068 * README: Don't mention xscale*-*-linux*.
7069 * configure.srv (xscale*-*-linux*): Don't handle target.
7070
b00ad6ff
NF
70712011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7072
7073 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7074 casting pointers.
7075 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7076 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7077 (i386_emit_void_call_2): Likewise.
7078
af96c192
YQ
70792011-04-26 Yao Qi <yao@codesourcery.com>
7080
43aaf8b6
PA
7081 * linux-low.c: Move common macros to linux-ptrace.h.
7082 Include linux-ptrace.h.
af96c192
YQ
7083 * Makefile.in (linux_ptrace_h): New.
7084 (linux-low.o): Depends on linux-ptrace.h.
7085
03f2bd59
JK
70862011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7087
7088 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7089 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7090 (remote_prepare): New function with most of the TCP code from ...
7091 (remote_open): ... here. Detect PORT here unconditionally. Move also
7092 setting transport_is_reliable.
7093 * server.c (run_once): New variable.
7094 (gdbserver_usage): Document it.
7095 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7096 the first run if RUN_ONCE.
7097 * server.h (run_once, remote_prepare): New declarations.
7098
7a9dd1b2
TT
70992011-04-19 Tom Tromey <tromey@redhat.com>
7100
7101 * win32-low.c (handle_load_dll): Remove duplicate "the".
7102
81239425
PM
71032011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7104
7105 Remove support for old Cygwin 1.5 versions.
7106 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7107 function to avoid warning.
7108 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7109 warning.
7110
9e0627f1
PM
71112011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7112
7113 * gdbserver/server.h (Macro _): Define it if not available.
7114
588eebee
MS
71152011-03-14 Michael Snyder <msnyder@vmware.com>
7116
348af9f7 7117 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 7118
43f70d4c
JB
71192011-03-10 Joel Brobecker <brobecker@adacore.com>
7120
7121 * Makefile.in (maintainer-clean realclean distclean): Remove
7122 "make ... subdir_do" command.
7123
348af9f7
MS
71242011-03-10 Michael Snyder <msnyder@vmware.com>
7125
7126 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7127
7128 * server.c (handle_v_run): Free alloced buffer on early return.
7129
e637a4f5
YQ
71302011-03-09 Yao Qi <yao@codesourcery.com>
7131
7132 Revert:
7133 2011-03-04 Yao Qi <yao@codesourcery.com>
7134
7135 * Makefile.in: Remove GNU make feature --directory.
7136
7137 2011-03-05 Yao Qi <yao@codesourcery.com>
7138
7139 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7140 (subdir_do): New make target. Copied from gdb/Makefile.
7141 (maintainer-clean, realclean, distclean, clean): Call corresponding
7142 make targets in common/Makefile.
7143
7144 2011-02-11 Yao Qi <yao@codesourcery.com>
7145
7146 * configure.ac: Call AC_PROG_RANLIB.
7147 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7148 * configure: Regenerate.
7149
e6edda56
JK
71502011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7151
7152 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7153
e5141119
JB
71542011-03-06 Yao Qi <yao@codesourcery.com>
7155
7156 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7157
64794aa4
JB
71582011-03-05 Yao Qi <yao@codesourcery.com>
7159
7160 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7161 (subdir_do): New make target. Copied from gdb/Makefile.
7162 (maintainer-clean, realclean, distclean, clean): Call corresponding
7163 make targets in common/Makefile.
7164
7a762829
YQ
71652011-03-04 Yao Qi <yao@codesourcery.com>
7166
7167 * Makefile.in: Remove GNU make feature --directory.
7168
348af9f7
MS
71692011-03-04 Michael Snyder <msnyder@vmware.com>
7170
7171 * server.c (queue_stop_reply): Call xmalloc not malloc.
7172
71732011-03-02 Michael Snyder <msnyder@vmware.com>
7174
7175 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7176
9f72fee2
MS
71772011-02-28 Michael Snyder <msnyder@vmware.com>
7178
588eebee
MS
7179 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7180 (cmd_qtframe): Ditto.
7181 (cmd_qtbuffer): Ditto.
7182 (cmd_bigqtbuffer): Ditto.
7183
9f72fee2
MS
7184 * utils.c (decimal2str): Initialize 'width' to nine, then
7185 don't mess with it.
7186
8040bd49
UW
71872011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7188
7189 * hostio.c (require_data): Free *data, not data.
7190
7e52cbd0
JK
71912011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7192
7193 * hostio.c (require_data): Use free, not xfree.
7194
9130f83e
MS
71952011-02-27 Michael Snyder <msnyder@vmware.com>
7196
4b812f4e
MS
7197 * server.c (handle_query): Discard unused value.
7198
9130f83e
MS
7199 * hostio.c (require_data): Free malloc memory before returning
7200 error.
7201
69d37113
MS
72022011-02-26 Michael Snyder <msnyder@vmware.com>
7203
7204 * linux-low.c (list_threads): Call closedir for dirent.
7205
35f5825a
MS
72062011-02-27 Michael Snyder <msnyder@vmware.com>
7207
2a589cef
MS
7208 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7209 a case statement falls through.
7210
0adea5f7
MS
7211 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7212
35f5825a
MS
7213 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7214 in comparison.
7215
238f1c74
MS
72162011-02-26 Michael Snyder <msnyder@vmware.com>
7217
7218 * utils.c (decimal2str): Eliminate dead code and dead param.
7219 (pulongest): Drop dead param from call to decimal2str.
7220 (plongest): Ditto.
7221
633ff500
JB
72222011-02-24 Joel Brobecker <brobecker@adacore.com>
7223
7224 Revert the following patch (not approved yet):
7225 2011-02-21 Hui Zhu <teawater@gmail.com>
7226 * tracepoint.c (tp_printf): New function.
7227 (eval_agent_expr): Handle gdb_agent_op_printf.
7228
f9c6ff72
HZ
72292011-02-21 Hui Zhu <teawater@gmail.com>
7230
7231 * tracepoint.c (tp_printf): New function.
7232 (eval_agent_expr): Handle gdb_agent_op_printf.
7233
94d5e490
TT
72342011-02-18 Tom Tromey <tromey@redhat.com>
7235
7236 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7237 (tracepoint.o): Likewise.
7238 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7239 (gdb_agent_op_names): Likewise.
7240
c7f96d2b
TT
72412011-02-18 Tom Tromey <tromey@redhat.com>
7242
7243 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7244 gdb_agent_op_rot>: New constants.
7245 (gdb_agent_op_names): Add pick and roll.
7246 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7247 cases.
7248
0feedb2c
JK
72492011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7250
7251 * aclocal.m4: Regenerated with aclocal-1.11.1.
7252
b3b9301e
PA
72532011-02-14 Pedro Alves <pedro@codesourcery.com>
7254
7255 * server.c (handle_qxfer_traceframe_info): New.
7256 (qxfer_packets): Register "traceframe-info".
7257 (handle_query): Report support for qXfer:traceframe-info:read+.
7258 * tracepoint.c (match_blocktype): New.
7259 (traceframe_find_block_type): Rename to ...
7260 (traceframe_walk_blocks): ... this. Add callback filter argument,
7261 and use it.
7262 (traceframe_find_block_type): New, reimplemented on top of
7263 traceframe_walk_blocks.
7264 (build_traceframe_info_xml): New.
7265 (traceframe_read_info): New.
7266 * server.h (traceframe_read_info): Declare.
7267
4f3e6fb7
YQ
72682011-02-11 Yao Qi <yao@codesourcery.com>
7269
7270 * configure.ac: Call AC_PROG_RANLIB.
7271 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7272 * configure: Regenerate.
7273
764880b7
PA
72742011-02-07 Pedro Alves <pedro@codesourcery.com>
7275
7276 * server.c (gdb_read_memory): Change return semantics to allow
7277 partial transfers.
7278 (handle_search_memory_1): Adjust.
7279 (process_serial_event) <'m' packet>: Handle partial transfers.
7280 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7281
1c79eb8a
PA
72822011-01-28 Pedro Alves <pedro@codesourcery.com>
7283
7284 * regcache.c (init_register_cache): Initialize
7285 regcache->register_status.
7286 (free_register_cache): Release regcache->register_status.
7287 (regcache_cpy): Copy register_status.
7288 (registers_to_string): Print 'x's for unavailable registers.
7289 (supply_register): Mark the register's status valid or
7290 unavailable, depending on whether a buffer was passed in or not.
7291 (supply_register_zeroed): New.
7292 (supply_regblock): Mark the registers' status valid or
7293 unavailable, depending on whether a buffer was passed in or not.
7294 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7295 (struct regcache): New `register_status' field.
7296 (supply_register_zeroed): Declare.
7297 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7298 supply_register_zeroed, rather than passing a NULL buffer to
7299 supply_register.
7300 * tracepoint.c (fetch_traceframe_registers): Update comment.
7301
85724a0e
PA
73022011-01-28 Pedro Alves <pedro@codesourcery.com>
7303
7304 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7305 buffer explicit.
7306
d08aafef
PA
73072011-01-25 Pedro Alves <pedro@codesourcery.com>
7308
7309 * server.h (decode_xfer_write): Change prototype.
7310 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7311 and don't extract the annex here.
7312 * server.c (decode_xfer_read): Remove `annex' parameter,
7313 and don't extract the annex here.
7314 (decode_xfer): New.
7315 (struct qxfer): New.
7316 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7317 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7318 (handle_qxfer_statictrace): New functions, abstracted out from
7319 handle_query, and made to use the struct qxfer interface.
7320 (handle_threads_qxfer_proper): Rename to ...
7321 (handle_qxfer_threads_proper): ... this.
7322 (handle_threads_qxfer): Rename to ...
7323 (handle_qxfer_threads): ... this. Adjust.
7324 (qxfer_packets): New array.
7325 (handle_qxfer): New function.
7326 (handle_query): Use handle_qxfer.
7327
493e2a69
MS
73282011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7329
7330 * gdbreplay.c: Shorten lines of >= 80 columns.
7331 * linux-low.c: Ditto.
7332 * linux-ppc-low.c: Ditto.
7333 * linux-s390-low.c: Ditto.
7334 * linux-sparc-low.c: Ditto.
7335 * linux-x86-low.c: Ditto.
7336 * linux-xtensa-low.c: Ditto.
7337 * mem-break.c: Ditto.
7338 * nto-low.c: Ditto.
7339 * regcache.h: Ditto.
7340 * remote-utils.c: Ditto.
7341 * server.c: Ditto.
7342 * server.h: Ditto.
7343 * thread-db.c: Ditto.
7344 * tracepoint.c: Ditto.
7345 * utils.c: Ditto.
7346 * win32-low.h: Ditto.
7347
44944448
JB
73482011-01-05 Joel Brobecker <brobecker@adacore.com>
7349
7350 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7351 update.
7352
71ce852c
JB
73532011-01-01 Joel Brobecker <brobecker@adacore.com>
7354
7355 * server.c (gdbserver_version): Update copyright year in version
7356 output.
7357 * gdbreplay.c (gdbreplay_version): Ditto.
7358
eb826dc6
MF
73592010-12-29 Jie Zhang <jie.zhang@analog.com>
7360
7361 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7362 * linux-bfin-low.c: New file.
7363 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7364 PT_DATA_ADDR for BFIN targets.
7365 * Makefile.in (SFILES): Add linux-bfin-low.c.
7366 (clean): Remove reg-bfin.c.
7367 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7368 * README: Mention supported Blackfin targets.
7369
39ab222a
MF
73702010-12-23 Mike Frysinger <vapier@gentoo.org>
7371
7372 * .gitignore: New file.
7373
a1f2ce7d
MF
73742010-11-16 Mike Frysinger <vapier@gentoo.org>
7375
7376 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7377
f474844c
JZ
73782010-10-22 Jie Zhang <jie@codesourcery.com>
7379
7380 * Makefile.in: Add FLAGS_TO_PASS variable.
7381 (install): Remove dependency of install-only and recursively
7382 invoke make for install-only.
7383
f1048712
DE
73842010-10-04 Doug Evans <dje@google.com>
7385
7386 * Makefile.in (uninstall): Use $(DESTDIR).
7387
b53a1623
PA
73882010-09-24 Pedro Alves <pedro@codesourcery.com>
7389
e6ee044d
PA
7390 PR gdb/11842
7391
b53a1623
PA
7392 * linux-x86-low.c (compat_siginfo_from_siginfo)
7393 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7394 si_code is < 0. Check for si_code == SI_TIMER before checking for
7395 si_code < 0.
7396
fa1bd1e4
JB
73972010-09-13 Joel Brobecker <brobecker@adacore.com>
7398
7399 * lynx-i386-low.c: New file.
7400 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7401
47fac8f8
JB
74022010-09-13 Joel Brobecker <brobecker@adacore.com>
7403
7404 * lynx-low.c (ptrace_request_to_str): Remove handling for
7405 request values that have been removed in LynxOS 5.x.
7406
1adfc54d
JB
74072010-09-13 Joel Brobecker <brobecker@adacore.com>
7408
7409 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7410 <ptrace.h>
7411
c2a66c29
NS
74122010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7413
7414 * configure.ac: Add --enable-inprocess-agent option.
7415 * configure: Rebuilt.
7416
32fcada3
YQ
74172010-09-06 Yao Qi <yao@codesourcery.com>
7418
7419 * linux-low.c (linux_kill): Remove unused variable.
7420 (linux_stabilize_threads): Likewise.
7421 * server.c (start_inferior): Likewise.
7422 (queue_stop_reply_callback): Likewise.
7423 * tracepoint.c (do_action_at_tracepoint): Likewise.
7424
0cccb683
YQ
74252010-09-06 Yao Qi <yao@codesourcery.com>
7426
7427 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7428 on return.
7429
423ec54c
JK
74302010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7431
7432 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7433
12ac6819
PA
74342010-09-06 Pedro Alves <pedro@codesourcery.com>
7435
7436 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7437 "$(IPA_DEPFILES)".
7438
8ed54b31
JB
74392010-09-01 Joel Brobecker <brobecker@adacore.com>
7440
7441 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7442 gdbserver/lynx-ppc-low.c: New files.
7443 * Makefile.in (lynx_low_h): New variable.
7444 (lynx-low.o, lynx-ppc-low.o): New rules.
7445 * configure.ac: On LynxOS, link with -lnetinet.
7446 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7447 * configure: regenerate.
7448
bb0116a4
JB
74492010-09-01 Joel Brobecker <brobecker@adacore.com>
7450
7451 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7452 * configure.ac: Add check for vasprintf and vsnprintf.
7453 * configure, config.in: Regenerate.
7454 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7455
a778ab81 74562010-09-01 Joel Brobecker <brobecker@adacore.com>
7457
7458 * gdbreplay.c: Move include of alloca.h up, next to include of
7459 malloc.h.
7460 * server.h: Add include of malloc.h.
7461 * mem-break.c: Remove include of malloc.h.
7462 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7463
8b034a19 74642010-09-01 Joel Brobecker <brobecker@adacore.com>
7465
7466 * Makefile.in (memmem.o): Build with -Wno-error.
7467
74682010-09-01 Joel Brobecker <brobecker@adacore.com>
7469
7470 * utils.c (xsnprintf): Make non-static.
7471 * server.h: Add xsnprintf declaration.
7472 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7473 replace calls to snprintf by calls to xsnprintf throughout.
7474
74752010-09-01 Joel Brobecker <brobecker@adacore.com>
7476
7477 * configure.ac: Add configure check for alloca.
7478 * configure, config.in: Regenerate.
7479 * server.h: Include alloca.h if it exists.
7480 * gdbreplay.c: Include alloca.h if it exists.
7481
1a981360
PA
74822010-08-28 Pedro Alves <pedro@codesourcery.com>
7483
7484 * linux-low.c (__SIGRTMIN): Define if not already defined.
7485 (linux_create_inferior): Check for __ANDROID__ rather than
7486 __SIGRTMIN.
7487 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7488 are already deferred.
7489 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7490 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7491 stopped and already has a pending signal to report.
7492 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7493 a pending signal to report or is moving out of a jump pad.
7494 (linux_init_signals): Check for __ANDROID__ rather than
7495 __SIGRTMIN.
7496
b4d51a55
PA
74972010-08-28 Pedro Alves <pedro@codesourcery.com>
7498
7499 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7500 debug_threads check. Avoid a linear search when not doing debug
7501 output.
7502
ec48365d
PA
75032010-08-27 Pedro Alves <pedro@codesourcery.com>
7504
7505 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7506 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7507 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7508 (process_event): Change local fd's type to gdb_fildes_t.
7509 (create_file_handler): Adjust prototype.
7510 (delete_file_handler): Adjust prototype.
7511 (handle_file_event): Adjust prototype. Use pfildes.
7512 (create_file_event): Adjsut prototype.
7513 * remote-utils.c (remote_desc, listen_desc): Change type to
7514 gdb_fildes_t.
7515 * server.h: New gdb_fildes_t typedef.
7516 [USE_WIN32API]: Include winsock2.h.
7517 (delete_file_handler, add_file_handler): Adjust prototypes.
7518 (pfildes): Declare.
7519 * utils.c (pfildes): New.
7520
854d88f0
PA
75212010-08-27 Pedro Alves <pedro@codesourcery.com>
7522
7523 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7524 * configure: Regenerate.
7525
0146f85b
PA
75262010-08-27 Pedro Alves <pedro@codesourcery.com>
7527
7528 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7529 (linux_done_accessing_memory): ... this.
7530 (linux_target_ops): Adjust.
7531 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7532 * nto-low.c (nto_target_ops): Adjust comment.
7533 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7534 * spu-low.c (spu_target_ops): Adjust comment.
7535 * target.h (target_ops): Rename unprepare_to_access_memory field
7536 to done_accessing_memory.
7537 (unprepare_to_access_memory): Rename to ...
7538 (done_accessing_memory): ... this.
7539
90d74c30
PA
75402010-08-26 Pedro Alves <pedro@codesourcery.com>
7541
7542 * linux-low.c (linux_prepare_to_access_memory): New.
7543 (linux_unprepare_to_access_memory): New.
7544 (linux_target_ops): Install them.
7545 * server.c (read_memory): Rename to ...
7546 (gdb_read_memory): ... this. Use
7547 prepare_to_access_memory/prepare_to_access_memory.
7548 (write_memory): Rename to ...
7549 (gdb_write_memory): ... this. Use
7550 prepare_to_access_memory/prepare_to_access_memory.
7551 (handle_search_memory_1): Adjust.
7552 (process_serial_event): Adjust.
7553 * target.h (struct target_ops): New fields
7554 prepare_to_access_memory and unprepare_to_access_memory.
7555 (prepare_to_access_memory, unprepare_to_access_memory): New.
7556 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7557 prepare_to_access_memory/prepare_to_access_memory.
7558 * nto-low.c (nto_target_ops): Adjust.
7559 * spu-low.c (spu_target_ops): Adjust.
7560 * win32-low.c (win32_target_ops): Adjust.
7561
fd467969
PA
75622010-08-26 Pedro Alves <pedro@codesourcery.com>
7563
7564 * Makefile.in (WARN_CFLAGS): Get it from configure.
7565 (WERROR_CFLAGS): New.
7566 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7567 * configure.ac: Introduce --enable-werror, which adds -Werror to
7568 the compiler command line. Enabled by default. Disable with
7569 --disable-werror. Add -Wdeclaration-after-statement
7570 Wpointer-arith and -Wformat-nonliteral to warning flags.
7571 * configure: Regenerate.
7572
331e2f5f
PA
75732010-08-26 Pedro Alves <pedro@codesourcery.com>
7574
7575 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7576
e581f2b4
PA
75772010-08-26 Pedro Alves <pedro@codesourcery.com>
7578
7579 * gdbreplay.c (remote_error): New.
7580 (gdbchar): New.
7581 (expect): Use gdbchar. Check for error reading from GDB.
7582 Clarify sync error output.
7583 (play): Check for errors writing to GDB.
7584 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7585 * remote-utils.c (getpkt): Check for errors writing to the remote
7586 descriptor.
7587
3c11dd79
PA
75882010-08-25 Pedro Alves <pedro@codesourcery.com>
7589
7590 * linux-low.c (linux_wait_1): Move non-debugging code out of
7591 `debug_threads' control.
7592
d20a8ad9
PA
75932010-08-25 Pedro Alves <pedro@codesourcery.com>
7594
7595 * linux-low.c (linux_wait_1): Don't set last_status here.
7596 * server.c (push_event, queue_stop_reply_callback): Assert we're
7597 not pushing a TARGET_WAITKIND_IGNORE event.
7598 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7599 (myresume, handle_target_event): Set the thread's last_resume_kind
7600 and last_status from the target returned status.
7601
964e4306
PA
76022010-08-25 Pedro Alves <pedro@codesourcery.com>
7603
7604 PR threads/10729
7605
7606 * linux-x86-low.c (update_debug_registers_callback): New.
7607 (i386_dr_low_set_addr): Use it.
7608 (i386_dr_low_get_addr): New.
7609 (i386_dr_low_set_control): Use update_debug_registers_callback.
7610 (i386_dr_low_get_control): New.
7611 (i386_dr_low_get_status): Adjust.
7612 * linux-low.c (linux_stop_lwp): New.
7613 * linux-low.h (linux_stop_lwp): Declare.
7614
7615 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7616 argument instead of a i386_debug_reg_state.
7617 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7618 a i386_debug_reg_state.
7619 (i386_insert_aligned_watchpoint): Adjust.
7620 (i386_remove_aligned_watchpoint): Adjust.
7621 (i386_low_stopped_data_address): Read the debug registers from the
7622 inferior instead of from the mirrors.
7623 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7624 (i386_dr_low_get_addr): Declare.
7625 (i386_dr_low_get_control): Declare.
7626 (i386_dr_low_get_status): Change prototype.
7627
7628 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7629 (i386_dr_low_get_addr): New.
7630 (i386_dr_low_get_control): New.
7631 (i386_dr_low_get_status): Adjust prototype. Return
7632 dr_status_mirror.
7633 (i386_initial_stuff): Clear dr_status_mirror and
7634 dr_control_mirror.
7635 (i386_get_thread_context): Adjust.
7636 (i386_set_thread_context): Adjust.
7637 (i386_thread_added): Adjust.
7638
5f21a75b
PA
76392010-08-24 Pedro Alves <pedro@codesourcery.com>
7640
7641 * linux-low.h (linux_thread_area): Delete declaration.
7642
3e4c1235
TS
76432010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7644
7645 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7646 after its termination.
7647
1971b033
PA
76482010-08-09 Pedro Alves <pedro@codesourcery.com>
7649
7650 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7651 (gdb_wants_all_stopped): Delete.
7652 (linux_wait_1): Don't call them.
7653 * server.c (handle_v_cont): Tag all threads as want-stopped.
7654 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7655 stopped as "client-wants-stopped".
7656
310444ac
PA
76572010-07-31 Pedro Alves <pedro@codesourcery.com>
7658
7659 * Makefile.in (signals_h): New.
7660 (server_h): Depend on it.
7661 (server.o): Don't depend on $(signals_def).
7662 (signals.o): Depend on $(signals_def).
7663
a19cae16
JK
76642010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7665
7666 * Makefile.in (signals_def): New.
7667 (server_h): Append include/gdb/signals.h and signals_def.
7668 (server.o): Append signals_def.
7669
30d50328
JK
76702010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7671
7672 * server.c (handle_target_event): Use target_signal_to_host for
7673 resume_info.sig initialization.
7674 * target.h (struct thread_resume) <sig>: New comment.
7675
5c3216e2
OS
76762010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7677
c6f46ca0
OS
7678 * server.c (handle_query): strcpy() the returned string from paddress()
7679 instead of sprintf().
5c3216e2
OS
7680 * utils.c (paddress): Return phex_nz().
7681
6bd31874
JB
76822010-07-07 Joel Brobecker <brobecker@adacore.com>
7683
7684 * server.c (handle_v_cont): Call mourn_inferior if process
7685 just exited.
7686 (myresume): Likewise.
7687
0fb4aa4b
PA
76882010-07-01 Pedro Alves <pedro@codesourcery.com>
7689
7690 Static tracepoints, and integration with UST.
7691
7692 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7693 * mem-break.c (uninsert_all_breakpoints)
7694 (reinsert_all_breakpoints): New.
7695 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7696 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7697 (gdb_agent_ust_loaded, helper_thread_id)
7698 (gdb_agent_helper_thread_id): New macros.
7699 (struct ipa_sym_addresses): Add addr_ust_loaded,
7700 addr_helper_thread_id, addr_cmd_buf.
7701 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7702 (in_process_agent_loaded_ust): New.
7703 (write_e_ust_not_loaded): New.
7704 (maybe_write_ipa_ust_not_loaded): New.
7705 (struct collect_static_trace_data_action): New.
7706 (enum tracepoint_type) <static_tracepoint>: New.
7707 (struct tracepoint) <handle>: Mention static tracepoints.
7708 (struct static_tracepoint_ctx): New.
7709 (CMD_BUF_SIZE): New.
7710 (add_tracepoint_action): Handle static tracepoint actions.
7711 (unprobe_marker_at): New.
7712 (clear_installed_tracepoints): Handle static tracepoints.
7713 (cmd_qtdp): Handle static tracepoints.
7714 (probe_marker_at): New.
7715 (cmd_qtstart): Handle static tracepoints.
7716 (response_tracepoint): Handle static tracepoints.
7717 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7718 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7719 (get_context_regcache): Handle static tracepoints.
7720 (do_action_at_tracepoint): Handle static tracepoint actions.
7721 (traceframe_find_block_type): Handle static trace data blocks.
7722 (traceframe_read_sdata): New.
7723 (download_tracepoints): Download static tracepoint actions.
7724 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7725 (GDB_PROBE_NAME): New.
7726 (ust_ops): New.
7727 (GET_UST_SYM): New.
7728 (USTF): New.
7729 (dlsym_ust): New.
7730 (ust_marker_to_static_tracepoint): New.
7731 (gdb_probe): New.
7732 (collect_ust_data_at_tracepoint): New.
7733 (gdb_ust_probe): New.
7734 (UNIX_PATH_MAX, SOCK_DIR): New.
7735 (gdb_ust_connect_sync_socket): New.
7736 (resume_thread, stop_thread): New.
7737 (run_inferior_command): New.
7738 (init_named_socket): New.
7739 (gdb_ust_socket_init): New.
7740 (cstr_to_hexstr): New.
7741 (next_st): New.
7742 (first_marker, next_marker): New.
7743 (response_ust_marker): New.
7744 (cmd_qtfstm, cmd_qtsstm): New.
7745 (unprobe_marker_at, probe_marker_at): New.
7746 (cmd_qtstmat, gdb_ust_thread): New.
7747 (gdb_ust_init): New.
7748 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7749 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7750 (ST_REGENTRY): New.
7751 (x86_64_st_collect_regmap): New.
7752 (X86_64_NUM_ST_COLLECT_GREGS): New.
7753 (AMD64_RIP_REGNUM): New.
7754 (supply_static_tracepoint_registers): New.
7755 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7756 (ST_REGENTRY): New.
7757 (i386_st_collect_regmap): New.
7758 (i386_NUM_ST_COLLECT_GREGS): New.
7759 (supply_static_tracepoint_registers): New.
7760 * server.c (handle_query): Handle qXfer:statictrace:read.
7761 <qSupported>: Report support for StaticTracepoints, and
7762 qXfer:statictrace:read features.
7763 * server.h (traceframe_read_sdata)
7764 (supply_static_tracepoint_registers): Declare.
7765 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7766 (unpack_varlen_hex): Include in IPA build.
7767 * Makefile.in (ustlibs, ustinc): New.
7768 (IPA_OBJS): Add remote-utils-ipa.o.
7769 ($(IPA_LIB)): Link -ldl and -lpthread.
7770 (UST_CFLAGS): New.
7771 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7772 * config.in, configure: Regenerate.
7773
9e4344e5
PA
77742010-06-20 Ian Lance Taylor <iant@google.com>
7775 Pedro Alves <pedro@codesourcery.com>
7776
7777 * linux-x86-low.c (always_true): Delete.
7778 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7779 trying to fool the compiler with always_true.
7780
c6beb2cb
PA
77812010-06-20 Pedro Alves <pedro@codesourcery.com>
7782
7783 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7784 conditions in gdbserver.
7785
d2ed6730
UW
77862010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7787
7788 * spu-low.c (spu_read_memory): Wrap around local store limit.
7789 (spu_write_memory): Likewise.
7790
4e29fb54
PA
77912010-06-15 Pedro Alves <pedro@codesourcery.com>
7792
7793 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7794 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7795 LONGEST uses.
7796 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7797 uses.
7798 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7799 uses with LONGEST uses.
7800
6a271cae
PA
78012010-06-14 Stan Shebs <stan@codesourcery.com>
7802 Pedro Alves <pedro@codesourcery.com>
7803
7804 Bytecode compiler.
7805
7806 * linux-x86-low.c: Include limits.h.
7807 (add_insns): New.
7808 (always_true): New.
7809 (EMIT_ASM): New.
7810 (EMIT_ASM32): New.
7811 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7812 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7813 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7814 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7815 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7816 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7817 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7818 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7819 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7820 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7821 (amd64_emit_void_call_2): New.
7822 (amd64_emit_ops): New.
7823 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7824 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7825 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7826 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7827 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7828 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7829 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7830 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7831 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7832 (i386_emit_stack_adjust, i386_emit_int_call_1)
7833 (i386_emit_void_call_2): New.
7834 (i386_emit_ops): New.
7835 (x86_emit_ops): New.
7836 (the_low_target): Install x86_emit_ops.
7837 * server.h (struct emit_ops): New.
7838 (get_raw_reg_func_addr): Declare.
7839 (current_insn_ptr, emit_error): Declare.
7840 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7841 (set_trace_state_variable_value): New defines.
7842 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7843 addr_get_trace_state_variable_value and
7844 addr_set_trace_state_variable_value.
7845 (symbol_list): New fields for get_raw_reg,
7846 get_trace_state_variable_value and set_trace_state_variable_value.
7847 (condfn): New typedef.
7848 (struct tracepoint): New field `compiled_cond'.
7849 (do_action_at_tracepoint): Clear compiled_cond.
7850 (get_trace_state_variable_value, set_trace_state_variable_value):
7851 Export in the IPA.
7852 (condition_true_at_tracepoint): If there's a compiled condition,
7853 run that.
7854 (current_insn_ptr, emit_error): New globals.
7855 (struct bytecode_address): New.
7856 (get_raw_reg_func_addr): New.
7857 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7858 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7859 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7860 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7861 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7862 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7863 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7864 (compile_tracepoint_condition, compile_bytecodes): New.
7865 * target.h (emit_ops): Forward declare.
7866 (struct target_ops): New field emit_ops.
7867 (target_emit_ops): New.
7868 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7869 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7870 * linux-low.c (linux_emit_ops): New.
7871 (linux_target_ops): Install it.
7872 * linux-low.h (struct linux_target_ops): New field emit_ops.
7873
92b72907
UW
78742010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7875
7876 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7877 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7878
fa593d66
PA
78792010-06-01 Pedro Alves <pedro@codesourcery.com>
7880 Stan Shebs <stan@codesourcery.com>
7881
7882 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7883 (all): Depend on $(extra_libraries).
7884 (install-only): Install the IPA.
7885 (IPA_OBJS, IPA_LIB): New.
7886 (clean): Remove the IPA lib.
7887 (IPAGENT_CFLAGS): New.
7888 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7889 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7890 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7891 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7892 * configure.ac: Check for atomic builtins support in the compiler.
7893 (IPA_DEPFILES, extra_libraries): Define.
7894 * configure.srv (ipa_obj): Add description.
7895 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7896 (i[34567]86-*-linux*): Set ipa_obj.
7897 (x86_64-*-linux*): Set ipa_obj.
7898 * linux-low.c (stabilizing_threads): New.
7899 (supports_fast_tracepoints): New.
7900 (linux_detach): Stabilize threads before detaching.
7901 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7902 the lwp is either not stabilizing, or is moving out of a jump pad.
7903 (linux_fast_tracepoint_collecting): New.
7904 (maybe_move_out_of_jump_pad): New.
7905 (enqueue_one_deferred_signal): New.
7906 (dequeue_one_deferred_signal): New.
7907 (linux_wait_for_event_1): If moving out of a jump pad, defer
7908 pending signals to later.
7909 (linux_stabilize_threads): New.
7910 (linux_wait_1): Check if threads need moving out of jump pads, and
7911 do it if so.
7912 (stuck_in_jump_pad_callback): New.
7913 (move_out_of_jump_pad_callback): New.
7914 (lwp_running): New.
7915 (linux_resume_one_lwp): Handle moving out of jump pads.
7916 (linux_set_resume_request): Dequeue deferred signals.
7917 (need_step_over_p): Also step over fast tracepoint jumps.
7918 (start_step_over): Also uninsert fast tracepoint jumps.
7919 (finish_step_over): Also reinsert fast tracepoint jumps.
7920 (linux_install_fast_tracepoint_jump): New.
7921 (linux_target_ops): Install linux_stabilize_threads and
7922 linux_install_fast_tracepoint_jump_pad.
7923 * linux-low.h (linux_target_ops) <get_thread_area,
7924 install_fast_tracepoint_jump_pad>: New fields.
7925 (struct lwp_info) <collecting_fast_tracepoint,
7926 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7927 (linux_get_thread_area): Declare.
7928 * linux-x86-low.c (jump_insn): New.
7929 (x86_get_thread_area): New.
7930 (append_insns): New.
7931 (push_opcode): New.
7932 (amd64_install_fast_tracepoint_jump_pad): New.
7933 (i386_install_fast_tracepoint_jump_pad): New.
7934 (x86_install_fast_tracepoint_jump_pad): New.
7935 (the_low_target): Install x86_get_thread_area and
7936 x86_install_fast_tracepoint_jump_pad.
7937 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7938 (struct fast_tracepoint_jump): New.
7939 (fast_tracepoint_jump_insn): New.
7940 (fast_tracepoint_jump_shadow): New.
7941 (find_fast_tracepoint_jump_at): New.
7942 (fast_tracepoint_jump_here): New.
7943 (delete_fast_tracepoint_jump): New.
7944 (set_fast_tracepoint_jump): New.
7945 (uninsert_fast_tracepoint_jumps_at): New.
7946 (reinsert_fast_tracepoint_jumps_at): New.
7947 (set_breakpoint_at): Use write_inferior_memory.
7948 (uninsert_raw_breakpoint): Use write_inferior_memory.
7949 (check_mem_read): Mask out fast tracepoint jumps.
7950 (check_mem_write): Mask out fast tracepoint jumps.
7951 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7952 (set_fast_tracepoint_jump): Declare.
7953 (delete_fast_tracepoint_jump)
7954 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7955 (reinsert_fast_tracepoint_jumps_at): Declare.
7956 * regcache.c: Don't compile many functions when building the
7957 in-process agent library.
7958 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7959 the register buffer in the heap.
7960 (free_register_cache): If the register buffer isn't owned by the
7961 regcache, don't free it.
7962 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7963 pre-existing register caches.
7964 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7965 type.
7966 (convert_ascii_to_int): : Constify `from' parameter type.
7967 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7968 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7969 the needed buffer in-place.
7970 (relocate_instruction): New.
7971 * server.c (handle_query) <qSymbols>: If the target supports
7972 tracepoints, give it a chance of looking up symbols. Report
7973 support for fast tracepoints.
7974 (handle_status): Stabilize threads.
7975 (process_serial_event): Adjust.
7976 * server.h (struct fast_tracepoint_jump): Forward declare.
7977 (struct process_info) <fast_tracepoint_jumps>: New field.
7978 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7979 (decode_X_packet, decode_M_packet): Adjust.
7980 (relocate_instruction): Declare.
7981 (in_process_agent_loaded): Declare.
7982 (tracepoint_look_up_symbols): Declare.
7983 (struct fast_tpoint_collect_status): Declare.
7984 (fast_tracepoint_collecting): Declare.
7985 (force_unlock_trace_buffer): Declare.
7986 (handle_tracepoint_bkpts): Declare.
7987 (initialize_low_tracepoint)
7988 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7989 * target.h (struct target_ops) <stabilize_threads,
7990 install_fast_tracepoint_jump_pad>: New fields.
7991 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7992 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7993 [HAVE_STDINT_H]: Include stdint.h.
7994 (trace_debug_1): Rename to ...
7995 (trace_vdebug): ... this.
7996 (trace_debug): Rename to ...
7997 (trace_debug_1): ... this. Add `level' parameter.
7998 (trace_debug): New.
7999 (ATTR_USED, ATTR_NOINLINE): New.
8000 (IP_AGENT_EXPORT): New.
8001 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8002 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8003 (about_to_request_buffer_space, trace_buffer_is_full)
8004 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8005 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8006 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8007 (traceframe_write_count, traceframes_created)
8008 (trace_state_variables)
8009 New renaming defines.
8010 (struct ipa_sym_addresses): New.
8011 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8012 (symbol_list): New.
8013 (ipa_sym_addrs): New.
8014 (all_tracepoint_symbols_looked_up): New.
8015 (in_process_agent_loaded): New.
8016 (write_e_ipa_not_loaded): New.
8017 (maybe_write_ipa_not_loaded): New.
8018 (tracepoint_look_up_symbols): New.
8019 (debug_threads) [IN_PROCESS_AGENT]: New.
8020 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8021 (UNKNOWN_SIDE_EFFECTS): New.
8022 (stop_tracing): New.
8023 (flush_trace_buffer): New.
8024 (stop_tracing_bkpt): New.
8025 (flush_trace_buffer_bkpt): New.
8026 (read_inferior_integer): New.
8027 (read_inferior_uinteger): New.
8028 (read_inferior_data_pointer): New.
8029 (write_inferior_data_pointer): New.
8030 (write_inferior_integer): New.
8031 (write_inferior_uinteger): New.
8032 (struct collect_static_trace_data_action): Delete.
8033 (enum tracepoint_type): New.
8034 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
8035 <actions_str, step_actions, step_actions_str>: Only include in
8036 GDBserver.
fa593d66
PA
8037 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8038 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8039 (tracepoints): Use IP_AGENT_EXPORT.
8040 (last_tracepoint): Don't include in the IPA.
8041 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8042 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8043 (alloced_trace_state_variables): New.
8044 (trace_state_variables): Use IP_AGENT_EXPORT.
8045 (traceframe_t): Delete unused variable.
8046 (circular_trace_buffer): Don't include in the IPA.
8047 (trace_buffer_start): Delete.
8048 (struct trace_buffer_control): New.
8049 (trace_buffer_free): Delete.
8050 (struct ipa_trace_buffer_control): New.
8051 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8052 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8053 New.
8054 (trace_buffer_ctrl): New.
8055 (TRACE_BUFFER_CTRL_CURR): New.
8056 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8057 Reimplement as macros.
8058 (trace_buffer_wrap): Delete.
8059 (traceframe_write_count, traceframe_read_count)
8060 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8061 (struct tracepoint_hit_ctx) <type>: New field.
8062 (struct fast_tracepoint_ctx): New.
8063 (memory_barrier): New.
8064 (cmpxchg): New.
8065 (record_tracepoint_error): Update atomically in the IPA.
8066 (clear_inferior_trace_buffer): New.
8067 (about_to_request_buffer_space): New.
8068 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8069 updating the same buffer.
8070 (add_tracepoint): Default the tracepoint's type to trap
8071 tracepoint, and orig_size to -1.
8072 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8073 internal variables.
8074 (create_trace_state_variable): New parameter `gdb'. Handle it.
8075 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8076 (cmd_qtdp): Handle fast tracepoints.
8077 (cmd_qtdv): Adjust.
8078 (max_jump_pad_size): New.
8079 (gdb_jump_pad_head): New.
8080 (get_jump_space_head): New.
8081 (claim_jump_space): New.
8082 (sort_tracepoints): New.
8083 (MAX_JUMP_SIZE): New.
8084 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8085 IPA.
8086 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8087 support. Upload fast traceframes, and delete internal IPA
8088 breakpoints.
8089 (stop_tracing_handler): New.
8090 (flush_trace_buffer_handler): New.
8091 (cmd_qtstop): Upload fast tracepoints.
8092 (response_tracepoint): Handle fast tracepoints.
8093 (tracepoint_finished_step): Upload fast traceframes. Set the
8094 tracepoint hit context's tracepoint type.
8095 (handle_tracepoint_bkpts): New.
8096 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8097 type. Add comment about fast tracepoints.
8098 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8099 non-existing action_str field.
8100 (get_context_regcache): Handle fast tracepoints.
8101 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8102 to the regcache.
8103 (fast_tracepoint_from_jump_pad_address): New.
8104 (fast_tracepoint_from_ipa_tpoint_address): New.
8105 (collecting_t): New.
8106 (force_unlock_trace_buffer): New.
8107 (fast_tracepoint_collecting): New.
8108 (collecting): New.
8109 (gdb_collect): New.
8110 (write_inferior_data_ptr): New.
8111 (target_tp_heap): New.
8112 (target_malloc): New.
8113 (download_agent_expr): New.
8114 (UALIGN): New.
8115 (download_tracepoints): New.
8116 (download_trace_state_variables): New.
8117 (upload_fast_traceframes): New.
8118 (IPA_FIRST_TRACEFRAME): New.
8119 (IPA_NEXT_TRACEFRAME_1): New.
8120 (IPA_NEXT_TRACEFRAME): New.
8121 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8122 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8123 (gdb_jump_pad_buffer_end): New.
8124 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8125 (initialize_tracepoint): Adjust.
8126 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8127 buffer. Initialize the low module.
8128 * utils.c (PREFIX, TOOLNAME): New.
8129 (malloc_failure): Use PREFIX.
8130 (error): In the IPA, an error causes an exit.
8131 (fatal, warning): Use PREFIX.
8132 (internal_error): Use TOOLNAME.
8133 (NUMCELLS): Increase to 10.
8134 * configure, config.in: Regenerate.
8135
d149dd1d
PA
81362010-06-01 Pedro Alves <pedro@codesourcery.com>
8137
8138 * server.c (handle_query) <qSupported>: Do two passes over the
8139 qSupported string to avoid nesting strtok.
8140
f6528abd
JK
81412010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8142
8143 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8144 (CDEPS): New.
8145 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8146 -Wl,--dynamic-list.
8147 * configure: Regenerate.
8148 * proc-service.list: New.
8149
ca2a87a0
JK
81502010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8151
8152 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8153 New comment.
8154
363a6e9f
OS
81552010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8156
8157 * gdbreplay.c (remote_open): Check error return from socket() call by
8158 its equality to -1 not by it being negative.
8159 * remote-utils.c (remote_open): Likewise.
8160
d23b6cb1
PA
81612010-05-23 Pedro Alves <pedro@codesourcery.com>
8162
8163 * config.h: Regenerate.
8164
28d3cf85
MK
81652010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8166
8167 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8168 doesn't provide PTRACE_GET_THREAD_AREA.
8169
fea36a59
MK
81702010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8171
8172 * linux-m68k-low.c: Include <asm/ptrace.h>
8173 (ps_get_thread_area): Implement.
8174
24b066ba
DE
81752010-05-03 Doug Evans <dje@google.com>
8176
8177 * event-loop.c (struct callback_event): New struct.
8178 (callback_list): New global.
8179 (append_callback_event, delete_callback_event): New functions.
8180 (process_callback): New function.
8181 (start_event_loop): Call it.
8182 * remote-utils.c (NOT_SCHEDULED): Define.
8183 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8184 moved out of readchar.
8185 (readchar): Rewrite. Call reschedule before returning.
8186 (reset_readchar): New function.
8187 (remote_close): Call it.
8188 (process_remaining, reschedule): New functions.
8189 * server.h (callback_handler_func): New typedef.
8190 (append_callback_event, delete_callback_event): Declare.
8191
9836d6ea
PA
81922010-05-03 Pedro Alves <pedro@codesourcery.com>
8193
8194 * proc-service.c (ps_pglobal_lookup): Use
8195 thread_db_look_up_one_symbol.
8196 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8197 parameter. Use it instead of all_symbols_looked_up.
8198 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8199 field.
8200 (all_symbols_looked_up): Don't declare.
8201 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8202 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8203 field.
8204 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8205 Set all_symbols_looked_up here.
8206 (thread_db_look_up_one_symbol): New.
8207 (thread_db_get_tls_address): Adjust.
8208 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8209 thread_db object on the heap, and tentatively set it in the
8210 process structure.
8211 (thread_db_init): Don't set all_symbols_looked_up here.
8212 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8213
7984d532
PA
82142010-05-03 Pedro Alves <pedro@codesourcery.com>
8215
8216 * linux-low.c (linux_kill, linux_detach): Adjust.
8217 (status_pending_p_callback): Remove redundant statement. Check
8218 for !TARGET_WAITIKIND_IGNORE, instead of
8219 TARGET_WAITKIND_STOPPED.
8220 (handle_tracepoints): Make sure LWP is locked. Adjust.
8221 (linux_wait_for_event_1): Adjust.
8222 (linux_cancel_breakpoints): New.
8223 (unsuspend_one_lwp): New.
8224 (unsuspend_all_lwps): New.
8225 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8226 (send_sigstop_callback): Change return type to int, add new
8227 `except' parameter and handle it.
8228 (suspend_and_send_sigstop_callback): New.
8229 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8230 pass them down. If SUSPEND, also increment the lwp's suspend
8231 count.
8232 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8233 (need_step_over_p): Don't consider suspended LWPs.
8234 (start_step_over): Adjust.
8235 (proceed_one_lwp): Change return type to int, add new `except'
8236 parameter and handle it.
8237 (unsuspend_and_proceed_one_lwp): New.
8238 (proceed_all_lwps): Use find_inferior instead of
8239 for_each_inferior.
8240 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8241 also decrement the suspend count of LWPs. Pass `except' down,
8242 instead of hacking its suspend count.
8243 (linux_pause_all): Add `freeze' parameter. Adjust.
8244 (linux_unpause_all): New.
8245 (linux_target_ops): Install linux_unpause_all.
8246 * server.c (handle_status): Adjust.
8247 * target.h (struct target_ops): New fields `unpause_all' and
8248 `cancel_breakpoints'. Add new parameter to `pause_all'.
8249 (pause_all): Add new `freeze' parameter.
8250 (unpause_all): New.
8251 (cancel_breakpoints): New.
8252 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8253 cancel breakpoints.
8254 (cmd_qtstart): Pause threads.
8255 (stop_tracing): Pause threads, and cancel breakpoints.
8256 * win32-low.c (win32_target_ops): Adjust.
8257
e471f25b
PA
82582010-05-03 Pedro Alves <pedro@codesourcery.com>
8259
8260 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8261 the inferior right away from here...
8262 (linux_wait_1): ... to here, and adjust to check the thread's
8263 last_resume_kind instead of the lwp's step or stop_expected flags.
8264
1915ef4f
PA
82652010-05-02 Pedro Alves <pedro@codesourcery.com>
8266
8267 * README: Use consistent `GDB' and `GDBserver' spellings.
8268
f9e39928
PA
82692010-05-02 Pedro Alves <pedro@codesourcery.com>
8270
8271 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8272 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8273 (linux_detach_one_lwp): Assume the lwp is stopped.
8274 (any_thread_of): Delete.
8275 (linux_detach): Stop all lwps here. Don't blindly delete all
8276 breakpoints.
8277 (delete_lwp_callback): New.
8278 (linux_mourn): Delete all lwps of the process that is gone.
8279 (linux_wait_1): Don't delete the last lwp of the process here.
8280 * mem-break.h (mark_breakpoints_out): Declare.
8281 * mem-break.c (mark_breakpoints_out): New.
8282 (free_all_breakpoints): Use it.
8283 * server.c (handle_target_event): If the process is gone, mark
8284 breakpoints out.
8285 * thread-db.c (struct thread_db) <create_bp>: New field.
8286 (thread_db_enable_reporting): Fix prototype. Store a thread event
8287 breakpoint reference in the thread_db struct.
8288 (thread_db_load_search): Clear the thread_db object.
8289 (try_thread_db_load_1): Ditto.
8290 (switch_to_process): New.
8291 (disable_thread_event_reporting): Use it.
8292 (remove_thread_event_breakpoints): New.
8293 (thread_db_detach, thread_db_mourn): Use it.
8294
1e7fc18c
PA
82952010-05-01 Pedro Alves <pedro@codesourcery.com>
8296
8297 * linux-low.c (linux_enable_event_reporting): New.
8298 (linux_wait_for_event_1, handle_extended_wait): Use it.
8299
02fc4de7
PA
83002010-04-30 Pedro Alves <pedro@codesourcery.com>
8301
8302 * linux-low.c (linux_kill_one_lwp, linux_kill)
8303 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8304 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8305 SIGSTOP even if the LWP is stopped.
8306 (send_sigstop_callback): New.
8307 (stop_all_lwps): Use send_sigstop_callback instead.
8308 (linux_resume_one_thread): Adjust.
8309 (proceed_one_lwp): Still proceed an LWP that the client has
8310 requested to stop, if we haven't reported it as stopped yet. Make
8311 sure that LWPs the client want stopped, have a pending SIGSTOP.
8312
bc3b5632
DE
83132010-04-26 Doug Evans <dje@google.com>
8314
ae1ada35
DE
8315 * server.c (handle_general_set): Make static.
8316
bc3b5632
DE
8317 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8318 Print received char after testing for error/eof instead of before.
8319 (input_interrupt): Tweak comment.
8320
65730243
DE
83212010-04-23 Doug Evans <dje@google.com>
8322
8323 * server.c (start_inferior): Print inferior argv if --debug.
8324
a8ae7dc0
AR
83252010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8326
8327 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8328 * nto-x86-low.c: Include server.h
8329
1c07cc19
PM
83302010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8331
8332 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8333 be consistent with other sources of this directory.
8334 (init_registers_amd64): Correct name of source file of this function
8335 in the comment.
8336
e0a61e09
PM
83372010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8338
8339 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8340 64-bit executables.
8341
54709339
PM
83422010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8343
8344 * win32-i386-low.c: Add 64-bit support.
8345 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8346 (init_registers_amd64): Declare.
8347 (mappings): Add 64-bit version of array.
8348 (init_windows_x86): New function.
8349 (the_low_target): Change init_arch field to init_windows_x86.
8350
e8f0053d
PM
83512010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8352
8353 * win32-low.c: Adapt to support also 64-bit architecture.
8354 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8355 (get_image_name): Use SIZE_T type for local variable `done'.
8356 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8357 (toolhelp_get_dll_name): Idem.
8358 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8359 Use uintptr_t typecast to avoid warning.
8360 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8361 (handle_exception): Use phex_nz to avoid warning.
8362 (win32_wait): Remove unused local variable `process'.
8363
c481e77e
PM
83642010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8365
8366 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8367 `amd64-avx.o'.
8368
12ea4b69
PM
83692010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8370
8371 * configure.ac: Use `ws2_32' library for srv_mingw.
8372 * configure: Regenerate.
8373 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8374 * remote-utils.c: Likewise.
8375
f6d1620c
L
83762010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8377
8378 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8379 if __x86_64__ is defined.
8380
8e642873
PM
83812010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8382
8383 * configure: Regenerate.
8384
711e434b
PM
83852010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8386
8387 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8388 * target.h (target_ops): New get_tib_address field.
8389 * win32-low.h (win32_thread_info): Add thread_local_base field.
8390 * win32-low.c (child_add_thread): Add tlb argument.
8391 Set thread_local_base field to TLB.
8392 (get_child_debug_event): Adapt to child_add_thread change.
8393 (win32_get_tib_address): New function.
8394 (win32_target_ops): Set get_tib_address field to
8395 win32_get_tib_address.
8396 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8397
505106cd
PA
83982010-04-12 Pedro Alves <pedro@codesourcery.com>
8399
505106cd
PA
8400 * linux-low.c (linux_mourn): Also remove the process.
8401 * server.c (handle_target_event): Don't remove the process here.
8402 * nto-low.c (nto_mourn): New.
8403 (nto_target_ops): Install it.
8404 * spu-low.c (spu_mourn): New.
8405 (spu_target_ops): Install it.
8406 * win32-low.c (win32_mourn): New.
8407 (win32_target_ops): Install it.
8408
e8470a06
PA
84092010-04-12 Pedro Alves <pedro@codesourcery.com>
8410
8411 * server.h (buffer_xml_printf): Remove redundant `;'.
8412
45ba0d02
PA
84132010-04-12 Pedro Alves <pedro@codesourcery.com>
8414
8415 * regcache.c (set_register_cache): Invalidate regcaches before
8416 changing the register cache layout.
8417 (regcache_invalidate_one): Allow a NULL regcache.
8418 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8419 regcaches before changing the register cache layout or the target
8420 regsets.
8421
59e04013
L
84222010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8423
8424 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8425 variable warning on Linux/x86-64.
8426
8336d594
PA
84272010-04-11 Pedro Alves <pedro@codesourcery.com>
8428
8429 GDBserver disconnected tracing support.
8430
8431 * linux-low.c (linux_remove_process): Delete.
8432 (add_lwp): Don't set last_resume_kind here.
8433 (linux_kill): Use `mourn'.
8434 (linux_detach): Use `thread_db_detach', and `mourn'.
8435 (linux_mourn): New.
8436 (linux_attach_lwp_1): Adjust comment.
8437 (linux_attach): last_resume_kind moved the thread_info; adjust.
8438 (status_pending_p_callback): Adjust.
8439 (linux_wait_for_event_1): Adjust.
8440 (count_events_callback, select_singlestep_lwp_callback)
8441 (select_event_lwp_callback, cancel_breakpoints_callback)
8442 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8443 (proceed_one_lwp): Adjust.
8444 (linux_async): Add debug output.
8445 (linux_thread_stopped): New.
8446 (linux_pause_all): New.
8447 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8448 linux_pause_all.
8449 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8450 (thread_db_free): Delete declaration.
8451 (thread_db_detach, thread_db_mourn): Declare.
8452 * thread-db.c (thread_db_init): Use thread_db_mourn.
8453 (thread_db_free): Delete, split in two.
8454 (disable_thread_event_reporting): New.
8455 (thread_db_detach): New.
8456 (thread_db_mourn): New.
8457
8458 * server.h (struct thread_info) <last_resume_kind>: New field.
8459 <attached>: Add comment.
8460 <gdb_detached>: New field.
8461 (handler_func): Change return type to int.
8462 (handle_serial_event, handle_target_event): Ditto.
8463 (gdb_connected): Declare.
8464 (tracing): Delete.
8465 (disconnected_tracing): Declare.
8466 (stop_tracing): Declare.
8467
8468 * server.c (handle_query) <qSupported>: Report support for
8469 disconnected tracing.
8470 (queue_stop_reply_callback): Account for running threads.
8471 (gdb_wants_thread_stopped): New.
8472 (gdb_wants_all_threads_stopped): New.
8473 (gdb_reattached_process): New.
8474 (handle_status): Clear the `gdb_detached' flag of all processes.
8475 In all-stop, stop all threads.
8476 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8477 (process_serial_event): If the remote connection breaks, or if an
8478 exit was forced with "monitor exit", force an event loop exit.
8479 Handle disconnected tracing on detach.
8480 (handle_serial_event): Adjust.
8481 (handle_target_event): If GDB isn't connected, forward events back
8482 to the inferior, unless the last process exited, in which case,
8483 exit gdbserver. Adjust interface.
8484
8485 * remote-utils.c (remote_open): Don't block in accept. Instead
8486 register an event loop source on the listen socket file
8487 descriptor. Refactor bits into ...
8488 (listen_desc): ... this new global.
8489 (gdb_connected): ... this new function.
8490 (enable_async_notification): ... this new function.
8491 (handle_accept_event): ... this new function.
8492 (remote_close): Clear remote_desc.
8493
8494 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8495
8496 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8497 New fields.
8498 (mourn_inferior): Define.
8499 (target_process_qsupported): Avoid the dangling else problem.
8500 (thread_stopped): Define.
8501 (pause_all): Define.
8502 (target_waitstatus_to_string): Declare.
8503 * target.c (target_waitstatus_to_string): New.
8504
8505 * tracepoint.c (tracing): Make extern.
8506 (disconnected_tracing): New.
8507 (stop_tracing): Make extern. Handle tracing stops due to GDB
8508 disconnecting.
8509 (cmd_qtdisconnected): New.
8510 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8511 (handle_tracepoint_general_set): Handle QTDisconnected.
8512
8513 * event-loop.c (event_handler_func): Change return type to int.
8514 (process_event): Bail out if the event handler wants the event
8515 loop to stop.
8516 (handle_file_event): Ditto.
8517 (start_event_loop): Bail out if the event handler wants the event
8518 loop to stop.
8519
8520 * nto-low.c (nto_target_ops): Adjust.
8521 * spu-low.c (spu_wait): Don't remove the process here.
8522 (spu_target_ops): Adjust.
8523 * win32-low.c (win32_wait): Don't remove the process here.
8524 (win32_target_ops): Adjust.
8525
5d267c4c
PA
85262010-04-11 Pedro Alves <pedro@codesourcery.com>
8527
8528 * regcache.c (realloc_register_cache): Invalidate inferior's
8529 regcache before recreating it.
8530
623ccd72
PA
85312010-04-09 Pedro Alves <pedro@codesourcery.com>
8532
8533 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8534
219f2f23
PA
85352010-04-09 Stan Shebs <stan@codesourcery.com>
8536 Pedro Alves <pedro@codesourcery.com>
8537
8538 * server.h (LONGEST): New.
8539 (struct thread_info) <while_stepping>: New field.
8540 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8541 Declare.
8542 (initialize_tracepoint, handle_tracepoint_general_set)
8543 (handle_tracepoint_query, tracepoint_finished_step)
8544 (tracepoint_was_hit, release_while_stepping_state_list):
8545 (current_traceframe): Declare.
8546 * server.c (handle_general_set): Handle tracepoint packets.
8547 (read_memory): New.
8548 (write_memory): New.
8549 (handle_search_memory_1): Use read_memory.
8550 (handle_query): Report support for conditional tracepoints, trace
8551 state variables, and tracepoint sources. Handle tracepoint
8552 queries.
8553 (main): Initialize the tracepoints module.
8554 (process_serial_event): Handle traceframe reads/writes.
8555
8556 * linux-low.c (handle_tracepoints): New.
8557 (linux_wait_1): Call it.
8558 (linux_resume_one_lwp): Handle while-stepping.
8559 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8560 (linux_target_ops): Install them.
8561 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8562 New field.
8563 * linux-x86-low.c (x86_supports_tracepoints): New.
8564 (the_low_target). Install it.
8565
8566 * mem-break.h (delete_breakpoint): Declare.
8567 * mem-break.c (delete_breakpoint): Make external.
8568
8569 * target.h (struct target_ops): Add `supports_tracepoints',
8570 `read_pc', and `write_pc' fields.
8571 (target_supports_tracepoints): Define.
8572 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8573 (phex_nz): New.
8574
8575 * regcache.h (struct regcache) <registers_owned>: New field.
8576 (init_register_cache, regcache_cpy): Declare.
8577 (regcache_read_pc, regcache_write_pc): Declare.
8578 (register_cache_size): Declare.
8579 (supply_regblock): Declare.
8580 * regcache.c (init_register_cache): New.
8581 (new_register_cache): Use it.
8582 (regcache_cpy): New.
8583 (register_cache_size): New.
8584 (supply_regblock): New.
8585 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 8586
219f2f23
PA
8587 * tracepoint.c: New.
8588
8589 * Makefile.in (OBS): Add tracepoint.o.
8590 (tracepoint.o): New rule.
8591
3a13a53b
L
85922010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8593
8594 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8595 (i386-mmx.o): New.
8596 (i386-mmx.c): Likewise.
8597 (i386-mmx-linux.o): Likewise.
8598 (i386-mmx-linux.c): Likewise.
8599
8600 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8601 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8602 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8603 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8604
8605 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8606 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8607 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8608
1570b33e
L
86092010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8610
8611 * Makefile.in (clean): Updated.
8612 (i386-avx.o): New.
8613 (i386-avx.c): Likewise.
8614 (i386-avx-linux.o): Likewise.
8615 (i386-avx-linux.c): Likewise.
8616 (amd64-avx.o): Likewise.
8617 (amd64-avx.c): Likewise.
8618 (amd64-avx-linux.o): Likewise.
8619 (amd64-avx-linux.c): Likewise.
8620
8621 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8622 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8623 (srv_amd64_regobj): Add amd64-avx.o.
8624 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8625 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8626 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8627 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8628 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8629 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8630 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8631
8632 * i387-fp.c: Include "i386-xstate.h".
8633 (i387_xsave): New.
8634 (i387_cache_to_xsave): Likewise.
8635 (i387_xsave_to_cache): Likewise.
8636 (x86_xcr0): Likewise.
8637
8638 * i387-fp.h (i387_cache_to_xsave): Likewise.
8639 (i387_xsave_to_cache): Likewise.
8640 (x86_xcr0): Likewise.
8641
8642 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8643 * linux-crisv32-low.c (target_regsets): Likewise.
8644 * linux-m68k-low.c (target_regsets): Likewise.
8645 * linux-mips-low.c (target_regsets): Likewise.
8646 * linux-ppc-low.c (target_regsets): Likewise.
8647 * linux-s390-low.c (target_regsets): Likewise.
8648 * linux-sh-low.c (target_regsets): Likewise.
8649 * linux-sparc-low.c (target_regsets): Likewise.
8650 * linux-xtensa-low.c (target_regsets): Likewise.
8651
8652 * linux-low.c: Include <sys/uio.h>.
8653 (regsets_fetch_inferior_registers): Support nt_type.
8654 (regsets_store_inferior_registers): Likewise.
8655 (linux_process_qsupported): New.
8656 (linux_target_ops): Add linux_process_qsupported.
8657
8658 * linux-low.h (regset_info): Add nt_type.
8659 (linux_target_ops): Add process_qsupported.
8660
8661 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8662 and <sys/uio.h>.
8663 (init_registers_i386_avx_linux): New.
8664 (init_registers_amd64_avx_linux): Likewise.
8665 (xmltarget_i386_linux_no_xml): Likewise.
8666 (xmltarget_amd64_linux_no_xml): Likewise.
8667 (PTRACE_GETREGSET): Likewise.
8668 (PTRACE_SETREGSET): Likewise.
8669 (x86_fill_xstateregset): Likewise.
8670 (x86_store_xstateregset): Likewise.
8671 (use_xml): Likewise.
8672 (x86_linux_update_xmltarget): Likewise.
8673 (x86_linux_process_qsupported): Likewise.
8674 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8675 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8676 init_registers_i386_linux here. Call
8677 x86_linux_update_xmltarget.
8678 (the_low_target): Add x86_linux_process_qsupported.
8679
8680 * server.c (handle_query): Call target_process_qsupported.
8681
8682 * target.h (target_ops): Add process_qsupported.
8683 (target_process_qsupported): New.
8684
fc7238bb
PA
86852010-04-03 Pedro Alves <pedro@codesourcery.com>
8686
8687 * inferiors.c (add_thread): Set last_status kind to
8688 TARGET_WAITKIND_IGNORE.
8689 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8690 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8691 (linux_wait_1): Move `thread' local definition to block that uses
8692 it. Don't NULL initialize `event_child'.
8693 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8694 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8695 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8696
bdabb078
PA
86972010-04-01 Pedro Alves <pedro@codesourcery.com>
8698
8699 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8700 an extended waitstatus, or by a watchpoint.
8701 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8702 thread was stepping or has been stopped by a watchpoint.
8703
d3bbe7a0
PA
87042010-04-01 Pedro Alves <pedro@codesourcery.com>
8705
8706 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8707 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8708 of another, then delete the previous, and validate all
8709 breakpoints.
8710 (validate_inserted_breakpoint): New.
8711 (delete_disabled_breakpoints): New.
8712 (validate_breakpoints): New.
8713 (check_mem_read): Validate breakpoints before trusting their
8714 shadow. Delete disabled breakpoints.
8715 (check_mem_write): Validate breakpoints before trusting they
8716 should be inserted. Delete disabled breakpoints.
8717 * mem-break.h (validate_breakpoints):
8718 * server.c (handle_query): Validate breakpoints when we see a
8719 qSymbol query.
8720
8b07ae33
PA
87212010-04-01 Pedro Alves <pedro@codesourcery.com>
8722
8723 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8724 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8725 if we could tell there's a GDB breakpoint at stop_pc.
8726 (need_step_over_p): Don't do a step over if we find a GDB
8727 breakpoint at the resume PC.
8728
8729 * mem-break.c (struct raw_breakpoint): New.
8730 (enum bkpt_type): New type `gdb_breakpoint'.
8731 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8732 fields. New field `raw'.
8733 (find_raw_breakpoint_at): New.
8734 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8735 breakpoint instead.
8736 (set_breakpoint_at): Adjust.
8737 (delete_raw_breakpoint): New.
8738 (release_breakpoint): New.
8739 (delete_breakpoint): Rename to...
8740 (delete_breakpoint_1): ... this. Add proc parameter. Use
8741 release_breakpoint. Return ENOENT.
8742 (delete_breakpoint): Reimplement.
8743 (find_breakpoint_at): Delete.
8744 (find_gdb_breakpoint_at): New.
8745 (delete_breakpoint_at): Delete.
8746 (set_gdb_breakpoint_at): New.
8747 (delete_gdb_breakpoint_at): New.
8748 (gdb_breakpoint_here): New.
8749 (set_reinsert_breakpoint): Use release_breakpoint.
8750 (uninsert_breakpoint): Rename to ...
8751 (uninsert_raw_breakpoint): ... this.
8752 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8753 (reinsert_raw_breakpoint): Change parameter type to
8754 raw_breakpoint.
8755 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8756 instead.
8757 (check_breakpoints): Adjust. Use release_breakpoint.
8758 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8759 (breakpoint_inserted_here): Ditto.
8760 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8761 Don't trust the breakpoint's shadow if it is not inserted.
8762 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8763 (delete_all_breakpoints): Adjust.
8764 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8765 use delete_breakpoint_1.
8766
8767 * mem-break.h (breakpoints_supported): Delete declaration.
8768 (set_gdb_breakpoint_at): Declare.
8769 (gdb_breakpoint_here): Declare.
8770 (delete_breakpoint_at): Delete.
8771 (delete_gdb_breakpoint_at): Declare.
8772
8773 * server.h (struct raw_breakpoint): Forward declare.
8774 (struct process_info): New field `raw_breakpoints'.
8775
8776 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8777 breakpoints.
8778
6bf5e0ba
PA
87792010-03-24 Pedro Alves <pedro@codesourcery.com>
8780
8781 * linux-low.c (status_pending_p_callback): Fix comment.
8782 (linux_wait_for_event_1): Move most of the internal breakpoint
8783 handling from here...
8784 (linux_wait_1): ... to here.
8785 (count_events_callback): New.
8786 (select_singlestep_lwp_callback): New.
8787 (select_event_lwp_callback): New.
8788 (cancel_breakpoints_callback): New.
8789 (select_event_lwp): New.
8790 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8791 priority to all LWPs that have had events that should be reported
8792 to the client. Cancel breakpoints when about to reporting the
8793 event to the client, not while stopping lwps. No longer cancel
8794 finished single-steps here.
8795 (cancel_finished_single_step): Delete.
8796 (cancel_finished_single_steps): Delete.
8797
414a389f
PA
87982010-03-24 Pedro Alves <pedro@codesourcery.com>
8799
8800 * mem-break.c (enum bkpt_type): New.
8801 (struct breakpoint): New field `type'.
8802 (set_breakpoint_at): Change return type to struct breakpoint
8803 pointer. Set type to `other_breakpoint' by default.
8804 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8805 in the breakpoint list.
8806 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8807 (reinsert_breakpoint): Rename to ...
8808 (reinsert_raw_breakpoint): ... this.
8809 (reinsert_breakpoints_at): Adjust.
8810 * mem-break.h (struct breakpoint): Declare.
8811 (set_breakpoint_at): Change return type to struct breakpoint
8812 pointer.
8813
2280c721
PA
88142010-03-24 Pedro Alves <pedro@codesourcery.com>
8815
8816 * server.c (handle_query): Assign, not compare.
8817
d50171e4
PA
88182010-03-24 Pedro Alves <pedro@codesourcery.com>
8819
8820 Teach linux gdbserver to step-over-breakpoints.
8821
8822 * linux-low.c (can_hardware_single_step): New.
8823 (supports_breakpoints): New.
8824 (handle_extended_wait): If stopping threads, read the stop pc of
8825 the new cloned LWP.
8826 (get_pc): New.
8827 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8828 low target doesn't support retrieving the PC.
8829 (add_lwp): Set last_resume_kind to resume_continue.
8830 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8831 (linux_attach): Don't clear stop_expected. Set the lwp's
8832 last_resume_kind to resume_stop.
8833 (linux_detach_one_lwp): Don't check for removed breakpoints.
8834 (check_removed_breakpoint): Delete.
8835 (status_pending_p): Rename to ...
8836 (status_pending_p_callback): ... this. Don't check for removed
8837 breakpoints. Don't consider threads that are stopped from GDB's
8838 perspective.
8839 (linux_wait_for_lwp): Always read the stop_pc here.
8840 (cancel_breakpoint): New.
8841 (step_over_bkpt): New global.
8842 (linux_wait_for_event_1): Implement stepping over breakpoints.
8843 (gdb_wants_lwp_stopped): New.
8844 (gdb_wants_all_stopped): New.
8845 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8846 single-step traps here. Store the thread's last reported target
8847 wait status.
8848 (send_sigstop): Don't clear stop_expected. Always set it,
8849 instead.
8850 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8851 (cancel_finished_single_step): New.
8852 (cancel_finished_single_steps): New.
8853 (wait_for_sigstop): Don't cancel finished single-step traps here.
8854 (linux_resume_one_lwp): Don't check for removed breakpoints.
8855 Don't set `step' on non-hardware step archs.
8856 (linux_set_resume_request): Ignore resume_stop requests if already
8857 stopping or stopped. Set the lwp's last_resume_kind.
8858 (resume_status_pending_p): Don't check for removed breakpoints.
8859 (need_step_over_p): New.
8860 (start_step_over): New.
8861 (finish_step_over): New.
8862 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8863 requests. Clear the thread's last reported target waitstatus.
8864 Don't use the `suspended' flag. Don't consider pending breakpoints.
8865 (linux_resume): Start a step-over if necessary.
8866 (proceed_one_lwp): New.
8867 (proceed_all_lwps): New.
8868 (unstop_all_lwps): New.
8869 * linux-low.h (struct lwp_info): Rewrite comment for the
8870 `suspended' flag. Add the `stop_pc' field. Delete the
8871 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8872 Add `'last_resume_kind' and `need_step_over' fields.
8873 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8874 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8875 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8876 (set_raw_breakpoint_at): New.
8877 (set_breakpoint_at): Rewrite to use it.
8878 (reinsert_breakpoint_handler): Delete.
8879 (set_reinsert_breakpoint): New.
8880 (reinsert_breakpoint_by_bp): Delete.
8881 (delete_reinsert_breakpoints): New.
8882 (uninsert_breakpoint): Rewrite.
8883 (uninsert_breakpoints_at): New.
8884 (reinsert_breakpoint): Rewrite.
8885 (reinsert_breakpoints_at): New.
8886 (check_breakpoints): Rewrite.
8887 (breakpoint_here): New.
8888 (breakpoint_inserted_here): New.
8889 (check_mem_read): Adjust.
8890 * mem-break.h (breakpoints_supported, breakpoint_here)
8891 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8892 (reinsert_breakpoint_by_bp): Delete declaration.
8893 (delete_reinsert_breakpoints): Declare.
8894 (reinsert_breakpoint): Delete declaration.
8895 (reinsert_breakpoints_at): Declare.
8896 (uninsert_breakpoint): Delete declaration.
8897 (uninsert_breakpoints_at): Declare.
8898 (check_breakpoints): Adjust prototype.
8899 * server.h: Adjust include order.
8900 (struct thread_info): Declare here. Add a `last_status' field.
8901
30ba68cb
MS
89022010-03-23 Michael Snyder <msnyder@vmware.com>
8903
8904 * server.c (crc32): New function.
8905 (handle_query): Add handling for 'qCRC:' request.
8906
b9a881c2
PA
89072010-03-23 Pedro Alves <pedro@codesourcery.com>
8908
8909 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8910 lwp had been stopped by a watchpoint.
8911
e92d13d5
PA
89122010-03-16 Pedro Alves <pedro@codesourcery.com>
8913
8914 * server.h (internal_error): Declare.
8915 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8916 * utils.c (internal_error): New function.
8917
64daa791
AS
89182010-03-15 Andreas Schwab <schwab@redhat.com>
8919
8920 * configure.srv: Fix typo setting srv_regobj.
8921
f52cd8cd
PA
89222010-03-15 Pedro Alves <pedro@codesourcery.com>
8923
8924 * linux-low.c (fetch_register): Avoid passing a non string literal
8925 format to `error'.
8926 (usr_store_inferior_registers): Ditto.
8927
93ae6fdc
PA
89282010-03-14 Pedro Alves <pedro@codesourcery.com>
8929
8930 * linux-low.c (linux_write_memory): Bail out early if peeking
8931 memory failed.
8932
c3adc08c
PA
89332010-03-14 Pedro Alves <pedro@codesourcery.com>
8934
8935 * linux-low.h (struct lwp_info): New fields
8936 `stopped_by_watchpoint' and `stopped_data_address'.
8937 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8938 here, and cache them in the lwp object.
8939 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8940 directly.
8941 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8942 field.
8943 (linux_stopped_by_watchpoint): Rewrite.
8944 (linux_stopped_data_address): Rewrite.
8945
bce522a2
PA
89462010-03-06 Simo Melenius <simo.melenius@iki.fi>
8947
8948 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8949 switching the current inferior, not before.
8950
90884b2b
L
89512010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8952
8953 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8954 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8955 i386-linux.c and amd64-linux.c.
8956 (reg-i386.o): Removed.
8957 (reg-i386.c): Likewise.
8958 (reg-i386-linux.o): Likewise.
8959 (reg-i386-linux.c): Likewise.
8960 (reg-x86-64.o): Likewise.
8961 (reg-x86-64.c): Likewise.
8962 (reg-x86-64-linux.o): Likewise.
8963 (reg-x86-64-linux.c): Likewise.
8964 (i386.o): New.
8965 (i386.c): Likewise.
8966 (i386-linux.o): Likewise.
8967 (i386-linux.c): Likewise.
8968 (amd64.o): Likewise.
8969 (amd64.c): Likewise.
8970 (amd64-linux.o): Likewise.
8971 (amd64-linux.c): Likewise.
8972
8973 * configure.srv (srv_i386_regobj): New.
8974 (srv_i386_linux_regobj): Likewise.
8975 (srv_amd64_regobj): Likewise.
8976 (srv_amd64_linux_regobj): Likewise.
8977 (srv_i386_32bit_xmlfiles): Likewise.
8978 (srv_i386_64bit_xmlfiles): Likewise.
8979 (srv_i386_xmlfiles): Likewise.
8980 (srv_amd64_xmlfiles): Likewise.
8981 (srv_i386_linux_xmlfiles): Likewise.
8982 (srv_amd64_linux_xmlfiles): Likewise.
8983 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8984 srv_xmlfiles to $srv_i386_xmlfiles.
8985 (i[34567]86-*-mingw32ce*): Likewise.
8986 (i[34567]86-*-mingw*): Likewise.
8987 (i[34567]86-*-nto*): Likewise.
8988 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8989 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8990 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8991 (x86_64-*-linux*): Likewise.
8992
8993 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8994 (init_registers_amd64_linux): New.
8995 (x86_arch_setup): Replace init_registers_x86_64_linux with
8996 init_registers_amd64_linux.
8997
193f13e6
MK
89982010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8999
9000 * configure.ac: Check for libdl. If it is not available link against
9001 static libthread_db.
9002 * configure: Regenerate.
9003
85d721b8
PA
90042010-02-22 Pedro Alves <pedro@codesourcery.com>
9005
9006 PR9605
9007
9008 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9009 handing a read watchpoint.
9010 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9011
6076632b
DE
90122010-02-12 Doug Evans <dje@google.com>
9013
9014 * linux-low.c (linux_supports_tracefork_flag): Document.
9015 (linux_look_up_symbols): Add comment.
9016
3327ccf7
L
90172010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9018
9019 * regcache.c (supply_register): Clear regcache if buf is NULL.
9020
0718675c 90212010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 9022 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
9023
9024 * inferiors.c (find_inferior): Add function documentation.
9025 (unloaded_dll): Handle the case where the unloaded dll has not
9026 been previously registered in the dll list.
9027
177321bd
DJ
90282010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9029
9030 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9031 (thumb2_breakpoint): New.
9032 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9033
2b009048
DJ
90342010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9035
9036 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9037 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9038 breakpoints.
9039
3be029c7
PA
90402010-01-21 Pedro Alves <pedro@codesourcery.com>
9041
9042 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9043
18f5de3b
JK
90442010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9045
9046 * linux-s390-low.c (s390_collect_ptrace_register)
9047 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9048
3743bb4f
DE
90492010-01-21 Doug Evans <dje@google.com>
9050
14ce3065
DE
9051 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9052 (PTRACE_ARG4_TYPE): New macro.
9053 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9054 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9055 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9056 (usr_store_inferior_registers): Ditto.
9057 (linux_read_memory, linux_write_memory): Ditto.
9058 (linux_test_for_tracefork): Ditto.
9059
3743bb4f
DE
9060 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9061 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9062
8b315be5
PA
90632010-01-21 Pedro Alves <pedro@codesourcery.com>
9064
9065 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9066 target.
9067
85492558
PA
90682010-01-21 Pedro Alves <pedro@codesourcery.com>
9069
9070 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9071 prototype to take a regcache. Adjust.
9072
442ea881
PA
90732010-01-20 Pedro Alves <pedro@codesourcery.com>
9074
9075 * regcache.h (struct thread_info): Forward declare.
9076 (struct regcache): New.
9077 (new_register_cache): Adjust prototype.
9078 (get_thread_regcache): Declare.
9079 (free_register_cache): Adjust prototype.
9080 (registers_to_string, registers_from_string): Ditto.
9081 (supply_register, supply_register_by_name, collect_register)
9082 (collect_register_as_string, collect_register_by_name): Ditto.
9083 * regcache.c (struct inferior_regcache_data): Delete.
9084 (get_regcache): Rename to ...
9085 (get_thread_regcache): ... this. Adjust. Switch inferior before
9086 fetching registers.
9087 (regcache_invalidate_one): Adjust.
9088 (regcache_invalidate): Fix prototype.
9089 (new_register_cache): Return the new register cache.
9090 (free_register_cache): Change prototype.
9091 (realloc_register_cache): Adjust.
9092 (registers_to_string): Change prototype to take a regcache. Adjust.
9093 (registers_from_string): Ditto.
9094 (register_data): Ditto.
9095 (supply_register): Ditto.
9096 (supply_register_by_name): Ditto.
9097 (collect_register): Ditto.
9098 (collect_register_as_string): Ditto.
9099 (collect_register_by_name): Ditto.
9100 * server.c (process_serial_event): Adjust.
9101 * linux-low.h (regset_fill_func, regset_store_func): Change
9102 prototype.
9103 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9104 Change prototype.
9105 * linux-low.c (get_stop_pc): Adjust.
9106 (check_removed_breakpoint): Adjust.
9107 (linux_wait_for_event): Adjust.
9108 (linux_resume_one_lwp): Adjust.
9109 (fetch_register): Add regcache parameter. Adjust.
9110 (usr_store_inferior_registers): Ditto.
9111 (regsets_fetch_inferior_registers): Ditto.
9112 (regsets_store_inferior_registers): Ditto.
9113 (linux_fetch_registers, linux_store_registers): Ditto.
9114 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9115 regcache. Adjust.
43aaf8b6
PA
9116 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9117 Ditto.
442ea881
PA
9118 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9119 prototype to take a regcache.
9120 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9121 * remote-utils.c (convert_ascii_to_int, outreg)
9122 (prepare_resume_reply): Change prototype to take a regcache.
9123 Adjust.
9124 * target.h (struct target_ops) <fetch_registers, store_registers>:
9125 Change prototype to take a regcache.
9126 (fetch_inferior_registers, store_inferior_registers): Change
9127 prototype to take a regcache. Adjust.
9128 * proc-service.c (ps_lgetregs): Adjust.
9129 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9130 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9131 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9132 take a regcache. Adjust.
9133 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9134 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9135 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9136 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9137 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9138 (cris_cannot_fetch_register):
9139 (cris_breakpoint_at): Change prototype to take a regcache.
9140 Adjust.
9141 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9142 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9143 to take a regcache. Adjust.
9144 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9145 Adjust.
9146 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9147 take a regcache. Adjust.
9148 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9149 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9150 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9151 * linux-mips-low.c (mips_get_pc):
9152 (mips_set_pc): Change prototype to take a regcache. Adjust.
9153 (mips_reinsert_addr): Adjust.
9154 (mips_collect_register): Change prototype to take a regcache.
9155 Adjust.
9156 (mips_supply_register):
9157 (mips_collect_register_32bit, mips_supply_register_32bit)
9158 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9159 (mips_store_fpregset): Ditto.
43aaf8b6
PA
9160 * linux-ppc-low.c (ppc_supply_ptrace_register)
9161 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
9162 (parse_spufs_run): Adjust.
9163 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9164 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9165 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9166 take a regcache. Adjust.
9167 * linux-s390-low.c (s390_collect_ptrace_register)
9168 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9169 (s390_set_pc): Change prototype to take a regcache. Adjust.
9170 (s390_arch_setup): Adjust.
9171 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9172 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9173 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9174 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9175 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9176 regcache. Adjust.
9177 (sparc_breakpoint_at): Adjust.
9178 * linux-xtensa-low.c (xtensa_fill_gregset):
9179 (xtensa_store_gregset):
9180 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9181 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9182 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9183 prototype to take a regcache. Adjust.
9184 * win32-arm-low.c (arm_fetch_inferior_register)
9185 (arm_store_inferior_register): Change prototype to take a
9186 regcache. Adjust.
9187 * win32-i386-low.c (i386_fetch_inferior_register)
9188 (i386_store_inferior_register): Change prototype to take a
9189 regcache. Adjust.
9190 * win32-low.c (child_fetch_inferior_registers)
9191 (child_store_inferior_registers): Change prototype to take a
9192 regcache. Adjust.
9193 (win32_wait): Adjust.
9194 (win32_fetch_inferior_registers): Change prototype to take a
9195 regcache. Adjust.
9196 (win32_store_inferior_registers): Adjust.
9197 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9198 store_inferior_register>: Change prototype to take a regcache.
9199
60c3d7b0
DE
92002010-01-20 Doug Evans <dje@google.com>
9201
9202 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9203 #ifdef.
9204 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 9205 (W_STOPCODE): Provide definition if missing.
60c3d7b0 9206
dc146f7c
VP
92072010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9208
9209 * linux-low.c (linux_core_of_thread): New.
9210 (compare_ints, show_process, list_threads): New.
9211 (linux_qxfer_osdata): Report threads and cores.
9212 (linux_target_op): Register linux_core_of_thread.
9213 * remote-utils.c (prepare_resume_reply): Report the core.
9214 (buffer_xml_printf): Support %d specifier.
9215 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9216 New.
9217 (handle_query): Handle qXfer:threads. Announce availability
9218 thereof.
9219 * target.h (struct target_ops): New field core_of_thread.
9220
7803799a
UW
92212010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9222
9223 * Makefile.in (clean): Remove new generated files.
9224 (reg-s390.o, reg-s390.c): Remove rules.
9225 (reg-s390x.o, reg-s390x.c): Likewise.
9226 (s390-linux32.o, s390-linux32.c): Add rules.
9227 (s390-linux64.o, s390-linux64.c): Likewise.
9228 (s390x-linux64.o, s390x-linux64.c): Likewise.
9229 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9230 * linux-s390-low.c: Include <elf.h>.
9231 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9232 (init_registers_s390): Remove prototype.
9233 (init_registers_s390x): Likewise.
9234 (init_registers_s390_linux32): Add prototype.
9235 (init_registers_s390_linux64): Likewise.
9236 (init_registers_s390x_linux64): Likewise.
9237 (s390_num_regs_3264): New define.
9238 (s390_regmap_3264): New global variable.
9239 (s390_cannot_fetch_register): Remove obsolete check.
9240 (s390_cannot_store_register): Likewise.
9241 (s390_collect_ptrace_register): Handle upper/lower register halves.
9242 (s390_supply_ptrace_register): Likewise.
9243 (s390_fill_gregset): Update to register number changes.
9244 (s390_get_hwcap): New routine.
9245 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9246 Install appropriate regmap and register set.
9247
6e7ffa39
JB
92482010-01-01 Joel Brobecker <brobecker@adacore.com>
9249
9250 * server.c (gdbserver_version): Update copyright year to 2010.
9251 * gdbreplay.c (gdbreplay_version): Likewise.
9252
957f3f49
DE
92532009-12-28 Doug Evans <dje@google.com>
9254
9255 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9256 elf/external.h. Include <elf.h> instead but only if necessary.
9257
ca5c370d
PA
92582009-12-28 Pedro Alves <pedro@codesourcery.com>
9259
9260 * linux-low.c (linux_remove_process): Remove `detaching'
9261 parameter. Don't release/detach from thread_db here.
9262 (linux_kill): Release/detach from thread_db here, ...
9263 (linux_detach): ... and here, before actually detaching.
9264 (linux_wait_1): ... and here, when a process exits.
9265 * thread-db.c (any_thread_of): New.
9266 (thread_db_free): Switch the current inferior to a thread of the
9267 passed in process.
9268
4ee62156
DE
92692009-12-21 Doug Evans <dje@google.com>
9270
d90e6a88
DE
9271 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9272
c5f62d5f
DE
9273 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9274 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9275 warning ifndef __NR_tkill. Move setting of errno there too.
9276 Delete unnecessary resetting of errno after syscall.
9277 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9278
10e86dd7
DE
9279 * configure.ac: Check for dladdr.
9280 * config.in: Regenerate.
9281 * configure: Regenerate.
9282 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9283 (try_thread_db_load): Update.
9284
4ee62156
DE
9285 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9286
00f515da
DE
92872009-12-18 Doug Evans <dje@google.com>
9288
e9464885
DE
9289 * event-loop.c: Include unistd.h if it exists.
9290
07d4f67e
DE
9291 * linux-low.c (my_waitpid): Move definition away from being in
9292 between linux_tracefork_child/linux_test_for_tracefork.
9293
00f515da
DE
9294 * gdb_proc_service.h (psaddr_t): Fix type.
9295 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9296 signature to match glibc.
9297
1de1badb
DE
92982009-12-16 Doug Evans <dje@google.com>
9299
9300 * linux-low.c (linux_read_memory): Fix argument to read.
9301
aeeb81d1
PA
93022009-11-26 Pedro Alves <pedro@codesourcery.com>
9303
9304 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9305 events, don't leave current_inferior pointing at null.
9306
10357975
PA
93072009-11-26 Pedro Alves <pedro@codesourcery.com>
9308
9309 * win32-low.c (LOG): Delete.
9310 (OUTMSG): Output to stderr.
9311 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9312 on compile time LOG macro.
9313 (win32_wait): Fix debug output.
9314
cf6e3471
PA
93152009-11-26 Pedro Alves <pedro@codesourcery.com>
9316
9317 * win32-low.c (win32_add_one_solib): If the dll name is
9318 "ntdll.dll", prepend the system directory to the dll path.
9319
0c85e18e
MK
93202009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9321
9322 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9323
9ac544ce 93242009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9325 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9326
9327 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9328 * configure.ac: Check for __mcoldfire__ and set
9329 gdb_cv_m68k_is_coldfire.
9330 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9331 reg-cf.o and reg-m68k.o.
9332 * configure: Regenerated.
9333
fd7dd3e6
PA
93342009-11-16 Pedro Alves <pedro@codesourcery.com>
9335
9336 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9337 Pass it to thread_db_free.
9338 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9339 proper `detaching' argument to linux_remove_process.
9340 * linux-low.h (thread_db_free): Add `detaching' parameter.
9341 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9342 to thread_db_free.
9343 (thread_db_free): Add `detaching' parameter. Only
9344 call td_ta_clear_event if detaching from process.
9345
75aa492e
MK
93462009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9347
9348 * thread-db.c (thread_db_free): Fix typo.
9349
21e1bee4
PP
93502009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9351
9352 PR gdb/10838
9353 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9354
8838b45e
NS
93552009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9356
9357 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9358 with an i686 compiler.
9359 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9360 needed.
9361 * configure: Rebuilt.
9362
8a35fb51
SL
93632009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9364
9365 PR gdb/10783
9366
9367 * server.c (handle_search_memory_1): Correct read_addr initialization
9368 in loop for searching subsequent chunks.
9369
96f15937
PP
93702009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9371
9372 * configure.ac: New --with-libthread-db option.
9373 * thread-db.c: Allow direct dependence on libthread_db.
9374 (thread_db_free): Adjust.
9375 * config.in: Regenerate.
9376 * configure: Likewise.
889bf7c5 9377
5f7d1694
PP
93782009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9379
9380 PR gdb/10757
9381 * thread-db.c (attach_thread): New function.
9382 (maybe_attach_thread): Return success/failure.
9383 (find_new_threads_callback): Adjust.
889bf7c5
PA
9384 (thread_db_find_new_threads): Loop until no new threads.
9385
88e3b899
PA
93862009-10-13 Pedro Alves <pedro@codesourcery.com>
9387
9388 * proc-service.c (ps_lgetregs): Formatting.
9389
cdbfd419
PP
93902009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9391
9392 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9393 * configure.ac: Adjust.
9394 * linux-low.h (struct process_info_private): Move members to struct
9395 thread_db.
9396 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9397 * linux-low.c (linux_remove_process): Adjust.
9398 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9399 * server.c (handle_query): Move code ...
9400 (handle_monitor_command): ... here. New function.
9401 * target.h (struct target_ops): New member.
9402 * thread-db.c (struct thread_db): New.
9403 (libthread_db_search_path): New variable.
9404 (thread_db_create_event, thread_db_enable_reporting)
9405 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9406 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9407 (try_thread_db_load_1, dladdr_to_soname): New functions.
9408 (try_thread_db_load, thread_db_load_search): New functions.
9409 (thread_db_init): Search for libthread_db.
9410 (thread_db_free): New function.
9411 (thread_db_handle_monitor_command): Likewise.
9412 * config.in: Regenerate.
9413 * configure: Regenerate.
889bf7c5 9414
4168d2d6
UW
94152009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9416
9417 * spu-low.c (spu_kill): Wait for inferior to terminate.
9418 Call clear_inferiors.
9419 (spu_detach): Call clear_inferiors.
9420
81ecdfbb
RW
94212009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9422
9423 * aclocal.m4: Regenerate.
9424 * config.in: Likewise.
9425 * configure: Likewise.
9426
0b9ff2c0
UW
94272009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9428
9429 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9430 (parse_spufs_run): New function.
9431 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9432 (ppc_breakpoint_at): Handle SPU breakpoints.
9433
efcbbd14
UW
94342009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9435
9436 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9437 (SPUFS_MAGIC): Define.
9438 (spu_enumerate_spu_ids): New function.
9439 (linux_qxfer_spu): New function.
9440 (linux_target_ops): Install linux_qxfer_spu.
9441
f4d9bade
UW
94422009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9443
9444 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9445 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9446 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9447 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9448 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9449 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9450 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9451 (init_registers_powerpc_cell32l): Add prototype.
9452 (init_registers_powerpc_cell64l): Likewise.
9453 (ppc_arch_setup): Detect Cell/B.E. architecture.
9454
96e946ca
RW
94552009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9456
9457 * Makefile.in (datarootdir): New variable.
9458
58d6951d
DJ
94592009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9460
9461 * linux-low.c (linux_write_memory): Update debugging output.
9462 * Makefile.in (clean): Add new descriptions.
9463 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9464 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9465 * configure.srv: Add new files for arm*-*-linux*.
9466 * linux-arm-low.c: Add new declarations.
9467 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9468 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9469 (HWCAP_VFPv3D16): New.
9470 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9471 instead of __IWMMXT__.
9472 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9473 (arm_arch_setup): New.
9474 (target_regsets): Remove #ifdef. Add VFP regset.
9475 (the_low_target): Use arm_arch_setup.
9476
12b42a12
DJ
94772009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9478
9479 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9480 the main thread again.
9481
ac8c974e
AR
94822009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9483
9484 Adding Neutrino gdbserver.
9485 * configure: Regenerated.
9486 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9487 * configure.srv (i[34567]86-*-nto*): New target.
9488 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9489 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9490 (nto_comctrl) [__QNX__]: New function.
9491 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9492
4424e0c3 94932009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
9494
9495 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9496 srv_tgtobj.
9497
912cf4ba
PA
94982009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9499 Pedro Alves <pedro@codesourcery.com>
9500
9501 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9502 don't support CONTEXT_EXTENDED_REGISTERS.
9503 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9504 (the_low_target): Install them.
9505 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9506 failing with ERROR_PIPE_NOT_CONNECTED.
9507
aa5ca48f
DE
95082009-06-30 Doug Evans <dje@google.com>
9509 Pierre Muller <muller@ics.u-strasbg.fr>
9510
9511 Add h/w watchpoint support to x86-linux, win32-i386.
9512 * Makefile.in (SFILES): Add i386-low.c
9513 (i386_low_h): Define.
9514 (i386-low.o): Add dependencies.
9515 (linux-x86-low.o): Add i386-low.h dependency.
9516 (win32-i386-low.o): Ditto.
9517 * i386-low.c: New file.
9518 * i386-low.h: New file.
9519 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9520 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9521 * linux-low.c (linux_add_process): Initialize arch_private.
9522 (linux_remove_process): Free arch_private.
9523 (add_lwp): Initialize arch_private.
9524 (delete_lwp): Free arch_private.
9525 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9526 provided.
9527 * linux-low.h (process_info_private): New member arch_private.
9528 (lwp_info): New member arch_private.
9529 (linux_target_ops): New members new_process, new_thread,
9530 prepare_to_resume.
9531 (ptid_of): New macro.
9532 * linux-x86-low.c: Include stddef.h, i386-low.h.
9533 (arch_process_info): New struct.
9534 (arch_lwp_info): New struct.
9535 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9536 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9537 (i386_dr_low_get_status): New function.
9538 (x86_insert_point, x86_remove_point): New functions.
9539 (x86_stopped_by_watchpoint): New function.
9540 (x86_stopped_data_address): New function.
9541 (x86_linux_new_process, x86_linux_new_thread): New functions.
9542 (x86_linux_prepare_to_resume): New function.
9543 (the_low_target): Add entries for insert_point, remove_point,
9544 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9545 prepare_to_resume.
9546 * server.c (debug_hw_points): New global.
9547 (monitor_show_help): Document set debug-hw-points.
9548 (handle_query): Process "set debug-hw-points".
9549 * server.h (debug_hw_points): Declare.
9550 (paddress): Declare.
9551 * utils.c (NUMCELLS, CELLSIZE): New macros.
9552 (get_sell, xsnprintf, paddress): New functions.
9553 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9554 remove_point, stopped_by_watchpoint, stopped_data_address.
9555 * win32-i386-low.c: Include i386-low.h.
9556 (debug_reg_state): Replaces dr.
9557 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9558 (i386_dr_low_get_status): New function.
9559 (i386_insert_point, i386_remove_point): New functions.
9560 (i386_stopped_by_watchpoint): New function.
9561 (i386_stopped_data_address): New function.
9562 (i386_initial_stuff): Update.
9563 (get_thread_context,set_thread_context,i386_thread_added): Update.
9564 (the_low_target): Add entries for insert_point,
9565 remove_point, stopped_by_watchpoint, stopped_data_address.
9566 * win32-low.c (win32_insert_watchpoint): New function.
9567 (win32_remove_watchpoint): New function.
9568 (win32_stopped_by_watchpoint): New function.
9569 (win32_stopped_data_address): New function.
9570 (win32_target_ops): Add entries for insert_watchpoint,
9571 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9572 * win32-low.h (win32_target_ops): New members insert_point,
9573 remove_point, stopped_by_watchpoint, stopped_data_address.
9574
d993e290
PA
95752009-06-25 Pedro Alves <pedro@codesourcery.com>
9576
9577 * server.c (process_serial_event): Re-return unsupported, not
9578 error, if the type isn't recognized. Re-allow supporting only
9579 insert or remove packets. Also call require_running for
9580 breakpoints. Add missing break statement to default case. Tidy.
9581 * target.h (struct target_ops): Rename insert_watchpoint to
9582 insert_point, and remove_watchpoint to remove_point.
9583
9584 * linux-low.h (struct linux_target_ops): Likewise.
9585 * linux-low.c (linux_insert_watchpoint): Rename to ...
9586 (linux_insert_point): ... this. Adjust.
9587 (linux_remove_watchpoint): Rename to ...
9588 (linux_remove_point): ... this. Adjust.
9589 (linux_target_ops): Adjust.
9590 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9591 (cris_insert_point): ... this.
9592 (cris_remove_watchpoint): Rename to ...
9593 (cris_remove_point): ... this.
9594 (the_low_target): Adjust.
9595
0f54c268
PM
95962009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9597
9598 * server.c (handle_v_kill): Pass signal_pid to
9599 kill_inferior if multi_process is zero.
9600
c6314022
AR
96012009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9602
9603 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9604 * target.h (target_ops): Comment for *_watchpoint to make it clear
9605 the functions can get types '0' and '1'.
9606
4463ce24
AR
96072009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9608
9609 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9610 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9611 * regcache.c (get_regcache): Likewise.
9612 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9613 * win32-low.c (child_fetch_inferior_registers): Remove check for
9614 regno 0.
9615
cf8fd78b
PA
96162009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9617 Pedro Alves <pedro@codesourcery.com>
9618
9619 * target.h (struct target_ops) <supports_multi_process>: New
9620 callback.
9621 (target_supports_multi_process): New.
9622 * server.c (handle_query): Even if GDB reports support, only
9623 enable multi-process if the target also supports it. Report
9624 multi-process support only if the target backend supports it.
9625 * linux-low.c (linux_supports_multi_process): New function.
9626 (linux_target_ops): Install it as target_supports_multi_process
9627 callback.
9628
47c0c975
DE
96292009-05-24 Doug Evans <dje@google.com>
9630
e09875d4
DE
9631 Global renaming of find_thread_pid to find_thread_ptid.
9632 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9633 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9634 All callers updated.
9635
e27d73f6
DE
9636 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9637 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9638 directly.
9639
47c0c975
DE
9640 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9641 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9642 (linux_resume_one_lwp): Ditto.
9643
2acc282a
DE
96442009-05-23 Doug Evans <dje@google.com>
9645
9646 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9647 from struct inferior_list_entry * to struct lwp_info *.
9648 All callers updated.
9649
9f1036c1
DE
96502009-05-13 Doug Evans <dje@google.com>
9651
9652 * linux-x86-low.c: Don't include assert.h.
9653 (x86_siginfo_fixup): Use fatal, not assert.
9654 (x86_arch_setup): Fix comment.
9655
d0722149
DE
96562009-05-12 Doug Evans <dje@google.com>
9657
9658 Biarch support for i386/amd64 gdbserver.
9659 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9660 Add linux-x86-low.c.
9661 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9662 (linux-x86-low.o): Add.
9663 * linux-x86-64-low.c: Delete.
9664 * linux-i386-low.c: Delete.
9665 * linux-x86-low.c: New file.
9666 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9667 linux-x86-low.o.
9668 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9669 linux-x86-low.o.
9670 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9671 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9672 (linux_child_pid_to_exec_file): New function.
9673 (elf_64_header_p, elf_64_file_p): New functions.
9674 (siginfo_fixup): New function.
9675 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9676 give target a chance to convert layout.
9677 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9678 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9679
fdeb2a12
DE
96802009-05-07 Doug Evans <dje@google.com>
9681
9682 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9683 (regsets_store_inferior_registers): Ditto.
9684
a6dbe5df
PA
96852009-05-06 Pedro Alves <pedro@codesourcery.com>
9686
9687 PR server/10048
9688
9689 * linux-low.c (must_set_ptrace_flags): Delete.
9690 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9691 of the global.
9692 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9693 `lwp->must_set_ptrace_flags' instead.
ba42693b 9694 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
9695 (linux_wait_1): ... not here.
9696
5091eb23
DE
96972009-04-30 Doug Evans <dje@google.com>
9698
9f767825
DE
9699 * inferiors.c (started_inferior_callback): New function.
9700 (attached_inferior_callback): New function.
9701 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9702 * server.c (print_started_pid, print_attached_pid): New functions.
9703 (detach_or_kill_for_exit): New function.
9704 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9705 * server.h (have_started_inferiors_p): Declare.
9706 (have_attached_inferiors_p): Declare.
9707
5091eb23
DE
9708 * inferiors.c (remove_process): Fix memory leak, free process.
9709 * linux-low.c (linux_remove_process): New function.
9710 (linux_kill): Call it instead of remove_process.
9711 (linux_detach, linux_wait_1): Ditto.
9712
155c8968
PA
97132009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9714
9715 * configure.srv: Add x86 Windows CE target.
9716
7fe519cb
UW
97172009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9718
9719 * inferiors.c (get_thread_process): Make global.
9720 * server.h (get_thread_process): Add prototype.
9721 * thread-db.c (find_one_thread): Use get_thread_process
9722 instead of current_process.
9723 (thread_db_get_tls_address): Do not crash if called when
9724 thread layer is not yet initialized.
9725
5472f405
UW
97262009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9727
9728 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9729 * spu-low.c (current_tid): Rename to ...
9730 (current_ptid): ... this.
9731 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9732 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9733 ptid_get_lwp (current_ptid) instead of current_tid.
9734 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9735 instead of current_tid. Use find_process_pid to verify pid
9736 argument is valid. Pass proper argument to remove_process.
9737 (spu_thread_alive): Compare current_ptid instead of current_tid.
9738 (spu_resume): Likewise.
9739
55ac2b99
PA
97402009-04-02 Pedro Alves <pedro@codesourcery.com>
9741
9742 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9743 variable.
9744
95954743
PA
97452009-04-01 Pedro Alves <pedro@codesourcery.com>
9746
9747 Implement the multiprocess extensions, and add linux multiprocess
9748 support.
9749
9750 * server.h (ULONGEST): Declare.
9751 (struct ptid, ptid_t): New.
9752 (minus_one_ptid, null_ptid): Declare.
9753 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9754 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9755 (struct inferior_list_entry): Change `id' type from unsigned from
9756 to ptid_t.
9757 (struct sym_cache, struct breakpoint, struct
9758 process_info_private): Forward declare.
9759 (struct process_info): Declare.
9760 (current_process): Declare.
9761 (all_processes): Declare.
9762 (initialize_inferiors): Declare.
9763 (add_thread): Adjust to use ptid_t.
9764 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9765 (add_process, remove_process, find_thread_pid): Declare.
9766 (find_inferior_id): Adjust to use ptid_t.
9767 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9768 (multi_process): Declare.
9769 (push_event): Adjust to use ptid_t.
9770 (read_ptid, write_ptid): Declare.
9771 (prepare_resume_reply): Adjust to use ptid_t.
9772 (clear_symbol_cache): Declare.
9773 * inferiors.c (all_processes): New.
9774 (null_ptid, minus_one_ptid): New.
9775 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9776 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9777 (add_thread): Change unsigned long to ptid. Remove gdb_id
9778 parameter. Adjust.
9779 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9780 (gdb_id_to_thread): Rename to ...
9781 (find_thread_pid): ... this. Change unsigned long to ptid.
9782 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9783 (loaded_dll, pull_pid_from_list): Adjust.
9784 (add_process, remove_process, find_process_pid)
9785 (get_thread_process, current_process, initialize_inferiors): New.
9786 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9787 (struct target_waitstatus) <related_pid>: Ditto.
9788 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9789 return type to int.
9790 (struct target_ops) <join>: Add `pid' argument.
9791 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9792 (struct target_ops) <wait>: Add `ptid' field. Change return type
9793 to ptid.
9794 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9795 (mywait): Add `ptid' argument. Change return type to ptid_t.
9796 (target_pid_to_str): Declare.
9797 * target.c (set_desired_inferior): Adjust to use ptids.
9798 (mywait): Add new `ptid' argument. Adjust.
9799 (target_pid_to_str): New.
9800 * mem-break.h (free_all_breakpoints): Declare.
9801 * mem-break.c (breakpoints): Delelete.
9802 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9803 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9804 to use per-process breakpoint list.
9805 (free_all_breakpoints): New.
9806 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9807 (symbol_cache, all_symbols_looked_up): Delete.
9808 (hexchars): New.
9809 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9810 read_ptid): New.
9811 (prepare_resume_reply): Change ptid argument's type from unsigned
9812 long to ptid_t. Adjust. Implement W;process and X;process.
9813 (free_sym_cache, clear_symbol_cache): New.
9814 (look_up_one_symbol): Adjust to per-process symbol cache. *
9815 * server.c (cont_thread, general_thread, step_thread): Change type
9816 to ptid_t.
9817 (attached): Delete.
9818 (multi_process): New.
9819 (last_ptid): Change type to ptid_t.
9820 (struct vstop_notif) <ptid>: Change type to ptid_t.
9821 (queue_stop_reply, push_event): Change `ptid' argument's type to
9822 ptid_t.
9823 (discard_queued_stop_replies): Add `pid' argument.
9824 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9825 changes. Don't reference the `attached' global.
9826 (attach_inferior): Adjust to mywait interface changes.
9827 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9828 features. Handle and report "multiprocess+". Handle
9829 "qAttached:PID".
9830 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9831 changes.
9832 (handle_v_kill): New.
9833 (handle_v_stopped): Adjust to use target_pid_to_str.
9834 (handle_v_requests): Allow multiple attaches and runs when
9835 multiprocess extensions are in effect. Handle "vKill".
9836 (myresume): Adjust to use ptids.
9837 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9838 (handle_status): Adjust to discard_queued_stop_replies interface
9839 change.
9840 (first_thread_of, kill_inferior_callback)
9841 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9842 (main): Call initialize_inferiors. Adjust to use ptids, killing
9843 and detaching from all inferiors. Handle multiprocess packet
9844 variants.
9845 * linux-low.h: Include gdb_proc_service.h.
9846 (struct process_info_private): New.
9847 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9848 <lwpid_of>: Use ptid_get_lwp.
9849 (get_lwp_thread): Adjust.
9850 (struct lwp_info): Add `dead' member.
9851 (find_lwp_pid): Declare.
9852 * linux-low.c (thread_db_active): Delete.
9853 (new_inferior): Adjust comment.
9854 (inferior_pid): Delete.
9855 (linux_add_process): New.
9856 (handle_extended_wait): Adjust.
9857 (add_lwp): Change unsigned long to ptid.
9858 (linux_create_inferior): Add process to processes table. Adjust
9859 to use ptids. Don't set new_inferior here.
9860 (linux_attach_lwp): Rename to ...
9861 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9862 it. Adjust to use ptids.
9863 (linux_attach_lwp): New.
9864 (linux_attach): Add process to processes table. Don't set
9865 new_inferior here.
9866 (struct counter): New.
9867 (second_thread_of_pid_p, last_thread_of_process_p): New.
9868 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9869 multiple processes.
9870 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9871 processes. Remove process from process table.
9872 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9873 to multiple processes.
9874 (any_thread_of): New.
9875 (linux_detach): Add `pid' argument, and handle it. Remove process
9876 from processes table.
9877 (linux_join): Add `pid' argument. Handle it.
9878 (linux_thread_alive): Change unsighed long argument to ptid_t.
9879 Consider dead lwps as not being alive.
9880 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9881 threads we're not interested in.
9882 (same_lwp, find_lwp_pid): New.
9883 (linux_wait_for_lwp): Change `pid' argument's type from int to
9884 ptid_t. Adjust.
9885 (linux_wait_for_event): Rename to ...
9886 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9887 from int to ptid_t. Adjust.
9888 (linux_wait_for_event): New.
9889 (linux_wait_1): Add `ptid' argument. Change return type to
9890 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9891 that exit from the process table.
9892 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9893 Adjust.
9894 (mark_lwp_dead): New.
9895 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9896 stopping all threads, mark its main lwp as dead.
9897 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9898 ptids.
9899 (fetch_register, usr_store_inferior_registers)
9900 (regsets_fetch_inferior_registers)
9901 (regsets_store_inferior_registers, linux_read_memory)
9902 (linux_write_memory): Inline `inferior_pid'.
9903 (linux_look_up_symbols): Adjust to use per-process
9904 `thread_db_active'.
9905 (linux_request_interrupt): Adjust to use ptids.
9906 (linux_read_auxv): Inline `inferior_pid'.
9907 (initialize_low): Don't reference thread_db_active.
9908 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9909 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9910 (ps_getpid): Return the pid of the current inferior.
9911 * thread-db.c (proc_handle, thread_agent): Delete.
9912 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9913 per-process data.
9914 (find_one_thread): Change argument type to ptid_t. Adjust to
9915 per-process data.
9916 (maybe_attach_thread): Adjust to per-process data and ptids.
9917 (thread_db_find_new_threads): Ditto.
9918 (thread_db_init): Ditto.
9919 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9920 processes table. Adjust to use ptids.
9921 (spu_kill, spu_detach): Adjust interface. Remove process from
9922 processes table.
9923 (spu_join, spu_thread_alive): Adjust interface.
9924 (spu_wait): Adjust interface. Remove process from processes
9925 table. Adjust to use ptids.
9926 * win32-low.c (current_inferior_tid): Delete.
9927 (current_inferior_ptid): New.
9928 (debug_event_ptid): New.
9929 (thread_rec): Take a ptid. Adjust.
9930 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9931 (child_delete_thread): Ditto.
9932 (do_initial_child_stuff): Add `attached' argument. Add process to
9933 processes table.
9934 (child_fetch_inferior_registers, child_store_inferior_registers):
9935 Adjust.
9936 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9937 (win32_attach): Pass 1 to do_initial_child_stuff.
9938 (win32_kill): Adjust interface. Remove process from processes
9939 table.
9940 (win32_detach): Ditto.
9941 (win32_join): Adjust interface.
9942 (win32_thread_alive): Take a ptid.
9943 (win32_resume): Adjust to use ptids.
9944 (get_child_debug_event): Ditto.
9945 (win32_wait): Adjust interface. Remove exiting process from
9946 processes table.
9947
bd99dc85
PA
99482009-04-01 Pedro Alves <pedro@codesourcery.com>
9949
9950 Non-stop mode support.
9951
9952 * server.h (non_stop): Declare.
9953 (gdb_client_data, handler_func): Declare.
9954 (delete_file_handler, add_file_handler, start_event_loop):
9955 Declare.
9956 (handle_serial_event, handle_target_event, push_event)
9957 (putpkt_notif): Declare.
9958 * target.h (enum resume_kind): New.
9959 (struct thread_resume): Replace `step' field by `kind' field.
9960 (TARGET_WNOHANG): Define.
9961 (struct target_ops) <wait>: Add `options' argument.
9962 <supports_non_stop, async, start_non_stop>: New fields.
9963 (target_supports_non_stop, target_async): New.
9964 (start_non_stop): Declare.
9965 (mywait): Add `options' argument.
9966 * target.c (mywait): Add `options' argument. Print child exit
9967 notifications here.
9968 (start_non_stop): New.
9969 * server.c (non_stop, own_buf, mem_buf): New globals.
9970 (struct vstop_notif): New.
9971 (notif_queue): New global.
9972 (queue_stop_reply, push_event, discard_queued_stop_replies)
9973 (send_next_stop_reply): New.
9974 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9975 interface changes.
9976 (attach_inferior): In non-stop mode, don't wait for the target
9977 here.
9978 (handle_general_set): Handle QNonStop.
9979 (handle_query): When handling qC, return the current general
9980 thread, instead of the first thread of the list.
9981 (handle_query): If the backend supports non-stop mode, include
9982 QNonStop+ in the qSupported query response.
9983 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9984 and non-stop mode.
9985 (handle_v_attach, handle_v_run): Handle non-stop mode.
9986 (handle_v_stopped): New.
9987 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9988 (myresume): Adjust to use resume_kind. Handle non-stop.
9989 (queue_stop_reply_callback): New.
9990 (handle_status): Handle non-stop mode.
9991 (main): Clear non_stop flag on reconnection. Use the event-loop.
9992 Refactor serial protocol handling from here ...
9993 (process_serial_event): ... to this new function. When GDB
9994 selects any thread, select one here. In non-stop mode, wait until
9995 GDB acks all pending events before exiting.
9996 (handle_serial_event, handle_target_event): New.
9997 * remote-utils.c (remote_open): Install remote_desc in the event
9998 loop.
9999 (remote_close): Remove remote_desc from the event loop.
10000 (putpkt_binary): Rename to...
10001 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10002 (putpkt_binary): New as wrapper around putpkt_binary_1.
10003 (putpkt_notif): New.
10004 (prepare_resume_reply): In non-stop mode, don't change the
10005 general_thread.
10006 * event-loop.c: New.
10007 * Makefile.in (OBJ): Add event-loop.o.
10008 (event-loop.o): New rule.
10009
10010 * linux-low.h (pid_of): Moved here.
10011 (lwpid_of): New.
10012 (get_lwp_thread): Use lwpid_of.
10013 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10014 * linux-low.c (pid_of): Delete.
10015 (inferior_pid): Use lwpid_of.
10016 (linux_event_pipe): New.
10017 (target_is_async_p): New.
10018 (delete_lwp): New.
10019 (handle_extended_wait): Use lwpid_of.
10020 (add_lwp): Don't set lwpid field.
10021 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10022 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10023 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10024 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10025 first. Adjust to linux_wait_for_event interface changes. Use
10026 lwpid_of.
10027 (linux_detach): Don't delete the main lwp here.
10028 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10029 (status_pending_p): Don't consider explicitly suspended lwps.
10030 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10031 pointer. Add OPTIONS argument. Change return type to int. Use
10032 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10033 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10034 pointer. Add status pointer argument. Return a pid instead of a
10035 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10036 changes. In non-stop mode, don't switch to a random thread.
10037 (linux_wait): Rename to...
10038 (linux_wait_1): ... this. Add target_options argument, and handle
10039 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10040 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10041 clean exit and signal exit code. Don't stop all threads in
10042 non-stop mode. In all-stop mode, only stop all threads when
10043 reporting a stop to GDB. Handle explicit thread stop requests.
10044 (async_file_flush, async_file_mark): New.
10045 (linux_wait): New.
10046 (send_sigstop): Use lwpid_of.
10047 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10048 interface changes. In non-stop mode, don't switch to a random
10049 thread.
10050 (linux_resume_one_lwp): Use lwpid_of.
10051 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10052 (linux_resume_one_thread): ... this. Handle resume_stop. In
10053 non-stop mode, don't look for pending flag in all threads.
10054 (resume_status_pending_p): Don't consider explicitly suspended
10055 threads.
10056 (my_waitpid): Reimplement. Emulate __WALL.
10057 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10058 Use lwpid_of.
10059 (sigchld_handler, linux_supports_non_stop, linux_async)
10060 (linux_start_non_stop): New.
10061 (linux_target_ops): Register linux_supports_non_stop, linux_async
10062 and linux_start_non_stop.
10063 (initialize_low): Install SIGCHLD handler.
10064 * thread-db.c (thread_db_create_event, find_one_thread)
10065 (thread_db_get_tls_address): Use lwpid_of.
10066 * win32-low.c (win32_detach): Adjust to use resume_kind.
10067 (win32_wait): Add `options' argument.
10068 * spu-low.c (spu_resume): Adjust to use resume_kind.
10069 (spu_wait): Add `options' argument.
10070
5b1c542e
PA
100712009-04-01 Pedro Alves <pedro@codesourcery.com>
10072
10073 Decouple target code from remote protocol.
10074
10075 * target.h (enum target_waitkind): New.
10076 (struct target_waitstatus): New.
10077 (struct target_ops) <wait>: Return an unsigned long. Take a
10078 target_waitstatus pointer instead of a char pointer.
10079 (mywait): Likewise.
10080 * target.c (mywait): Change prototype to return an unsigned long.
10081 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10082 * server.h (thread_from_wait, old_thread_from_wait): Delete
10083 declarations.
10084 (prepare_resume_reply): Change prototype to take a
10085 target_waitstatus.
10086 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10087 (last_status, last_ptid): New.
10088 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10089 pid instead of a signal.
10090 (attach_inferior): Remove "status" and "signal" parameters.
10091 Adjust.
10092 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10093 not as an address.
10094 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10095 (handle_v_requests, myresume): Remove "status" and "signal"
10096 parameters. Adjust.
10097 (handle_status): New.
10098 (main): Delete local `status'. Adjust.
10099 * remote-utils.c: Include target.h.
10100 (prepare_resume_reply): Change prototype to take a
10101 target_waitstatus. Adjust.
10102
10103 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10104 interface.
10105 * spu-low.c (spu_wait): Adjust.
10106 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10107 Delete.
10108 (win32_wait): Adjust.
10109
2bd7c093
PA
101102009-04-01 Pedro Alves <pedro@codesourcery.com>
10111
10112 * target.h (struct thread_resume): Delete leave_stopped member.
10113 (struct target_ops): Add a `n' argument to the `resume' callback.
10114 * server.c (start_inferior): Adjust.
10115 (handle_v_cont, myresume): Adjust.
10116 * linux-low.c (check_removed_breakpoint): Adjust to resume
10117 interface change, and to removed leave_stopped field.
10118 (resume_ptr): Delete.
10119 (struct thread_resume_array): New.
10120 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10121 resume interface change.
10122 (linux_continue_one_thread, linux_queue_one_thread)
10123 (resume_status_pending_p): Check if the resume field is NULL
10124 instead of checking the leave_stopped member.
10125 (linux_resume): Adjust to the target resume interface change.
10126 * spu-low.c (spu_resume): Adjust to the target resume interface
10127 change.
10128 * win32-low.c (win32_detach, win32_resume): Ditto.
10129
c35fafde
PA
101302009-04-01 Pedro Alves <pedro@codesourcery.com>
10131
10132 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10133 flag.
10134 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10135 pending.
10136 (linux_continue_one_thread): Only preserve the stepping flag if
10137 there's a pending breakpoint.
10138
0a59d50b
PA
101392009-03-31 Pedro Alves <pedro@codesourcery.com>
10140
10141 * server.c (main): After the inferior having exited, call
10142 remote_close before exiting gdbserver.
10143
f04c6d38
TJB
101442009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10145
10146 Fix size of FPSCR in Power 7 processors.
10147 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10148 (PPC_FEATURE_HAS_DFP): New #define.
10149 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10150 size of the FPSCR.
10151
78e5cee6
PA
101522009-03-23 Pedro Alves <pedro@codesourcery.com>
10153
10154 * server.c (handle_query) Whitespace and formatting.
10155
1b3f6016
PA
101562009-03-22 Pedro Alves <pedro@codesourcery.com>
10157
10158 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10159 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10160 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10161 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10162 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10163 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10164 Makefile.in, configure.ac: Fix whitespace throughout.
10165 * configure: Regenerate.
10166
a07b2135
PA
101672009-03-22 Pedro Alves <pedro@codesourcery.com>
10168
10169 * inferiors.c (find_inferior): Make it safe for the callback
10170 function to delete the currently iterated inferior.
10171
67cc2626
PA
101722009-03-22 Pedro Alves <pedro@codesourcery.com>
10173
10174 * Makefile.in (linuw_low_h): Move higher.
10175 (thread-db.o): Depend on $(linux_low_h).
10176
54a0b537
PA
101772009-03-17 Pedro Alves <pedro@codesourcery.com>
10178
10179 Rename "process" to "lwp" throughout.
10180
10181 * linux-low.c (all_processes): Rename to...
10182 (all_lwps): ... this.
10183 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10184 (add_process): Rename to ...
10185 (add_lwp): ... this. Adjust.
10186 (linux_create_inferior): Adjust.
10187 (linux_attach_lwp): Adjust.
10188 (linux_attach): Adjust.
10189 (linux_kill_one_process): Rename to ...
10190 (linux_kill_one_lwp): ... this. Adjust.
10191 (linux_kill): Adjust.
10192 (linux_detach_one_process): Rename to ...
10193 (linux_detach_one_lwp): ... this. Adjust.
10194 (linux_detach): Adjust.
10195 (check_removed_breakpoint): Adjust.
10196 (status_pending_p): Adjust.
10197 (linux_wait_for_process): Rename to ...
10198 (linux_wait_for_lwp): ... this. Adjust.
10199 (linux_wait_for_event): Adjust.
10200 (send_sigstop): Adjust.
10201 (wait_for_sigstop): Adjust.
10202 (stop_all_processes): Rename to ...
10203 (stop_all_lwps): ... this.
10204 (linux_resume_one_process): Rename to ...
10205 (linux_resume_one_lwp): ... this. Adjust.
10206 (linux_set_resume_request, linux_continue_one_thread)
10207 (linux_queue_one_thread, resume_status_pending_p)
10208 (usr_store_inferior_registers, regsets_store_inferior_registers)
10209 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10210 Adjust.
10211 * linux-low.h (get_process): Rename to ...
10212 (get_lwp): ... this. Adjust.
10213 (get_thread_process): Rename to ...
10214 (get_thread_lwp): ... this. Adjust.
10215 (get_process_thread): Rename to ...
10216 (get_lwp_thread): ... this. Adjust.
10217 (struct process_info): Rename to ...
10218 (struct lwp_info): ... this.
10219 (all_processes): Rename to ...
10220 (all_lwps): ... this.
10221 * proc-service.c (ps_lgetregs): Adjust.
10222 * thread-db.c (thread_db_create_event, find_one_thread)
10223 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10224
0b16c5cf
PA
102252009-03-14 Pedro Alves <pedro@codesourcery.com>
10226
10227 * server.c (handle_query): Handle "qAttached".
10228
32de4b9d
NS
102292009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10230
10231 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10232 GPLv3, update license URL.
10233
2aecd87f
DE
102342009-03-01 Doug Evans <dje@google.com>
10235
93efd302 10236 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
10237 (server_h): Add gdb_signals.h.
10238 (signals.o): Update.
10239 * server.h (target_signal_from_host,target_signal_to_host_p)
10240 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10241
86b1f9c5
PM
102422009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10243
10244 * remote-utils.c (getpkt): Also generate remote-debug
10245 information if noack_mode is set.
10246
4aa995e1
PA
102472009-02-06 Pedro Alves <pedro@codesourcery.com>
10248
10249 * server.c (handle_query): Report qXfer:siginfo:read and
10250 qXfer:siginfo:write as supported and handle them.
10251 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10252 * linux-low.c (linux_xfer_siginfo): New.
10253 (linux_target_ops): Set it.
10254
62709adf
PA
102552009-01-26 Pedro Alves <pedro@codesourcery.com>
10256
10257 * server.c (gdbserver_usage): Mention --remote-debug.
10258 (main): Accept '--remote-debug' switch.
10259
aef93bd7
DE
102602009-01-18 Doug Evans <dje@google.com>
10261
10262 * regcache.c (new_register_cache): No need to check result of xcalloc.
10263 * server.c (handle_search_memory): Back out calls to xmalloc,
10264 result is checked and error is returned to user upon failure.
10265 (handle_query): Ditto. Add more checks for result of malloc.
10266 (handle_v_cont): Check result of malloc, report error back to
10267 user upon failure.
10268 (handle_v_run): Ditto. Call freeargv.
10269 * server.h (freeargv): Declare.
10270 * utils.c (freeargv): New fn.
10271
54363045
DE
102722009-01-15 Doug Evans <dje@google.com>
10273
f626972c
DE
10274 * gdbreplay.c (perror_with_name): Make arg const char *.
10275 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10276 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10277 * utils.c (perror_with_name): Make arg const char *.
54363045 10278
18aae699
PA
102792009-01-14 Pedro Alves <pedro@codesourcery.com>
10280
10281 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10282 when handling a EXIT_PROCESS_DEBUG_EVENT.
10283
ff703abe
JB
102842009-01-06 Joel Brobecker <brobecker@adacore.com>
10285
10286 * gdbreplay.c (gdbreplay_version): Update copyright year.
10287 * server.c (gdbserver_version): Likewise.
10288
f21cc1a2 102892009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10290
10291 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10292 (handle_extended_wait): Improve comment.
0e21c1ec 10293
bca929d3
DE
102942008-12-13 Doug Evans <dje@google.com>
10295
10296 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10297 * server.h (ATTR_MALLOC): New macro.
10298 (xmalloc,xcalloc,xstrdup): Declare.
10299 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10300 * inferiors.c: Ditto.
10301 * linux-low.c: Ditto.
10302 * mem-break.c: Ditto.
10303 * regcache.c: Ditto.
10304 * remote-utils.c: Ditto.
10305 * server.c: Ditto.
10306 * target.c: Ditto.
10307 * win32-low.c: Ditto.
10308
97438e3f
DE
103092008-12-12 Doug Evans <dje@google.com>
10310
896c7fbb
DE
10311 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10312 in debugging printf.
10313
97438e3f
DE
10314 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10315
e3b886f8
DE
103162008-12-09 Doug Evans <dje@google.com>
10317
10318 * linux-low.h (struct process_info): Delete member tid, unused.
10319 * thread-db.c (find_one_thread): Update.
10320 (maybe_attach_thread): Update.
10321
07e059b5
VP
103222008-12-02 Pedro Alves <pedro@codesourcery.com>
10323
889bf7c5
PA
10324 * target.h (struct target_ops): Add qxfer_osdata member.
10325 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10326 and dirent.h.
10327 (linux_qxfer_osdata): New functions.
10328 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10329 callback.
10330 * server.c (handle_query): Handle "qXfer:osdata:read:".
10331 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10332 (buffer_xml_printf): New functions.
10333 * server.h (struct buffer): New.
10334 (buffer_grow_str, buffer_grow_str0): New macros.
10335 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10336 (buffer_xml_printf): Declare.
07e059b5 10337
4cab47ab
DE
103382008-11-24 Doug Evans <dje@google.com>
10339
10340 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10341
f142445f
DJ
103422008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10343
10344 * server.c (handle_v_run): Always use the supplied argument list.
10345
d0107bb6 103462008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 10347
d0107bb6
BW
10348 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10349 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 10350
2c4ad781
TJB
103512008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10352
10353 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10354 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10355 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10356 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10357 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10358 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10359 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10360 XML target descriptions.
10361 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10362 when inferior is running on an ISA 2.05 or later processor. Add
10363 special case to return offset for full 64-bit slot of FPSCR when
10364 in 32-bits.
10365
dfb64f85
DJ
103662008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10367
10368 * Makefile.in (SFILES, clean): Added sparc64 files.
10369 (reg-sparc64.o, reg-sparc64.c): New.
10370 * configure.srv (sparc*-*-linux*): New configuration.
10371 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10372 syscall arguments for SPARC.
10373 (regsets_store_inferior_registers): Likewise.
10374 * linux-sparc-low.c: New file.
10375
66b6e1dd
DE
103762008-10-21 Doug Evans <dje@google.com>
10377
10378 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10379 (READLINE_DIR,READLINE_DEP): Delete.
10380 (INTERNAL_CFLAGS): Update.
10381 (LINTFLAGS): Update.
10382
9b710a42
PA
103832008-10-10 Pedro Alves <pedro@codesourcery.com>
10384
10385 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10386 whole argv from the last run, not just argv[0].
10387
5822d809
PA
103882008-09-08 Pedro Alves <pedro@codesourcery.com>
10389
10390 * regcache.c (new_register_cache): Return NULL if the register
10391 cache size isn't known yet.
10392 (free_register_cache): Avoid dereferencing a NULL regcache.
10393
74aac56f
DJ
103942008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10395
10396 * configure.srv: Merge MIPS and MIPS64.
10397
400b20f5
MR
103982008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10399
10400 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10401
677c5bb1
LM
104022008-08-18 Luis Machado <luisgpm@br.ibm.com>
10403
10404 * Makefile.in: Add required vsx dependencies.
10405
10406 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10407 Declare init_registers_powerpc_vsx32l.
10408 Declare init_registers_powerpc_vsx64l.
10409 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10410 (ppc_arch_setup): Check for VSX in hwcap.
10411 (ppc_fill_vsxregset): New function.
10412 (ppc_store_vsxregset): New function.
10413 Add new VSX entry in regset_info target_regsets.
10414
10415 * configure.srv: Add new VSX dependencies.
10416
a6f3e723
SL
104172008-08-12 Pedro Alves <pedro@codesourcery.com>
10418
10419 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10420 (remote_open): Set or clear transport_is_reliable.
10421 (putpkt_binary): Don't expect acks in noack mode.
10422 (getpkt): Don't send ack/nac in noack mode.
10423 * server.c (handle_general_set): Handle QStartNoAckMode.
10424 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10425 qSupported.
10426 (main): Reset noack_mode on every connection.
10427 * server.h (noack_mode): Declare.
10428
a417dc56
RW
104292008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10430
10431 * Makefile.in (GDBREPLAY_OBS): New variable.
10432 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10433
3221518c
UW
104342008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10435 Daniel Jacobowitz <dan@codesourcery.com>
10436
10437 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10438 (usr_store_inferior_registers): Likewise.
10439 (regsets_store_inferior_registers): Likewise.
10440
ec56be1b
PA
104412008-07-31 Rolf Jansen <rj@surtec.com>
10442 Pedro Alves <pedro@codesourcery.com>
10443
10444 * configure.ac: Check for memmem declaration.
10445 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10446 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10447 (disable_packet_qfThreadInfo): Unconditionally compile.
10448 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10449 * configure, config.in: Regenerate.
10450
2fe5e3ff
DE
104512008-07-28 Doug Kwan <dougkwan@google.com>
10452
10453 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10454 (linux_write_memory): Remove declaration of errno.
10455
836acd6d
UW
104562008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10457
10458 * linux-low.c (handle_extended_wait): Do not use "status"
10459 variable uninitialized.
10460
aeba519e
PA
104612008-07-07 Pedro Alves <pedro@codesourcery.com>
10462
10463 * server.c (handle_v_attach): Inhibit reporting dll changes.
10464
db42f210
PA
104652008-06-27 Pedro Alves <pedro@codesourcery.com>
10466
10467 * remote-utils.c (prepare_resume_reply): If requested, don't
10468 output "thread:TID" in the T stop reply.
10469
10470 * server.c (disable_packet_vCont, disable_packet_Tthread)
10471 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10472 (handle_query): If requested, disable support for qC, qfThreadInfo
10473 and qsThreadInfo.
10474 (handle_v_requests): If requested, disable support for vCont.
10475 (gdbserver_show_disableable): New.
10476 (main): Handle --disable-packet and --disable-packet=LIST.
10477
10478 * server.h (disable_packet_vCont, disable_packet_Tthread)
10479 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10480
8e4c5421
CD
104812008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10482
10483 * server.c (gdbserver_usage): Mention --version.
10484
6e23a804
DJ
104852008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10486
10487 * Makefile.in (gdbreplay.o): New rule.
10488
90aa6a40
JM
104892008-06-06 Joseph Myers <joseph@codesourcery.com>
10490
10491 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10492 message, not gdbserver.
10493
c16158bc 104942008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
10495 Nathan Sidwell <nathan@codesourcery.com>
10496 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
10497
10498 * acinclude.m4: Include ../../config/acx.m4.
10499 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10500 * configure, config.in: Regenerate.
10501 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10502 * server.c (gdbserver_version): Print PKGVERSION.
10503 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10504 (main): Adjust gdbserver_usage calls.
10505 * gdbreplay.c (version, host_name): Add declarations.
10506 (gdbreplay_version, gdbreplay_usage): New.
10507 (main): Accept --version and --help options.
10508
aeb75bf5
DJ
105092008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10510
10511 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10512 (arm_breakpoint_at): Handle Thumb.
10513 (the_low_target): Add comment.
10514
76b233dd
UW
105152008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10516
10517 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10518
08388c79
DE
105192008-05-09 Doug Evans <dje@google.com>
10520
a3c83fae
DE
10521 * server.h (decode_search_memory_packet): Declare.
10522 * remote-utils.c (decode_search_memory_packet): New fn.
10523 * server.c (handle_search_memory_1): New fn.
08388c79
DE
10524 (handle_search_memory): New fn.
10525 (handle_query): Process qSearch:memory packets.
10526
bb9c3d36
UW
105272008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10528
10529 * regcache.c (registers_length): Remove.
10530 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10531 full register packet.
10532 * regcache.h (registers_length): Remove prototype.
10533 * server.h (PBUFSIZ): Define to 16384.
10534
7284e1be
UW
105352008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10536
10537 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10538 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10539 powerpc-64l.o, and powerpc-altivec64l.o.
10540 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10541 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10542 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10543 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10544 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10545 to srv_xmlfiles.
10546
10547 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10548 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10549 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10550 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10551 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10552 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10553 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10554 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10555 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10556 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10557 (clean): Update.
10558
10559 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10560 (init_registers_powerpc_32l): ... this new prototype.
10561 (init_registers_powerpc_32): Remove, replace by ...
10562 (init_registers_powerpc_altivec32l): ... this new prototype.
10563 (init_registers_powerpc_e500): Remove, replace by ...
10564 (init_registers_powerpc_e500l): ... this new prototype.
10565 (init_registers_ppc64): Remove, replace by ...
10566 (init_registers_powerpc_64l): ... this new prototype.
10567 (init_registers_powerpc_64): Remove, replace by ...
10568 (init_registers_powerpc_altivec64l): ... this new prototype.
10569 (ppc_num_regs): Set to 73.
10570 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10571 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10572 (ppc_cannot_store_register): Handle orig_r3 and trap.
10573 (ppc_arch_setup): Update init_registers_... calls.
10574 (ppc_fill_gregset): Handle orig_r3 and trap.
10575
10576 * inferiors.c (clear_inferiors): Reset current_inferior.
10577
fdc59709
PB
105782008-04-23 Paolo Bonzini <bonzini@gnu.org>
10579
889bf7c5
PA
10580 * acinclude.m4: Add override.m4.
10581 * configure: Regenerate.
fdc59709 10582
c9b2f845
UW
105832008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10584
10585 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10586 initial call to init_register_ppc64.
10587
550512b8
UW
105882008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10589
43aaf8b6
PA
10590 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10591 single powerpc*-*-linux* case.
550512b8
UW
10592 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10593
b6430ec3
UW
105942008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10595
10596 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 10597 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
10598 from reg_xmlfiles.
10599 * linux-ppc-low.c: Include <elf.h>.
10600 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10601 (ppc_hwcap): New global variable.
10602 (ppc_regmap): Remove __SPE__ #ifdef sections.
10603 (ppc_regmap_e500): New global variable.
10604 (ppc_cannot_store_register): Update __SPE__ special case.
10605 (ppc_get_hwcap): New function.
10606 (ppc_arch_setup): Use it to determine whether inferior supports
10607 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10608 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10609 Do not access registers if target does not support AltiVec.
10610 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10611 Do not access registers if target does not support SPE.
10612 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10613
52fa2412
UW
106142008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10615
10616 * linux-low.c (disabled_regsets, num_regsets): New.
10617 (use_regsets_p): Delete.
10618 (linux_wait_for_process): Clear disabled_regsets.
10619 (regsets_fetch_inferior_registers): Check and set it.
10620 (regsets_store_inferior_registers): Likewise.
10621 (linux_fetch_registers, linux_store_registers): Do not use
10622 use_regsets_p.
10623 (initialize_low): Allocate disabled_regsets.
10624
e28b3332
DJ
106252008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10626
10627 * Makefile.in (LIBOBJS): New.
10628 (OBS): Use LIBOBJS.
10629 (memmem.o): New rule.
10630 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10631 * configure: Regenerated.
10632
4536995d
UW
106332008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10634
10635 * server.c (handle_query): Never return "unsupported" for
10636 qXfer:features:read queries.
10637
221c031f
UW
106382008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10639
10640 * server.c (get_features_xml): Fix inverted condition.
10641 (handle_query): Always support qXfer:feature:read.
10642
ccd213ac
DJ
106432008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10644
10645 * server.c (wrapper_argv): New.
10646 (start_inferior): Handle wrapper_argv. If set, expect an extra
10647 trap.
10648 (gdbserver_usage): Document --wrapper.
10649 (main): Parse --wrapper.
10650
6fe305f7
UW
106512008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10652
10653 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10654 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10655 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10656 (ppc_set_pc): Likewise.
10657 (ppc_arch_setup): New function.
10658 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10659 of collect_register.
889bf7c5 10660 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 10661
5b0a002e
UW
106622008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10663
10664 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10665 instead of linux-ppc64-low.o.
10666 * linux-ppc64-low.c: Remove file.
10667 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10668 (linux-ppc64-low.o): Remove rule.
10669
10670 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10671 (init_registers_powerpc_64): Likewise.
10672 (ppc_regmap): Conditionally define depending on __powerpc64__.
10673 (ppc_cannot_store_register): Do not special-case "fpscr" when
10674 compiled on __powerpc64__.
10675 (ppc_collect_ptrace_register): New function.
10676 (ppc_supply_ptrace_register): New function.
10677 (ppc_breakpoint): Change type to "unsigned int".
10678 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10679 (the_low_target): Conditionally provide initializers for the
889bf7c5 10680 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
10681 collect_ptrace_register and supply_ptrace_register members.
10682
9b4b61c8
UW
106832008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10684
10685 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10686 * server.c (gdbserver_xmltarget): Define.
10687 (get_features_xml): Use it to replace "target.xml" and arch_string.
10688
10689 * configure.srv: Remove srv_xmltarget. Add XML files that were
10690 mentioned there to srv_xmlfiles instead. Remove conditional tests
10691 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10692 srv_xmlfiles and srv_regobj to include all possible choices.
10693 * configure.ac (srv_xmltarget): Remove.
10694 (srv_xmlfiles): Do not add "target.xml".
10695 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10696 checks for supplementary target information.
10697 * configure: Regenerate.
10698 * Makefile.in (XML_TARGET): Remove.
10699 (target.xml): Remove rule.
10700 (clean): Do not clean up target.xml.
10701 (.PRECIOUS): Do not mention target.xml.
10702
10703 * target.h (struct target_ops): Remove arch_string member.
10704 * linux-low.c (linux_arch_string): Remove.
10705 (linux_target_ops): Remove arch_string initializer.
10706 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10707 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10708 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10709 * spu-low.c (spu_arch_string): Remove.
10710 (spu_target_ops): Remove arch_string initializer.
10711 * win32-low.c (win32_arch_string): Remove.
10712 (win32_target_ops): Remove arch_string initializer.
10713 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10714 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10715 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10716
ee1a7ae4
UW
107172008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10718
10719 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10720 by collect_ptrace_register and supply_ptrace_register hooks.
10721 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10722 instead of checking for the_low_target.left_pad_xfer.
10723 (usr_store_inferior_registers): Use collect_ptrace_register callback
10724 instead of checking for the_low_target.left_pad_xfer.
10725
10726 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10727 (s390_supply_ptrace_register): Likewise.
10728 (s390_fill_gregset): Call s390_collect_ptrace_register.
10729 (the_low_target): Update.
10730
10731 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10732 (ppc_supply_ptrace_register): Likewise.
10733 (the_low_target): Update.
10734
10735 * linux-i386-low.c (the_low_target): Update.
10736 * linux-x86-64-low.c (the_low_target): Update.
10737
d61ddec4
UW
107382008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10739
10740 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10741 reg-s390.o and reg-s390x.o.
10742
10743 * linux-low.c (new_inferior): New global variable.
10744 (linux_create_inferior, linux_attach): Set it.
10745 (linux_wait_for_process): Call the_low_target.arch_setup after the
10746 target has stopped for the first time.
10747 (initialize_low): Do not call the_low_target.arch_setup.
10748
10749 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10750 (s390_set_pc): Likewise.
10751 (s390_arch_setup): New function.
10752 (the_low_target): Use s390_arch_setup as arch_setup routine.
10753
10754 * regcache.c (realloc_register_cache): New function.
10755 (set_register_cache): Call it for each existing regcache.
10756
d05b4ac3
UW
107572008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10758
10759 * server.h (init_registers): Remove prototype.
10760
10761 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10762 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10763 instead of init_registers ().
10764 * linux-arm-low.c (init_registers_arm): Add prototype.
10765 (init_registers_arm_with_iwmmxt): Likewise.
10766 (the_low_target): Add initializer for arch_setup field.
10767 * linux-cris-low.c (init_registers_cris): Add prototype.
10768 (the_low_target): Add initializer for arch_setup field.
10769 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10770 (the_low_target): Add initializer for arch_setup field.
10771 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10772 (the_low_target): Add initializer for arch_setup field.
10773 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10774 (the_low_target): Add initializer for arch_setup field.
10775 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10776 (the_low_target): Add initializer for arch_setup field.
10777 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10778 (the_low_target): Add initializer for arch_setup field.
10779 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10780 (init_registers_mips64_linux): Likewise.
10781 (the_low_target): Add initializer for arch_setup field.
10782 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10783 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10784 (the_low_target): Add initializer for arch_setup field.
10785 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10786 (init_registers_powerpc_64): Likewise.
10787 (the_low_target): Add initializer for arch_setup field.
10788 * linux-s390-low.c (init_registers_s390): Add prototype.
10789 (init_registers_s390x): Likewise.
10790 (the_low_target): Add initializer for arch_setup field.
10791 * linux-sh-low.c (init_registers_sh): Add prototype.
10792 (the_low_target): Add initializer for arch_setup field.
10793 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10794 (the_low_target): Add initializer for arch_setup field.
10795 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10796 (the_low_target): Add initializer for arch_setup field.
10797
10798 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10799 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10800 instead of init_registers ().
10801 * win32-arm-low.c (init_registers_arm): Add prototype.
10802 (the_low_target): Add initializer for arch_setup field.
10803 * win32-i386-low.c (init_registers_i386): Add prototype.
10804 (the_low_target): Add initializer for arch_setup field.
10805
10806 * spu-low.c (init_registers_spu): Add prototype.
10807 (initialize_low): Call initialie_registers_spu () instead of
10808 initialize_registers ().
10809
fd96d250
PA
108102008-02-19 Pedro Alves <pedro@codesourcery.com>
10811
10812 * server.c (handle_v_requests): When handling the vRun and vAttach
10813 packets, if already debugging a process, don't kill it. Return an
10814 error instead.
10815
d41b6bb4
DJ
108162008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10817
10818 * server.c (handle_query): Correct length check.
10819
5ac588cf
PA
108202008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10821
10822 * win32-low.c (do_initial_child_stuff): Add process handle
10823 parameter. Set current_process_handle and current_process_id from the
10824 parameters. Clear globals.
10825 (win32_create_inferior): Don't set current_process_handle and
10826 current_process_id here. Instead pass them on the call to
10827 do_initial_child_stuff.
10828 (win32_attach): Likewise.
10829 (win32_clear_inferiors): New.
10830 (win32_kill): Don't close the current process handle or the
10831 current thread handle here. Instead call win32_clear_inferiors.
10832 (win32_detach): Don't open a new handle to the process. Call
10833 win32_clear_inferiors.
10834 (win32_join): Don't rely on current_process_handle; open a new
10835 handle using the process id.
10836 (win32_wait): Call win32_clear_inferiors when the inferior process
10837 has exited.
10838
ecd7ecbc
DJ
108392008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10840
10841 * server.c (monitor_show_help): Add "exit".
10842
1525d545
MG
108432008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10844
ecd7ecbc 10845 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
10846 (clean): Add reg-xtensa.c.
10847 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
10848 * configure.srv (xtensa*-*-linux*) New target.
10849 * linux-xtensa-low.c: New.
10850 * xtensa-xtregs.c: New.
1525d545 10851
59a016f0
PA
108522008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10853
10854 * hostio.c: Don't include errno.h.
10855 (errno_to_fileio_errno): Move to hostio-errno.
10856 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10857 error number outputting to the target->hostio_last_error callback.
10858 (hostio_packet_error): Use FILEIO_EINVAL directly.
10859 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10860 calls to hostio_error.
10861 * hostio-errno.c: New.
10862 * server.h (hostio_last_error_from_errno): Declare.
10863 * target.h (target_ops): Add hostio_last_error member.
10864 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10865 as hostio_last_error handler.
889bf7c5 10866 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
10867 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10868 (wince_hostio_last_error): New functions.
10869 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10870 as hostio_last_error handler.
10871 (win32_target_ops) [!_WIN32_WCE]: Register
10872 hostio_last_error_from_errno as hostio_last_error handler.
10873 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10874 (hostio-errno.o): New rule.
10875 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10876 * configure.srv (srv_hostio_err_objs): New variable. Default to
10877 hostio-errno.o.
10878 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10879 * configure: Regenerate.
10880
2d717e4f
DJ
108812008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10882
10883 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10884 (linux_kill, linux_detach): Clean up the process list.
10885 * remote-utils.c (remote_open): Improve port number parsing.
10886 (putpkt_binary, input_interrupt): Only send interrupts if the target
10887 is running.
10888 * server.c (extended_protocol): Make static.
10889 (attached): Define earlier.
10890 (exit_requested, response_needed, program_argv): New variables.
10891 (target_running): New.
10892 (start_inferior): Clear attached here.
10893 (attach_inferior): Set attached here.
10894 (require_running): Define.
10895 (handle_query): Use require_running and target_running. Implement
10896 "monitor exit".
10897 (handle_v_attach, handle_v_run): New.
10898 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10899 (gdbserver_usage): Update.
10900 (main): Redo argument parsing. Handle --debug and --multi. Handle
10901 --attach along with other options or after the port. Save
10902 program_argv. Support no initial program. Resynchronize
10903 communication with GDB after an error. Handle "monitor exit".
10904 Use require_running and target_running. Always allow the extended
10905 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10906 restart in extended mode.
10907 * README: Refer to the GDB manual. Update --attach usage.
10908
7407e2de
AS
109092007-12-20 Andreas Schwab <schwab@suse.de>
10910
10911 * linux-low.c (STACK_SIZE): Define.
10912 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10913 (linux_test_for_tracefork): Likewise.
10914
b65d95c5
DJ
109152007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10916
10917 * linux-low.c (linux_wait_for_event): Update messages. Do not
10918 reinsert auto-delete breakpoints.
10919 * mem-break.c (struct breakpoint): Change return type of handler to
10920 int.
10921 (set_breakpoint_at): Update handler type.
10922 (reinsert_breakpoint_handler): Return 1 instead of calling
10923 delete_breakpoint.
10924 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10925 setting a new one.
10926 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10927 * mem-break.h (set_breakpoint_at): Update handler type.
10928 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10929 * win32-low.c (auto_delete_breakpoint): New.
10930 (get_child_debug_event): Use it.
10931
4e799345
DJ
109322007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10933
10934 * configure.ac: Check for pread and pwrite.
10935 * hostio.c (handle_pread): Fall back to lseek and read.
10936 (handle_pwrite): Fall back to lseek and write.
10937 * config.in, configure: Regenerated.
10938
27524b67
DJ
109392007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10940
10941 * server.c (myresume): Add own_buf argument.
10942 (main): Update calls.
10943
a20d5e98
DJ
109442007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10945
10946 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10947 * remote-utils.c (remote_open): Do not call disable_async_io.
10948 (block_async_io): Delete.
10949 (unblock_async_io): Make static.
10950 (initialize_async_io): New.
10951 * server.c (handle_v_cont): Handle async I/O here.
10952 (myresume): Likewise. Move other common resume tasks here...
10953 (main): ... from here. Call initialize_async_io. Disable async
10954 I/O before the main loop.
10955 * server.h (initialize_async_io): Declare.
10956 (block_async_io, unblock_async_io): Delete prototypes.
10957 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10958
b79d787e
DJ
109592007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10960
10961 * remote-utils.c (readchar): Allow binary data in received messages.
10962
d97903b2
PA
109632007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10964
10965 * win32-low.c (attaching): New global.
10966 (win32_create_inferior): Clear the `attaching' global.
10967 (win32_attach): Set the `attaching' global.
10968 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10969 attaching. Only set a breakpoint at the entry point if not
10970 attaching.
10971
311de423
PA
109722007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10973
10974 * server.c (main): Don't report dll events on the initial
10975 connection on attaches.
10976
6c2d16d2
PA
109772007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10978
10979 * server.c (main): Relax numerical bases supported for the pid of
10980 the --attach command line argument.
10981
5ca906e6
PA
109822007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10983
10984 * win32-low.c (win32_attach): Call OpenProcess before
10985 DebugActiveProcess, not after. Add last error output to error
10986 call.
10987
9c6c8194
PA
109882007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10989
10990 * win32-low.c (win32_get_thread_context)
10991 (win32_set_thread_context): New functions.
10992 (thread_rec): Use win32_get_thread_context.
10993 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10994 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10995 field.
10996
4d5d1aaa
PA
109972007-12-03 Leo Zayas
10998 Pedro Alves <pedro_alves@portugalmail.pt>
10999
11000 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11001 global variables.
11002 (child_add_thread): Minor cleanup.
11003 (child_continue): Resume artificially suspended threads before
11004 calling ContinueDebugEvent.
11005 (suspend_one_thread): New.
11006 (fake_breakpoint_event): New.
11007 (get_child_debug_event): Change return type to int. Check here if
11008 gdb sent an interrupt request. If a soft interrupt was requested,
11009 fake a breakpoint event. Return 0 if there is no event to handle,
11010 and 1 otherwise.
11011 (win32_wait): Don't check here if gdb sent an interrupt request.
11012 Ensure there is a valid event to handle.
11013 (win32_request_interrupt): Add soft interruption method as last
11014 resort.
11015
c436e841
PA
110162007-12-03 Leo Zayas
11017 Pedro Alves <pedro_alves@portugalmail.pt>
11018
11019 * win32-low.h (win32_thread_info): Add descriptions to the
11020 structure members. Replace `suspend_count' counter by a
11021 `suspended' flag.
11022 * win32-low.c (thread_rec): Update condition of when to get the
11023 context from the inferior. Rely on ContextFlags being set if it
11024 has already been retrieved. Only suspend the inferior thread if
11025 we haven't already. Warn if that fails.
11026 (continue_one_thread): s/suspend_count/suspended/. Only call
11027 ResumeThread once. Warn if that fails.
11028
e7b5fa67
PA
110292007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11030
11031 * win32-low.c (win32_wait): Don't read from the inferior when it
11032 has already exited.
11033
a385171d
PA
110342007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11035
11036 * Makefile.in (win32_low_h): New variable.
11037 (win32-low.o): Add dependency on $(win32_low_h).
11038 (win32-arm-low.o, win32-i386-low.o): New rules.
11039
f80c84b3
DJ
110402007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11041
11042 * hostio.c: Correct copyright year.
11043
a6b151f1
DJ
110442007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11045
11046 * Makefile.in (OBS): Add hostio.o.
11047 (hostio.o): New rule.
11048 * server.h (handle_vFile): Declare.
11049 * hostio.c: New file.
11050 * server.c (handle_v_requests): Take packet_len and new_packet_len
11051 for binary packets. Call handle_vFile.
11052 (main): Update call to handle_v_requests.
11053
f9387fc3
DJ
110542007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11055
11056 * linux-low.c: Include <sched.h>.
11057
51c2684e
DJ
110582007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11059
11060 * linux-low.c (linux_tracefork_grandchild): New.
11061 (linux_tracefork_child): Use clone.
11062 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11063
75f83163
JB
110642007-10-31 Joel Brobecker <brobecker@adacore.com>
11065
11066 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11067
da5898ce
DJ
110682007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11069
11070 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11071
24a09b5f
DJ
110722007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11073
11074 * inferiors.c (change_inferior_id): Delete.
11075 (add_pid_to_list, pull_pid_from_list): New.
11076 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11077 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11078 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11079 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11080 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11081 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11082 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11083 (using_threads): Always set to 1.
11084 (handle_extended_wait): New.
11085 (add_process): Do not set TID.
11086 (linux_create_inferior): Set must_set_ptrace_flags.
11087 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11088 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11089 (linux_thread_alive): Rename TID argument to LWPID.
11090 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11091 (linux_wait_for_event): Do not use TID or check using_threads. Update
11092 call to dead_thread_notify. Call handle_extended_wait.
11093 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11094 (send_sigstop): Delete sigstop_sent.
11095 (wait_for_sigstop): Avoid TID.
11096 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11097 (linux_test_for_tracefork): New.
11098 (linux_lookup_signals): Use thread_db_active and
11099 linux_supports_tracefork_flag.
11100 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11101 * linux-low.h (get_process_thread): Avoid TID.
11102 (struct process_ifo): Move thread_known and tid to the end. Remove
11103 sigstop_sent.
11104 (linux_attach_lwp, thread_db_init): Update prototypes.
11105 * server.h (change_inferior_id): Delete prototype.
11106 (add_pid_to_list, pull_pid_from_list): New prototypes.
11107 * thread-db.c (thread_db_use_events): New.
11108 (find_first_thread): Rename to...
11109 (find_one_thread): ...this. Update callers and messages. Do not
11110 call fatal. Check thread_db_use_events. Do not call
11111 change_inferior_id or new_thread_notify.
11112 (maybe_attach_thread): Update. Do not call new_thread_notify.
11113 (thread_db_init): Set thread_db_use_events. Check use_events.
11114 * utils.c (fatal, warning): Correct message prefix.
11115
30ed0a8f
DJ
111162007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11117
11118 * Makefile.in (clean): Remove new files.
11119 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11120 (powerpc-64.o, powerpc-64.c): New rules.
11121 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11122 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11123 with SPE.
11124 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11125 SPE targets.
11126 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11127 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11128 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11129 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11130 (target_regsets): Add AltiVec and SPE register sets.
11131 * configure.ac: Check for AltiVec and SPE.
11132 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11133 (ppc_fill_vrregset, ppc_store_vrregset): New.
11134 (target_regsets): Add AltiVec register set.
11135 * configure: Regenerated.
11136
fd462a61
DJ
111372007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11138
11139 * linux-low.c (O_LARGEFILE): Define.
11140 (linux_read_memory): Use /proc/PID/mem.
11141 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11142 * configure, config.in: Regenerated.
11143
69f223ed
DJ
111442007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11145
11146 * linux-low.c (linux_wait_for_event): Do not pass signals while
11147 single-stepping.
11148
aec18585
PA
111492007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11150
11151 * win32-low.c (create_process): New.
11152 (win32_create_inferior): Use create_process instead of
11153 CreateProcess. If create_process failed retry appending an ".exe"
11154 suffix. Store the GetLastError result immediatelly after
11155 create_process calls and use it on the call to error.
11156
34d86ddd
PA
111572007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11158
11159 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11160
5a0e3bd0
JB
111612007-08-23 Joel Brobecker <brobecker@adacore.com>
11162
11163 * configure.ac: Switch license to GPLv3.
11164
f88c79e6
MS
111652007-08-01 Michael Snyder <msnyder@access-company.com>
11166
11167 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11168
6b3d9b83
PA
111692007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11170
11171 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11172 typedef.
11173 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11174 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11175 CloseToolhelp32Snapshot.
11176 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11177 CloseToolhelp32Snapshot.
11178
c588c53c
MS
111792007-07-27 Michael Snyder <michael.snyder@access-company.com>
11180
11181 * server.c (main): Check for inferior exit before main loop.
11182
aa0403d9
PA
111832007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11184
11185 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11186 instead of on tmp_desc.
11187
255e7678
DJ
111882007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11189 Daniel Jacobowitz <dan@codesourcery.com>
11190
11191 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11192 (add_thread): Minor cleanups.
11193 (clear_inferiors): Move lower in the file. Clear the DLL
11194 list.
11195 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11196 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11197 (xml_escape_text): New.
11198 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11199 for qSupported.
11200 (handle_v_cont): Report errors.
11201 (gdbserver_version): Update.
11202 (main): Correct size of own_buf. Do not report initial DLL events.
11203 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11204 (unloaded_dll, xml_escape_text): New.
11205 * win32-low.c (enum target_waitkind): Update comments.
11206 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11207 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11208 (win32_EnumProcessModules, win32_GetModuleInformation)
11209 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11210 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11211 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11212 (win32_Module32First, win32_Module32Next, load_toolhelp)
11213 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11214 (get_child_debug_event): Handle DLL events.
11215 (win32_wait): Likewise.
11216
0d37add9
DJ
112172007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11218
11219 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11220 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11221
45e2715e
PA
112222007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11223
11224 * win32-low.c (handle_output_debug_string): Ignore event if not
11225 waiting.
11226
c5674cf1
PA
112272007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11228
11229 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11230
2bbe3cc1
DJ
112312007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11232
11233 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11234
ae13219e
DJ
112352007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11236
11237 * inferiors.c (change_inferior_id): Add comment.
11238 * linux-low.c (check_removed_breakpoint): Add an early
11239 prototype. Improve debug output.
11240 (linux_attach): Doc update.
11241 (linux_detach_one_process, linux_detach): Clean up before releasing
11242 each process.
11243 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11244 * linux-low.h (struct process_info): Doc improvement.
11245 * mem-break.c (delete_all_breakpoints): New.
11246 * mem-break.h (delete_all_breakpoints): New prototype.
11247 * thread-db.c (find_first_thread): New.
11248 (thread_db_create_event): Call it instead of
11249 thread_db_find_new_threads. Clean up unused variables.
11250 (maybe_attach_thread): Remove first thread handling.
11251 (thread_db_find_new_threads): Use find_first_thread.
11252 (thread_db_get_tls_address): Likewise.
11253
4105de34
DJ
112542007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11255
11256 * thread-db.c (thread_db_find_new_threads): Add prototype.
11257 (thread_db_create_event): Check for the main thread before adding
11258 a new thread.
11259 (maybe_attach_thread): Only enable event reporting if TID == 0.
11260 (thread_db_get_tls_address): Check for new threads.
11261
2b876972
DJ
112622007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11263
11264 * linux-low.c (linux_create_inferior): Try execv before execvp.
11265 * spu-low.c (spu_create_inferior): Likewise.
11266
7a245884
DJ
112672007-06-13 Mike Frysinger <vapier@gentoo.org>
11268
11269 * linux-low.c (linux_create_inferior): Change execv to execvp.
11270 * spu-low.c (spu_create_inferior): Likewies.
11271
117ce543
DJ
112722007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11273
11274 * Makefile.in (clean): Clean new files instead of deleted ones.
11275 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11276 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11277 rules.
11278 * configure.srv: Specify XML files and new regformats for MIPS and
11279 MIPS64 GNU/Linux.
11280 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11281 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11282 an entry for the restart register.
11283 (mips_cannot_fetch_register, mips_cannot_store_register)
11284 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11285 register names to match the XML descriptions.
11286 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11287 restart register instead of $0.
11288
0e7f50da
UW
112892007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11290 Markus Deuling <deuling@de.ibm.com>
11291
11292 * remote-utils.c (decode_xfer_write): New function.
11293 * server.h (decode_xfer_write): Add prototype.
11294 * server.c (handle_query): Add PACKET_LEN argument. Support
11295 qXfer:spu:read and qXfer:spu:write packets.
11296 (main): Pass packet_len to handle_query.
11297 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11298 * target.h (target_ops): Add qxfer_spu.
11299
374c1d38
UW
113002007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11301
11302 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11303 accessing non-seekable spufs files.
11304
bb63802a
UW
113052007-05-16 Markus Deuling <deuling@de.ibm.com>
11306
889bf7c5 11307 * server.c (handle_query): Add reply for qC packet.
bb63802a 11308
7390519e
PA
113092007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11310 Leo Zayas <lerele@champenstudios@com>
11311
11312 * server.h (check_remote_input_interrupt_request): New function.
11313 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11314 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11315 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11316 (check_remote_input_interrupt_request): New function.
11317 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11318 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11319 winapi_GenerateConsoleCtrlEvent): New typedefs.
11320 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11321 to 250 ms.
11322 (win32_wait): Check for remote interrupt request
11323 with check_remote_input_interrupt_request.
11324 (win32_request_interrupt): New function.
11325 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11326
34b34921
PA
113272007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11328
11329 * win32-low.c (debug_registers_changed,
11330 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11331 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11332 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11333 (thread_rec): Get context using the low target.
11334 (child_add_thread): Call thread_added on the low target,
11335 which does the same thing.
11336 (regptr): Delete.
11337 (do_initial_child_stuff): Remove debug registers references.
11338 Set context using the low target. Resume threads after
11339 setting the contexts.
11340 (child_continue): Remove dead variable. Remove debug
11341 registers references.
11342 (child_fetch_inferior_registers): Go through the low target.
11343 (do_child_store_inferior_registers): Remove.
11344 (child_store_inferior_registers): Go through the low target.
11345 (win32_resume): Remove debug registers references.
11346 Set context using the low target.
11347 (handle_exception): Change return type to void. Don't record
11348 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11349 first chance exception.
889bf7c5 11350 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
11351 goto loop. Always return after waiting for debug event.
11352 (win32_wait): Convert to switch statement. Handle spurious
11353 events.
11354
11355 * win32-i386-low.c (debug_registers_changed,
11356 debug_registers_used): New.
11357 (initial_stuff): Rename to ...
11358 (i386_initial_stuff): ... this. Clear debug registers
11359 state variables.
11360 (store_debug_registers): Delete.
11361 (i386_get_thread_context): New.
11362 (load_debug_registers): Delete.
11363 (i386_set_thread_context): New.
11364 (i386_thread_added): New.
11365 (single_step): Rename to ...
11366 (i386_single_step): ... this.
11367 (do_fetch_inferior_registers): Rename to ...
11368 (i386_fetch_inferior_register): ... this.
11369 (i386_store_inferior_register): New.
11370 (the_low_target): Adapt to new interface.
11371
11372 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11373 (arm_get_thread_context): New.
11374 (arm_set_thread_context): New.
11375 (regptr): New.
11376 (do_fetch_inferior_registers): Rename to ...
11377 (arm_fetch_inferior_register): ... this.
11378 (arm_store_inferior_register): New.
11379 (arm_wince_breakpoint): Reimplement as unsigned long.
11380 (arm_wince_breakpoint_len): Define.
11381 (the_low_target): Adapt to new interface.
11382
11383 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11384 load_debug_registers. Add get_thread_context, set_thread_context,
11385 thread_added and store_inferior_register. Rename
11386 fetch_inferior_registers to fetch_inferior_register.
11387 (regptr): Remove declaration.
11388
dd6953e1
PA
113892007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11390
11391 * linux-low.c (linux_detach): Change return type to int. Return 0.
11392 * spu-low.c (spu_detach): Likewise.
11393
444d6139
PA
113942007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11395
11396 * target.h (target_ops): Change return type of detach to int.
11397 Add join.
11398 (join_inferior): New.
11399 * server.c (main): Don't skip detach support on mingw32.
11400 If the inferior doesn't support detaching return error.
11401 Call join_inferior instead of using waitpid.
11402 * linux-low.c (linux_join): New.
11403 (linux_target_op): Add linux_join.
11404 * spu-low.c (spu_join): New.
11405 (spu_target_ops): Add spu_join.
11406 * win32-low.c (win32_detach): Adapt to new interface.
11407 Reopen current_process_handle before detaching. Issue a child
11408 resume before detaching.
11409 (win32_join): New.
11410 (win32_target_op): Add win32_join.
11411
1d5315fe
PA
114122007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11413
11414 * win32-low.c (win32-attach): Fix return value.
11415 * target.h (target_ops): Describe ATTACH return values.
11416
bf914831
PA
114172007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11418
11419 * win32-low.c (GETPROCADDRESS): Define.
11420 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11421 (winapi_DebugSetProcessKillOnExit): Likewise.
11422 (win32_create_inferior): Force usage of ansi CreateProcessA.
11423 (win32_attach): Use GETPROCADDRESS.
11424 (win32_detach): Likewise.
11425
f72f3e60
PA
114262007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11427
11428 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11429
ed50f18f
PA
114302007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11431
11432 * win32-low.c: Commit leftover changes from 2007-03-29.
11433
0c2ead7e
DJ
114342007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11435
11436 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11437 fields short instead of int. Add explicit padding.
11438 (i387_cache_to_fsave): Remove unnecessary casts.
11439 (i387_fsave_to_cache): Doc fix.
11440 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11441
73725ff3
DJ
114422007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11443
11444 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11445 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11446
d99f33d8
PA
114472007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11448
11449 * configure.srv (arm*-*-mingw32ce*): Move near the other
11450 arm targets.
11451
68070c10
PA
114522007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11453
2482afc6 11454 * configure.ac: Add errno checking.
68070c10
PA
11455 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11456 sys/file.h and malloc.h.
11457 (AC_CHECK_DECLS): Add perror.
11458 (srv_mingwce): Handle.
2482afc6 11459 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
11460 win32-i386-low.o to srv_tgtobj.
11461 (i[34567]86-*-mingw*): Likewise.
11462 (arm*-*-mingw32ce*): Add case.
11463 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11464 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11465 [__MINGW32CE__] (strerror): New function.
11466 [__MINGW32CE__] (errno): Define to GetLastError.
11467 [__MINGW32CE__] (COUNTOF): New macro.
11468 (remote_open): Remove extra close call.
11469 * mem-break.c (delete_breakpoint_at): New function.
11470 * mem-break.h (delete_breakpoint_at): Declare.
11471 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11472 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11473 [USE_WIN32API] (read, write): Add char* casts.
11474 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11475 * server.h: Include wincecompat.h on Windows CE.
11476 [HAVE_ERRNO_H]: Check.
11477 (perror): Declare if not declared.
11478 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11479 (perror_with_name): Remove errno declaration.
11480 * wincecompat.h: New.
11481 * wincecompat.c: New.
11482 * win32-low.h: New.
11483 * win32-arm-low.c: New.
11484 * win32-i386-low.c: New.
11485 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11486 (OUTMSG2): Make it safe.
11487 (_T): New macro.
11488 (COUNTOF): New macro.
11489 (NUM_REGS): Get it from the low target.
11490 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11491 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11492 (thread_rec): Let low target handle debug registers.
11493 (child_add_thread): Likewise.
11494 (child_init_thread_list): Likewise.
11495 (continue_one_thread): Likewise.
11496 (regptr): New.
11497 (do_child_fetch_inferior_registers): Move to ...
11498 * win32-i386-low.c: ... here, and rename to ...
11499 (do_fetch_inferior_registers): ... this.
889bf7c5 11500 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
11501 Go through the low target.
11502 (do_child_store_inferior_registers): Use regptr.
11503 (strwinerror): New function.
11504 (win32_create_inferior): Handle Windows CE.
11505 Use strwinerror instead of strerror on Windows error
11506 codes. Add program to the error output.
11507 Don't close the main thread handle on Windows CE.
11508 (win32_attach): Use coredll.dll on Windows CE.
11509 (win32_kill): Close current process and current
11510 thread handles.
11511 (win32_detach): Use coredll.dll on Windows CE.
11512 (win32_resume): Let low target handle debug registers, and
11513 step request.
11514 (handle_exception): Add/Remove initial breakpoint. Avoid
11515 non-existant WSTOPSIG on Windows CE.
11516 (win32_read_inferior_memory): Cast to remove warning.
11517 (win32_arch_string): Go through the low target.
11518 (initialize_low): Call set_breakpoint_data with the low
11519 target's breakpoint.
11520 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11521 FOP_REGNUM, mappings): Move to ...
11522 * win32-i386-low.c: ... here.
11523 * win32-low.c (win32_thread_info): Move to ...
11524 * win32-low.h: ... here.
11525 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11526 win32-arm-low.c and wincecompat.c.
11527 (all:): Add $EXEEXT.
11528 (install-only:): Likewise.
11529 (gdbserver:): Likewise.
11530 (gdbreplay:): Likewise.
11531 * config.in: Regenerate.
11532 * configure: Regenerate.
11533
41093d81
PA
115342007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11535
11536 * win32-low.c: Rename typedef thread_info to
11537 win32_thread_info throughout.
11538
544afa54
PA
115392007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11540
11541 * win32-i386-low.c: Rename to ...
11542 * win32-low.c: ... this.
11543 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11544 * Makefile.in: Likewise.
11545
bce7165d
PA
115462007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11547
11548 * remote-utils.c (monitor_output): Constify msg parameter.
11549 * server.h (monitor_output): Likewise.
11550 * win32-i386-low.c (handle_output_debug_string): New.
11551 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11552 handle_output_debug_string.
11553 (get_child_debug_event): Likewise.
11554
506c7aa0
DJ
115552007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11556
11557 * server.c (main): Correct strtoul check.
11558
42c81e2a
DJ
115592007-03-27 Jon Ringle <jon@ringle.org>
11560
11561 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11562
9453113a
DJ
115632007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11564
11565 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11566
64a69107
DJ
115672007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11568
11569 * terminal.h: Check HAVE_SGTTY_H.
11570
115712007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
11572
11573 * remote-utils.c (remote_open): Print out the assigned port number.
11574
c74d0ad8
DJ
115752007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11576
11577 * remote-utils.c (monitor_output): New function.
11578 * server.c (debug_threads): Define here.
11579 (monitor_show_help): New function.
11580 (handle_query): Handle qRcmd.
11581 (main): Do not handle 'd' packet.
11582 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11583 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11584 of debug_threads.
11585
de7c3b4a
PA
115862007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11587
11588 * Makefile.in (EXEEXT): New.
11589 (clean): Use $(EXEEXT).
11590
ef57601b
PA
115912007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11592
11593 * target.h (target_ops): Rename send_signal to request_interrupt,
11594 and remove enum target_signal parameter.
11595 * linux-low.c (linux_request_interrupt): Rename from
11596 linux_send_signal, and always send SIGINT.
11597 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11598 and always send SIGINT.
11599 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11600 of send_signal.
11601 (input_interrupt): Likewise.
11602
820f2bda
PA
116032007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11604
11605 * server.c (get_features_xml): Check if target implemented
11606 arch_string.
11607 * win32-i386-low.c (win32_arch_string): New.
11608 (win32_target_ops): Add win32_arch_string as arch_string member.
11609
ab39bf24
UW
116102007-02-22 Markus Deuling <deuling@de.ibm.com>
11611
11612 * spu-low.c (spu_arch_string): New.
11613 (spu_target_ops): Add spu_arch_string.
11614
61ff6e04
DJ
116152007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11616
11617 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11618 * configure.ac: Do not check for terminal.h.
11619 * configure, config.in: Regenerated.
11620
fb1e4ffc
DJ
116212007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11622
11623 * Makefile.in (OBS): Add $(XML_BUILTIN).
11624 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11625 (clean): Update.
11626 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11627 (arm-with-iwmmxt.c): New.
11628 * config.in, configure: Regenerate.
11629 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11630 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11631 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11632 (arm*-*-linux*): Add iWMMXt and regset support.
11633 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11634 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11635 (arm_store_wmmxregset, target_regsets): New.
11636 * server.c (get_features_xml): Take annex argument. Check builtin
11637 XML documents.
11638 (handle_query): Handle multiple annexes.
11639
0f48aa01
DJ
116402007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11641
11642 * remote-utils.c [USE_WIN32API] (read, write): Define.
11643 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11644 write.
11645
23181151
DJ
116462007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11647
11648 * linux-i386-low.c (the_low_target): Set arch_string.
11649 * linux-x86-64-low.c (the_low_target): Likewise.
11650 * linux-low.c (linux_arch_string): New.
11651 (linux_target_ops): Add it.
11652 * linux-low.h (struct linux_target_ops): Add arch_string.
11653 * server.c (write_qxfer_response): Use const void * for DATA.
11654 (get_features_xml): New.
11655 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11656 * target.h (struct target_ops): Add arch_string method.
11657
9d606399
DJ
116582007-01-03 Denis Pilat <denis.pilat@st.com>
11659 Daniel Jacobowitz <dan@codesourcery.com>
11660
11661 * linux-low.c (linux_kill): Handle being called with no threads.
11662 * win32-i386-low.c (win32_kill): Likewise.
11663 (get_child_debug_event): Clear current_process_handle.
11664
116652006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
11666 Daniel Jacobowitz <dan@codesourcery.com>
11667
11668 * remote-utils.c (remote_open): Check the type of specified
11669 serial port devices before opening them.
11670 * server.c (main): Kill the inferior if an error occurs during
11671 the first remote_open.
11672
a5e13d24
DJ
116732006-12-05 Markus Deuling <deuling@de.ibm.com>
11674
11675 * README: Update supported targets.
11676
186947f7
DJ
116772006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11678
11679 * Makefile.in (clean): Remove reg-mips64.c.
11680 (reg-mips64.c, reg-mips64.o): New rules.
11681 * configure.srv: Handle mips64. Include regset support for mips.
11682 * linux-mips-low.c (union mips_register): New.
11683 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11684 (mips_breakpoint, mips_breakpoint_at): Use int.
11685 (mips_collect_register, mips_supply_register)
11686 (mips_collect_register_32bit, mips_supply_register_32bit)
11687 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11688 (mips_store_fpregset, target_regsets): New.
11689 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11690
a13e2c95
UW
116912006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11692
11693 * configure.srv: Add target "spu*-*-*".
11694 * Makefile.in (clean): Remove reg-spu.c.
11695 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11696 * spu-low.c: New file.
11697
cb7283db
DJ
116982006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11699
11700 * configure.ac: Correct td_thr_tls_get_addr test.
11701 * configure: Regenerated.
11702
89be2091
DJ
117032006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11704
11705 * linux-low.c (linux_wait_for_event): Reformat. Use the
11706 pass_signals array.
11707 * remote-utils.c (decode_address_to_semicolon): New.
11708 * server.c (pass_signals, handle_general_set): New.
11709 (handle_query): Mention QPassSignals for qSupported.
11710 (main): Call handle_general_set.
11711 * server.h (pass_signals, decode_address_to_semicolon): New.
11712
000ef4f0
DJ
117132006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11714
11715 * server.c (handle_query): Correct error handling for read_auxv.
11716
b7149293
UW
117172005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11718
11719 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11720 and srv_linux_thread_db to yes.
11721 * linux-s390-low.c (s390_fill_gregset): New function.
11722 (target_regsets): Define data structure.
11723
dae5f5cf
DJ
117242006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11725
11726 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11727 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11728 * config.in, configure: Regenerated.
11729 * inferiors.c (gdb_id_to_thread): New function.
11730 (gdb_id_to_thread_id): Use it.
11731 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11732 * linux-low.h (struct process_info): Add th member.
11733 (thread_db_get_tls_address): New prototype.
11734 * remote-utils.c (decode_address): Make non-static.
11735 * server.c (handle_query): Handle qGetTLSAddr.
11736 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11737 * target.h (struct target_ops): Add get_tls_address.
11738 * thread-db.c (maybe_attach_thread): Save the thread handle.
11739 (thread_db_get_tls_address): New.
11740
32ca6d61
DJ
117412006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11742
11743 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11744 (linux_resume_one_process): Take a siginfo_t *. Update all
11745 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11746 (struct pending_signals): Add a siginfo_t.
11747 (linux_wait_for_process): Always set last_status.
11748 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11749 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11750 * linux-low.h (struct process_info): Add last_status.
11751
5ffff7c1
DJ
117522006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11753
11754 * remote-utils.c (try_rle): New function.
11755 (putpkt_binary): Use it.
11756
8695c747
DJ
117572006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11758
11759 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11760 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11761 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11762 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11763 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11764 point registers.
11765
290fadea
RS
117662006-08-08 Richard Sandiford <richard@codesourcery.com>
11767
11768 * server.c (terminal_fd): New variable.
11769 (old_foreground_pgrp): Likewise.
11770 (restore_old_foreground_pgrp): New function.
11771 (start_inferior): Record the terminal file descriptor in terminal_fd
11772 and its original foreground group in old_foreground_pgrp. Register
11773 restore_old_foreground_pgrp with atexit().
11774
9f2e1e63
DJ
117752006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11776
11777 * server.c (handle_query): Correct qPart to qXfer.
11778
b80864fb
DJ
117792006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11780
11781 * configure.ac: Check for more headers which are missing on
11782 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11783 * configure.srv: Add Cygwin and mingw32.
11784 * remote-utils.c: Don't include headers unconditionally which
11785 are missing on mingw32. Include <winsock.h> for mingw32.
11786 (remote_open): Adjust for mingw32 support. Flush
11787 standard error after writing to it.
11788 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11789 (unblock_async_io, enable_async_io, disable_async_io)
11790 (readchar, getpkt): Update for Winsock support.
11791 (prepare_resume_reply): Expect a protocol signal number.
11792 * server.c: Disable <sys/wait.h> on mingw32.
11793 (start_inferior): Adjust for mingw32 support. Flush
11794 standard error after writing to it.
11795 (attach_inferior): Likewise. Use protocol signal
11796 numbers.
11797 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11798 and names.
11799 * win32-i386-low.c: New file.
11800 * Makefile.in (XM_CLIBS): Set.
11801 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11802 (win32-i386-low.o): New dependency rule.
11803 * linux-low.c (linux_wait): Use target signal numbers.
11804 * target.h (struct target_ops): Doc fix.
11805 * server.h (target_signal_to_name): New prototype.
11806 * gdbreplay.c: Don't include headers unconditionally which
11807 are missing on mingw32. Include <winsock.h> for mingw32.
11808 (remote_close, remote_open): Adjust for Winsock support.
11809 * configure, config.in: Regenerated.
11810
0876f84a
DJ
118112006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11812
11813 * server.c (decode_xfer_read, write_qxfer_response): New.
11814 (handle_query): Take a packet length argument. Handle
11815 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11816 the qSupported response.
11817 (main): Update call to handle_query.
11818
01f9e8fa
DJ
118192006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11820
11821 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11822 (putpkt_binary): Renamed from putpkt and adjusted for binary
11823 data.
11824 (putpkt): New wrapper for putpkt_binary.
11825 (readchar): Don't mask off the high bit.
11826 (decode_X_packet): New function.
11827 * server.c (main): Call putpkt_binary if a handler sets the packet
11828 length. Save the length of the incoming packet. Handle 'X'.
11829 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11830
be2a5f71
DJ
118312006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11832
11833 * server.c (handle_query): Handle qSupported.
11834
ea025f5f
DJ
118352006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11836
11837 * remote-utils.c (all_symbols_looked_up): New variable.
11838 (look_up_one_symbol): Check it.
11839 * server.h (look_up_one_symbol): New declaration.
11840 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11841
9308fc88
DJ
118422006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11843
11844 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 11845 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
11846 (PTRACE_GET_THREAD_AREA): Define.
11847 (ps_get_thread_area): New function.
11848
52fb6437
NS
118492006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11850
11851 * configure.srv (m68k*-*-uclinux*): New target.
11852 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11853 (linux_resume_one_process): Remove extraneous cast.
11854 (linux_read_offsets): New.
11855 (linux_target_op): Add linux_read_offsets on mmuless systems.
11856 * server.c (handle_query): Add qOffsets logic.
11857 * target.h (struct target_ops): Add read_offsets.
11858
21b0f40c
DJ
118592006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11860
11861 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11862 (PTRACE_GET_THREAD_AREA): Define.
11863 (ps_get_thread_area): New function.
11864 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11865 (linux-x86-64-low.o): Update.
11866
0050a760
DJ
118672006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11868
11869 * configure.ac: Remove checks for prfpregset_t.
11870 * gdb_proc_service.h: New file.
11871 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11872 new "gdb_proc_service.h".
11873 * proc-service.c: Likewise.
11874 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11875 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11876 * Makefile.in (gdb_proc_service_h): Updated.
11877 * configure, config.in: Regenerated.
11878
b92a518e
DJ
118792006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11880
11881 * remote-utils.c (prepare_resume_reply): Move declaration
11882 of gdb_id_from_wait to the top of the block.
11883
545587ee
DJ
118842006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11885
11886 * linux-low.c (regsets_store_inferior_registers): Read the regset
11887 from the target before filling it.
11888
9db87ebd
DJ
118892006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11890
11891 * server.c (attach_inferior): Return SIGTRAP for a successful
11892 attach.
11893
dd24457d
DJ
118942006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11895
11896 * Makefile.in (OBS): Add version.o.
11897 (STAGESTUFF): Delete.
11898 (version.o): Add dependencies.
11899 (version.c): Replace rule.
11900 (clean): Remove version.c.
11901 * server.c (gdbserver_version): New.
11902 (gdbserver_usage): Use printf.
11903 (main): Handle --version and --help.
11904 * server.h (version, host_name): Add declarations.
11905
6f0f660e
EZ
119062005-12-23 Eli Zaretskii <eliz@gnu.org>
11907
889bf7c5
PA
11908 * linux-arm-low.c:
11909 * linux-arm-low.c:
11910 * inferiors.c:
11911 * i387-fp.h:
11912 * i387-fp.c:
11913 * gdbreplay.c:
11914 * regcache.c:
11915 * proc-service.c:
11916 * mem-break.h:
11917 * mem-break.c:
11918 * linux-x86-64-low.c:
11919 * linux-sh-low.c:
11920 * linux-s390-low.c:
11921 * linux-ppc64-low.c:
11922 * linux-ppc-low.c:
11923 * linux-mips-low.c:
11924 * linux-m68k-low.c:
11925 * linux-m32r-low.c:
11926 * linux-low.h:
11927 * linux-low.c:
11928 * linux-ia64-low.c:
11929 * linux-i386-low.c:
11930 * linux-crisv32-low.c:
11931 * thread-db.c:
11932 * terminal.h:
11933 * target.h:
11934 * target.c:
11935 * server.h:
11936 * server.c:
11937 * remote-utils.c:
11938 * regcache.h:
11939 * utils.c:
11940 * Makefile.in:
11941 * configure.ac:
6f0f660e
EZ
11942 * gdbserver.1: Add (C) after Copyright. Update the FSF
11943 address.
11944
9d1fb177
DJ
119452005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11946
11947 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11948 (arm_breakpoint_at): Recognize both breakpoints.
11949 (the_low_target): Use the correct breakpoint instruction.
11950
011a70c2
DJ
119512005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11952
11953 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11954 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11955 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11956 (the_low_target): Update.
11957
7fb85e41
AS
119582005-10-25 Andreas Schwab <schwab@suse.de>
11959
11960 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11961
11962 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11963 (ia64_num_regs): Reduce to 462.
11964
3db0444b
DJ
119652005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11966
11967 * acinclude.m4: Correct quoting.
11968 * aclocal.m4: Regenerated.
11969
11970 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11971 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11972 (thread_db_init): Call thread_db_err_str.
11973 * configure.ac: Check for TD_VERSION.
11974 * config.in, configure: Regenerated.
11975
bee0189a
DJ
119762005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11977
11978 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11979
e9d25b98
DJ
119802005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11981
11982 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11983 is not available. Define HAVE_PTRACE_GETREGS if it is.
11984 * config.in, configure: Regenerated.
11985 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11986 * linux-i386-low.c, linux-m68k-low.c: Update to use
11987 HAVE_PTRACE_GETREGS.
11988 * linux-low.c (regsets_fetch_inferior_registers)
11989 (regsets_store_inferior_registers): Only return 0 if we processed
11990 GENERAL_REGS.
11991 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11992 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11993
a06660f7
DJ
119942005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11995
11996 * inferiors.c (struct thread_info): Add gdb_id.
11997 (add_thread): Add gdb_id argument.
11998 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11999 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12000 calls to add_thread.
12001 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12002 * server.c (handle_query): Use thread_to_gdb_id.
12003 (handle_v_cont, main): Use gdb_id_to_thread_id.
12004 * server.h (add_thread): Update prototype.
12005 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12006 prototypes.
12007
5a1f5858
DJ
120082005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12009
12010 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12011 left-padded registers.
12012 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12013 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12014
e122f1f5
SE
120152005-07-01 Steve Ellcey <sje@cup.hp.com>
12016
12017 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12018 * configure: Regenerate.
12019 * config.in: Regenerate.
12020 * server.h (NEED_DECLARATION_STRERROR):
12021 Replace with !HAVE_DECL_STRERROR.
12022
d592fa2f
DJ
120232005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12024
12025 * linux-low.c (linux_wait, linux_send_signal): Don't test
12026 an unsigned long variable for > 0 if it could be MAX_ULONG.
12027 * server.c (myresume): Likewise.
12028 * target.c (set_desired_inferior): Likewise.
12029
ccbd4912
MK
120302005-06-13 Mark Kettenis <kettenis@gnu.org>
12031
12032 * configure.ac: Simplify and improve check for socklen_t.
12033 * configure, config.in: Regenerate.
12034
f450004a
DJ
120352005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12036
12037 * acconfig.h: Remove.
12038 * configure.ac: Add a test for socklen_t. Use three-argument
12039 AC_DEFINE throughout.
12040 * config.in: Regenerated using autoheader 2.59.
12041 * configure: Regenerated.
12042
12043 * gdbreplay.c (socklen_t): Provide a default.
12044 (remote_open): Use socklen_t.
12045 * remote-utils.c (socklen_t): Provide a default.
12046 (remote_open): Use socklen_t.
12047 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12048 unsigned char.
12049
12050 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12051 char for buffers.
12052 * linux-low.c (linux_read_memory, linux_write_memory)
12053 (linux_read_auxv): Likewise.
12054 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12055 (check_mem_write): Likewise.
12056 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12057 Likewise.
12058 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12059 (registers_from_string, register_data): Likewise.
12060 * server.c (handle_query, main): Likewise.
12061 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12062 (decode_M_packet): Likewise.
12063 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12064 * target.h (struct target_ops): Update read_memory, write_memory,
12065 and read_auxv.
12066 (read_inferior_memory, write_inferior_memory): Update.
12067 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12068 to unsigned char *.
12069 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12070 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12071 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12072 linux-s390-low.c, linux-sh-low.c: Update for changes in
12073 read_inferior_memory and the_low_target->breakpoint.
12074
eee84df1
DJ
120752005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12076
12077 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12078 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12079 * configure.srv: Add powerpc64-*-linux*.
12080 * linux-ppc64-low.c: New file.
12081
45b134e5
OF
120822005-05-23 Orjan Friberg <orjanf@axis.com>
12083
12084 * linux-cris-low.c: New file with support for CRIS.
12085 * linux-crisv32-low.c: Ditto for CRISv32.
12086 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12087 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 12088 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
12089 reg-crisv32.o, and reg-crisv32.c to make rules.
12090 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12091 recognized targets.
12092
48d93c75
UW
120932005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12094
12095 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12096 of sizeof (PTRACE_XFER_TYPE).
12097 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12098
e013ee27
OF
120992005-05-12 Orjan Friberg <orjanf@axis.com>
12100
889bf7c5 12101 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
12102 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12103 pointers for hardware watchpoint support.
12104 * linux-low.h (struct linux_target_ops): Ditto.
12105 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12106 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12107 to linux_target_ops.
12108 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12109 reply packet.
12110 * server.c (main): Recognize 'Z' and 'z' packets.
12111
b0ded00b
UW
121122005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12113
12114 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12115 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12116 (the_low_target): Add new members.
12117
8643e2ad
DJ
121182005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12119
12120 * proc-service.c (ps_lgetregs): Search all_processes instead of
12121 all_threads.
12122
fc620387
DJ
121232005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12124
12125 * server.c (start_inferior): Change return type to int.
12126 (attach_inferior): Change sigptr to int *.
12127 (handle_v_cont, handle_v_requests): Change signal to int *.
12128 (main): Change signal to int.
12129
121302005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
12131
12132 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12133 * configure.srv: Add m32r*-*-linux*.
12134 * linux-m32r-low.c: New file.
12135
e0e76420
DJ
121362005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12137
12138 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12139
a1928bad
DJ
121402005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12141
12142 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12143 Take unsigned long arguments for PIDs.
12144 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12145 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12146 (wait_for_sigstop, linux_resume_one_process)
12147 (regsets_fetch_inferior_registers, linux_send_signal)
12148 (linux_read_auxv): Likewise. Update the types of variables holding
12149 PIDs. Update format string specifiers.
12150 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12151 * remote-utils.c (prepare_resume_reply): Likewise.
12152 * server.c (cont_thread, general_thread, step_thread)
12153 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12154 unsigned long.
12155 (handle_query): Update format specifiers.
12156 (handle_v_cont, main): Use strtoul for thread IDs.
12157 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12158 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12159 (general_thread, step_thread, thread_from_wait)
12160 (old_thread_from_wait): Update.
12161 * target.h (struct thread_resume): Use unsigned long for THREAD.
12162 (struct target_ops): Use unsigned long for arguments to attach and
12163 thread_alive.
12164
dcdb98d2
DJ
121652005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12166
12167 * acinclude.m4: Include bfd/bfd.m4 directly.
12168 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12169 <agriffis@toolchain.org>.
12170 * aclocal.m4, configure: Regenerated.
12171
bec39cab
AC
121722005-01-07 Andrew Cagney <cagney@gnu.org>
12173
12174 * configure.ac: Rename configure.in, require autoconf 2.59.
12175 * configure: Re-generate.
12176
434c4c77
DJ
121772004-12-08 Daniel Jacobowitz <dan@debian.org>
12178
12179 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12180 LIBS when finished.
12181 * aclocal.m4: Regenerated.
12182 * configure: Regenerated.
12183
db1d3e1b
AS
121842004-11-21 Andreas Schwab <schwab@suse.de>
12185
12186 * linux-m68k-low.c (m68k_num_gregs): Define.
12187 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12188 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12189 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12190 (m68k_breakpoint_at): New. Add to the_low_target.
12191
12192 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12193 srv_linux_thread_db to yes.
12194
43360365
JB
121952004-10-20 Joel Brobecker <brobecker@gnat.com>
12196
12197 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12198 (ARCH_SET_FS): Likewise.
12199 (ARCH_GET_FS): Likewise.
12200 (ARCH_GET_GS): Likewise.
12201
fd500816
DJ
122022004-10-16 Daniel Jacobowitz <dan@debian.org>
12203
12204 * linux-i386-low.c (ps_get_thread_area): New.
12205 * linux-x86-64-low.c (ps_get_thread_area): New.
12206 * linux-low.c: Include <sys/syscall.h>.
12207 (linux_kill_one_process): Don't kill the first thread here.
12208 (linux_kill): Kill the first thread here.
12209 (kill_lwp): New function.
12210 (send_sigstop, linux_send_signal): Use it.
12211 * proc-service.c: Clean up #ifdefs.
12212 (fpregset_info): Delete.
12213 (ps_lgetregs): Update and enable implementation.
12214 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12215 implementations.
12216 * remote-utils.c (struct sym_cache, symbol_cache): New.
12217 (input_interrupt): Print a clearer message.
12218 (async_io_enabled): New variable.
12219 (enable_async_io, disable_async_io): Use it. Update comments.
12220 (look_up_one_symbol): Use the symbol cache.
12221 * thread-db.c (thread_db_look_up_symbols): New function.
12222 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12223
f6de3c42
DJ
122242004-10-16 Daniel Jacobowitz <dan@debian.org>
12225
12226 * configure.in: Test for -rdynamic.
12227 * configure: Regenerated.
12228 * Makefile (INTERNAL_LDFLAGS): New.
12229 (gdbserver, gdbreplay): Use it.
12230
2c0fc042
AC
122312004-09-02 Andrew Cagney <cagney@gnu.org>
12232
12233 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12234
075b3282
DJ
122352004-03-23 Daniel Jacobowitz <drow@mvista.com>
12236
12237 * linux-low.c (linux_wait): Clear all_processes list also.
12238
fa6a77dc
DJ
122392004-03-12 Daniel Jacobowitz <drow@mvista.com>
12240
12241 * linux-low.c: Include <errno.h>. Remove extern declaration of
12242 errno.
12243
6d782a97
DJ
122442004-03-12 Daniel Jacobowitz <drow@mvista.com>
12245
12246 * gdbreplay.c, server.h, utils.c: Update copyright years.
12247
3a7fb99b
DJ
122482004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12249
12250 * server.c (main): Print child status or termination signal from
12251 variable 'signal', not 'sig'.
12252
c3e735a6
DJ
122532004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12254
12255 * linux-low.c (linux_read_memory): Change return type to
12256 int. Check for and return error from ptrace().
12257 * target.c (read_inferior_memory): Change return type to int. Pass
12258 back return status from the_target->read_memory().
12259 * target.h (struct target_ops): Adapt *read_memory() prototype.
12260 Update comment.
12261 (read_inferior_memory): Adapt prototype.
12262 * server.c (main): Return an error packet if
12263 read_inferior_memory() returns an error.
12264
a59d1c82
DJ
122652004-03-04 Daniel Jacobowitz <drow@mvista.com>
12266
12267 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12268 Unify with other clean targets.
12269
dc3f8883
DJ
122702004-02-29 Daniel Jacobowitz <drow@mvista.com>
12271
12272 * server.c (handle_v_cont): Call set_desired_inferior.
12273
89a208da
DJ
122742004-02-29 Daniel Jacobowitz <drow@mvista.com>
12275
12276 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12277
62ea82f5
DJ
122782004-02-29 Daniel Jacobowitz <drow@mvista.com>
12279
12280 * linux-low.c (linux_wait): Unblock async I/O.
12281 (linux_resume): Block and enable async I/O.
12282 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12283 * server.h (block_async_io, unblock_async_io): Add prototypes.
12284
6910d122
DJ
122852004-02-29 Daniel Jacobowitz <drow@mvista.com>
12286
12287 * remote-utils.c (remote_open): Print a status notice after
12288 opening a TCP port.
12289 * server.c (attach_inferior): Print a status notice after
12290 attaching.
12291
122922004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12293
12294 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12295
c89dc5d4
DJ
122962004-02-26 Daniel Jacobowitz <drow@mvista.com>
12297
12298 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12299 error packet.
12300 * server.c, target.h: Update copyright years.
12301
4b8dad4a
RM
123022004-02-25 Roland McGrath <roland@redhat.com>
12303
12304 * target.h (struct target_ops): New member `read_auxv'.
12305 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12306 * linux-low.c (linux_read_auxv): New function.
12307 (linux_target_ops): Initialize `read_auxv' member to that.
12308
d7446758
JB
123092004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12310
12311 Committed by Jim Blandy <jimb@redhat.com>.
12312
12313 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12314 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12315 instead of GPR_SIZE to distiguish s390 and s390x targets.
12316
5544ad89
DJ
123172004-01-31 Daniel Jacobowitz <drow@mvista.com>
12318
12319 * linux-low.c: Update copyright year.
12320 (check_removed_breakpoint): Clear pending_is_breakpoint.
12321 (linux_set_resume_request, linux_queue_one_thread)
12322 (resume_status_pending_p): New functions.
12323 (linux_continue_one_thread): Use process->resume.
12324 (linux_resume): Only resume threads if there are no pending events.
12325 * linux-low.h (struct process_info): Add resume request
12326 pointer.
12327
2a68b70e
DJ
123282004-01-30 Daniel Jacobowitz <drow@mvista.com>
12329
12330 * regcache.c (new_register_cache): Clear the allocated register
12331 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12332
64386c31
DJ
123332003-10-13 Daniel Jacobowitz <drow@mvista.com>
12334
12335 * linux-low.c (linux_resume): Take a struct thread_resume *
12336 argument.
12337 (linux_wait): Update call.
12338 (resume_ptr): New static variable.
12339 (linux_continue_one_thread): Renamed from
12340 linux_continue_one_process. Use resume_ptr.
12341 (linux_resume): Use linux_continue_one_thread.
12342 * server.c (handle_v_cont, handle_v_requests): New functions.
12343 (myresume): New function.
12344 (main): Handle 'v' case.
12345 * target.h (struct thread_resume): New type.
12346 (struct target_ops): Change argument of "resume" to struct
12347 thread_resume *.
12348 (myresume): Delete macro.
12349
c938e9b0
L
123502003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12351
12352 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12353 (uninstall): Support DESTDIR.
12354
7f313d07
BC
12355Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12356
12357 * configure.srv: Add xscale*linux copy of arm*linux entry.
12358
3b2fc2ea
DJ
123592003-07-24 Daniel Jacobowitz <drow@mvista.com>
12360
12361 * linux-arm-low.c (arm_reinsert_addr): New function.
12362 (the_low_target): Add arm_reinsert_addr.
12363
1c0a559e
MK
123642003-07-08 Mark Kettenis <kettenis@gnu.org>
12365
12366 * mem-break.c: Remove whitespace at end of file.
12367
43d5792c
DJ
123682003-06-28 Daniel Jacobowitz <drow@mvista.com>
12369
12370 * configure.in: Check whether we need to prototype strerror.
12371 * server.h: Optionally prototype strerror.
12372 * gdbreplay.c (perror_with_name): Use strerror.
12373 * linux-low.c (linux_attach_lwp): Use strerror.
12374 * utils.c (perror_with_name): Use strerror.
12375 * config.in, configure: Regenerated.
12376
c8a86edf
DJ
123772003-06-28 Daniel Jacobowitz <drow@mvista.com>
12378
12379 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12380 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12381
73d37363
DJ
123822003-06-20 Daniel Jacobowitz <drow@mvista.com>
12383
12384 * Makefile.in (SFILES): Update.
12385 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12386 low-sun3.c: Remove files.
12387
6ad8ae5c
DJ
123882003-06-17 Daniel Jacobowitz <drow@mvista.com>
12389
12390 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12391 (linux_detach_one_process, linux_detach): New functions.
12392 (linux_target_ops): Add linux_detach.
12393 * server.c (main): Handle 'D' packet.
12394 * target.h (struct target_ops): Add "detach" member.
12395 (detach_inferior): Define.
12396
1581182a
MK
123972003-06-13 Mark Kettenis <kettenis@gnu.org>
12398
12399 From Kelley Cook <kelleycook@wideopenwest.com>:
12400 * configure.srv: Accept i[34567]86 variants.
12401
e5379b03
DJ
124022003-06-05 Daniel Jacobowitz <drow@mvista.com>
12403
12404 * linux-low.c (linux_wait_for_event): Correct comment typos.
12405 (linux_resume_one_process): Call check_removed_breakpoint.
12406 (linux_send_signal): New function.
12407 (linux_target_ops): Add linux_send_signal.
12408 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12409 of kill.
12410 * target.h (struct target_ops): Add send_signal.
12411
2ff29de4
JB
124122003-05-29 Jim Blandy <jimb@redhat.com>
12413
12414 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12415 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12416 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12417 away part of the register's value.
12418
254787d4
DJ
124192003-03-26 Daniel Jacobowitz <drow@mvista.com>
12420
12421 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12422 (linux_wait_for_event, linux_init_signals): Likewise.
12423
94e10508
DJ
124242003-03-17 Daniel Jacobowitz <drow@mvista.com>
12425
12426 * configure.in: Check for stdlib.h.
12427 * configure: Regenerated.
12428 * config.in: Regenerated.
12429
4c0711e0
DJ
124302003-01-04 Andreas Schwab <schwab@suse.de>
12431
12432 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12433
ef66e766
AC
124342003-01-02 Andrew Cagney <ac131313@redhat.com>
12435
12436 * Makefile.in: Remove obsolete code.
12437
a1358604
DJ
124382002-11-20 Daniel Jacobowitz <drow@mvista.com>
12439
12440 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12441 defined(PT_FPR0_HI).
12442
23ce3b1c
DJ
124432002-11-17 Stuart Hughes <seh@zee2.com>
12444
12445 * linux-arm-low.c (arm_num_regs): Increase.
12446 (arm_regmap): Include status register.
12447
124482002-11-17 Daniel Jacobowitz <drow@mvista.com>
12449
12450 * linux-low.c (register_addr): Remove incorrect -1 check.
12451
a9fa9f7d
DJ
124522002-08-29 Daniel Jacobowitz <drow@mvista.com>
12453
12454 * linux-low.c (linux_create_inferior): Call setpgid. Return
12455 the new PID.
12456 (unstopped_p, linux_signal_pid): Remove.
12457 (linux_target_ops): Remove linux_signal_pid.
12458 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12459 global instead of target method.
12460 * target.h (struct target_ops): Remove signal_pid. Update comment
12461 for create_inferior.
12462 * server.c (signal_pid): New variable.
12463 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 12464 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
12465 (attach_inferior): Set signal_pid.
12466
17574093
DJ
124672002-08-23 Daniel Jacobowitz <drow@mvista.com>
12468
12469 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12470
124712002-08-20 Jim Blandy <jimb@redhat.com>
12472
12473 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12474 default for this.
12475
124762002-08-01 Andrew Cagney <cagney@redhat.com>
12477
12478 * Makefile.in: Make chill references obsolete.
12479
124802002-07-24 Kevin Buettner <kevinb@redhat.com>
12481
12482 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12483 * configure: Regenerate.
12484 * config.in: Regenerate.
12485
124862002-07-09 David O'Brien <obrien@FreeBSD.org>
12487
12488 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12489 (perror_with_name, remote_close, remote_open, expect, play): Static.
12490
124912002-07-04 Michal Ludvig <mludvig@suse.cz>
12492
4b8dad4a 12493 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
12494 byte offsets instead of an array of indexes.
12495 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12496
124972002-06-13 Daniel Jacobowitz <drow@mvista.com>
12498
12499 * regcache.c: Add comment.
12500
125012002-06-11 Daniel Jacobowitz <drow@mvista.com>
12502
12503 * thread-db.c: New file.
12504 * proc-service.c: New file.
12505 * acinclude.m4: New file.
12506 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12507 proc-service.o, and thread-db.o.
12508 (linux-low.o): Add USE_THREAD_DB.
12509 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12510 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12511 * aclocal.m4: Regenerated.
12512 * config.in: Regenerated.
12513 * configure: Regenerated.
12514 * configure.in: Check for proc_service.h, sys/procfs.h,
12515 thread_db.h, and linux/elf.h headrs.
12516 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12517 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12518 Check for -lthread_db and thread support.
12519 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12520 PowerPC, and SuperH.
12521 * i387-fp.c: Constify arguments.
12522 * i387-fp.h: Likewise.
12523 * inferiors.c: (struct thread_info): Renamed from
12524 `struct inferior_info'. Remove PID member. Use generic inferior
12525 list header. All uses updated.
12526 (inferiors, signal_pid): Removed.
12527 (all_threads): New variable.
12528 (get_thread): Define.
12529 (add_inferior_to_list): New function.
12530 (for_each_inferior): New function.
12531 (change_inferior_id): New function.
12532 (add_inferior): Removed.
12533 (remove_inferior): New function.
12534 (add_thread): New function.
12535 (free_one_thread): New function.
12536 (remove_thread): New function.
12537 (clear_inferiors): Use for_each_inferior and free_one_thread.
12538 (find_inferior): New function.
12539 (find_inferior_id): New function.
12540 (inferior_target_data): Update argument type.
12541 (set_inferior_target_data): Likewise.
12542 (inferior_regcache_data): Likewise.
12543 (set_inferior_regcache_data): Likewise.
12544 * linux-low.c (linux_bp_reinsert): Remove.
12545 (all_processes, stopping_threads, using_thrads)
12546 (struct pending_signals, debug_threads, pid_of): New.
12547 (inferior_pid): Replace with macro.
12548 (struct inferior_linux_data): Remove.
12549 (get_stop_pc, add_process): New functions.
12550 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12551 Use add_process and add_thread.
12552 (linux_attach_lwp): New function, based on old linux_attach. Use
12553 add_process and add_thread. Set stop_expected for new threads.
12554 (linux_attach): New function.
12555 (linux_kill_one_process): New function.
12556 (linux_kill): Kill all LWPs.
12557 (linux_thread_alive): Use find_inferior_id.
12558 (check_removed_breakpoints, status_pending_p): New functions.
12559 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12560 Update. Use WNOHANG. Wait for cloned processes also. Update process
12561 struct for the found process.
12562 (linux_wait_for_event): New function.
12563 (linux_wait): Use it. Support LWPs.
12564 (send_sigstop, wait_for_sigstop, stop_all_processes)
12565 (linux_resume_one_process, linux_continue_one_process): New functions.
12566 (linux_resume): Support LWPs.
12567 (REGISTER_RAW_SIZE): Remove.
12568 (fetch_register): Use register_size instead. Call supply_register.
12569 (usr_store_inferior_registers): Likewise. Call collect_register.
12570 Fix recursive case.
12571 (regsets_fetch_inferior_registers): Improve error message.
12572 (regsets_store_inferior_registers): Add debugging.
12573 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12574 (unstopped_p, linux_signal_pid): New functions.
12575 (linux_target_ops): Add linux_signal_pid.
12576 (linux_init_signals): New function.
12577 (initialize_low): Call it. Initialize using_threads.
12578 * regcache.c (inferior_regcache_data): Add valid
12579 flag.
12580 (get_regcache): Fetch registers lazily. Add fetch argument
12581 and update all callers.
12582 (regcache_invalidate_one, regcache_invalidate): New
12583 functions.
12584 (new_register_cache): Renamed from create_register_cache.
12585 Return the new regcache.
12586 (free_register_cache): Change argument to a void *.
12587 (registers_to_string, registers_from_string): Call get_regcache
12588 with fetch flag set.
12589 (register_data): Make static. Pass fetch flag to get_regcache.
12590 (supply_register): Call get_regcache with fetch flag clear.
12591 (collect_register): Call get_regcache with fetch flag set.
12592 (collect_register_as_string): New function.
12593 * regcache.h: Update.
12594 * remote-utils.c (putpkt): Flush after debug output and use
12595 stderr.
12596 Handle input interrupts while waiting for an ACK.
12597 (input_interrupt): Use signal_pid method.
12598 (getpkt): Flush after debug output and use stderr.
12599 (outreg): Use collect_register_as_string.
12600 (new_thread_notify, dead_thread_notify): New functions.
12601 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12602 and general_thread.
12603 (look_up_one_symbol): Flush after debug output.
12604 * server.c (step_thread, server_waiting): New variables.
12605 (start_inferior): Don't use signal_pid. Update call to mywait.
12606 (attach_inferior): Update call to mywait.
12607 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12608 (main): Don't fetch/store registers explicitly. Use
12609 set_desired_inferior. Support proposed ``Hs'' packet. Update
12610 calls to mywait.
12611 * server.h: Update.
12612 (struct inferior_list, struct_inferior_list_entry): New.
12613 * target.c (set_desired_inferior): New.
12614 (write_inferior_memory): Constify.
12615 (mywait): New function.
12616 * target.h: Update.
12617 (struct target_ops): New signal_pid method.
12618 (mywait): Removed macro, added prototype.
12619
12620 * linux-low.h (regset_func): Removed.
12621 (regset_fill_func, regset_store_func): New.
12622 (enum regset_type): New.
12623 (struct regset_info): Add type field. Use new operation types.
12624 (struct linux_target_ops): stop_pc renamed to get_pc.
12625 Add decr_pc_after_break and breakpoint_at.
12626 (get_process, get_thread_proess, get_process_thread)
12627 (strut process_info, all_processes, linux_attach_lwp)
12628 (thread_db_init): New.
12629
12630 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12631 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12632 (the_low_target): Add new members.
12633 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12634 (i386_store_fpxregset): Constify.
12635 (target_regsets): Add new kind identifier.
12636 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12637 (i386_set_pc): Add debugging.
12638 (i386_breakpoint_at): New function.
12639 (the_low_target): Add new members.
12640 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12641 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12642 (mips_breakpoint_at): New.
12643 (the_low_target): Add new members.
12644 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12645 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12646 (the_low_target): Add new members.
12647 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12648 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12649 (the_low_target): Add new members.
12650 * linux-x86-64-low.c (target_regsets): Add new kind
12651 identifier.
12652
126532002-05-15 Daniel Jacobowitz <drow@mvista.com>
12654
12655 From Martin Pool <mbp@samba.org>:
12656 * server.c (gdbserver_usage): New function.
12657 (main): Call it.
12658
126592002-05-14 Daniel Jacobowitz <drow@mvista.com>
12660
12661 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12662 stop_at -> stop_pc.
12663
126642002-05-04 Andrew Cagney <ac131313@redhat.com>
12665
12666 * Makefile.in: Remove obsolete code.
12667
126682002-04-24 Michal Ludvig <mludvig@suse.cz>
12669
12670 * linux-low.c (regsets_fetch_inferior_registers),
12671 (regsets_store_inferior_registers): Removed cast to int from
12672 ptrace() calls.
12673 * regcache.h: Added declaration of struct inferior_info.
12674
126752002-04-20 Daniel Jacobowitz <drow@mvista.com>
12676
12677 * inferiors.c (struct inferior_info): Add regcache_data.
12678 (add_inferior): Call create_register_cache.
12679 (clear_inferiors): Call free_register_cache.
12680 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12681 * regcache.c (struct inferior_regcache_data): New.
12682 (registers): Remove.
12683 (get_regcache): New function.
12684 (create_register_cache, free_register_cache): New functions.
12685 (set_register_cache): Don't initialize the register cache here.
12686 (registers_to_string, registers_from_string, register_data): Call
12687 get_regcache.
12688 * regcache.h: Add prototypes.
12689 * server.h: Likewise.
12690
126912002-04-20 Daniel Jacobowitz <drow@mvista.com>
12692
12693 * mem-break.c: New file.
12694 * mem-break.h: New file.
12695 * Makefile.in: Add mem-break.o rule; update server.h
12696 dependencies.
12697 * inferiors.c (struct inferior_info): Add target_data
12698 member.
12699 (clear_inferiors): Free target_data member if set.
12700 (inferior_target_data, set_inferior_target_data): New functions.
12701 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12702 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12703 * linux-low.c (linux_bp_reinsert): New variable.
12704 (struct inferior_linux_data): New.
12705 (linux_create_inferior): Use set_inferior_target_data.
12706 (linux_attach): Likewise. Call add_inferior.
12707 (linux_wait_for_one_inferior): New function.
12708 (linux_wait): Call it.
12709 (linux_write_memory): Add const.
12710 (initialize_low): Call set_breakpoint_data.
12711 * linux-low.h (struct linux_target_ops): Add breakpoint
12712 handling members.
12713 * server.c (attach_inferior): Remove extra add_inferior
12714 call.
12715 * server.h: Include mem-break.h. Update inferior.c
12716 prototypes.
12717 * target.c (read_inferior_memory)
12718 (write_inferior_memory): New functions.
12719 * target.h (read_inferior_memory)
12720 (write_inferior_memory): Change macros to prototypes.
12721 (struct target_ops): Update comments. Add const to write_memory
12722 definition.
12723
127242002-04-11 Daniel Jacobowitz <drow@mvista.com>
12725
12726 * linux-low.c (usr_store_inferior_registers): Support
12727 registers which are allowed to fail to store.
12728 * linux-low.h (linux_target_ops): Likewise.
12729 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12730 (ppc_cannot_store_register): FPSCR may not be storable.
12731
127322002-04-09 Daniel Jacobowitz <drow@mvista.com>
12733
12734 * server.h: Include <string.h> if HAVE_STRING_H.
12735 * ChangeLog: Correct paths in last ChangeLog entry.
12736
127372002-04-09 Daniel Jacobowitz <drow@mvista.com>
12738
12739 * linux-low.h: Remove obsolete prototypes.
12740 (struct linux_target_ops): New.
12741 (extern the_low_target): New.
12742 * linux-low.c (num_regs, regmap): Remove declarations.
12743 (register_addr): Use the_low_target explicitly.
12744 (fetch_register): Likewise.
12745 (usr_fetch_inferior_registers): Likewise.
12746 (usr_store_inferior_registers): Likewise.
12747 * linux-arm-low.c (num_regs): Remove.
12748 (arm_num_regs): Define.
12749 (arm_regmap): Renamed from regmap, made static.
12750 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12751 made static.
12752 (arm_cannot_store_register): Renamed from cannot_store_register,
12753 made static.
12754 (the_low_target): New.
12755 * linux-i386-low.c (num_regs): Remove.
12756 (i386_num_regs): Define.
12757 (i386_regmap): Renamed from regmap, made static.
12758 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12759 made static.
12760 (i386_cannot_store_register): Renamed from cannot_store_register,
12761 made static.
12762 (the_low_target): New.
12763 * linux-ia64-low.c (num_regs): Remove.
12764 (ia64_num_regs): Define.
12765 (ia64_regmap): Renamed from regmap, made static.
12766 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12767 made static.
12768 (ia64_cannot_store_register): Renamed from cannot_store_register,
12769 made static.
12770 (the_low_target): New.
12771 * linux-m68k-low.c (num_regs): Remove.
12772 (m68k_num_regs): Define.
12773 (m68k_regmap): Renamed from regmap, made static.
12774 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12775 made static.
12776 (m68k_cannot_store_register): Renamed from cannot_store_register,
12777 made static.
12778 (the_low_target): New.
12779 * linux-mips-low.c (num_regs): Remove.
12780 (mips_num_regs): Define.
12781 (mips_regmap): Renamed from regmap, made static.
12782 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12783 made static.
12784 (mips_cannot_store_register): Renamed from cannot_store_register,
12785 made static.
12786 (the_low_target): New.
12787 * linux-ppc-low.c (num_regs): Remove.
12788 (ppc_num_regs): Define.
12789 (ppc_regmap): Renamed from regmap, made static.
12790 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12791 made static.
12792 (ppc_cannot_store_register): Renamed from cannot_store_register,
12793 made static.
12794 (the_low_target): New.
12795 * linux-s390-low.c (num_regs): Remove.
12796 (s390_num_regs): Define.
12797 (s390_regmap): Renamed from regmap, made static.
12798 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12799 made static.
12800 (s390_cannot_store_register): Renamed from cannot_store_register,
12801 made static.
12802 (the_low_target): New.
12803 * linux-sh-low.c (num_regs): Remove.
12804 (sh_num_regs): Define.
12805 (sh_regmap): Renamed from regmap, made static.
12806 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12807 made static.
12808 (sh_cannot_store_register): Renamed from cannot_store_register,
12809 made static.
12810 (the_low_target): New.
12811 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12812 (the_low_target): New.
12813
128142002-04-09 Daniel Jacobowitz <drow@mvista.com>
12815
12816 * Makefile.in: Add stamp-h target.
12817 * configure.in: Create stamp-h.
12818 * configure: Regenerated.
12819
128202002-04-09 Daniel Jacobowitz <drow@mvista.com>
12821
12822 * inferiors.c: New file.
12823 * target.c: New file.
12824 * target.h: New file.
12825 * Makefile.in: Add target.o and inferiors.o. Update
12826 dependencies.
12827 * linux-low.c (inferior_pid): New static variable,
12828 moved from server.c.
12829 (linux_create_inferior): Renamed from create_inferior.
12830 Call add_inferior. Return 0 on success instead of a PID.
12831 (linux_attach): Renamed from myattach.
12832 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12833 (linux_thread_alive): Renamed from mythread_alive.
12834 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12835 child dies.
12836 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12837 (regsets_store_inferior_registers): Correct error message.
12838 Add missing ``return 0''.
12839 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12840 (linux_store_registers): Renamed from store_inferior_registers.
12841 (linux_read_memory): Renamed from read_inferior_memory.
12842 (linux_write_memory): Renamed from write_inferior_memory.
12843 (linux_target_ops): New structure.
12844 (initialize_low): Call set_target_ops ().
12845 * remote-utils.c (unhexify): New function.
12846 (hexify): New function.
12847 (input_interrupt): Send signals to ``signal_pid''.
12848 * server.c (inferior_pid): Remove.
12849 (start_inferior): Update create_inferior call.
12850 (attach_inferior): Call add_inferior.
12851 (handle_query): New function.
12852 (main): Call handle_query for `q' packets.
12853 * server.h: Include "target.h". Remove obsolete prototypes.
12854 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12855
128562002-04-09 Daniel Jacobowitz <drow@mvista.com>
12857
12858 * Makefile.in: Add WARN_CFLAGS. Update configury
12859 dependencies.
12860 * configure.in: Check for <string.h>
12861 * configure: Regenerate.
12862 * config.in: Regenerate.
12863 * gdbreplay.c: Include needed system headers.
12864 (remote_open): Remove strchr prototype.
12865 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12866 * regcache.c (supply_register): Change buf argument to const void *.
12867 (supply_register_by_name): Likewise.
12868 (collect_register): Change buf argument to void *.
12869 (collect_register_by_name): Likewise.
12870 * regcache.h: Add missing prototypes.
12871 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12872 * server.c (handle_query): New function.
12873 (attached): New static variable, moved out of main.
12874 (main): Quiet longjmp clobber warnings.
12875 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12876 * utils.c (error): Remove NORETURN.
12877 (fatal): Likewise.
This page took 2.229155 seconds and 4 git commands to generate.