]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Fix breakpoint size when stepping over a permanent breakpoint in GDBServer.
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
769ef81f
AT
12015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2
3 * linux-arm-low.c (arm_is_thumb_mode): New function.
4 (arm_breakpoint_at): Use arm_is_thumb_mode.
5 (arm_breakpoint_kind_from_current_state): New function.
6 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
7 Initialize.
8 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
9 (linux_breakpoint_kind_from_current_state): New function.
10 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
11 * linux-low.h (struct linux_target_ops)
12 <breakpoint_kind_from_current_state>: New field.
13 * target.h (struct target_ops): Likewise.
14 (target_breakpoint_kind_from_current_state): New macro.
15
1bebeeca
PA
162015-11-30 Pedro Alves <palves@redhat.com>
17
18 * linux-low.c (linux_resume): Wake up the event loop before
19 returning.
20
a67a9fae
PA
212015-11-30 Pedro Alves <palves@redhat.com>
22
23 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
24 check.
25 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
26 to -1.
27 * target.c (struct thread_search): New structure.
28 (thread_search_callback): New function.
29 (prev_general_thread): New global.
30 (prepare_to_access_memory, done_accessing_memory): New functions.
31 * target.h (prepare_to_access_memory, done_accessing_memory):
32 Replace macros with function declarations.
33
f2faf941
PA
342015-11-30 Pedro Alves <palves@redhat.com>
35
36 PR 14618
37 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
38 report TARGET_WAITKIND_NO_RESUMED.
39 * remote-utils.c (prepare_resume_reply): Handle
40 TARGET_WAITKIND_NO_RESUMED.
41 * server.c (report_no_resumed): New global.
42 (handle_query) <qSupported>: Handle "no-resumed+". Report
43 "no-resumed+" support.
44 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
45 return error if the client doesn't support no-resumed events.
46 (push_stop_notification): New function.
47 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
48 events if the client supports them.
49
a681f9c9
PA
502015-11-30 Pedro Alves <palves@redhat.com>
51
52 * linux-low.c (thread_still_has_status_pending_p): Don't check
53 vCont;t here.
54 (lwp_resumed): New function.
55 (status_pending_p_callback): Return early if the LWP is not
56 supposed to be resumed.
57
65706a29
PA
582015-11-30 Pedro Alves <palves@redhat.com>
59
60 * linux-low.c (handle_extended_wait): Assert that the LWP's
61 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
62 thread create events, leave the new child's status pending.
63 (linux_low_filter_event): If GDB wants to hear about thread exit
64 events, leave the LWP marked dead and don't delete it.
65 (linux_wait_for_event_filtered): Don't check for thread exit.
66 (filter_exit_event): New function.
67 (linux_wait_1): Use it, when returning an exit event.
68 (linux_resume_one_lwp_throw): Assert that the LWP's
69 waitstatus is TARGET_WAITKIND_IGNORE.
70 * remote-utils.c (prepare_resume_reply): Handle
71 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
72 * server.c (report_thread_events): New global.
73 (handle_general_set): Handle QThreadEvents.
74 (handle_query) <qSupported>: Handle and report QThreadEvents+;
75 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
76 TARGET_WAITKIND_THREAD_EXITED.
77 * server.h (report_thread_events): Declare.
78
56cf4bed
PA
792015-11-30 Pedro Alves <palves@redhat.com>
80
81 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
82 the thread's last_resume_kind was resume_stop.
83
500c1d85
PA
842015-11-30 Pedro Alves <palves@redhat.com>
85
86 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
87 before returning.
88
de979965
PA
892015-11-30 Pedro Alves <palves@redhat.com>
90
91 * server.c (handle_v_requests): Handle vCtrlC.
92
34c65914
PA
932015-11-30 Pedro Alves <palves@redhat.com>
94
95 * gdbthread.h (find_any_thread_of_pid): Declare.
96 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
97 functions.
98 * server.c (handle_query): If current_thread is NULL, look for
99 another thread of the selected process.
100
79efa585 1012015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 102 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
103
104 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
105 * server.c (handle_qxfer_threads_worker): Refactor to include thread
106 name in reply.
107 * target.h (struct target_ops) <thread_name>: New field.
108 (target_thread_name): New macro.
109
80d82c19
JB
1102015-11-23 Joel Brobecker <brobecker@adacore.com>
111
112 * regcache.h (regcache_invalidate_pid): Add declaration.
113 * regcache.c (regcache_invalidate_pid): New function, extracted
114 from regcache_invalidate.
115 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
116 Add trivial documentation comment.
117 * lynx-low.c: Use regcache_invalidate_pid instead of
118 regcache_invalidate.
119
64da5dd5
JB
1202015-11-23 Joel Brobecker <brobecker@adacore.com>
121
122 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
123 and Elf64_auxv_t if the target is Android.
124
37ce4055
DE
1252015-11-22 Doug Evans <xdje42@gmail.com>
126
127 * target.h: #include <sys/types.h>.
128
06e03fff
PA
1292015-11-19 Pedro Alves <palves@redhat.com>
130
131 * linux-low.c (linux_process_qsupported): Change prototype.
132 Adjust.
133 * linux-low.h (struct linux_target_ops) <process_qsupported>:
134 Change prototype.
135 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
136 and adjust to loop over all features.
137 * server.c (handle_query) <qSupported>: Adjust to call
138 target_process_qsupported once, passing it a vector of unprocessed
139 features.
140 * target.h (struct target_ops) <process_qsupported>: Change
141 prototype.
142 (target_process_qsupported): Adjust.
143
9a084706
PA
1442015-11-19 Pedro Alves <palves@redhat.com>
145
146 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
147 mode.
148 * configure: Regenerate.
149
dad44a1f
PA
1502015-11-19 Pedro Alves <palves@redhat.com>
151
152 * configure: Regenerate.
153
231c0592
YQ
1542015-11-19 Yao Qi <yao.qi@linaro.org>
155
156 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
157 type to uint32_t.
158
6c1c9a8b
YQ
1592015-11-19 Yao Qi <yao.qi@linaro.org>
160
161 * linux-aarch64-low.c (enum aarch64_operand_type): New.
162 (struct aarch64_operand): Move enum out.
163
9caa3311
YQ
1642015-11-19 Yao Qi <yao.qi@linaro.org>
165
166 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
167 struct user_fpsimd_state *.
168 (aarch64_store_fpregset): Likewise.
169
6a69a054
YQ
1702015-11-19 Yao Qi <yao.qi@linaro.org>
171
172 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
173 struct user_pt_regs *.
174 (aarch64_store_gregset): Likewise.
175
1798301e
PA
1762015-11-18 Pedro Alves <palves@redhat.com>
177
178 * Makefile.in (all_object_files): Add $IPA_OBJS.
179
ce7715e2
PA
1802015-11-17 Pedro Alves <palves@redhat.com>
181
182 * win32-low.c (win32_resume): Use gdb_signal_from_host,
183 GDB_SIGNAL_0 and gdb_signal_to_string.
184
c0879059
PA
1852015-11-17 Pedro Alves <palves@redhat.com>
186
187 * win32-low.c (handle_output_debug_string): Remove parameter.
188 (win32_kill): Remove our_status local and adjust call to
189 handle_output_debug_string.
190 (get_child_debug_event): Adjust call to
191 handle_output_debug_string.
192
1996e237
SM
1932015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
194
195 * linux-mips-low.c (mips_fill_gregset): Add cast.
196 (mips_store_gregset): Likewise.
197 (mips_fill_fpregset): Likewise.
198 (mips_store_fpregset): Likewise.
199
cbec665b
SM
2002015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
201
202 * linux-mips-low.c (mips_add_watchpoint): Rename private to
203 priv.
204
eb3e3c67
SM
2052015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
206
207 * linux-mips-low.c (mips_linux_new_thread): Change type of
208 watch_type to enum target_hw_bp_type.
209
171de4b8
SM
2102015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
211
212 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
213 Change return type to arm_hwbp_type.
214
04248ead
SM
2152015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
216
217 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
218 (arm_store_gregset): Likewise.
219 * linux-arm-low.c (arm_get_hwcap): Likewise.
220 (arm_read_description): Likewise.
221
04b3479c
SM
2222015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
223
224 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
225
2bc84e8a
SM
2262015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
227
228 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
229 (ppc_fill_vsxregset): Likewise.
230 (ppc_store_vsxregset): Likewise.
231 (ppc_fill_vrregset): Likewise.
232 (ppc_store_vrregset): Likewise.
233 (ppc_fill_evrregset): Likewise.
234 (ppc_store_evrregset): Likewise.
235
e6c5bb05
SM
2362015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
237
238 * linux-ppc-low.c (ppc_usrregs_info): Remove
239 forward-declaration.
240 (ppc_arch_setup): Move lower in file.
241
7ea45d72
SM
2422015-10-30 Simon Marchi <simon.marchi@ericsson.com>
243
244 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
245 (ps_pdwrite): Likewise.
246
69291610
HW
2472015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
248
249 * linux-arm-low.c (arm_new_thread): Move pointer dereference
250 to after assert checks.
251
b42945fd
SM
2522015-10-29 Simon Marchi <simon.marchi@ericsson.com>
253
254 * proc-service.c (ps_pdread): Add/adjust casts.
255 (ps_pdwrite): Add/adjust casts.
256
d6f85c84
SM
2572015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
258
259 * server.c (handle_search_memory_1): Cast return value of
260 memmem.
261
f98cd059
SM
2622015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
263
264 * server.c (write_qxfer_response): Change type of data to
265 gdb_byte *.
266
d2412fa5
PA
2672015-10-29 Pedro Alves <palves@redhat.com>
268
269 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
270
c17414a2
PA
2712015-10-29 Pedro Alves <palves@redhat.com>
272
273 * tracepoint.c (clear_installed_tracepoints): Add casts.
274
e053fbc4
PA
2752015-10-29 Pedro Alves <palves@redhat.com>
276
277 * server.c (handle_v_cont, process_serial_event): Add enum
278 gdb_signal casts to signal parsing code.
279
add67df8
PA
2802015-10-29 Pedro Alves <palves@redhat.com>
281
282 * linux-low.h (NULL_REGSET): Define.
283 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
284 * linux-arm-low.c (arm_regsets): Likewise.
285 * linux-crisv32-low.c (cris_regsets): Likewise.
286 * linux-m68k-low.c (m68k_regsets): Likewise.
287 * linux-mips-low.c (mips_regsets): Likewise.
288 * linux-nios2-low.c (nios2_regsets): Likewise.
289 * linux-ppc-low.c (ppc_regsets): Likewise.
290 * linux-s390-low.c (s390_regsets): Likewise.
291 * linux-sh-low.c (sh_regsets): Likewise.
292 * linux-sparc-low.c (sparc_regsets): Likewise.
293 * linux-tic6x-low.c (tic6x_regsets): Likewise.
294 * linux-tile-low.c (tile_regsets): Likewise.
295 * linux-x86-low.c (x86_regsets): Likewise.
296 * linux-xtensa-low.c (xtensa_regsets): Likewise.
297
50bc912a
PA
2982015-10-29 Pedro Alves <palves@redhat.com>
299
300 * linux-low.h (NULL_REGSET): Define.
301 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
302 * linux-arm-low.c (arm_regsets): Likewise.
303 * linux-crisv32-low.c (cris_regsets): Likewise.
304 * linux-m68k-low.c (m68k_regsets): Likewise.
305 * linux-mips-low.c (mips_regsets): Likewise.
306 * linux-nios2-low.c (nios2_regsets): Likewise.
307 * linux-ppc-low.c (ppc_regsets): Likewise.
308 * linux-s390-low.c (s390_regsets): Likewise.
309 * linux-sh-low.c (sh_regsets): Likewise.
310 * linux-sparc-low.c (sparc_regsets): Likewise.
311 * linux-tic6x-low.c (tic6x_regsets): Likewise.
312 * linux-tile-low.c (tile_regsets): Likewise.
313 * linux-x86-low.c (x86_regsets): Likewise.
314 * linux-xtensa-low.c (xtensa_regsets): Likewise.
315
682b2546
DE
3162015-10-26 Doug Evans <dje@google.com>
317
318 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
319
963843d4
DE
3202015-10-26 Doug Evans <dje@google.com>
321
322 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
323
d41401ac
DE
3242015-10-26 Doug Evans <dje@google.com>
325
326 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
327 for debug_printf.
328 (attach_thread, find_new_threads_callback): Ditto.
329
3db28855
AT
3302015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
331
332 * mem-break.h (set_breakpoint_data): Remove.
333
fb78e89c
AT
3342015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
335
336 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
337 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
338 (initialize_low): Remove set_breakpoint_data call.
339 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
340 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
341 (initialize_low): Remove set_breakpoint_data call.
342 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
343 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
344 (initialize_low): Remove set_breakpoint_data call.
345
2e6ee069
AT
3462015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
347
348 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
349 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
350 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
351 * target.h (target_breakpoint_kind_from_pc): New macro.
352
1652a986
AT
3532015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
354
355 * linux-low.c (default_breakpoint_kind_from_pc): New function.
356 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
357 the default breakpoint kind.
358
abeead09
AT
3592015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
360
361 * linux-arm-low.c (arm_supports_z_point_type): Add software
362 breakpoint support.
363
b0b4b501
AT
3642015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
365
366 * linux-arm-low.c: Refactor breakpoint definitions.
367 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
368 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
369
8689682c
AT
3702015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
371
372 * Makefile.in: Add arm.c/o.
373 * configure.srv: Likewise.
374 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
375 (arm_breakpoint_kind_from_pc): New function.
376 (arm_sw_breakpoint_from_kind): Return proper kind.
377 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
378
27165294
AT
3792015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
380
381 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
382 removal.
383 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
384 (struct raw_breakpoint) <size>: Remove.
385 (struct raw_breakpoint) <kind>: Add.
386 (bp_size): New function.
387 (bp_opcode): Likewise.
388 (find_raw_breakpoint_at): Adjust for kind.
389 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
390 (remove_memory_breakpoint): Adjust for kind call bp_size.
391 (set_raw_breakpoint_at): Adjust for kind.
392 (set_breakpoint): Likewise.
393 (set_breakpoint_at): Call breakpoint_kind_from_pc.
394 (delete_raw_breakpoint): Adjust for kind.
395 (delete_breakpoint): Likewise.
396 (find_gdb_breakpoint): Likewise.
397 (set_gdb_breakpoint_1): Likewise.
398 (set_gdb_breakpoint): Likewise.
399 (delete_gdb_breakpoint_1): Likewise.
400 (delete_gdb_breakpoint): Likewise.
401 (uninsert_raw_breakpoint): Likewise.
402 (reinsert_raw_breakpoint): Likewise.
403 (set_breakpoint_data): Remove.
404 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
405 (check_mem_read): Adjust for kind call bp_size.
406 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
407 (clone_one_breakpoint): Adjust for kind.
408 * mem-break.h (set_gdb_breakpoint): Likewise.
409 (delete_gdb_breakpoint): Likewise.
410 * server.c (process_serial_event): Likewise.
411
dd373349
AT
4122015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
413
414 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
415 (struct linux_target_ops) <breakpoint>: Remove.
416 (struct linux_target_ops) <breakpoint_len>: Remove.
417 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
418 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
419 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
420 (arm_sw_breakpoint_from_kind): New function.
421 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
422 (struct linux_target_ops) <breakpoint>: Remove.
423 (struct linux_target_ops) <breakpoint_len>: Remove.
424 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
425 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
426 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
427 (struct linux_target_ops) <breakpoint>: Remove.
428 (struct linux_target_ops) <breakpoint_len>: Remove.
429 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
430 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
431 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
432 (struct linux_target_ops) <breakpoint>: Remove.
433 (struct linux_target_ops) <breakpoint_len>: Remove.
434 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
435 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
436 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
437 and sw_breakpoint_from_kind to increment the pc.
438 (linux_breakpoint_kind_from_pc): New function.
439 (linux_sw_breakpoint_from_kind): New function.
440 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
441 (initialize_low): Call breakpoint_kind_from_pc and
442 sw_breakpoint_from_kind to replace breakpoint_data/len.
443 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
444 New field.
445 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
446 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
447 (struct linux_target_ops) <breakpoint>: Remove.
448 (struct linux_target_ops) <breakpoint_len>: Remove.
449 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
450 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
451 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
452 (struct linux_target_ops) <breakpoint>: Remove.
453 (struct linux_target_ops) <breakpoint_len>: Remove.
454 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
455 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
456 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
457 (struct linux_target_ops) <breakpoint>: Remove.
458 (struct linux_target_ops) <breakpoint_len>: Remove.
459 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
460 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
461 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
462 (struct linux_target_ops) <breakpoint>: Remove.
463 (struct linux_target_ops) <breakpoint_len>: Remove.
464 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
465 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
466 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
467 (struct linux_target_ops) <breakpoint>: Remove.
468 (struct linux_target_ops) <breakpoint_len>: Remove.
469 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
470 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
471 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
472 (struct linux_target_ops) <breakpoint>: Remove.
473 (struct linux_target_ops) <breakpoint_len>: Remove.
474 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
475 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
476 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
477 (struct linux_target_ops) <breakpoint>: Remove.
478 (struct linux_target_ops) <breakpoint_len>: Remove.
479 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
480 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
481 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
482 (struct linux_target_ops) <breakpoint>: Remove.
483 (struct linux_target_ops) <breakpoint_len>: Remove.
484 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
485 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
486 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
487 (struct linux_target_ops) <breakpoint>: Remove.
488 (struct linux_target_ops) <breakpoint_len>: Remove.
489 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
490 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
491 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
492 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
493 (struct linux_target_ops) <breakpoint>: Remove.
494 (struct linux_target_ops) <breakpoint_len>: Remove.
495 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
496 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
497 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
498 (struct linux_target_ops) <breakpoint>: Remove.
499 (struct linux_target_ops) <breakpoint_len>: Remove.
500 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
501 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
502
4cd98a19
AT
5032015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
504
505 * linux-cris-low.c (cris_get_pc): Remove void arg.
506
774ee6d2
AR
5072015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
508
509 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
510 variable name.
511
833dcd29
AR
5122015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
513
514 * inferiors.c (thread_pid_matches_callback): New function.
515 (find_thread_process): New function.
516 (remove_thread): Reset current_thread.
517 (remove_process): Assert threads have been removed first.
518
8d689ee5
YQ
5192015-10-15 Yao Qi <yao.qi@linaro.org>
520
521 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
522 if it is 3.
523 (aarch64_remove_point): Likewise.
524 * regcache.c (regcache_register_size): New function.
525
1c2e1515
YQ
5262015-10-12 Yao Qi <yao.qi@linaro.org>
527
528 * linux-aarch64-low.c: Update all callers as emit_load_store
529 is renamed to aarch64_emit_load_store.
530
e1c587c3
YQ
5312015-10-12 Yao Qi <yao.qi@linaro.org>
532
533 * linux-aarch64-low.c: Update all callers of function renaming
534 from emit_insn to aarch64_emit_insn.
535
b6542f81
YQ
5362015-10-12 Yao Qi <yao.qi@linaro.org>
537
538 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
539 arch/aarch64-insn.h.
540 (struct aarch64_memory_operand): Likewise.
541 (ENCODE): Likewise.
542 (emit_insn): Move to arch/aarch64-insn.c.
543 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
544 (emit_load_store): Move to arch/aarch64-insn.c.
545 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
546 (can_encode_int32): Remove.
547
246994ce
YQ
5482015-10-12 Yao Qi <yao.qi@linaro.org>
549
550 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
551 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
552 (aarch64_relocate_instruction): Likewise.
553 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
554 (struct aarch64_insn_visitor): Likewise.
555
0badd99f
YQ
5562015-10-12 Yao Qi <yao.qi@linaro.org>
557
558 * linux-aarch64-low.c (struct aarch64_insn_data): New.
559 (struct aarch64_insn_visitor): New.
560 (struct aarch64_insn_relocation_data): New.
561 (aarch64_ftrace_insn_reloc_b): New function.
562 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
563 (aarch64_ftrace_insn_reloc_cb): Likewise.
564 (aarch64_ftrace_insn_reloc_tb): Likewise.
565 (aarch64_ftrace_insn_reloc_adr): Likewise.
566 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
567 (aarch64_ftrace_insn_reloc_others): Likewise.
568 (visitor): New.
569 (aarch64_relocate_instruction): Use visitor.
570
dfaffe9d
YQ
5712015-10-12 Yao Qi <yao.qi@linaro.org>
572
573 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
574 int. Add argument buf.
575 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
576 aarch64_relocate_instruction.
577
70b439f0
YQ
5782015-10-12 Yao Qi <yao.qi@linaro.org>
579
580 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
581 argument insn. Remove local variable insn. Don't call
582 target_read_uint32.
583 (aarch64_install_fast_tracepoint_jump_pad): Call
584 target_read_uint32.
585
7781c06f
YQ
5862015-09-30 Yao Qi <yao.qi@linaro.org>
587
588 * linux-aarch64-low.c (emit_movk): Shorten a long line.
589 (emit_load_store_pair): Likewise.
590
9a3c8263
SM
5912015-09-25 Simon Marchi <simon.marchi@ericsson.com>
592
593 * dll.c (match_dll): Add cast(s).
594 (unloaded_dll): Likewise.
595 * linux-low.c (second_thread_of_pid_p): Likewise.
596 (delete_lwp_callback): Likewise.
597 (count_events_callback): Likewise.
598 (select_event_lwp_callback): Likewise.
599 (linux_set_resume_request): Likewise.
600 * server.c (accumulate_file_name_length): Likewise.
601 (emit_dll_description): Likewise.
602 (handle_qxfer_threads_worker): Likewise.
603 (visit_actioned_threads): Likewise.
604 * thread-db.c (any_thread_of): Likewise.
605 * tracepoint.c (same_process_p): Likewise.
606 (match_blocktype): Likewise.
607 (build_traceframe_info_xml): Likewise.
608
224c3ddb
SM
6092015-09-25 Simon Marchi <simon.marchi@ericsson.com>
610
611 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
612 assignment.
613 (gdb_unparse_agent_expr): Likewise.
614 * hostio.c (require_data): Likewise.
615 (handle_pread): Likewise.
616 * linux-low.c (disable_regset): Likewise.
617 (fetch_register): Likewise.
618 (store_register): Likewise.
619 (get_dynamic): Likewise.
620 (linux_qxfer_libraries_svr4): Likewise.
621 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
622 (set_fast_tracepoint_jump): Likewise.
623 (uninsert_fast_tracepoint_jumps_at): Likewise.
624 (reinsert_fast_tracepoint_jumps_at): Likewise.
625 (validate_inserted_breakpoint): Likewise.
626 (clone_agent_expr): Likewise.
627 * regcache.c (init_register_cache): Likewise.
628 * remote-utils.c (putpkt_binary_1): Likewise.
629 (decode_M_packet): Likewise.
630 (decode_X_packet): Likewise.
631 (look_up_one_symbol): Likewise.
632 (relocate_instruction): Likewise.
633 (monitor_output): Likewise.
634 * server.c (handle_search_memory): Likewise.
635 (handle_qxfer_exec_file): Likewise.
636 (handle_qxfer_libraries): Likewise.
637 (handle_qxfer): Likewise.
638 (handle_query): Likewise.
639 (handle_v_cont): Likewise.
640 (handle_v_run): Likewise.
641 (captured_main): Likewise.
642 * target.c (write_inferior_memory): Likewise.
643 * thread-db.c (try_thread_db_load_from_dir): Likewise.
644 * tracepoint.c (init_trace_buffer): Likewise.
645 (add_tracepoint_action): Likewise.
646 (add_traceframe): Likewise.
647 (add_traceframe_block): Likewise.
648 (cmd_qtdpsrc): Likewise.
649 (cmd_qtdv): Likewise.
650 (cmd_qtstatus): Likewise.
651 (response_source): Likewise.
652 (response_tsv): Likewise.
653 (cmd_qtnotes): Likewise.
654 (gdb_collect): Likewise.
655 (initialize_tracepoint): Likewise.
656
afbe19f8
PL
6572015-09-21 Pierre Langlois <pierre.langlois@arm.com>
658
659 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
660 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
661 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
662 <NOP>: New.
663 (enum aarch64_condition_codes): New enum.
664 (w0): New static global.
665 (fp): Likewise.
666 (lr): Likewise.
667 (struct aarch64_memory_operand) <type>: New
668 MEMORY_OPERAND_POSTINDEX type.
669 (postindex_memory_operand): New helper function.
670 (emit_ret): New function.
671 (emit_load_store_pair): New function, factored out of emit_stp
672 with support for MEMORY_OPERAND_POSTINDEX.
673 (emit_stp): Rewrite using emit_load_store_pair.
674 (emit_ldp): New function.
675 (emit_load_store): Likewise.
676 (emit_ldr): Mention post-index instruction in comment.
677 (emit_ldrh): New function.
678 (emit_ldrb): New function.
679 (emit_ldrsw): Mention post-index instruction in comment.
680 (emit_str): Likewise.
681 (emit_subs): New function.
682 (emit_cmp): Likewise.
683 (emit_and): Likewise.
684 (emit_orr): Likewise.
685 (emit_orn): Likewise.
686 (emit_eor): Likewise.
687 (emit_mvn): Likewise.
688 (emit_lslv): Likewise.
689 (emit_lsrv): Likewise.
690 (emit_asrv): Likewise.
691 (emit_mul): Likewise.
692 (emit_sbfm): Likewise.
693 (emit_sbfx): Likewise.
694 (emit_ubfm): Likewise.
695 (emit_ubfx): Likewise.
696 (emit_csinc): Likewise.
697 (emit_cset): Likewise.
698 (emit_nop): Likewise.
699 (emit_ops_insns): New helper function.
700 (emit_pop): Likewise.
701 (emit_push): Likewise.
702 (aarch64_emit_prologue): New function.
703 (aarch64_emit_epilogue): Likewise.
704 (aarch64_emit_add): Likewise.
705 (aarch64_emit_sub): Likewise.
706 (aarch64_emit_mul): Likewise.
707 (aarch64_emit_lsh): Likewise.
708 (aarch64_emit_rsh_signed): Likewise.
709 (aarch64_emit_rsh_unsigned): Likewise.
710 (aarch64_emit_ext): Likewise.
711 (aarch64_emit_log_not): Likewise.
712 (aarch64_emit_bit_and): Likewise.
713 (aarch64_emit_bit_or): Likewise.
714 (aarch64_emit_bit_xor): Likewise.
715 (aarch64_emit_bit_not): Likewise.
716 (aarch64_emit_equal): Likewise.
717 (aarch64_emit_less_signed): Likewise.
718 (aarch64_emit_less_unsigned): Likewise.
719 (aarch64_emit_ref): Likewise.
720 (aarch64_emit_if_goto): Likewise.
721 (aarch64_emit_goto): Likewise.
722 (aarch64_write_goto_address): Likewise.
723 (aarch64_emit_const): Likewise.
724 (aarch64_emit_call): Likewise.
725 (aarch64_emit_reg): Likewise.
726 (aarch64_emit_pop): Likewise.
727 (aarch64_emit_stack_flush): Likewise.
728 (aarch64_emit_zero_ext): Likewise.
729 (aarch64_emit_swap): Likewise.
730 (aarch64_emit_stack_adjust): Likewise.
731 (aarch64_emit_int_call_1): Likewise.
732 (aarch64_emit_void_call_2): Likewise.
733 (aarch64_emit_eq_goto): Likewise.
734 (aarch64_emit_ne_goto): Likewise.
735 (aarch64_emit_lt_goto): Likewise.
736 (aarch64_emit_le_goto): Likewise.
737 (aarch64_emit_gt_goto): Likewise.
738 (aarch64_emit_ge_got): Likewise.
739 (aarch64_emit_ops_impl): New static global variable.
740 (aarch64_emit_ops): New target function, return
741 &aarch64_emit_ops_impl.
742 (struct linux_target_ops): Install it.
743
bb903df0
PL
7442015-09-21 Pierre Langlois <pierre.langlois@arm.com>
745
746 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
747 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
748 aarch64-ipa.o.
749 * linux-aarch64-ipa.c: New file.
750 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
751 and endian.h.
752 (aarch64_get_thread_area): New target method.
753 (extract_signed_bitfield): New helper function.
754 (aarch64_decode_ldr_literal): New function.
755 (enum aarch64_opcodes): New enum.
756 (struct aarch64_register): New struct.
757 (struct aarch64_operand): New struct.
758 (x0): New static global.
759 (x1): Likewise.
760 (x2): Likewise.
761 (x3): Likewise.
762 (x4): Likewise.
763 (w2): Likewise.
764 (ip0): Likewise.
765 (sp): Likewise.
766 (xzr): Likewise.
767 (aarch64_register): New helper function.
768 (register_operand): Likewise.
769 (immediate_operand): Likewise.
770 (struct aarch64_memory_operand): New struct.
771 (offset_memory_operand): New helper function.
772 (preindex_memory_operand): Likewise.
773 (enum aarch64_system_control_registers): New enum.
774 (ENCODE): New macro.
775 (emit_insn): New helper function.
776 (emit_b): New function.
777 (emit_bcond): Likewise.
778 (emit_cb): Likewise.
779 (emit_tb): Likewise.
780 (emit_blr): Likewise.
781 (emit_stp): Likewise.
782 (emit_ldp_q_offset): Likewise.
783 (emit_stp_q_offset): Likewise.
784 (emit_load_store): Likewise.
785 (emit_ldr): Likewise.
786 (emit_ldrsw): Likewise.
787 (emit_str): Likewise.
788 (emit_ldaxr): Likewise.
789 (emit_stxr): Likewise.
790 (emit_stlr): Likewise.
791 (emit_data_processing_reg): Likewise.
792 (emit_data_processing): Likewise.
793 (emit_add): Likewise.
794 (emit_sub): Likewise.
795 (emit_mov): Likewise.
796 (emit_movk): Likewise.
797 (emit_mov_addr): Likewise.
798 (emit_mrs): Likewise.
799 (emit_msr): Likewise.
800 (emit_sevl): Likewise.
801 (emit_wfe): Likewise.
802 (append_insns): Likewise.
803 (can_encode_int32_in): New helper function.
804 (aarch64_relocate_instruction): New function.
805 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
806 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
807 (struct linux_target_ops): Install aarch64_get_thread_area,
808 aarch64_install_fast_tracepoint_jump_pad and
809 aarch64_get_min_fast_tracepoint_insn_len.
810
787749ea
PL
8112015-09-21 Pierre Langlois <pierre.langlois@arm.com>
812
813 * Makefile.in (aarch64-insn.o): New rule.
814 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
815
9812b2e6
YQ
8162015-09-21 Yao Qi <yao.qi@linaro.org>
817
818 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
819
18fe412b
YQ
8202015-09-21 Yao Qi <yao.qi@linaro.org>
821
822 * tracepoint.c (max_jump_pad_size): Remove.
823
a0cc84cd
YQ
8242015-09-18 Yao Qi <yao.qi@linaro.org>
825
826 * linux-aarch64-low.c: Don't include sys/uio.h.
827 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
828
d78908cf
WW
8292015-09-16 Wei-cheng Wang <cole945@gmail.com>
830
831 * tracepoint.c (eval_result_type): Change prototype.
832 (condition_true_at_tracepoint): Fix argument to compiled_cond.
833
d57e0d50
PA
8342015-09-15 Pedro Alves <palves@redhat.com>
835
836 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
837 Check whether to report exec events instead of checking whether
838 multiprocess is enabled.
839
5a676acc
PA
8402015-09-15 Pedro Alves <palves@redhat.com>
841
842 PR remote/18965
843 * remote-utils.c (prepare_resume_reply): Merge
844 TARGET_WAITKIND_VFORK_DONE switch case with the
845 TARGET_WAITKIND_FORKED case.
846
7c5d0fad
YQ
8472015-09-15 Yao Qi <yao.qi@linaro.org>
848
849 * server.c (handle_query): Check string comparison using
850 "else if" instead of "if".
851
750ce8d1
YQ
8522015-09-15 Yao Qi <yao.qi@linaro.org>
853
854 * server.c (vCont_supported): New global variable.
855 (handle_query): Set vCont_supported to 1 if "vContSupported+"
856 matches. Append ";vContSupported+" to own_buf.
857 (handle_v_requests): Append ";s;S" to own_buf if target supports
858 hardware single step or vCont_supported is false.
859 (capture_main): Set vCont_supported to zero.
860
70b90b91
YQ
8612015-09-15 Yao Qi <yao.qi@linaro.org>
862
863 * linux-low.c (linux_supports_conditional_breakpoints): Rename
864 it to ...
865 (linux_supports_hardware_single_step): ... New function.
866 (linux_target_ops): Update.
867 * lynx-low.c (lynx_target_ops): Set field
868 supports_hardware_single_step to target_can_do_hardware_single_step.
869 * nto-low.c (nto_target_ops): Likewise.
870 * spu-low.c (spu_target_ops): Likewise.
871 * win32-low.c (win32_target_ops): Likewise.
872 * target.c (target_can_do_hardware_single_step): New function.
873 * target.h (struct target_ops) <supports_conditional_breakpoints>:
874 Remove. <supports_hardware_single_step>: New field.
875 (target_supports_conditional_breakpoints): Remove.
876 (target_supports_hardware_single_step): New macro.
877 (target_can_do_hardware_single_step): Declare.
878 * server.c (handle_query): Use target_supports_hardware_single_step
879 instead of target_supports_conditional_breakpoints.
880
ade90bde
YQ
8812015-09-15 Yao Qi <yao.qi@linaro.org>
882
883 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
884 function.
885 (struct linux_target_ops the_low_target): Install
886 aarch64_linux_siginfo_fixup.
887
94585166
DB
8882015-09-11 Don Breazeal <donb@codesourcery.com>
889 Luis Machado <lgustavo@codesourcery.com>
890
891 * linux-low.c (linux_mourn): Static declaration.
892 (linux_arch_setup): Move in front of
893 handle_extended_wait.
894 (linux_arch_setup_thread): New function.
895 (handle_extended_wait): Handle exec events. Call
896 linux_arch_setup_thread. Make event_lwp argument a
897 pointer-to-a-pointer.
898 (check_zombie_leaders): Do not check stopped threads.
899 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
900 (linux_low_filter_event): Add lwp and thread for exec'ing
901 non-leader thread if leader thread has been deleted.
902 Refactor code into linux_arch_setup_thread and call it.
903 Pass child lwp pointer by reference to handle_extended_wait.
904 (linux_wait_for_event_filtered): Update comment.
905 (linux_wait_1): Prevent clobbering exec event status.
906 (linux_supports_exec_events): New function.
907 (linux_target_ops) <supports_exec_events>: Initialize new member.
908 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
909 new member.
910 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
911 * server.c (report_exec_events): New global variable.
912 (handle_query): Handle qSupported query for exec-events feature.
913 (captured_main): Initialize report_exec_events.
914 * server.h (report_exec_events): Declare new global variable.
915 * target.h (struct target_ops) <supports_exec_events>: New
916 member.
917 (target_supports_exec_events): New macro.
918 * win32-low.c (win32_target_ops) <supports_exec_events>:
919 Initialize new member.
920
0568462b
MM
9212015-09-09 Markus Metzger <markus.t.metzger@intel.com>
922
923 * linux-low.c (linux_low_enable_btrace): Remove.
924 (linux_target_ops): Replace linux_low_enable_btrace with
925 linux_enable_btrace.
926
39edd165
YQ
9272015-09-03 Yao Qi <yao.qi@linaro.org>
928
929 * linux-aarch64-low.c (aarch64_insert_point): Call
930 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
931 returns true.
932
1db33b5a
UW
9332015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
934
935 * linux-low.c (check_stopped_by_breakpoint): Use
936 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
937
ab290430
PA
9382015-08-27 Pedro Alves <palves@redhat.com>
939
940 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
941
8d749320
SM
9422015-08-26 Simon Marchi <simon.marchi@ericsson.com>
943
6711b7f8
SM
944 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
945 the XNEW-family equivalent.
8d749320
SM
946 (compile_bytecodes): Likewise.
947 * dll.c (loaded_dll): Likewise.
948 * event-loop.c (append_callback_event): Likewise.
949 (create_file_handler): Likewise.
950 (create_file_event): Likewise.
951 * hostio.c (handle_open): Likewise.
952 * inferiors.c (add_thread): Likewise.
953 (add_process): Likewise.
954 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
955 * linux-arm-low.c (arm_new_process): Likewise.
956 (arm_new_thread): Likewise.
957 * linux-low.c (add_to_pid_list): Likewise.
958 (linux_add_process): Likewise.
959 (handle_extended_wait): Likewise.
960 (add_lwp): Likewise.
961 (enqueue_one_deferred_signal): Likewise.
962 (enqueue_pending_signal): Likewise.
963 (linux_resume_one_lwp_throw): Likewise.
964 (linux_resume_one_thread): Likewise.
965 (linux_read_memory): Likewise.
966 (linux_write_memory): Likewise.
967 * linux-mips-low.c (mips_linux_new_process): Likewise.
968 (mips_linux_new_thread): Likewise.
969 (mips_add_watchpoint): Likewise.
970 * linux-x86-low.c (initialize_low_arch): Likewise.
971 * lynx-low.c (lynx_add_process): Likewise.
972 * mem-break.c (set_raw_breakpoint_at): Likewise.
973 (set_breakpoint): Likewise.
974 (add_condition_to_breakpoint): Likewise.
975 (add_commands_to_breakpoint): Likewise.
976 (clone_agent_expr): Likewise.
977 (clone_one_breakpoint): Likewise.
978 * regcache.c (new_register_cache): Likewise.
979 * remote-utils.c (look_up_one_symbol): Likewise.
980 * server.c (queue_stop_reply): Likewise.
981 (start_inferior): Likewise.
982 (queue_stop_reply_callback): Likewise.
983 (handle_target_event): Likewise.
984 * spu-low.c (fetch_ppc_memory): Likewise.
985 (store_ppc_memory): Likewise.
986 * target.c (set_target_ops): Likewise.
987 * thread-db.c (thread_db_load_search): Likewise.
988 (try_thread_db_load_1): Likewise.
989 * tracepoint.c (add_tracepoint): Likewise.
990 (add_tracepoint_action): Likewise.
991 (create_trace_state_variable): Likewise.
992 (cmd_qtdpsrc): Likewise.
993 (cmd_qtro): Likewise.
994 (add_while_stepping_state): Likewise.
995 * win32-low.c (child_add_thread): Likewise.
996 (get_image_name): Likewise.
997
ed8b7b42
YQ
9982015-08-25 Yao Qi <yao.qi@linaro.org>
999
1000 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1001
db3cb7cb
YQ
10022015-08-25 Yao Qi <yao.qi@linaro.org>
1003
1004 * Makefile.in (aarch64-linux.o): New rule.
1005 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1006 srv_tgtobj.
1007 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1008 (aarch64_init_debug_reg_state): Make it extern.
1009 (aarch64_linux_prepare_to_resume): Remove.
1010
f6011a1c
YQ
10112015-08-25 Yao Qi <yao.qi@linaro.org>
1012
1013 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1014 lwp_arch_private_info and ptid_of_lwp.
1015
88e2cf7e
YQ
10162015-08-25 Yao Qi <yao.qi@linaro.org>
1017
1018 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1019 Find proc_info by find_process_pid. All callers updated.
1020
5e35436e
YQ
10212015-08-25 Yao Qi <yao.qi@linaro.org>
1022
1023 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1024 Remove.
1025 (debug_reg_change_callback): Remove.
1026 (aarch64_notify_debug_reg_change): Remove.
1027
4a8a7965
YQ
10282015-08-25 Yao Qi <yao.qi@linaro.org>
1029
1030 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1031 Call current_lwp_ptid.
1032
32a271ee
YQ
10332015-08-25 Yao Qi <yao.qi@linaro.org>
1034
1035 * linux-aarch64-low.c (debug_reg_change_callback): Use
1036 debug_printf.
1037
0d51c8d7
YQ
10382015-08-25 Yao Qi <yao.qi@linaro.org>
1039
1040 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1041
31a43dd5
YQ
10422015-08-25 Yao Qi <yao.qi@linaro.org>
1043
1044 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1045
8ee52567
YQ
10462015-08-25 Yao Qi <yao.qi@linaro.org>
1047
1048 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1049 the code.
1050
ff3f0f45
YQ
10512015-08-25 Yao Qi <yao.qi@linaro.org>
1052
1053 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1054 Remove.
1055 (debug_reg_change_callback): Remove argument entry and add argument
1056 lwp. Remove local variable thread. Don't print thread id in the
1057 debugging output. Don't check whether pid of thread equals to pid.
1058 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
1059 iterate_over_lwps instead find_inferior.
1060
3d40fbb5
PA
10612015-08-24 Pedro Alves <palves@redhat.com>
1062
1063 * inferiors.c (get_first_process): New function.
1064 * inferiors.h (get_first_process): New declaration.
1065 * remote-utils.c (read_ptid): Default to the first process in the
1066 list, instead of to the current thread's process.
1067
438e1e42
PA
10682015-08-24 Pedro Alves <palves@redhat.com>
1069
1070 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1071 * event-loop.c: Likewise.
1072 * remote-utils.c: Likewise.
1073 * tracepoint.c: Likewise.
1074
a8c6d4fc
PA
10752015-08-24 Pedro Alves <palves@redhat.com>
1076
1077 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1078 ptid_get_lwp.
1079
99b0bb12
PA
10802015-08-21 Pedro Alves <palves@redhat.com>
1081
1082 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1083 instead of literal 1.
1084
f8904751
PA
10852015-08-21 Pedro Alves <palves@redhat.com>
1086
1087 * tdesc.c (default_description): Explicitly zero-initialize.
1088
465a859e
PA
10892015-08-21 Pedro Alves <palves@redhat.com>
1090
1091 PR gdb/18749
1092 * inferiors.c (remove_thread): Discard any pending stop reply for
1093 this thread.
1094 * server.c (remove_all_on_match_pid): Rename to ...
1095 (remove_all_on_match_ptid): ... this. Work with a filter ptid
1096 instead of a pid.
1097 (discard_queued_stop_replies): Change parameter to a ptid. Now
1098 extern.
1099 (handle_v_kill, kill_inferior_callback, captured_main)
1100 (process_serial_event): Adjust.
1101 * server.h (discard_queued_stop_replies): Declare.
1102
f0db101d
PA
11032015-08-21 Pedro Alves <palves@redhat.com>
1104
1105 * linux-low.c (wait_for_sigstop): Always switch to no thread
1106 selected if the previously current thread dies.
1107 * lynx-low.c (lynx_request_interrupt): Use the first thread's
1108 process instead of the current thread's.
1109 * remote-utils.c (input_interrupt): Don't check if there's no
1110 current thread.
1111 * server.c (gdb_read_memory, gdb_write_memory): If setting the
1112 current thread to the general thread fails, error out.
1113 (handle_qxfer_auxv, handle_qxfer_libraries)
1114 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1115 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1116 (handle_query): Check if there's a thread selected instead of
1117 checking whether there's any thread in the thread list.
1118 (handle_qxfer_threads, handle_qxfer_btrace)
1119 (handle_qxfer_btrace_conf): Don't error out early if there's no
1120 thread in the thread list.
1121 (handle_v_cont, myresume): Don't set the current thread to the
1122 continue thread.
1123 (process_serial_event) <Hg handling>: Also set thread_id if the
1124 previous general thread is still alive.
1125 (process_serial_event) <g/G handling>: If setting the current
1126 thread to the general thread fails, error out.
1127 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1128 thread's lwp instead of the current thread's.
1129 * target.c (set_desired_thread): If the desired thread was not
1130 found, leave the current thread pointing to NULL. Return an int
1131 (boolean) indicating success.
1132 * target.h (set_desired_thread): Change return type to int.
1133
40045d91
MF
11342015-08-20 Max Filippov <jcmvbkbc@gmail.com>
1135
1136 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1137 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1138 #includes.
1139 (ps_get_thread_area): New function.
1140
45face3b
GB
11412015-08-19 Gary Benson <gbenson@redhat.com>
1142
1143 * hostio.c (handle_pread): Do not attempt to read more data
1144 than hostio_reply_with_data can fit in a packet.
1145
16d5f642
JB
11462015-08-18 Joel Brobecker <brobecker@adacore.com>
1147
1148 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1149
a738da3a
MF
11502015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1151
1152 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1153
33ebda9d
PA
11542015-08-06 Pedro Alves <palves@redhat.com>
1155
1156 * tracepoint.c (expr_eval_result): Now an int.
1157
a44892be
PA
11582015-08-06 Pedro Alves <palves@redhat.com>
1159
1160 * gdbthread.h (struct regcache): Forward declare.
1161 (struct thread_info) <regcache_data>: Now a struct regcache
1162 pointer.
1163 * inferiors.c (inferior_regcache_data)
1164 (set_inferior_regcache_data): Now work with struct regcache
1165 pointers.
1166 * inferiors.h (struct regcache): Forward declare.
1167 (inferior_regcache_data, set_inferior_regcache_data): Now work
1168 with struct regcache pointers.
1169 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1170 (free_register_cache_thread): Remove struct regcache pointer
1171 casts.
1172
608a1e46
PA
11732015-08-06 Pedro Alves <palves@redhat.com>
1174
1175 * server.c (captured_main): On error, print the exception message
1176 to stderr, and if run_once is set, throw a quit.
1177
f0ce0d3a
PA
11782015-08-06 Pedro Alves <palves@redhat.com>
1179
1180 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1181 the current thread.
1182
bf47e248
PA
11832015-08-06 Pedro Alves <palves@redhat.com>
1184
1185 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1186 reading beyond the passed in buffer length.
1187
b6b9ffcc
PL
11882015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1189
1190 * tracepoint.c (symbol_list) <required>: Remove.
1191
863d01bd
PA
11922015-08-06 Pedro Alves <palves@redhat.com>
1193
1194 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1195 count if stopping and suspending threads.
1196 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1197 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1198 (linux_detach): Complete an ongoing step-over.
1199 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1200 throughout.
1201 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1202 (linux_wait_1): If passing a signal to the inferior after
1203 finishing a step-over, unsuspend and re-resume all lwps. If we
1204 see a single-step event but the thread should be continuing, don't
1205 pass the trap to gdb.
1206 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1207 internal_error instead of gdb_assert.
1208 (enqueue_pending_signal): New function.
1209 (check_ptrace_stopped_lwp_gone): Add debug output.
1210 (start_step_over): Use internal_error instead of gdb_assert.
1211 (complete_ongoing_step_over): New function.
1212 (linux_resume_one_thread): Don't resume a suspended thread.
1213 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1214 it stepping.
1215
00db26fa
PA
12162015-08-06 Pedro Alves <palves@redhat.com>
1217
1218 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1219 (linux_thread_alive): Use lwp_is_marked_dead.
1220 (extended_event_reported): Delete.
1221 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1222 instead of extended_event_reported.
1223 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1224 as well.
1225 (lwp_is_marked_dead): New function.
1226 (lwp_running): Use lwp_is_marked_dead.
1227 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1228 comment.
1229
ad071a30
PA
12302015-08-06 Pedro Alves <palves@redhat.com>
1231
1232 * linux-low.c (linux_wait_1): Move fork event output out of the
1233 !report_to_gdb check. Pass event_child->waitstatus to
1234 target_waitstatus_to_string instead of ourstatus.
1235
524b57e6
YQ
12362015-08-04 Yao Qi <yao.qi@linaro.org>
1237
1238 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1239 if current_thread is 32 bit.
1240
6085d6f6
YQ
12412015-08-04 Yao Qi <yao.qi@linaro.org>
1242
1243 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1244 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1245 * server.c (extended_protocol): Remove "static".
1246 * server.h (extended_protocol): Declare it.
1247
8a7e4587
YQ
12482015-08-04 Yao Qi <yao.qi@linaro.org>
1249
1250 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1251 both aarch64 and aarch32.
1252 (aarch64_set_pc): Likewise.
1253
3b53ae99
YQ
12542015-08-04 Yao Qi <yao.qi@linaro.org>
1255
1256 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1257 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1258 arm-with-neon.xml to srv_xmlfiles.
1259 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1260 (is_64bit_tdesc): New function.
1261 (aarch64_linux_read_description): New function.
1262 (aarch64_arch_setup): Call aarch64_linux_read_description.
1263 (regs_info): Rename to regs_info_aarch64.
1264 (aarch64_regs_info): Return right regs_info.
1265 (initialize_low_arch): Call initialize_low_arch_aarch32.
1266
bd9e6534
YQ
12672015-08-04 Yao Qi <yao.qi@linaro.org>
1268
1269 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1270 * linux-aarch32-low.c: New file.
1271 * linux-aarch32-low.h: New file.
1272 * linux-arm-low.c (arm_fill_gregset): Move it to
1273 linux-aarch32-low.c.
1274 (arm_store_gregset): Likewise.
1275 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1276 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1277 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1278 (regs_info): Rename to regs_info_arm.
1279 (arm_regs_info): Return regs_info_aarch32 if
1280 have_ptrace_getregset is 1 and target description is
1281 arm_with_neon or arm_with_vfpv3.
1282 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1283 Call initialize_low_arch_aarch32 instead.
1284
ded48a5e
YQ
12852015-08-04 Yao Qi <yao.qi@linaro.org>
1286
1287 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1288 * linux-low.c: ... here.
1289 * linux-low.h (have_ptrace_getregset): Declare it.
1290
96e9210f
PA
12912015-08-04 Pedro Alves <palves@redhat.com>
1292
1293 * thread-db.c (struct thread_db): Use new typedefs.
1294 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1295 CHK calls.
1296 (disable_thread_event_reporting): Cast result of dlsym to
1297 destination function pointer type.
1298 (thread_db_mourn): Use td_ta_delete_ftype.
1299
af60a1ef
SL
13002015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1301
1302 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1303 arch variant.
1304 (CDX_BREAKPOINT): Define for R2.
1305 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1306 (the_low_target): Add comments.
1307
e8b41681
YQ
13082015-07-30 Yao Qi <yao.qi@linaro.org>
1309
1310 * linux-arm-low.c (arm_hwcap): Remove it.
1311 (arm_read_description): New local variable arm_hwcap. Don't
1312 set arm_hwcap to zero.
1313
89abb039
YQ
13142015-07-30 Yao Qi <yao.qi@linaro.org>
1315
1316 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1317 Use regcache->tdesc instead.
1318 (arm_store_wmmxregset): Likewise.
1319 (arm_fill_vfpregset): Likewise.
1320 (arm_store_vfpregset): Likewise.
1321
deca266c
YQ
13222015-07-30 Yao Qi <yao.qi@linaro.org>
1323
1324 * linux-arm-low.c: Include arch/arm.h.
1325 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1326 (arm_store_gregset): Likewise.
1327
aa58a496
SM
13282015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1329
1330 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1331 ptrace's 4th parameter.
1332
50904b25
YQ
13332015-07-27 Yao Qi <yao.qi@linaro.org>
1334
1335 * configure.srv (case aarch64*-*-linux*): Don't set
1336 srv_linux_usrregs.
1337
5826e159
PA
13382015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1339
1340 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1341 sys/ptrace.h.
1342 * linux-arm-low.c: Likewise.
1343 * linux-cris-low.c: Likewise.
1344 * linux-crisv32-low.c: Likewise.
1345 * linux-low.c: Likewise.
1346 * linux-m68k-low.c: Likewise.
1347 * linux-mips-low.c: Likewise.
1348 * linux-nios2-low.c: Likewise.
1349 * linux-s390-low.c: Likewise.
1350 * linux-sparc-low.c: Likewise.
1351 * linux-tic6x-low.c: Likewise.
1352 * linux-tile-low.c: Likewise.
1353 * linux-x86-low.c: Likewise.
1354
54019719
PA
13552015-07-24 Pedro Alves <palves@redhat.com>
1356
1357 * config.in: Regenerate.
1358 * configure: Regenerate.
1359
eb7aa561
PA
13602015-07-24 Pedro Alves <palves@redhat.com>
1361
1362 * acinclude.m4: Include ../ptrace.m4.
1363 * configure.ac: Call GDB_AC_PTRACE.
1364 * config.in, configure: Regenerate.
1365
55d7b841
YQ
13662015-07-24 Yao Qi <yao.qi@linaro.org>
1367
1368 * linux-low.c (linux_create_inferior): Remove setting to
1369 proc->priv->new_inferior.
1370 (linux_attach): Likewise.
1371 (linux_low_filter_event): Likewise.
1372 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1373
c06cbd92
YQ
13742015-07-24 Yao Qi <yao.qi@linaro.org>
1375
1376 * linux-low.c (linux_arch_setup): New function.
1377 (linux_low_filter_event): If proc->tdesc is NULL and
1378 proc->attached is true, call the_low_target.arch_setup.
1379 Otherwise, keep status pending, and return.
1380 (linux_resume_one_lwp_throw): Don't call get_pc if
1381 thread->while_stepping isn't NULL. Don't call
1382 get_thread_regcache if proc->tdesc is NULL.
1383 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1384 (linux_target_ops): Install arch_setup.
1385 * server.c (start_inferior): Call the_target->arch_setup.
1386 * target.h (struct target_ops) <arch_setup>: New field.
1387 (target_arch_setup): New marco.
1388 * lynx-low.c (lynx_target_ops): Update.
1389 * nto-low.c (nto_target_ops): Update.
1390 * spu-low.c (spu_target_ops): Update.
1391 * win32-low.c (win32_target_ops): Update.
1392
5ae3ebba
YQ
13932015-07-24 Yao Qi <yao.qi@linaro.org>
1394
1395 * linux-low.c (linux_add_process): Don't set
1396 proc->priv->new_inferior.
1397 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1398 (linux_attach): Likewise.
1399
eb97750b
YQ
14002015-07-24 Yao Qi <yao.qi@linaro.org>
1401
1402 * server.c (start_inferior): Code refactor.
1403
51aee833
YQ
14042015-07-24 Yao Qi <yao.qi@linaro.org>
1405
1406 * server.c (process_serial_event): Set general_thread.
1407
af1b22f3
YQ
14082015-07-21 Yao Qi <yao.qi@linaro.org>
1409
1410 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1411 aarch64_linux_get_debug_reg_capacity.
1412
554717a3
YQ
14132015-07-17 Yao Qi <yao.qi@linaro.org>
1414
1415 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1416 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1417 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1418 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1419 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1420 (AARCH64_HWP_ALIGNMENT): Likewise.
1421 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1422 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1423 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1424 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1425 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1426 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1427 (struct aarch64_debug_reg_state): Likewise.
1428 (struct arch_lwp_info): Likewise.
1429 (aarch64_align_watchpoint): Likewise.
1430 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1431 (aarch64_watchpoint_length): Likewise.
1432 (aarch64_point_encode_ctrl_reg): Likewise
1433 (aarch64_point_is_aligned): Likewise.
1434 (aarch64_align_watchpoint): Likewise.
1435 (aarch64_linux_set_debug_regs):
1436 (aarch64_dr_state_insert_one_point): Likewise.
1437 (aarch64_dr_state_remove_one_point): Likewise.
1438 (aarch64_handle_breakpoint): Likewise.
1439 (aarch64_handle_aligned_watchpoint): Likewise.
1440 (aarch64_handle_unaligned_watchpoint): Likewise.
1441 (aarch64_handle_watchpoint): Likewise.
1442
c67ca4de
YQ
14432015-07-17 Yao Qi <yao.qi@linaro.org>
1444
1445 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1446 and don't aarch64_get_debug_reg_state. All callers update.
1447 (aarch64_handle_aligned_watchpoint): Likewise.
1448 (aarch64_handle_unaligned_watchpoint): Likewise.
1449 (aarch64_handle_watchpoint): Likewise.
1450 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1451 (aarch64_remove_point): Likewise.
1452
25abf979
YQ
14532015-07-17 Yao Qi <yao.qi@linaro.org>
1454
1455 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1456 debug_printf.
1457 (aarch64_handle_unaligned_watchpoint): Likewise.
1458
db1ff28b
JK
14592015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1460
1461 Revert the previous 3 commits:
1462 Move gdb_regex* to common/
1463 Move linux_find_memory_regions_full & co.
1464 gdbserver build-id attribute generator
1465
700ca40f
JK
14662015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1467 Jan Kratochvil <jan.kratochvil@redhat.com>
1468
1469 gdbserver build-id attribute generator.
1470 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1471 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1472 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1473 (find_phdr): New.
1474 (get_dynamic): Use find_pdhr to traverse program headers.
1475 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1476 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1477 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1478 (get_hex_build_id): New.
1479 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1480 to reply XML document.
1481
9904185c
JK
14822015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1483 Jan Kratochvil <jan.kratochvil@redhat.com>
1484
1485 * target.c: Include target/target-utils.h and fcntl.h.
1486 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1487 (target_fileio_read_stralloc): New functions.
1488
6e5b4429
JK
14892015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1490
1491 * Makefile.in (OBS): Add gdb_regex.o.
1492 (gdb_regex.o): New.
1493 * config.in: Rebuilt.
1494 * configure: Rebuilt.
1495
ddc98fbf
JK
14962015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1497 Jan Kratochvil <jan.kratochvil@redhat.com>
1498
1499 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1500 * Makefile.in (OBS): Add target-utils.o.
1501 (linux-maps.o, target-utils.o): New.
1502 * configure.srv (srv_linux_obj): Add linux-maps.o.
1503
e57bb7a0
PL
15042015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1505
1506 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1507 function, return 1.
1508 (the_low_target): Install it.
1509
586b02a9
PA
15102015-07-14 Pedro Alves <palves@redhat.com>
1511
1512 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1513 Instead, ignore ECHILD, and throw an error for other errnos.
1514
58c1b36c
PA
15152015-07-10 Pedro Alves <palves@redhat.com>
1516
1517 * event-loop.c (struct callback_event) <data>: Change type to
1518 gdb_client_data instance instead of gdb_client_data pointer.
1519 (append_callback_event): Adjust.
1520
421530db
PL
15212015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1522
1523 * linux-aarch64-low.c: Add comments for each linux_target_ops
1524 method. Remove comments already covered in target_ops and
1525 linux_target_ops definitions.
1526 (the_low_target): Add comments for each unimplemented method.
1527
c2d65f38
YQ
15282015-07-09 Yao Qi <yao.qi@linaro.org>
1529
1530 * linux-aarch64-low.c (aarch64_regmap): Remove.
1531 (aarch64_usrregs_info): Remove.
1532 (regs_info): Set field usrregs to NULL.
1533
b20a6524
MM
15342015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1535
1536 * linux-low.c: Include "rsp-low.h"
1537 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1538 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1539 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1540 (handle_btrace_enable_pt): New.
1541 (handle_btrace_general_set): Support "pt".
1542 (handle_btrace_conf_general_set): Support "pt:size".
1543
96c97461
PL
15442015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1545
1546 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1547 Z_PACKET_SW_BP.
1548
37d66942
PL
15492015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1550
1551 * linux-aarch64-low.c: Remove comment about endianness.
1552 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1553 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1554 memcmp.
1555
dc06243f
GB
15562015-06-24 Gary Benson <gbenson@redhat.com>
1557
1558 * linux-i386-ipa.c (stdint.h): Do not include.
1559 * lynx-i386-low.c (stdint.h): Likewise.
1560 * lynx-ppc-low.c (stdint.h): Likewise.
1561 * mem-break.c (stdint.h): Likewise.
1562 * thread-db.c (stdint.h): Likewise.
1563 * tracepoint.c (stdint.h): Likewise.
1564 * win32-low.c (stdint.h): Likewise.
1565
124e13d9
SM
15662015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1567
1568 * server.c (write_qxfer_response): Update call to
1569 remote_escape_output.
1570
909c2cda
JK
15712015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1572 Jan Kratochvil <jan.kratochvil@redhat.com>
1573
1574 Merge multiple hex conversions.
1575 * gdbreplay.c (tohex): Rename to 'fromhex'.
1576 (logchar): Use fromhex.
1577
24c05f46
JK
15782015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1579
1580 * server.c (handle_qxfer_libraries): Set `version' attribute for
1581 <library-list>.
1582
14d2069a
GB
15832015-06-10 Gary Benson <gbenson@redhat.com>
1584
1585 * target.h (struct target_ops) <multifs_open>: New field.
1586 <multifs_unlink>: Likewise.
1587 <multifs_readlink>: Likewise.
1588 * linux-low.c (nat/linux-namespaces.h): New include.
1589 (linux_target_ops): Initialize the_target->multifs_open,
1590 the_target->multifs_unlink and the_target->multifs_readlink.
1591 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1592 * hostio.c (hostio_fs_pid): New static variable.
1593 (hostio_handle_new_gdb_connection): New function.
1594 (handle_setfs): Likewise.
1595 (handle_open): Use the_target->multifs_open as appropriate.
1596 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1597 (handle_readlink): Use the_target->multifs_readlink as
1598 appropriate.
1599 (handle_vFile): Handle vFile:setfs packets.
1600 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1601 after target_handle_new_gdb_connection.
1602
4b8b5e72
GB
16032015-06-10 Gary Benson <gbenson@redhat.com>
1604
1605 * configure.ac (AC_CHECK_FUNCS): Add setns.
1606 * config.in: Regenerate.
1607 * configure: Likewise.
1608 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1609 (linux-namespaces.o): New rule.
1610 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1611
3ac2e371
GB
16122015-06-09 Gary Benson <gbenson@redhat.com>
1613
1614 * hostio.c (handle_open): Process mode argument with
1615 fileio_to_host_mode.
1616
ca9b78ce
YQ
16172015-06-01 Yao Qi <yao.qi@linaro.org>
1618
1619 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1620 * linux-x86-low.c: Likewise.
1621
bfacd19d
DB
16222015-05-28 Don Breazeal <donb@codesourcery.com>
1623
1624 * linux-low.c (handle_extended_wait): Initialize
1625 thread_info.last_resume_kind for new fork children.
1626
452003ef
PA
16272015-05-15 Pedro Alves <palves@redhat.com>
1628
1629 * target.h (target_handle_new_gdb_connection): Rewrite using if
1630 wrapped in do/while.
1631
1041a03c
JB
16322015-05-14 Joel Brobecker <brobecker@adacore.com>
1633
1634 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1635 * configure, config.in: Regenerate.
1636 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1637 Declare typedef.
1638
c269dbdb
DB
16392015-05-12 Don Breazeal <donb@codesourcery.com>
1640
1641 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1642 PTRACE_EVENT_VFORK_DONE.
1643 (linux_low_ptrace_options, extended_event_reported): Add vfork
1644 events.
1645 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1646 and "vforkdone" for RSP 'T' Stop Reply Packet.
1647 * server.h (report_vfork_events): Declare
1648 global variable.
1649
3a8a0396
DB
16502015-05-12 Don Breazeal <donb@codesourcery.com>
1651
1652 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1653 (the_low_target) <new_fork>: Initialize new member.
1654 * linux-arm-low.c (arm_new_fork): New function.
1655 (the_low_target) <new_fork>: Initialize new member.
1656 * linux-low.c (handle_extended_wait): Call new target function
1657 new_fork.
1658 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1659 * linux-mips-low.c (mips_add_watchpoint): New function
1660 extracted from mips_insert_point.
1661 (the_low_target) <new_fork>: Initialize new member.
1662 (mips_linux_new_fork): New function.
1663 (mips_insert_point): Call mips_add_watchpoint.
1664 * linux-x86-low.c (x86_linux_new_fork): New function.
1665 (the_low_target) <new_fork>: Initialize new member.
1666
de0d863e
DB
16672015-05-12 Don Breazeal <donb@codesourcery.com>
1668
1669 * linux-low.c (handle_extended_wait): Implement return value,
1670 rename argument 'event_child' to 'event_lwp', handle
1671 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1672 (linux_low_ptrace_options): New function.
1673 (linux_low_filter_event): Call linux_low_ptrace_options,
1674 use different argument fo linux_enable_event_reporting,
1675 use return value from handle_extended_wait.
1676 (extended_event_reported): New function.
1677 (linux_wait_1): Call extended_event_reported and set
1678 status to report fork events.
1679 (linux_write_memory): Add pid to debug message.
1680 (reset_lwp_ptrace_options_callback): New function.
1681 (linux_handle_new_gdb_connection): New function.
1682 (linux_target_ops): Initialize new structure member.
1683 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1684 * lynx-low.c: Initialize new structure member.
1685 * remote-utils.c (prepare_resume_reply): Implement stop reason
1686 "fork" for "T" stop message.
1687 * server.c (handle_query): Call handle_new_gdb_connection.
1688 * server.h (report_fork_events): Declare global flag.
1689 * target.h (struct target_ops) <handle_new_gdb_connection>:
1690 New member.
1691 (target_handle_new_gdb_connection): New macro.
1692 * win32-low.c: Initialize new structure member.
1693
ddcbc397
DB
16942015-05-12 Don Breazeal <donb@codesourcery.com>
1695
1696 * mem-break.c (APPEND_TO_LIST): Define macro.
1697 (clone_agent_expr): New function.
1698 (clone_one_breakpoint): New function.
1699 (clone_all_breakpoints): New function.
1700 * mem-break.h: Declare new functions.
1701
89245bc0
DB
17022015-05-12 Don Breazeal <donb@codesourcery.com>
1703
1704 * linux-low.c (linux_supports_fork_events): New function.
1705 (linux_supports_vfork_events): New function.
1706 (linux_target_ops): Initialize new structure members.
1707 (initialize_low): Call linux_check_ptrace_features.
1708 * lynx-low.c (lynx_target_ops): Initialize new structure
1709 members.
1710 * server.c (report_fork_events, report_vfork_events):
1711 New global flags.
1712 (handle_query): Add new features to qSupported packet and
1713 response.
1714 (captured_main): Initialize new global variables.
1715 * target.h (struct target_ops) <supports_fork_events>:
1716 New member.
1717 <supports_vfork_events>: New member.
1718 (target_supports_fork_events): New macro.
1719 (target_supports_vfork_events): New macro.
1720 * win32-low.c (win32_target_ops): Initialize new structure
1721 members.
1722
835205d0
GB
17232015-05-12 Gary Benson <gbenson@redhat.com>
1724
1725 * server.c (handle_qxfer_exec_file): Use current process
1726 if annex is empty.
1727
21e94bd9
SL
17282015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1729
1730 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1731 Remove HAVE_PTRACE_GETREGS conditionals.
1732 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1733 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1734
45614f15
YQ
17352015-05-08 Yao Qi <yao.qi@linaro.org>
1736
1737 * linux-low.c (linux_supports_conditional_breakpoints): New
1738 function.
1739 (linux_target_ops): Install new target method.
1740 * lynx-low.c (lynx_target_ops): Install NULL hook for
1741 supports_conditional_breakpoints.
1742 * nto-low.c (nto_target_ops): Likewise.
1743 * spu-low.c (spu_target_ops): Likewise.
1744 * win32-low.c (win32_target_ops): Likewise.
1745 * server.c (handle_query): Check
1746 target_supports_conditional_breakpoints.
1747 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1748 New field.
1749 (target_supports_conditional_breakpoints): New macro.
1750
80ad801e
PA
17512015-05-06 Pedro Alves <palves@redhat.com>
1752
1753 PR server/18081
1754 * server.c (start_inferior): If the process exits, mourn it.
1755
819843c7
GB
17562015-04-21 Gary Benson <gbenson@redhat.com>
1757
1758 * hostio.c (fileio_open_flags_to_host): Factored out to
1759 fileio_to_host_openflags in common/fileio.c. Single use
1760 updated.
1761
a2d5a9d7
MF
17622015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1763
1764 * linux-xtensa-low.c (xtensa_fill_gregset)
1765 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1766 XCHAL_HAVE_LOOP.
1767
deb44829
MF
17682015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1769
1770 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1771 (regs_info): Replace usrregs pointer with NULL.
1772
e57f1de3
GB
17732015-04-17 Gary Benson <gbenson@redhat.com>
1774
1775 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1776 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1777 * server.c (handle_qxfer_exec_file): New function.
1778 (qxfer_packets): Add exec-file entry.
1779 (handle_query): Report qXfer:exec-file:read as supported packet.
1780
62828379
RN
17812015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1782
1783 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1784
b88bb450
GB
17852015-04-09 Gary Benson <gbenson@redhat.com>
1786
1787 * hostio-errno.c (errno_to_fileio_error): Remove function.
1788 Update caller to use remote_fileio_to_fio_error.
1789
c8f4bfdd
YQ
17902015-04-09 Yao Qi <yao.qi@linaro.org>
1791
1792 * linux-low.c (linux_insert_point): Call
1793 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1794 (linux_remove_point): Call remove_memory_breakpoint if type is
1795 raw_bkpt_type_sw.
1796 * linux-x86-low.c (x86_insert_point): Don't call
1797 insert_memory_breakpoint.
1798 (x86_remove_point): Don't call remove_memory_breakpoint.
1799
41f98f02
PA
18002015-04-01 Pedro Alves <palves@redhat.com>
1801 Cleber Rosa <crosa@redhat.com>
1802
1803 * server.c (gdbserver_usage): Reorganize and extend the usage
1804 message.
1805
2bf6fb9d
PA
18062015-03-24 Pedro Alves <palves@redhat.com>
1807
1808 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1809 output. Also dump TRAP_TRACE.
1810 (linux_low_filter_event): In debug output, distinguish a
1811 resume_stop SIGSTOP from a delayed SIGSTOP.
1812
369f6daa
GB
18132015-03-24 Gary Benson <gbenson@redhat.com>
1814
1815 * linux-x86-low.c (x86_linux_new_thread): Moved to
1816 nat/x86-linux.c.
1817 (x86_linux_prepare_to_resume): Likewise.
1818
8e5d4070
GB
18192015-03-24 Gary Benson <gbenson@redhat.com>
1820
1821 * Makefile.in (x86-linux-dregs.o): New rule.
1822 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1823 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1824 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1825 (x86_linux_dr_get): Likewise.
1826 (x86_linux_dr_set): Likewise.
1827 (update_debug_registers_callback): Likewise.
1828 (x86_linux_dr_set_addr): Likewise.
1829 (x86_linux_dr_get_addr): Likewise.
1830 (x86_linux_dr_set_control): Likewise.
1831 (x86_linux_dr_get_control): Likewise.
1832 (x86_linux_dr_get_status): Likewise.
1833 (x86_linux_update_debug_registers): Likewise.
1834
2b95d440
GB
18352015-03-24 Gary Benson <gbenson@redhat.com>
1836
1837 * linux-x86-low.c (x86_linux_update_debug_registers):
1838 New function, factored out from...
1839 (x86_linux_prepare_to_resume): ...this.
1840
14b0bc68
GB
18412015-03-24 Gary Benson <gbenson@redhat.com>
1842
1843 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1844 (x86_linux_dr_set): Likewise.
1845 (update_debug_registers_callback): Likewise.
1846 (x86_linux_dr_set_addr): Likewise.
1847 (x86_linux_dr_get_addr): Likewise.
1848 (x86_linux_dr_set_control): Likewise.
1849 (x86_linux_dr_get_control): Likewise.
1850 (x86_linux_dr_get_status): Likewise.
1851 (x86_linux_prepare_to_resume): Likewise.
1852
5dfe6ca8
GB
18532015-03-24 Gary Benson <gbenson@redhat.com>
1854
1855 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1856 Use perror_with_name. Pass string through gettext.
1857 (x86_linux_dr_set): Likewise.
1858
d33472ad
GB
18592015-03-24 Gary Benson <gbenson@redhat.com>
1860
1861 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1862 (x86_linux_dr_set_addr): ...this.
1863 (x86_dr_low_get_addr): Rename to...
1864 (x86_linux_dr_get_addr): ...this.
1865 (x86_dr_low_set_control): Rename to...
1866 (x86_linux_dr_set_control): ...this.
1867 (x86_dr_low_get_control): Rename to...
1868 (x86_linux_dr_get_control): ...this.
1869 (x86_dr_low_get_status): Rename to...
1870 (x86_linux_dr_get_status): ...this.
1871 (x86_dr_low): Update with new function names.
1872
4b134ca1
GB
18732015-03-24 Gary Benson <gbenson@redhat.com>
1874
1875 * Makefile.in (x86-linux.o): New rule.
1876 * configure.srv: Add x86-linux.o to relevant targets.
1877 * linux-low.c (lwp_set_arch_private_info): New function.
1878 (lwp_arch_private_info): Likewise.
1879 * linux-x86-low.c: Include nat/x86-linux.h.
1880 (arch_lwp_info): Removed structure.
1881 (update_debug_registers_callback):
1882 Use lwp_set_debug_registers_changed.
1883 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1884 and lwp_set_debug_registers_changed.
1885 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1886
34c703da
GB
18872015-03-24 Gary Benson <gbenson@redhat.com>
1888
1889 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1890 * linux-arm-low.c (arm_new_thread): Likewise.
1891 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1892 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1893 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1894 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1895
cff068da
GB
18962015-03-24 Gary Benson <gbenson@redhat.com>
1897
1898 * linux-low.c (ptid_of_lwp): New function.
1899 (lwp_is_stopped): Likewise.
1900 (lwp_stop_reason): Likewise.
1901 * linux-x86-low.c (update_debug_registers_callback):
1902 Use lwp_is_stopped.
1903 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1904 lwp_stop_reason.
1905
b2f7c7e8
GB
19062015-03-24 Gary Benson <gbenson@redhat.com>
1907
1908 * linux-low.h (linux_stop_lwp): Remove declaration.
1909
6d4ee8c6
GB
19102015-03-24 Gary Benson <gbenson@redhat.com>
1911
1912 * linux-low.h: Include nat/linux-nat.h.
1913 * linux-low.c (iterate_over_lwps_args): New structure.
1914 (iterate_over_lwps_filter): New function.
1915 (iterate_over_lwps): Likewise.
1916 * linux-x86-low.c (update_debug_registers_callback):
1917 Update signature to what iterate_over_lwps expects.
1918 Remove PID check that iterate_over_lwps now performs.
1919 (x86_dr_low_set_addr): Use iterate_over_lwps.
1920 (x86_dr_low_set_control): Likewise.
1921
70a0bb6b
GB
19222015-03-24 Gary Benson <gbenson@redhat.com>
1923
1924 * linux-x86-low.c (x86_debug_reg_state): New function.
1925 (x86_linux_prepare_to_resume): Use the above.
1926
7b669087
GB
19272015-03-24 Gary Benson <gbenson@redhat.com>
1928
1929 * linux-low.c (current_lwp_ptid): New function.
1930 * linux-x86-low.c: Include nat/linux-nat.h.
1931 (x86_dr_low_get_addr): Use current_lwp_ptid.
1932 (x86_dr_low_get_control): Likewise.
1933 (x86_dr_low_get_status): Likewise.
1934
eef49a3d
PA
19352015-03-20 Pedro Alves <palves@redhat.com>
1936
1937 * tracepoint.c (cmd_qtstatus): Make "str" const.
1938
b2333d22
PA
19392015-03-20 Pedro Alves <palves@redhat.com>
1940
1941 * server.c (handle_general_set): Make "req_str" const.
1942
23f238d3
PA
19432015-03-19 Pedro Alves <palves@redhat.com>
1944
1945 * linux-low.c (linux_resume_one_lwp): Rename to ...
1946 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1947 instead call perror_with_name.
1948 (check_ptrace_stopped_lwp_gone): New function.
1949 (linux_resume_one_lwp): Reimplement as wrapper around
1950 linux_resume_one_lwp_throw that swallows errors if the LWP is
1951 gone.
1952
91baf43f
PA
19532015-03-19 Pedro Alves <palves@redhat.com>
1954
1955 * linux-low.c (count_events_callback, select_event_lwp_callback):
1956 No longer check whether the thread has resume_stop as last resume
1957 kind.
1958
8bf3b159
PA
19592015-03-19 Pedro Alves <palves@redhat.com>
1960
1961 * linux-low.c (count_events_callback, select_event_lwp_callback):
1962 Use the lwp's status_pending_p field, not the thread's.
1963
b90fc188
PA
19642015-03-19 Pedro Alves <palves@redhat.com>
1965
1966 * linux-low.c (select_event_lwp_callback): Update comments to
1967 no longer mention SIGTRAP.
1968
464b0089
GB
19692015-03-18 Gary Benson <gbenson@redhat.com>
1970
1971 * server.c (handle_query): Do not report vFile:fstat as supported.
1972
aa9e327f
GB
19732015-03-11 Gary Benson <gbenson@redhat.com>
1974
1975 * hostio.c (sys/types.h): New include.
1976 (sys/stat.h): Likewise.
1977 (common-remote-fileio.h): Likewise.
1978 (handle_fstat): New function.
1979 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 1980
791c0056
GB
19812015-03-11 Gary Benson <gbenson@redhat.com>
1982
1983 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1984 struct stat.st_blocks and struct stat.st_blksize.
1985 * configure: Regenerate.
1986 * config.in: Likewise.
1987 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1988 (OBS): Add common-remote-fileio.o.
1989 (common-remote-fileio.o): New rule.
1990
9a9df970
PA
19912015-03-09 Pedro Alves <palves@redhat.com>
1992
1993 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1994 'struct sockaddr' pointer in 'accept' call.
1995
9eb1356e
PA
19962015-03-09 Pedro Alves <palves@redhat.com>
1997
1998 Revert:
1999 2015-03-07 Pedro Alves <palves@redhat.com>
2000 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2001 or <winsock2.h> here. Instead include "gdb_socket.h".
2002 (remote_open): Use union gdb_sockaddr_u.
2003 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2004 or <winsock2.h> here. Instead include "gdb_socket.h".
2005 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2006 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2007 or <sys/un.h>.
2008 (init_named_socket, gdb_agent_helper_thread): Use union
2009 gdb_sockaddr_u.
2010
aac331e4
PA
20112015-03-07 Pedro Alves <palves@redhat.com>
2012
2013 * configure.ac (build_warnings): Move
2014 -Wdeclaration-after-statement to the C-specific set.
2015 * configure: Regenerate.
2016
366c75fc
PA
20172015-03-07 Pedro Alves <palves@redhat.com>
2018
2019 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2020 or <winsock2.h> here. Instead include "gdb_socket.h".
2021 (remote_open): Use union gdb_sockaddr_u.
2022 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2023 or <winsock2.h> here. Instead include "gdb_socket.h".
2024 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2025 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2026 or <sys/un.h>.
2027 (init_named_socket, gdb_agent_helper_thread): Use union
2028 gdb_sockaddr_u.
2029
492d29ea
PA
20302015-03-07 Pedro Alves <palves@redhat.com>
2031
2032 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2033 instead.
2034
60a191ed
YQ
20352015-03-06 Yao Qi <yao.qi@linaro.org>
2036
2037 * linux-aarch64-low.c (aarch64_insert_point): Use
2038 show_debug_regs as a boolean.
2039 (aarch64_remove_point): Likewise.
2040
f5771b1d
PA
20412015-03-05 Pedro Alves <palves@redhat.com>
2042
2043 * lynx-low.c (lynx_target_ops): Install NULL hooks for
2044 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2045 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2046 * nto-low.c (nto_target_ops): Likewise.
2047 * spu-low.c (spu_target_ops): Likewise.
2048 * win32-low.c (win32_target_ops): Likewise.
2049
3e572f71
PA
20502015-03-04 Pedro Alves <palves@redhat.com>
2051
72f4393d 2052 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
2053 Decide whether a breakpoint triggered based on the SIGTRAP's
2054 siginfo.si_code.
72f4393d
L
2055 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2056 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
2057 (linux_low_filter_event): Check for breakpoints before checking
2058 watchpoints.
2059 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2060 siginfo.si_code.
72f4393d
L
2061 (linux_stopped_by_sw_breakpoint)
2062 (linux_supports_stopped_by_sw_breakpoint)
2063 (linux_stopped_by_hw_breakpoint)
2064 (linux_supports_stopped_by_hw_breakpoint): New functions.
2065 (linux_target_ops): Install new target methods.
3e572f71 2066
1ec68e26
PA
20672015-03-04 Pedro Alves <palves@redhat.com>
2068
2069 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2070 * server.c (swbreak_feature, hwbreak_feature): New globals.
2071 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2072 (captured_main): Clear swbreak_feature and hwbreak_feature.
2073 * server.h (swbreak_feature, hwbreak_feature): Declare.
2074 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2075 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2076 supports_stopped_by_hw_breakpoint>: New fields.
2077 (target_supports_stopped_by_sw_breakpoint)
2078 (target_stopped_by_sw_breakpoint)
2079 (target_supports_stopped_by_hw_breakpoint)
2080 (target_stopped_by_hw_breakpoint): Declare.
2081
15c66dd6
PA
20822015-03-04 Pedro Alves <palves@redhat.com>
2083
2084 enum lwp_stop_reason -> enum target_stop_reason
2085 * linux-low.c (check_stopped_by_breakpoint): Adjust.
2086 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2087 (linux_wait_1, stuck_in_jump_pad_callback)
2088 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2089 (linux_stopped_by_watchpoint):
2090 * linux-low.h (enum lwp_stop_reason): Delete.
2091 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2092 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2093
98fc70d6
YQ
20942015-03-04 Yao Qi <yao.qi@linaro.org>
2095
2096 * Makefile.in (SFILES): Add linux-aarch64-low.c.
2097
dd2ac174
GB
20982015-03-03 Gary Benson <gbenson@redhat.com>
2099
2100 * hostio.c (handle_vFile): Fix prefix lengths.
2101
d68e53f4
MM
21022015-03-03 Markus Metzger <markus.t.metzger@intel.com>
2103
2104 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2105 ptr_bits.
2106
bf2d68ab
AA
21072015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
2108
2109 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2110 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2111 (clean): Add "rm -f" for above C files.
2112 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2113 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2114 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2115 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2116 * linux-s390-low.c (HWCAP_S390_VX): New macro.
2117 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2118 (init_registers_s390x_vx_linux64)
2119 (init_registers_s390x_tevx_linux64)
2120 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2121 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2122 declarations.
2123 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2124 (s390_store_vxrs_high): New functions.
2125 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2126 NT_S390_VXRS_HIGH.
2127 (s390_arch_setup): Add logic for selecting one of the new target
2128 descriptions. Activate the new vector regsets if applicable.
2129 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2130 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2131 and init_registers_s390x_tevx_linux64.
2132
c966a859
PA
21332015-03-01 Pedro Alves <palves@redhat.com>
2134
2135 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2136 parameter.
2137
4180215b
PA
21382015-02-27 Pedro Alves <palves@redhat.com>
2139
2140 * linux-x86-low.c (u_debugreg_offset): New function.
2141 (x86_linux_dr_get, x86_linux_dr_set): Use it.
2142
749bab01
PA
21432015-02-27 Pedro Alves <palves@redhat.com>
2144
2145 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2146 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2147 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2148 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2149 (ps_lsetfpregs, ps_getpid)
2150 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2151 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2152 (ps_lsetxregs, ps_plog): Declare.
2153
3c14e5a3
PA
21542015-02-27 Pedro Alves <palves@redhat.com>
2155
2156 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2157 IP_AGENT_EXPORT_FUNC.
2158 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2159 IP_AGENT_EXPORT_FUNC.
2160 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2161 (IP_AGENT_EXPORT): Delete.
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, collecting, gdb_collect)
2165 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2166 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2167 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2168 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2169 (traceframe_read_count, traceframe_write_count)
2170 (traceframes_created, trace_state_variables, get_raw_reg)
2171 (get_trace_state_variable_value, set_trace_state_variable_value)
2172 (ust_loaded, helper_thread_id, cmd_buf): Use
2173 IPA_SYM_EXPORTED_NAME.
2174 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2175 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2176 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2177 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2178 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2179 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2180 EXTERN_C_PUSH/EXTERN_C_POP.
2181 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2182 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2183 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2184 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2185 (traceframe_write_count, traceframe_read_count)
2186 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2187 (about_to_request_buffer_space, get_trace_state_variable_value)
2188 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2189 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2190 EXTERN_C_PUSH/EXTERN_C_POP.
2191 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2192 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2193 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2194 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2195 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2196 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2197 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2198 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2199 Define.
2200 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2201 (IP_AGENT_EXPORT_VAR_DECL): Define.
2202 (tracing): Declare.
2203 (gdb_agent_get_raw_reg): Declare.
2204
fe978cb0
PA
22052015-02-27 Tom Tromey <tromey@redhat.com>
2206 Pedro Alves <palves@redhat.com>
2207
2208 Rename symbols whose names are reserved C++ keywords throughout.
2209
3bc3d82a
PA
22102015-02-27 Pedro Alves <palves@redhat.com>
2211
2212 * Makefile.in (COMPILER): New, get it from autoconf.
2213 (CXX): Get from autoconf instead.
2214 (COMPILE.pre): Use COMPILER.
2215 (CC-LD): Rename to ...
2216 (CC_LD): ... this. Use COMPILER.
2217 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2218 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2219 * acinclude.m4: Include build-with-cxx.m4.
2220 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2221 Disable -Werror by default if building in C++ mode.
2222 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2223 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2224 the C++ compiler. Save/restore CXXFLAGS too.
2225 * configure: Regenerate.
2226
07697489
PA
22272015-02-27 Pedro Alves <palves@redhat.com>
2228
2229 * acinclude.m4: Include libiberty.m4.
2230 * configure.ac: Call libiberty_INIT.
2231 * config.in, configure: Regenerate.
2232
9beb7c4e
PA
22332015-02-26 Pedro Alves <palves@redhat.com>
2234
2235 * linux-low.c (linux_wait_1): When incrementing the PC past a
2236 program breakpoint always use the_low_target.breakpoint_len as
2237 increment, rather than the maximum between that and
2238 the_low_target.decr_pc_after_break.
2239
8090aef2
PA
22402015-02-23 Pedro Alves <palves@redhat.com>
2241
2242 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2243 thread was doing a step-over; always adjust the PC if
2244 we stepped over a permanent breakpoint.
2245 (linux_wait_1): If we stepped over breakpoint that was on top of a
2246 permanent breakpoint, manually advance the PC past it.
2247
bc9540e8
PA
22482015-02-23 Pedro Alves <palves@redhat.com>
2249
2250 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2251 modes.
2252 (x86_fill_gregset, x86_store_gregset): Use it when handling
2253 $orig_eax.
2254
2db9a427
PA
22552015-02-20 Pedro Alves <palves@redhat.com>
2256
2257 * thread-db.c: Include "nat/linux-procfs.h".
2258 (thread_db_init): Skip listing new threads if the kernel supports
2259 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2260
afa8d396
PA
22612015-02-20 Pedro Alves <palves@redhat.com>
2262
2263 * linux-low.c (status_pending_p_callback): Use ptid_match.
2264
c9587f88
AT
22652015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2266
2267 PR breakpoints/16812
2268 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2269 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2270 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2271
b05ec7a5
AT
22722015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2273
2274 PR breakpoints/15956
2275 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2276
d33501a5
MM
22772015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2278
2279 * linux-low.c (linux_low_btrace_conf): Print size.
2280 * server.c (handle_btrace_conf_general_set): New.
2281 (hanle_general_set): Call handle_btrace_conf_general_set.
2282 (handle_query): Report Qbtrace-conf:bts:size as supported.
2283
f4abbc16
MM
22842015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2285
2286 * linux-low.c (linux_low_enable_btrace): Update parameters.
2287 (linux_low_btrace_conf): New.
2288 (linux_target_ops)<to_btrace_conf>: Initialize.
2289 * server.c (current_btrace_conf): New.
2290 (handle_btrace_enable): Rename to ...
2291 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2292 to target_enable_btrace. Update comment. Update users.
2293 (handle_qxfer_btrace_conf): New.
2294 (qxfer_packets): Add btrace-conf entry.
2295 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2296 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2297 (target_ops)<read_btrace_conf>: New.
2298 (target_enable_btrace): Update parameters.
2299 (target_read_btrace_conf): New.
2300
043c3577
MM
23012015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2302
2303 * server.c (handle_btrace_general_set): Remove call to
2304 target_supports_btrace.
2305 (supported_btrace_packets): New.
2306 (handle_query): Call supported_btrace_packets.
2307 * target.h: include btrace-common.h.
2308 (btrace_target_info): Removed.
2309 (supports_btrace, target_supports_btrace): Update parameters.
2310
734b0e4b
MM
23112015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2312
2313 * Makefile.in (SFILES): Add common/btrace-common.c.
2314 (OBS): Add common/btrace-common.o.
2315 (btrace-common.o): Add build rules.
2316 * linux-low: Include btrace-common.h.
2317 (linux_low_read_btrace): Use struct btrace_data. Call
2318 btrace_data_init and btrace_data_fini.
2319
d6c146e9
PA
23202015-02-06 Pedro Alves <palves@redhat.com>
2321
2322 * thread-db.c (find_new_threads_callback): Add debug output.
2323
20ba1ce6
PA
23242015-02-04 Pedro Alves <palves@redhat.com>
2325
2326 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2327 (resume_stopped_resumed_lwps): New function.
2328 (linux_wait_for_event_filtered): Use it.
2329
8cc73a39
SDJ
23302015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2331
2332 * Makefile.in (SFILES): Add linux-personality.c.
2333 (linux-personality.o): New rule.
2334 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2335 list of objects to be built.
2336 * linux-low.c: Include nat/linux-personality.h.
2337 (linux_create_inferior): Remove code to disable address space
2338 randomization (moved to ../nat/linux-personality.c). Create
2339 cleanup to disable address space randomization.
2340
fb23d554
SDJ
23412015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2342
2343 * Makefile.in (posix-strerror.o): New rule.
2344 (mingw-strerror.o): Likewise.
2345 * configure: Regenerated.
2346 * configure.ac: Source file ../common/common.host. Initialize new
2347 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2348
cdf43629
YQ
23492015-01-14 Yao Qi <yao@codesourcery.com>
2350
2351 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2352 (ppc-linux.o): New rule.
2353 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2354 * configure.ac: AC_CHECK_FUNCS(getauxval).
2355 * config.in: Re-generated.
2356 * configure: Re-generated.
2357 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2358 ppc64_64bit_inferior_p
2359
514c5338
YQ
23602015-01-14 Yao Qi <yao@codesourcery.com>
2361
2362 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2363 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2364 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2365 (PT_ORIG_R3, PT_TRAP): Likewise.
2366 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2367 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2368 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2369
3368c1e5
JB
23702015-01-10 Joel Brobecker <brobecker@adacore.com>
2371
2372 * i387-fp.c (i387_cache_to_xsave): In look over
2373 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2374 zmmh_low_space field by use of zmmh_high_space.
2375
582511be
PA
23762015-01-09 Pedro Alves <palves@redhat.com>
2377
2378 * linux-low.c (step_over_bkpt): Move higher up in the file.
2379 (handle_extended_wait): Don't store the stop_pc here.
2380 (get_stop_pc): Adjust comments and rename to ...
2381 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2382 stopped for a software breakpoint or hardware breakpoint.
2383 (thread_still_has_status_pending_p): New function.
2384 (status_pending_p_callback): Use
2385 thread_still_has_status_pending_p. If the event is no longer
2386 interesting, resume the LWP.
2387 (handle_tracepoints): Add assert.
2388 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2389 (wstatus_maybe_breakpoint): New function.
2390 (cancel_breakpoint): Delete function.
2391 (check_stopped_by_watchpoint): New function, factored out from
2392 linux_low_filter_event.
2393 (lp_status_maybe_breakpoint): Delete function.
2394 (linux_low_filter_event): Remove filter_ptid argument.
2395 Leave thread group exits pending here. Store the LWP's stop PC.
2396 Always leave events pending.
2397 (linux_wait_for_event_filtered): Pull all events out of the
2398 kernel, and leave them all pending.
2399 (count_events_callback, select_event_lwp_callback): Consider all
2400 events.
2401 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2402 (select_event_lwp): Only give preference to the stepping LWP in
2403 all-stop mode. Adjust comments.
2404 (ignore_event): New function.
2405 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2406 references to cancel_breakpoints. Adjust to renames. Also give
2407 equal priority to all LWPs that have had events in non-stop mode.
2408 If reporting a software breakpoint event, unadjust the LWP's PC.
2409 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2410 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2411 Adjust.
2412 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2413 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2414 (linux_stopped_by_watchpoint): Adjust.
2415 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2416 * linux-low.h (enum lwp_stop_reason): New.
2417 (struct lwp_info) <stop_pc>: Adjust comment.
2418 <stopped_by_watchpoint>: Delete field.
2419 <stop_reason>: New field.
2420 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2421 * mem-break.c (software_breakpoint_inserted_here)
2422 (hardware_breakpoint_inserted_here): New function.
2423 * mem-break.h (software_breakpoint_inserted_here)
2424 (hardware_breakpoint_inserted_here): Declare.
2425 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2426 (cancel_breakpoints): Delete.
2427 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2428 (upload_fast_traceframes): Remove references to
2429 cancel_breakpoints.
2430
a33e3959
PA
24312015-01-09 Pedro Alves <palves@redhat.com>
2432
2433 * thread-db.c (find_new_threads_callback): Ignore thread if the
2434 kernel thread ID is -1.
2435
8784d563
PA
24362015-01-09 Pedro Alves <palves@redhat.com>
2437
2438 * linux-low.c (linux_attach_fail_reason_string): Move to
2439 nat/linux-ptrace.c, and rename.
2440 (linux_attach_lwp): Update comment.
2441 (attach_proc_task_lwp_callback): New function.
2442 (linux_attach): Adjust to rename and use
2443 linux_proc_attach_tgid_threads.
2444 (linux_attach_fail_reason_string): Delete declaration.
2445
76f2b779
JB
24462015-01-01 Joel Brobecker <brobecker@adacore.com>
2447
2448 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2449 * server.c (gdbserver_version): Likewise.
2450
fafcc06a
SDJ
24512014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2452
2453 * remote-utils.c: Include ctype.h.
2454 (input_interrupt): Explicitly handle the case when the char
2455 received is the NUL byte. Improve the printing of non-ASCII
2456 characters.
2457
beed38b8
JB
24582014-12-16 Joel Brobecker <brobecker@adacore.com>
2459
2460 * linux-low.c (linux_low_filter_event): Update call to
2461 linux_enable_event_reporting following the addition of
2462 a new parameter to that function.
2463
bf330350
CU
24642014-12-16 Catalin Udma <catalin.udma@freescale.com>
2465
2466 PR server/17457
2467 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2468 (AARCH64_FPCR_REGNO): Likewise.
2469 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2470 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2471 (aarch64_store_fpregset): Likewise.
2472
5227d625
JB
24732014-12-15 Joel Brobecker <brobecker@adacore.com>
2474
2475 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2476 Remove FIXME comment about assumption about N.
2477
f93b65a0
JB
24782014-12-13 Joel Brobecker <brobecker@adacore.com>
2479
2480 * configure.ac: If large-file support is disabled in GDBserver,
2481 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2482 * configure: Regenerate.
2483
e5a9158d
AA
24842014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2485
2486 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2487 warning upon ENODATA from ptrace.
2488 * linux-s390-low.c (s390_store_tdb): New.
2489 (s390_regsets): Add regset for NT_S390_TDB.
2490
feea5f36
AA
24912014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2492
2493 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2494 without a fill_function.
2495 * linux-s390-low.c (s390_fill_last_break): Remove.
2496 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2497 (s390_arch_setup): Use regset's size instead of fill_function for
2498 loop end condition.
2499
098dbe61
AA
25002014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2501
2502 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2503 the regset's store function when ptrace returned an error.
2504 * regcache.c (get_thread_regcache): Invalidate register cache
2505 before fetching inferior's registers.
2506
28eef672
AA
25072014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2508
2509 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2510 while-loop as for-loop.
2511 (regsets_store_inferior_registers): Likewise.
2512
bdca27a2
YQ
25132014-11-28 Yao Qi <yao@codesourcery.com>
2514
2515 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2516 * config.in, configure: Re-generate.
2517 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2518 is defined.
2519
9c232dda
YQ
25202014-11-21 Yao Qi <yao@codesourcery.com>
2521
2522 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2523 (AC_CHECK_HEADERS): Remove malloc.h.
2524 * configure: Re-generated.
2525 * config.in: Re-generated.
2526 * server.h: Don't include alloca.h and malloc.h.
2527 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2528 Don't include malloc.h.
2529
43968415
JB
25302014-11-17 Joel Brobecker <brobecker@adacore.com>
2531
2532 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2533 corresponding ERRNO check in same block.
2534
40e91bc7
PA
25352014-11-12 Pedro Alves <palves@redhat.com>
2536
2537 * server.c (cont_thread): Update comment.
2538 (start_inferior, attach_inferior): No longer clear cont_thread.
2539 (handle_v_cont): No longer set cont_thread.
2540 (captured_main): Clear cont_thread each time a GDB connects.
2541
c2c118cf
PA
25422014-11-12 Pedro Alves <palves@redhat.com>
2543
2544 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2545 thread, and don't resume all threads if the Hc thread has exited.
2546
78708b7c
PA
25472014-11-12 Pedro Alves <palves@redhat.com>
2548
2549 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2550 the process group instead of to a specific LWP.
2551
a2abc7de
PA
25522014-10-15 Pedro Alves <palves@redhat.com>
2553
2554 PR server/17487
2555 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2556 parameter.
2557 (arm_set_thread_context): Delete.
2558 (the_low_target): Adjust.
2559 * win32-i386-low.c (debug_registers_changed)
2560 (debug_registers_used): Delete.
2561 (update_debug_registers_callback): New function.
2562 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2563 needing to update their debug registers.
2564 (win32_get_current_dr): New function.
2565 (x86_dr_low_get_addr, x86_dr_low_get_control)
2566 (x86_dr_low_get_status): Fetch the debug register from the thread
2567 record's context.
2568 (i386_initial_stuff): Adjust.
2569 (i386_get_thread_context): Remove current_event parameter. Don't
2570 clear debug_registers_changed nor copy DR values to
2571 debug_reg_state.
2572 (i386_set_thread_context): Delete.
2573 (i386_prepare_to_resume): New function.
2574 (i386_thread_added): Mark the thread as needing to update irs
2575 debug registers.
2576 (the_low_target): Remove i386_set_thread_context and install
2577 i386_prepare_to_resume.
2578 * win32-low.c (win32_get_thread_context): Adjust.
2579 (win32_set_thread_context): Use SetThreadContext
2580 directly.
2581 (win32_prepare_to_resume): New function.
2582 (win32_require_context): New function, factored out from ...
2583 (thread_rec): ... this.
2584 (continue_one_thread): Call win32_prepare_to_resume on each thread
2585 we're about to continue.
2586 (win32_resume): Call win32_prepare_to_resume on the event thread.
2587 * win32-low.h (struct win32_thread_info)
2588 <debug_registers_changed>: New field.
2589 (struct win32_target_ops): Change prototype of set_thread_context,
2590 delete set_thread_context and add prepare_to_resume.
2591 (win32_require_context): New declaration.
2592
a442d071
GB
25932014-10-08 Gary Benson <gbenson@redhat.com>
2594
2595 * server.h: Do not include common-exceptions.h.
2596
6f1947e8
GB
25972014-10-08 Gary Benson <gbenson@redhat.com>
2598
2599 * server.h: Do not include cleanups.h.
2600
63b434a4
JH
26012014-09-30 James Hogan <james.hogan@imgtec.com>
2602
2603 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2604 mips64-dsp-linux.c.
2605
c4d9ceb6
YQ
26062014-09-23 Yao Qi <yao@codesourcery.com>
2607
2608 * linux-low.c (lp_status_maybe_breakpoint): New function.
2609 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2610 (count_events_callback): Likewise.
2611 (select_event_lwp_callback): Likewise.
2612 (cancel_breakpoints_callback): Likewise.
2613
89a5711c
DB
26142014-09-19 Don Breazeal <donb@codesourcery.com>
2615
2616 * linux-low.c (handle_extended_wait): Call
2617 linux_ptrace_get_extended_event.
2618 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2619 linux_is_extended_waitstatus.
2620
bffc0964
JB
26212014-09-16 Joel Brobecker <brobecker@adacore.com>
2622
2623 * Makefile.in (CPPFLAGS): Define.
2624 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2625 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2626
0bfdf32f
GB
26272014-09-16 Gary Benson <gbenson@redhat.com>
2628
2629 * inferiors.h (current_inferior): Renamed as...
2630 (current_thread): New variable. All uses updated.
2631 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2632 (maybe_move_out_of_jump_pad): Likewise.
2633 (cancel_breakpoint): Likewise.
2634 (linux_low_filter_event): Likewise.
2635 (wait_for_sigstop): Likewise.
2636 (linux_resume_one_lwp): Likewise.
2637 (need_step_over_p): Likewise.
2638 (start_step_over): Likewise.
2639 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2640 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2641 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2642 and save_inferior as saved_thread.
2643 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2644 saved_thread.
2645 (regcache_invalidate_thread): Likewise.
2646 * remote-utils.c (prepare_resume_reply): Likewise.
2647 * thread-db.c (thread_db_get_tls_address): Likewise.
2648 (disable_thread_event_reporting): Likewise.
2649 (remove_thread_event_breakpoints): Likewise.
2650 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2651 as saved_thread.
2652 * target.h (set_desired_inferior): Renamed as...
2653 (set_desired_thread): New declaration. All uses updated.
2654 * server.c (myresume): Updated comment to reference thread instead
2655 of inferior.
2656 (handle_serial_event): Likewise.
2657 (handle_target_event): Likewise.
2658
361c8ade
GB
26592014-09-12 Tom Tromey <tromey@redhat.com>
2660 Gary Benson <gbenson@redhat.com>
2661
2662 * regcache.h: Include common-regcache.h.
2663 (regcache_read_pc): Don't declare.
2664 * regcache.c (get_thread_regcache_for_ptid): New function.
2665
bd9269f7
GB
26662014-09-11 Tom Tromey <tromey@redhat.com>
2667 Gary Benson <gbenson@redhat.com>
2668
2669 * symbol.c: New file.
2670 * Makefile.in (SFILES): Add symbol.c.
2671 (OBS): Add symbol.o.
2672
f8c1d06b
GB
26732014-09-11 Gary Benson <gbenson@redhat.com>
2674
2675 * target.c (target_stop_ptid, target_continue_ptid): New
2676 functions.
2677
721ec300
GB
26782014-09-11 Tom Tromey <tromey@redhat.com>
2679 Gary Benson <gbenson@redhat.com>
2680
2681 * target.h: Include target/target.h.
2682 * target.c (target_read_memory, target_read_uint32)
2683 (target_write_memory): New functions.
2684
c5e92cca
GB
26852014-09-11 Gary Benson <gbenson@redhat.com>
2686
2687 * server.h (debug_hw_points): Don't declare.
2688 * server.c (debug_hw_points): Don't define. Replace all uses
2689 with show_debug_regs.
2690 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2691 all uses with show_debug_regs.
2692
2e4bb98a
EBM
26932014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2694
2695 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2696 endianness into account.
2697 (ppc_supply_ptrace_register): Likewise.
2698
ac740bc7
JH
26992014-09-03 James Hogan <james.hogan@imgtec.com>
2700
2701 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2702 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2703
97ea6506
GB
27042014-09-03 Gary Benson <gbenson@redhat.com>
2705
2706 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2707 ALL_DEBUG_ADDRESS_REGISTERS.
2708
df7e5265
GB
27092014-09-02 Gary Benson <gbenson@redhat.com>
2710
2711 * i386-low.h: Renamed as...
2712 * x86-low.h: New file. All type, function and variable name
2713 prefixes changed from "i386_" to "x86_". All references updated.
2714 * i386-low.c: Renamed as...
2715 * x86-low.c: New file. All type, function and variable name
2716 prefixes changed from "i386_" to "x86_". All references updated.
2717
ed859da7
GB
27182014-09-02 Gary Benson <gbenson@redhat.com>
2719
2720 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2721 (x86_linux_new_thread): Likewise.
2722
860789c7
GB
27232014-08-29 Gary Benson <gbenson@redhat.com>
2724
2725 * server.h (setjmp.h): Do not include.
2726 (toplevel): Do not declare.
2727 (common-exceptions.h): Include.
2728 (cleanups.h): Likewise.
2729 * server.c (toplevel): Do not define.
2730 (exit_code): New static global.
2731 (detach_or_kill_for_exit_cleanup): New function.
2732 (main): New function. Original main renamed to...
2733 (captured_main): New function.
2734 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2735
ff55e1b5
GB
27362014-08-29 Gary Benson <gbenson@redhat.com>
2737
2738 * Makefile.in (SFILES): Add common/common-exceptions.c.
2739 (OBS): Add common-exceptions.o.
2740 (common-exceptions.o): New rule.
2741 * utils.c (prepare_to_throw_exception): New function.
2742
e9bcb658
GB
27432014-08-29 Gary Benson <gbenson@redhat.com>
2744
2745 * config.in: Regenerate.
2746 * configure: Likewise.
2747
e3180625
GB
27482014-08-29 Gary Benson <gbenson@redhat.com>
2749
2750 * Makefile.in (SFILES): Add common/cleanups.c.
2751 (OBS): cleanups.o.
2752 (cleanups.o): New rule.
2753
e3d6ba5d
GB
27542014-08-29 Gary Benson <gbenson@redhat.com>
2755
2756 * utils.c (internal_vwarning): New function.
2757
7096e886
GB
27582014-08-28 Gary Benson <gbenson@redhat.com>
2759
2760 * utils.h (fatal): Remove declaration.
2761 * utils.c (fatal): Remove function.
2762
14ce3192
GB
27632014-08-28 Gary Benson <gbenson@redhat.com>
2764
2765 * tracepoint.c (gdb_agent_init): Replace fatal with
2766 perror_with_name.
2767 (initialize_tracepoint): Likewise.
2768
50278d59
GB
27692014-08-28 Gary Benson <gbenson@redhat.com>
2770
2771 * remote-utils.c (remote_prepare): Replace fatal with error.
2772
aa96c426
GB
27732014-08-28 Gary Benson <gbenson@redhat.com>
2774
2775 * linux-low.c (linux_async): Replace fatal with warning.
2776 Tidy up and return.
2777 (linux_start_non_stop): Return -1 if linux_async failed.
2778
f7160e97
GB
27792014-08-28 Gary Benson <gbenson@redhat.com>
2780
2781 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2782 gdb_assert.
2783 (i386_dr_low_get_addr): Remove vague comment.
2784 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2785 gdb_assert.
2786
38e08fca
GB
27872014-08-28 Gary Benson <gbenson@redhat.com>
2788
2789 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2790 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2791 internal_error.
2792 (linux_resume_one_lwp): Likewise.
2793 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2794 gdb_assert.
2795 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2796 with internal_error.
2797 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2798 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2799 (find_register_by_name): Replace fatal with internal_error.
2800 (find_regno): Likewise.
2801 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2802 * thread-db.c (thread_db_create_event): Likewise.
2803 (thread_db_load_search): Likewise.
2804 (try_thread_db_load_1): Likewise.
2805 * tracepoint.c (get_jump_space_head): Replace fatal with
2806 internal_error.
2807 (claim_trampoline_space): Likewise.
2808 (have_fast_tracepoint_trampoline_buffer): Likewise.
2809 (cmd_qtstart): Likewise.
2810 (stop_tracing): Likewise.
2811 (fast_tracepoint_collecting): Likewise.
2812 (target_malloc): Likewise.
2813 (download_tracepoint): Likewise.
2814 (download_trace_state_variables): Replace check with gdb_assert.
2815 (upload_fast_traceframes): Replace fatal with internal_error.
2816
34abf635
GB
28172014-08-19 Tom Tromey <tromey@redhat.com>
2818 Gary Benson <gbenson@redhat.com>
2819
2820 * Makefile.in (SFILES): Add common/common-debug.c.
2821 (OBS): Add common-debug.o.
2822 (common-debug.o): New rule.
2823 * debug.h (debug_printf): Don't declare.
2824 * debug.c (debug_printf): Renamed and rewritten as...
2825 (debug_vprintf): New function.
2826
f6e94d78
GB
28272014-08-19 Gary Benson <gbenson@redhat.com>
2828
2829 * utils.h: Do not include print-utils.h.
2830
9239eeab
GB
28312014-08-19 Tom Tromey <tromey@redhat.com>
2832 Gary Benson <gbenson@redhat.com>
2833
2834 * server.h: Add static assertion.
2835 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2836
ef87c8bb
GB
28372014-08-19 Tom Tromey <tromey@redhat.com>
2838 Gary Benson <gbenson@redhat.com>
2839
2840 * Makefile.in (SFILES): Add common/errors.c.
2841 (OBS): Add errors.o.
2842 (IPA_OBS): Add errors-ipa.o.
2843 (errors.o): New rule.
2844 (errors-ipa.o): Likewise.
2845 * utils.h (perror_with_name, error, warning): Don't declare.
2846 * utils.c (warning): Renamed and rewritten as...
2847 (vwarning): New function.
2848 (error): Renamed and rewritten as...
2849 (verror): New function.
2850 (internal_error): Renamed and rewritten as...
2851 (internal_verror): New function.
2852
bb974a24
GB
28532014-08-07 Gary Benson <gbenson@redhat.com>
2854
2855 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2856 * configure: Regenerate.
2857 * config.in: Likewise.
2858 * server.h: Do not include errno.h.
2859 * event-loop.c: Likewise.
2860 * hostio-errno.c: Likewise.
2861 * linux-low.c: Likewise.
2862 * remote-utils.c: Likewise.
2863 * spu-low.c: Likewise.
2864 * utils.c: Likewise.
2865 * gdbreplay.c: Unconditionally include errno.h.
2866
6d3d12eb
GB
28672014-08-07 Gary Benson <gbenson@redhat.com>
2868
2869 * server.h: Do not include string.h.
2870 * event-loop.c: Likewise.
2871 * linux-low.c: Likewise.
2872 * regcache.c: Likewise.
2873 * remote-utils.c: Likewise.
2874 * spu-low.c: Likewise.
2875 * utils.c: Likewise.
2876
dccbb609
GB
28772014-08-07 Gary Benson <gbenson@redhat.com>
2878
2879 * server.h: Do not include gdb_assert.h.
2880
e76df0d0
GB
28812014-08-07 Gary Benson <gbenson@redhat.com>
2882
2883 * server.h: Do not include common-utils.h.
2884
4cb9c816
GB
28852014-08-07 Gary Benson <gbenson@redhat.com>
2886
2887 * server.h: Do not include ptid.h.
2888 * notif.h: Likewise.
2889
3995eeee
GB
28902014-08-07 Gary Benson <gbenson@redhat.com>
2891
2892 * server.h: Do not include gdb_locale.h.
2893
cb9f1a9b
GB
28942014-08-07 Gary Benson <gbenson@redhat.com>
2895
2896 * server.h: Do not include gdb/signals.h.
2897 * win32-low.c: Likewise.
2898
a5fceff8
GB
28992014-08-07 Gary Benson <gbenson@redhat.com>
2900
2901 * server.h: Do not include pathmax.h.
2902
b9391142
GB
29032014-08-07 Gary Benson <gbenson@redhat.com>
2904
2905 * server.h: Do not include libiberty.h.
2906 * linux-bfin-low.c: Likewise.
2907
0e443c87
GB
29082014-08-07 Gary Benson <gbenson@redhat.com>
2909
2910 * server.h: Do not include ansidecl.h.
2911
8ebb3f56
GB
29122014-08-07 Gary Benson <gbenson@redhat.com>
2913
2914 * linux-x86-low.c: Do not include stddef.h.
2915 * lynx-ppc-low.c: Likewise.
2916 * tracepoint.c: Likewise.
2917
8980bdf6
GB
29182014-08-07 Gary Benson <gbenson@redhat.com>
2919
2920 * server.h: Do not include stdarg.h.
2921 * nto-low.c: Likewise.
2922
d7096f71
GB
29232014-08-07 Gary Benson <gbenson@redhat.com>
2924
2925 * server.h: Do not include stdlib.h.
2926 * inferiors.c: Likewise.
2927 * linux-low.c: Likewise.
2928 * regcache.c: Likewise.
2929 * spu-low.c: Likewise.
2930 * tracepoint.c: Likewise.
2931 * utils.c: Likewise.
2932
d02f550d
GB
29332014-08-07 Gary Benson <gbenson@redhat.com>
2934
2935 * server.h: Do not include stdio.h.
2936 * linux-low.c: Likewise.
2937 * remote-utils.c: Likewise.
2938 * spu-low.c: Likewise.
2939 * utils.c: Likewise.
2940 * wincecompat.c: Likewise.
2941
87f6c4e3
GB
29422014-08-06 Gary Benson <gbenson@redhat.com>
2943
2944 * regcache.c (init_register_cache): Move conditionals inside if.
2945
7089dca4
GB
29462014-08-06 Gary Benson <gbenson@redhat.com>
2947
2948 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2949
462f517e
GB
29502014-07-31 Gary Benson <gbenson@redhat.com>
2951
2952 * ax.h: Do not include server.h.
2953 * gdbthread.h: Likewise.
2954 * lynx-low.h: Likewise.
2955 * notif.h: Likewise.
2956
976411d6
GB
29572014-07-30 Gary Benson <gbenson@redhat.com>
2958
2959 * server.h: Include common-defs.h.
2960 Do not include config.h or build-gnulib-gdbserver/config.h.
2961
d41f6d8e
GB
29622014-07-30 Gary Benson <gbenson@redhat.com>
2963
2964 * hostio-errno.c: Move server.h to top of includes list.
2965 * inferiors.c: Likewise.
2966 * linux-x86-low.c: Likewise.
2967 * notif.c: Include server.h.
2968
314c6a35
TT
29692014-07-24 Tom Tromey <tromey@redhat.com>
2970 Gary Benson <gbenson@redhat.com>
2971
2972 * server.h (CORE_ADDR): Now unsigned.
2973
69ff6be5
PA
29742014-07-16 Pedro Alves <palves@redhat.com>
2975
2976 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2977
ce9e3fe7
PA
29782014-07-15 Pedro Alves <palves@redhat.com>
2979
2980 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2981 copy.
2982
e76126e8
PA
29832014-07-11 Pedro Alves <palves@redhat.com>
2984
2985 * linux-low.c (kill_wait_lwp): New function, based on
2986 kill_one_lwp_callback, but use my_waitpid directly.
2987 (kill_one_lwp_callback, linux_kill): Use it.
2988
8e9db26e
PA
29892014-06-23 Pedro Alves <palves@redhat.com>
2990
2991 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2992 before setting DR0..DR3.
2993
698b3e08
GB
29942014-06-20 Gary Benson <gbenson@redhat.com>
2995
2996 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2997 * configure: Regenerated.
2998 * config.in: Likewise.
2999
125f8a3d
GB
30002014-06-20 Gary Benson <gbenson@redhat.com>
3001
3002 * Makefile.in (SFILES): Update locations for files moved
3003 from common to nat.
3004 (object file files): Reordered.
3005
42995dbd
GB
30062014-06-20 Gary Benson <gbenson@redhat.com>
3007
3008 * i386-low.h (i386_dr_low_can_set_addr): Removed.
3009 (i386_dr_low_set_addr): Likewise.
3010 (i386_dr_low_get_addr): Likewise.
3011 (i386_dr_low_can_set_control): Likewise.
3012 (i386_dr_low_set_control): Likewise.
3013 (i386_dr_low_get_control): Likewise.
3014 (i386_dr_low_get_status): Likewise.
3015 (i386_get_debug_register_length): Likewise.
3016 * linux-x86-low.c (i386_dr_low_set_addr):
3017 Changed signature. Made static.
3018 (i386_dr_low_get_addr): Likewise.
3019 (i386_dr_low_set_control): Likewise.
3020 (i386_dr_low_get_control): Likewise.
3021 (i386_dr_low_get_status): Likewise.
3022 (i386_dr_low): New global variable.
3023 * win32-i386-low.c (i386_dr_low_set_addr):
3024 Changed signature. Made static.
3025 (i386_dr_low_get_addr): Likewise.
3026 (i386_dr_low_set_control): Likewise.
3027 (i386_dr_low_get_control): Likewise.
3028 (i386_dr_low_get_status): Likewise.
3029 (i386_dr_low): New global variable.
3030
e1d2394b
MS
30312014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
3032
3033 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3034 * Makefile.in (AR, AR_FLAGS): Define.
3035 * configure: Regenerate.
3036
3a8ee006
GB
30372014-06-19 Gary Benson <gbenson@redhat.com>
3038
3039 * Makefile.in (i386-dregs.o): New rule.
3040 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3041 * i386-low.c (target.h): Remove include.
3042 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3043 (DR_CONTROL_SHIFT): Likewise.
3044 (DR_CONTROL_SIZE): Likewise.
3045 (DR_RW_EXECUTE): Likewise.
3046 (DR_RW_WRITE): Likewise.
3047 (DR_RW_READ): Likewise.
3048 (DR_RW_IORW): Likewise.
3049 (DR_LEN_1): Likewise.
3050 (DR_LEN_2): Likewise.
3051 (DR_LEN_4): Likewise.
3052 (DR_LEN_8): Likewise.
3053 (DR_LOCAL_ENABLE_SHIFT): Likewise.
3054 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3055 (DR_ENABLE_SIZE): Likewise.
3056 (DR_LOCAL_SLOWDOWN): Likewise.
3057 (DR_GLOBAL_SLOWDOWN): Likewise.
3058 (DR_CONTROL_RESERVED): Likewise.
3059 (I386_DR_CONTROL_MASK): Likewise.
3060 (I386_DR_VACANT): Likewise.
3061 (I386_DR_LOCAL_ENABLE): Likewise.
3062 (I386_DR_GLOBAL_ENABLE): Likewise.
3063 (I386_DR_DISABLE): Likewise.
3064 (I386_DR_SET_RW_LEN): Likewise.
3065 (I386_DR_GET_RW_LEN): Likewise.
3066 (I386_DR_WATCH_HIT): Likewise.
3067 (i386_wp_op_t): Likewise.
3068 (i386_show_dr): Likewise.
3069 (i386_length_and_rw_bits): Likewise.
3070 (i386_insert_aligned_watchpoint): Likewise.
3071 (i386_remove_aligned_watchpoint): Likewise.
3072 (i386_handle_nonaligned_watchpoint): Likewise.
3073 i386_update_inferior_debug_regs(): Likewise.
3074 (i386_dr_insert_watchpoint): Likewise.
3075 (i386_dr_remove_watchpoint): Likewise.
3076 (i386_dr_region_ok_for_watchpoint): Likewise.
3077 (i386_dr_stopped_data_address): Likewise.
3078 (i386_dr_stopped_by_watchpoint): Likewise.
3079
8f26655c
GB
30802014-06-19 Gary Benson <gbenson@redhat.com>
3081
3082 * i386-low.c (i386_dr_show): Renamed to
3083 i386_show_dr and made static. All uses updated.
3084 (i386_dr_length_and_rw_bits): Renamed to
3085 i386_length_and_rw_bits and made static.
3086 All uses updated.
3087 (i386_dr_insert_aligned_watchpoint): Renamed to
3088 i386_insert_aligned_watchpoint and made static.
3089 All uses updated.
3090 (i386_dr_remove_aligned_watchpoint): Renamed to
3091 i386_remove_aligned_watchpoint and made static.
3092 All uses updated.
3093 (i386_dr_update_inferior_debug_regs): Renamed to
3094 i386_update_inferior_debug_regs and made static.
3095 All uses updated.
3096
b9228891
GB
30972014-06-18 Gary Benson <gbenson@redhat.com>
3098
5171def3
GB
3099 * i386-low.h (i386_dr_low_can_set_addr): New macro.
3100 (i386_dr_low_can_set_control): Likewise.
3101 (i386_get_debug_register_length): Likewise.
3102 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3103 (i386_dr_low_can_set_control): Likewise.
3104 (i386_get_debug_register_length): Likewise.
3105
31062014-06-17 Gary Benson <gbenson@redhat.com>
3107
b9228891
GB
3108 * i386-low.h (i386-dregs.h): New include.
3109 (DR_FIRSTADDR): Now in i386-dregs.h.
3110 (DR_LASTADDR): Likewise.
3111 (DR_NADDR): Likewise.
3112 (DR_STATUS): Likewise.
3113 (DR_CONTROL): Likewise.
3114 (i386_debug_reg_state): Likewise.
3115 (i386_dr_insert_watchpoint): Likewise.
3116 (i386_dr_remove_watchpoint): Likewise.
3117 (i386_dr_region_ok_for_watchpoint): Likewise.
3118 (i386_dr_stopped_data_address): Likewise.
3119 (i386_dr_stopped_by_watchpoint): Likewise.
3120 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3121
4be83cc2
GB
31222014-06-18 Gary Benson <gbenson@redhat.com>
3123
3124 * i386-low.h (i386_low_insert_watchpoint): Renamed to
3125 i386_dr_insert_watchpoint.
3126 (i386_low_remove_watchpoint): Renamed to
3127 i386_dr_remove_watchpoint.
3128 (i386_low_region_ok_for_watchpoint): Renamed to
3129 i386_dr_region_ok_for_watchpoint.
3130 (i386_low_stopped_data_address): Renamed to
3131 i386_dr_stopped_data_address.
3132 (i386_low_stopped_by_watchpoint): Renamed to
3133 i386_dr_stopped_by_watchpoint.
3134 * i386-low.c (i386_show_dr): Renamed to
3135 i386_dr_show and made nonstatic. All uses updated.
3136 (i386_length_and_rw_bits): Renamed to
3137 i386_dr_length_and_rw_bits and made nonstatic.
3138 All uses updated.
3139 (i386_insert_aligned_watchpoint): Renamed to
3140 i386_dr_insert_aligned_watchpoint and made nonstatic.
3141 All uses updated.
3142 (i386_remove_aligned_watchpoint): Renamed to
3143 i386_dr_remove_aligned_watchpoint and made nonstatic.
3144 All uses updated.
3145 (i386_update_inferior_debug_regs): Renamed to
3146 i386_dr_update_inferior_debug_regs and made nonstatic.
3147 All uses updated.
3148 (i386_low_insert_watchpoint): Renamed to
3149 i386_dr_insert_watchpoint. All uses updated.
3150 (i386_low_remove_watchpoint): Renamed to
3151 i386_dr_remove_watchpoint. All uses updated.
3152 (i386_low_region_ok_for_watchpoint): Renamed to
3153 i386_dr_region_ok_for_watchpoint. All uses updated.
3154 (i386_low_stopped_data_address): Renamed to
3155 i386_dr_stopped_data_address. All uses updated.
3156 (i386_low_stopped_by_watchpoint): Renamed to
3157 i386_dr_stopped_by_watchpoint. All uses updated.
3158
131aa0d4
GB
31592014-06-18 Gary Benson <gbenson@redhat.com>
3160
3161 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3162 (i386_dr_low_can_set_control): Likewise.
3163 (i386_insert_aligned_watchpoint): New check.
3164
d9305f7f
GB
31652014-06-18 Gary Benson <gbenson@redhat.com>
3166
3167 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3168 Renamed to state.
3169
e927c9fc
GB
31702014-06-18 Gary Benson <gbenson@redhat.com>
3171
3172 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3173 instead of fatal and error.
3174 (i386_handle_nonaligned_watchpoint): Likewise.
3175
1b6d4134
GB
31762014-06-18 Gary Benson <gbenson@redhat.com>
3177
3178 * i386-low.c (i386_get_debug_register_length): New macro.
3179 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3180 (i386_show_dr): Use debug_printf instead of fprintf. Use
3181 phex to format values.
3182
6e62758f
GB
31832014-06-18 Gary Benson <gbenson@redhat.com>
3184
3185 * i386-low.h: Comment changes.
3186 * i386-low.c: Likewise.
3187
fc6e2f03
GB
31882014-06-18 Gary Benson <gbenson@redhat.com>
3189
3190 * i386-low.c: Whitespace changes.
3191
f9d1eeed
TT
31922014-06-12 Tom Tromey <tromey@redhat.com>
3193
3194 * utils.c (freeargv): Remove.
3195
0b04e523
TT
31962014-06-12 Tom Tromey <tromey@redhat.com>
3197
3198 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3199 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3200 (parse_debug_format_options): Likewise.
3201 (gdbserver_usage): Likewise.
3202 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3203 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3204 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3205 against libiberty.
3206 ($(LIBGNU)): Depend on libiberty.
3207 (all-lib): Recurse into all subdirs.
3208 (install-only): Invoke "install" target in subdirs.
3209 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3210 targets.
3211 * configure: Rebuild.
3212 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3213 for vasprintf, vsnprintf, or gettimeofday.
3214 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3215 srv_tgtobj.
3216
270c9937
JB
32172014-06-05 Joel Brobecker <brobecker@adacore.com>
3218
3219 * development.sh: Delete.
3220 * Makefile.in (config.status): Adjust dependency on development.sh.
3221 * configure.ac: Adjust development.sh source call.
3222 * configure: Regenerate.
3223
0a261ed8
PA
32242014-06-02 Pedro Alves <palves@redhat.com>
3225
3226 * ax.c (gdb_free_agent_expr): New function.
3227 * ax.h (gdb_free_agent_expr): New declaration.
3228 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3229 list.
3230 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3231 static.
3232 (clear_breakpoint_conditions_and_commands): New function.
3233 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3234 (clear_breakpoint_conditions_and_commands): New declaration.
3235
e9dae05e
RR
32362014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3237
3238 * linux-aarch64-low.c (asm/ptrace.h): Include.
3239
5876f503
JK
32402014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3241
3242 Fix TLS access for -static -pthread.
3243 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3244 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3245 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3246
802e8e6d
PA
32472014-05-20 Pedro Alves <palves@redhat.com>
3248
3249 * linux-aarch64-low.c (aarch64_insert_point)
3250 (aarch64_remove_point): No longer check whether the type is
3251 supported here. Adjust to new interface.
3252 (the_low_target): Install aarch64_supports_z_point_type as
3253 supports_z_point_type method.
3254 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3255 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3256 instead of a Z packet char. Adjust.
3257 (arm_supports_z_point_type): New function.
3258 (arm_insert_point, arm_remove_point): Adjust to new interface.
3259 (the_low_target): Install arm_supports_z_point_type.
3260 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3261 (cris_insert_point, cris_remove_point): Adjust to new interface.
3262 Don't check whether the type is supported here.
3263 (the_low_target): Install cris_supports_z_point_type.
3264 * linux-low.c (linux_supports_z_point_type): New function.
3265 (linux_insert_point, linux_remove_point): Adjust to new interface.
3266 * linux-low.h (struct linux_target_ops) <insert_point,
3267 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3268 raw_breakpoint pointer parameter.
3269 <supports_z_point_type>: New method.
3270 * linux-mips-low.c (mips_supports_z_point_type): New function.
3271 (mips_insert_point, mips_remove_point): Adjust to new interface.
3272 Use mips_supports_z_point_type.
3273 (the_low_target): Install mips_supports_z_point_type.
3274 * linux-ppc-low.c (the_low_target): Install NULL as
3275 supports_z_point_type method.
3276 * linux-s390-low.c (the_low_target): Install NULL as
3277 supports_z_point_type method.
3278 * linux-sparc-low.c (the_low_target): Install NULL as
3279 supports_z_point_type method.
3280 * linux-x86-low.c (x86_supports_z_point_type): New function.
3281 (x86_insert_point): Adjust to new insert_point interface. Use
3282 insert_memory_breakpoint. Adjust to new
3283 i386_low_insert_watchpoint interface.
3284 (x86_remove_point): Adjust to remove_point interface. Use
3285 remove_memory_breakpoint. Adjust to new
3286 i386_low_remove_watchpoint interface.
3287 (the_low_target): Install x86_supports_z_point_type.
3288 * lynx-low.c (lynx_target_ops): Install NULL as
3289 supports_z_point_type callback.
3290 * nto-low.c (nto_supports_z_point_type): New.
3291 (nto_insert_point, nto_remove_point): Adjust to new interface.
3292 (nto_target_ops): Install nto_supports_z_point_type.
3293 * mem-break.c: Adjust intro comment.
3294 (struct raw_breakpoint) <raw_type, size>: New fields.
3295 <inserted>: Update comment.
3296 <shlib_disabled>: Delete field.
3297 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3298 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3299 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3300 (raw_bkpt_type_to_target_hw_bp_type): New function.
3301 (find_enabled_raw_code_breakpoint_at): New function.
3302 (find_raw_breakpoint_at): New type and size parameters. Use them.
3303 (insert_memory_breakpoint): New function, based off
3304 set_raw_breakpoint_at.
3305 (remove_memory_breakpoint): New function.
3306 (set_raw_breakpoint_at): Reimplement.
3307 (set_breakpoint): New, based on set_breakpoint_at.
3308 (set_breakpoint_at): Reimplement.
3309 (delete_raw_breakpoint): Go through the_target->remove_point
3310 instead of assuming memory breakpoints.
3311 (find_gdb_breakpoint_at): Delete.
3312 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3313 (find_gdb_breakpoint): New function.
3314 (set_gdb_breakpoint_at): Delete.
3315 (z_type_supported): New function.
3316 (set_gdb_breakpoint_1): New function, loosely based off
3317 set_gdb_breakpoint_at.
3318 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3319 (delete_gdb_breakpoint_at): Delete.
3320 (delete_gdb_breakpoint_1): New function, loosely based off
3321 delete_gdb_breakpoint_at.
3322 (delete_gdb_breakpoint): New function.
3323 (clear_gdb_breakpoint_conditions): Rename to ...
3324 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3325 breakpoint.
3326 (add_condition_to_breakpoint): Make static.
3327 (add_breakpoint_condition): Take a struct breakpoint pointer
3328 instead of an address. Adjust.
3329 (gdb_condition_true_at_breakpoint): Rename to ...
3330 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3331 z_type parameter.
3332 (gdb_condition_true_at_breakpoint): Reimplement.
3333 (add_breakpoint_commands): Take a struct breakpoint pointer
3334 instead of an address. Adjust.
3335 (gdb_no_commands_at_breakpoint): Rename to ...
3336 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3337 parameter. Return true if no breakpoint was found. Change debug
3338 output.
3339 (gdb_no_commands_at_breakpoint): Reimplement.
3340 (run_breakpoint_commands): Rename to ...
3341 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3342 and change return type to boolean.
3343 (run_breakpoint_commands): New function.
3344 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3345 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3346 breakpoint. Go through the_target->remove_point instead of
3347 assuming memory breakpoint.
3348 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3349 software and hardware breakpoints.
3350 (reinsert_raw_breakpoint): Go through the_target->insert_point
3351 instead of assuming memory breakpoint.
3352 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3353 software and hardware breakpoints.
3354 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3355 Check both software and hardware breakpoints.
3356 (validate_inserted_breakpoint): Assert the breakpoint is a
3357 software breakpoint. Set the inserted flag to -1 instead of
3358 setting shlib_disabled.
3359 (delete_disabled_breakpoints): Adjust.
3360 (validate_breakpoints): Only validate software breakpoints.
3361 Adjust to inserted flag change.
3362 (check_mem_read, check_mem_write): Skip breakpoint types other
3363 than software breakpoints. Adjust to inserted flag change.
3364 * mem-break.h (enum raw_bkpt_type): New enum.
3365 (raw_breakpoint, struct process_info): Forward declare.
3366 (Z_packet_to_target_hw_bp_type): Delete declaration.
3367 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3368 (set_gdb_breakpoint, delete_gdb_breakpoint)
3369 (clear_breakpoint_conditions): New declarations.
3370 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3371 (breakpoint_inserted_here): Update comment.
3372 (add_breakpoint_condition, add_breakpoint_commands): Replace
3373 address parameter with a breakpoint pointer parameter.
3374 (gdb_breakpoint_here): Update comment.
3375 (delete_gdb_breakpoint_at): Delete.
3376 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3377 * server.c (process_point_options): Take a struct breakpoint
3378 pointer instead of an address. Adjust.
3379 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3380 delete_gdb_breakpoint.
3381 * spu-low.c (spu_target_ops): Install NULL as
3382 supports_z_point_type method.
3383 * target.h: Include mem-break.h.
3384 (struct target_ops) <prepare_to_access_memory>: Update comment.
3385 <supports_z_point_type>: New field.
3386 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3387 instead of a char. Also take a raw breakpoint pointer.
3388 * win32-arm-low.c (the_low_target): Install NULL as
3389 supports_z_point_type.
3390 * win32-i386-low.c (i386_supports_z_point_type): New function.
3391 (i386_insert_point, i386_remove_point): Adjust to new interface.
3392 (the_low_target): Install i386_supports_z_point_type.
3393 * win32-low.c (win32_supports_z_point_type): New function.
3394 (win32_insert_point, win32_remove_point): Adjust to new interface.
3395 (win32_target_ops): Install win32_supports_z_point_type.
3396 * win32-low.h (struct win32_target_ops):
3397 <supports_z_point_type>: New method.
3398 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3399 instead of a char. Also take a raw breakpoint pointer.
3400
932539e3
PA
34012014-05-20 Pedro Alves <palves@redhat.com>
3402
3403 * mem-break.h: Include break-common.h.
3404 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3405 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3406 (Z_packet_to_target_hw_bp_type): New declaration.
3407 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3408 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3409 (Z_PACKET_ACCESS_WP): Delete macros.
3410 (Z_packet_to_hw_type): Delete function.
3411 * i386-low.h: Don't include break-common.h here.
3412 (Z_packet_to_hw_type): Delete declaration.
3413 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3414 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3415 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3416 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3417 * linux-aarch64-low.c: Don't include break-common.h here.
3418 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3419 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3420 (Z_packet_to_target_hw_bp_type): Delete function.
3421 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3422 function.
3423 (mips_insert_point, mips_remove_point): Use
3424 Z_packet_to_target_hw_bp_type.
3425
4ff0d3d8
PA
34262014-05-20 Pedro Alves <palves@redhat.com>
3427
3428 * linux-aarch64-low.c: Include break-common.h.
3429 (enum target_point_type): Delete.
3430 (Z_packet_to_point_type): Rename to ...
3431 (Z_packet_to_target_hw_bp_type): ... this, and return a
3432 target_hw_bp_type instead.
3433 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3434 instead of an enum target_point_type.
3435 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3436 breakpoint type.
3437 (aarch64_dr_state_insert_one_point)
3438 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3439 (aarch64_handle_aligned_watchpoint)
3440 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3441 Take an enum target_hw_bp_type instead of an enum
3442 target_point_type.
3443 (aarch64_supports_z_point_type): New function.
3444 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3445 use Z_packet_to_target_hw_bp_type.
3446
786dc519
JB
34472014-05-20 Joel Brobecker <brobecker@adacore.com>
3448
3449 * configure.ac: Only use -Werror by default when DEVELOPMENT
3450 is true.
3451 * configure: Regenerate.
3452
9e0aa64f
JK
34532014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3454
3455 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3456 * linux-x86-low.c (X86_64_USER_REGS): New.
3457 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3458
2b577b92
YQ
34592014-04-28 Yao Qi <yao@codesourcery.com>
3460
3461 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3462 name.
3463
94611da2
PA
34642014-04-25 Pedro Alves <palves@redhat.com>
3465
3466 PR server/16255
3467 * linux-low.c (linux_attach_fail_reason_string): New function.
3468 (linux_attach_lwp): Delete.
3469 (linux_attach_lwp_1): Rename to ...
3470 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3471 argument. Remove "initial" parameter. Return int instead of
3472 void. Don't error or warn here.
3473 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3474 failure to attach to the tgid. Call warning when failing to
3475 attach to an lwp.
3476 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3477 argument. Remove "initial" parameter. Return int instead of
3478 void. Don't error or warn here.
3479 (linux_attach_fail_reason_string): New declaration.
3480 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3481 interface change. Use linux_attach_fail_reason_string.
3482
01f9f808
MS
34832014-04-24 Michael Sturm <michael.sturm@mintel.com>
3484 Walfred Tedeschi <walfred.tedeschi@intel.com>
3485
3486 * Makefile.in: Added rules to handle new files
3487 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3488 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3489 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3490 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3491 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3492 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3493 x32-avx512-linux.o.
3494 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3495 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3496 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3497 i386/x32-avx512.xml.
3498 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3499 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3500 i386/x32-avx512-linux.xml.
3501 * i387-fp.c (num_avx512_k_registers): New constant for number
3502 of K registers.
3503 (num_avx512_zmmh_low_registers): New constant for number of
3504 lower ZMM registers (0-15).
3505 (num_avx512_zmmh_high_registers): New constant for number of
3506 higher ZMM registers (16-31).
3507 (num_avx512_ymmh_registers): New contant for number of higher
3508 YMM registers (ymm16-31 added by avx521 on x86_64).
3509 (num_avx512_xmm_registers): New constant for number of higher
3510 XMM registers (xmm16-31 added by AVX512 on x86_64).
3511 (struct i387_xsave): Add space for AVX512 registers.
3512 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3513 Add code to handle AVX512 registers.
3514 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3515 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3516 prototypei from generated file.
3517 (tdesc_amd64_avx512_linux): Likewise.
3518 (init_registers_x32_avx512_linux): Likewise.
3519 (tdesc_x32_avx512_linux): Likewise.
3520 (init_registers_i386_avx512_linux): Likewise.
3521 (tdesc_i386_avx512_linux): Likewise.
3522 (x86_64_regmap): Add AVX512 registers.
3523 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3524 mask.
3525 (initialize_low_arch): Add code to initialize AVX512 registers.
3526
51aa91f9
PA
35272014-04-23 Pedro Alves <palves@redhat.com>
3528
3529 * mem-break.c (find_gdb_breakpoint_at): Make static.
3530 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3531
a4165e94
PA
35322014-04-23 Pedro Alves <palves@redhat.com>
3533
3534 * i386-low.c: Don't include break-common.h here.
3535 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3536 prototype to take target_hw_bp_type as argument instead of a Z
3537 packet char.
3538 * i386-low.h: Include break-common.h here.
3539 (Z_packet_to_hw_type): Declare.
3540 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3541 prototypes.
3542 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3543 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3544 (x86_remove_point): Convert the packet number to a
3545 target_hw_bp_type before calling i386_low_remove_watchpoint.
3546 * win32-i386-low.c (i386_insert_point): Convert the packet number
3547 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3548 (i386_remove_point): Convert the packet number to a
3549 target_hw_bp_type before calling i386_low_remove_watchpoint.
3550
b8acf843
PA
35512014-04-23 Pedro Alves <palves@redhat.com>
3552
3553 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3554
d708bcd1
PA
35552014-04-10 Pedro Alves <palves@redhat.com>
3556
3557 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3558 Check if the condition or command is NULL before checking if the
3559 breakpoint is known. On success, return true.
3560 * mem-break.h (add_breakpoint_condition): Document return.
3561 (add_breakpoint_commands): Add describing comment.
3562 * server.c (skip_to_semicolon): New function.
3563 (process_point_options): Use it.
3564
2eec7d5b
PA
35652014-04-09 Pedro Alves <palves@redhat.com>
3566
3567 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3568 to lwpid_of.
3569
fa96cb38
PA
35702014-02-27 Pedro Alves <palves@redhat.com>
3571
3572 PR 12702
3573 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3574 macros.
3575 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3576 output.
3577 (last_thread_of_process_p): Take a PID argument instead of a
3578 thread pointer.
3579 (linux_wait_for_lwp): Delete.
3580 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3581 functions.
3582 (linux_low_filter_event): New function, party factored out from
3583 linux_wait_for_event.
3584 (linux_wait_for_event): Rename to ...
3585 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3586 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3587 sigsuspend. Check for zombie leaders.
3588 (linux_wait_for_event): Reimplement as wrapper around
3589 linux_wait_for_event_filtered.
3590 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3591 a normal or signal exit is seen, it's the whole process exiting.
3592 (wait_for_sigstop): No longer a for_each_inferior callback.
3593 Rewrite on top of linux_wait_for_event_filtered.
3594 (stop_all_lwps): Call wait_for_sigstop directly.
3595 * server.c (resume, handle_target_event): Handle
3596 TARGET_WAITKIND_NO_RESUMED.
3597
d763de10
JB
35982014-02-26 Joel Brobecker <brobecker@adacore.com>
3599
3600 * win32-low.c (psapi_get_dll_name,
3601 * win32_CreateToolhelp32Snapshot): Delete.
3602 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3603 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3604 Delete.
3605 (handle_load_dll): Add function description.
3606 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3607
850a0f76
JB
36082014-02-26 Joel Brobecker <brobecker@adacore.com>
3609
3610 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3611 Add comment.
3612 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3613 base address when calling win32_add_one_solib.
3614 (handle_load_dll): Delete local variable load_addr.
3615 Remove 0x1000 offset applied to DLL base address when calling
3616 win32_add_one_solib.
3617 (handle_unload_dll): Add comment.
3618
f25b3fc3
JB
36192014-02-26 Joel Brobecker <brobecker@adacore.com>
3620
3621 * win32-low.c (win32_add_all_dlls): Renames
3622 win32_ensure_ntdll_loaded. Rewrite function documentation.
3623 Adjust implementation to always load all DLLs.
3624 Add 0x1000 offset to DLL base address when calling
3625 win32_add_one_solib.
3626 (child_initialization_done): New static global.
3627 (do_initial_child_stuff): Set child_initialization_done to
3628 zero during child initialization, and 1 after. Replace call
3629 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3630 Add comment.
3631 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3632 (handle_unload_dll): Add function documentation.
3633 (get_child_debug_event): Ignore load and unload DLL events
3634 during child initialization.
3635
d86d4aaf
DE
36362014-02-20 Doug Evans <dje@google.com>
3637
3bc32da3 3638 Remove global all_lwps.
d86d4aaf
DE
3639 * inferiors.h (ptid_of): Move here from linux-low.h.
3640 (pid_of, lwpid_of): Ditto.
3641 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3642 parameter is a struct thread_info * now.
3643 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3644 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3645 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3646 directly.
3647 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3648 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3649 * linux-arm-low.c (update_registers_callback): Update, "entry"
3650 parameter is a struct thread_info * now.
3651 Fetch lwpid from current_inferior directly.
3652 (arm_insert_point): Pass &all_threads to find_inferior instead of
3653 &all_lwps.
3654 (arm_remove_point): Ditto.
3655 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3656 (arm_prepare_to_resume): Fetch pid from thread.
3657 (arm_read_description): Fetch lwpid from current_inferior directly.
3658 * linux-low.c (all_lwps): Delete.
3659 (delete_lwp): Delete call to remove_inferior.
3660 (handle_extended_wait): Fetch lwpid from thread.
3661 (add_lwp): Don't set lwp->entry.id. Remove call to
3662 add_inferior_to_list.
3663 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3664 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3665 (kill_one_lwp_callback): Ditto.
3666 (linux_kill): Don't dereference NULL pointer.
3667 Fetch ptid,lwpid from thread.
3668 (get_detach_signal): Fetch ptid from thread.
3669 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3670 Simplify call to regcache_invalidate_thread.
3671 (delete_lwp_callback): Update, "entry" parameter is a
3672 struct thread_info * now. Fetch pid from thread.
3673 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3674 (status_pending_p_callback): Update, "entry" parameter is a
3675 struct thread_info * now. Fetch ptid from thread.
3676 (find_lwp_pid): Update, "entry" parameter is a
3677 struct thread_info * now.
3678 (linux_wait_for_lwp): Fetch pid from thread.
3679 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3680 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3681 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3682 (dequeue_one_deferred_signal): Ditto.
3683 (cancel_breakpoint): Fetch ptid from current_inferior.
3684 (linux_wait_for_event): Pass &all_threads to find_inferior,
3685 not &all_lwps. Fetch ptid, lwpid from thread.
3686 (count_events_callback): Update, "entry" parameter is a
3687 struct thread_info * now.
3688 (select_singlestep_lwp_callback): Ditto.
3689 (select_event_lwp_callback): Ditto.
3690 (cancel_breakpoints_callback): Ditto.
3691 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3692 not &all_lwps.
3693 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3694 (unsuspend_one_lwp): Update, "entry" parameter is a
3695 struct thread_info * now.
3696 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3697 not &all_lwps.
3698 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3699 Fetch lwpid from thread, not lwp.
3700 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3701 Pass &all_threads to find_inferior, not &all_lwps.
3702 (send_sigstop): Fetch lwpid from thread, not lwp.
3703 (send_sigstop_callback): Update, "entry" parameter is a
3704 struct thread_info * now.
3705 (suspend_and_send_sigstop_callback): Ditto.
3706 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3707 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3708 struct thread_info * now.
3709 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3710 from thread, lwp.
3711 (lwp_running): Update, "entry" parameter is a
3712 struct thread_info * now.
3713 (stop_all_lwps): Fetch ptid from thread.
3714 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3715 (linux_resume_one_lwp): Fetch lwpid from thread.
3716 (linux_set_resume_request): Update, "entry" parameter is a
3717 struct thread_info * now. Fetch pid, lwpid from thread.
3718 (resume_status_pending_p): Update, "entry" parameter is a
3719 struct thread_info * now.
3720 (need_step_over_p): Ditto. Fetch lwpid from thread.
3721 (start_step_over): Fetch lwpid from thread.
3722 (linux_resume_one_thread): Update, "entry" parameter is a
3723 struct thread_info * now. Fetch lwpid from thread.
3724 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3725 (proceed_one_lwp): Update, "entry" parameter is a
3726 struct thread_info * now. Fetch lwpid from thread.
3727 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3728 struct thread_info * now.
3729 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3730 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3731 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3732 directly.
3733 (regsets_store_inferior_registers): Ditto.
3734 (fetch_register, store_register): Ditto.
3735 (linux_read_memory, linux_write_memory): Ditto.
3736 (linux_request_interrupt): Ditto.
3737 (linux_read_auxv): Ditto.
3738 (linux_xfer_siginfo): Ditto.
3739 (linux_qxfer_spu): Ditto.
3740 (linux_qxfer_libraries_svr4): Ditto.
3741 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3742 moved to inferiors.h.
3743 (get_lwp): Delete.
3744 (get_thread_lwp): Update.
3745 (struct lwp_info): Delete member "entry". Simplify comment for
3746 member "thread".
3747 (all_lwps): Delete.
3748 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3749 current_inferior directly.
3750 (update_watch_registers_callback): Update, "entry" parameter is a
3751 struct thread_info * now. Fetch pid from thread.
3752 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3753 (mips_insert_point): Fetch lwpid from current_inferior.
3754 Pass &all_threads to find_inferior, not &all_lwps.
3755 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3756 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3757 directly.
3758 (mips_stopped_data_address): Ditto.
3759 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3760 directly.
3761 * linux-tile-low.c (tile_arch_setup): Ditto.
3762 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3763 (update_debug_registers_callback): Update, "entry" parameter is a
3764 struct thread_info * now. Fetch pid from thread.
3765 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3766 Pass &all_threads to find_inferior, not &all_lwps.
3767 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3768 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3769 Pass &all_threads to find_inferior, not &all_lwps.
3770 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3771 (i386_dr_low_get_status): Ditto.
3772 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3773 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3774 (x86_linux_read_description): Ditto.
3775 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3776
3b8361aa
DE
37772014-02-20 Doug Evans <dje@google.com>
3778
3779 * inferiors.c (get_first_inferior): Fix buglet.
3780
f7667f0d
DE
37812014-02-19 Doug Evans <dje@google.com>
3782
3783 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3784 * inferiors.c (add_thread): Change result type to struct thread_info *.
3785 All callers updated.
3786 (add_lwp): Call add_thread here instead of in callers.
3787 All callers updated.
3788 * linux-low.h (get_lwp_thread): Rewrite.
3789 (struct lwp_info): New member "thread".
3790
b3312d80
DE
37912014-02-19 Doug Evans <dje@google.com>
3792
3793 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3794 All callers updated.
3795
ecc6f45c
DE
37962014-02-19 Doug Evans <dje@google.com>
3797
3798 * inferiors.c (add_thread): Fix whitespace.
3799
649ebbca
DE
38002014-02-19 Doug Evans <dje@google.com>
3801
3802 * dll.c (clear_dlls): Replace accessing list implemention details
3803 with API function.
3804 * gdbthread.h (get_first_thread): Declare.
3805 * inferiors.c (for_each_inferior_with_data): New function.
3806 (get_first_thread): New function.
3807 (find_thread_ptid): Simplify.
3808 (get_first_inferior): New function.
3809 (clear_list): Delete.
3810 (one_inferior_p): New function.
3811 (clear_inferior_list): New function.
3812 (clear_inferiors): Update.
3813 * inferiors.h (for_each_inferior_with_data): Declare.
3814 (clear_inferior_list): Declare.
3815 (one_inferior_p): Declare.
3816 (get_first_inferior): Declare.
3817 * linux-low.c (linux_wait_for_event): Replace accessing list
3818 implemention details with API function.
3819 * server.c (target_running): Ditto.
3820 (accumulate_file_name_length): New function.
3821 (emit_dll_description): New function.
3822 (handle_qxfer_libraries): Replace accessing list implemention
3823 details with API function.
3824 (handle_qxfer_threads_worker): New function.
3825 (handle_qxfer_threads_proper): Replace accessing list implemention
3826 details with API function.
3827 (handle_query): Ditto.
3828 (visit_actioned_threads_callback_ftype): New typedef.
3829 (visit_actioned_threads_data): New struct.
3830 (visit_actioned_threads): Rewrite to be find_inferior callback.
3831 (resume): Call find_inferior.
3832 (handle_status): Replace accessing list implemention
3833 details with API function.
3834 (process_serial_event): Replace accessing list implemention details
3835 with API function.
3836 * target.c (set_desired_inferior): Replace accessing list implemention
3837 details with API function.
3838 * tracepoint.c (same_process_p): New function.
3839 (gdb_agent_about_to_close): Replace accessing list implemention
3840 details with API function.
3841 * win32-low.c (child_delete_thread): Replace accessing list
3842 implemention details with API function.
3843 (match_dll_by_basename): New function.
3844 (dll_is_loaded_by_basename): New function.
3845 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3846 details call to dll_is_loaded_by_basename.
3847
80894984
DE
38482014-02-19 Doug Evans <dje@google.com>
3849
3850 * dll.h (struct dll_info): Add comment.
3851 * gdbthread.h (struct thread_info): Add comment.
3852 (current_ptid): Simplify.
3853 * inferiors.c (add_process): Update.
3854 (remove_process): Update.
3855 * inferiors.h (struct process_info): Rename member "head" to "entry".
3856 * linux-low.c (delete_lwp): Update.
3857 (add_lwp): Update.
3858 (last_thread_of_process_p): Update.
3859 (kill_one_lwp_callback, linux_kill): Update.
3860 (status_pending_p_callback): Update.
3861 (wait_for_sigstop): Update. Simplify read of ptid.
3862 (start_step_over): Update.
3863 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3864 (get_lwp_thread): Update.
3865 (struct lwp_info): Rename member "head" to "entry".
3866 * regcache.h (inferior_list_entry): Delete.
3867 * server.c (kill_inferior_callback): Update.
3868 (detach_or_kill_inferior_callback): Update.
3869 (print_started_pid): Update.
3870 (print_attached_pid): Update.
3871 (process_serial_event): Simplify read of ptid.
3872 * thread-db.c (thread_db_create_event): Update.
3873 (thread_db_get_tls_address): Update.
3874 * win32-low.c (current_inferior_ptid): Simplify.
3875
46917d26
TT
38762014-02-19 Tom Tromey <tromey@redhat.com>
3877
3878 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3879 argument.
3880 (target_supports_btrace): Update.
3881
0759a81e
YQ
38822014-02-14 Yao Qi <yao@codesourcery.com>
3883
3884 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3885 (rsp-low-ipa.o): New target.
3886
a7191e8b
TT
38872014-02-12 Tom Tromey <tromey@redhat.com>
3888
3889 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3890 convert_ascii_to_int.
3891 * regcache.c (registers_to_string): Likewise.
3892 * remote-utils.c (decode_M_packet): Likewise.
3893 * server.c (process_serial_event): Likewise.
3894
ff0e980e
TT
38952014-02-12 Tom Tromey <tromey@redhat.com>
3896
3897 * server.c (handle_query, handle_v_run): Use hex2bin, not
3898 unhexify.
3899 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3900
e9371aff
TT
39012014-02-12 Tom Tromey <tromey@redhat.com>
3902
3903 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3904 convert_int_to_ascii.
3905 * regcache.c (registers_to_string, collect_register_as_string):
3906 Likewise.
3907 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3908 Likewise.
3909 * server.c (process_serial_event): Likewise.
3910 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3911 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3912
971dc0b8
TT
39132014-02-12 Tom Tromey <tromey@redhat.com>
3914
3915 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3916 bin2hex, not hexify.
3917 * tracepoint.c (cmd_qtstatus): Likewise.
3918
0a822afb
TT
39192014-02-12 Tom Tromey <tromey@redhat.com>
3920
3921 * remote-utils.c (monitor_output): Pass explicit length to
3922 hexify.
3923
9c3d6531
TT
39242014-02-12 Tom Tromey <tromey@redhat.com>
3925
3926 * tracepoint.c: Include rsp-low.h.
3927 * server.c: Include rsp-low.h.
3928 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3929 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3930 declare.
3931 * remote-utils.c: Include rsp-low.h.
3932 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3933 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3934 (convert_int_to_ascii, convert_ascii_to_int): Move to
3935 common/rsp-low.c.
3936 * regcache.c: Include rsp-low.h.
3937 * ax.c: Include rsp-low.h.
3938 * Makefile.in (SFILES): Add common/rsp-low.c.
3939 (OBS): Add rsp-low.o.
3940 (rsp-low.o): New target.
3941
01fd3ea5
TT
39422014-02-12 Tom Tromey <tromey@redhat.com>
3943
3944 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3945 Include print-utils.h.
3946 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3947 (plongest, thirty_two, phex_nz): Remove.
3948 * Makefile.in (SFILES): Add common/print-utils.c.
3949 (OBS): Add print-utils.o.
3950 (print-utils-ipa.o): New target.
3951 (print-utils.o): New target.
3952 (IPA_OBJS): Add print-utils-ipa.o.
3953
e99dc820
TT
39542014-02-06 Tom Tromey <tromey@redhat.com>
3955
3956 * Makefile.in (SFILES): Fix indentation.
3957
ee1e2d4f
DE
39582014-02-05 Doug Evans <dje@google.com>
3959
3960 * linux-low.c (linux_wait_for_event): Improve comment.
3961 (linux_wait_1): Keep current_inferior in sync with event_child.
3962
f5a02773
DE
39632014-01-22 Doug Evans <dje@google.com>
3964
3965 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3966
87ce2a04
DE
39672014-01-22 Doug Evans <dje@google.com>
3968
3969 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3970 * configure: Regenerate.
3971 * config.in: Regenerate.
3972 * Makefile.in (SFILES): Add debug.c.
3973 (OBS): Add debug.o.
3974 * debug.c: New file.
3975 * debug.h: New file.
3976 * linux-aarch64-low.c (*): Update all debugging printfs to use
3977 debug_printf instead of fprintf.
3978 * linux-arm-low.c (*): Ditto.
3979 * linux-cris-low.c (*): Ditto.
3980 * linux-crisv32-low.c (*): Ditto.
3981 * linux-m32r-low.c (*): Ditto.
3982 * linux-sparc-low.c (*): Ditto.
3983 * linux-x86.c (*): Ditto.
3984 * linux-low.c (*): Ditto.
3985 (linux_wait_1): Add calls to debug_enter, debug_exit.
3986 (linux_wait): Remove redundant debugging printf.
3987 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3988 (linux_resume, unstop_all_lwps): Ditto.
3989 * mem-break.c (*): Update all debugging printfs to use
3990 debug_printf instead of fprintf.
3991 * remote-utils.c (*): Ditto.
3992 * thread-db.c (*): Ditto.
3993 * server.c #include <ctype.h>, "gdb_vecs.h".
3994 (debug_threads): Moved to debug.c.
3995 (*): Update all debugging printfs to use debug_printf instead of
3996 fprintf.
3997 (start_inferior): Replace call to fflush with call to debug_flush.
3998 (monitor_show_help): Mention set debug-format.
3999 (parse_debug_format_options): New function.
4000 (handle_monitor_command): Handle "monitor set debug-format".
4001 (gdbserver_usage): Mention --debug-format.
4002 (main): Parse --debug-format.
4003 * server.h (debug_threads): Declaration moved to debug.h.
4004 #include "debug.h".
4005 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4006 trace_debug_1 that uses debug_printf.
4007 (tracepoint_look_up_symbols): Update all debugging printfs to use
4008 debug_printf instead of fprintf.
4009
e671835b
BS
40102014-01-20 Baruch Siach <baruch@tkos.co.il>
4011
4012 * linux-xtensa-low.c: Include asm/ptrace.h instead of
4013 sys/ptrace.h.
4014
b5737fa9
PA
40152014-01-17 Pedro Alves <palves@redhat.com>
4016
ea38d2a9 4017 PR build/16445
c7faa97a
PA
4018 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4019 defined after including gdb_proc_service.h.
b5737fa9 4020
40ed484e
DE
40212014-01-16 Doug Evans <dje@google.com>
4022
4023 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4024 (match_dll): Use it.
4025
969c39fb
MM
40262014-01-16 Markus Metzger <markus.t.metzger@intel.com>
4027
4028 * target.h (target_ops) <read_btrace>: Change parameters and
4029 return type to allow error reporting.
4030 * server.c (handle_qxfer_btrace): Support delta reads. Pass
4031 trace reading errors on.
4032 * linux-low.c (linux_low_read_btrace): Pass trace reading
4033 errors on.
4034 (linux_low_disable_btrace): New.
4035
ab7f45ba
DE
40362014-01-15 Doug Evans <dje@google.com>
4037
4038 * inferiors.c (thread_id_to_gdb_id): Delete.
4039 * inferiors.h (thread_id_to_gdb_id): Delete.
4040
66af0f44
EZ
40412014-01-13 Eli Zaretskii <eliz@gnu.org>
4042
4043 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4044 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
4045 versions.
4046
9939e131
PA
40472014-01-08 Pedro Alves <palves@redhat.com>
4048
4049 * server.c (handle_status): Don't discard previous queued stop
4050 replies or thread's pending status here.
4051 (main) <disconnection>: Do it here instead.
4052
b7ea362b
PA
40532014-01-08 Pedro Alves <palves@redhat.com>
4054
4055 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4056 * server.c (visit_actioned_threads, handle_pending_status): New
4057 function.
4058 (handle_v_cont): Factor out parts to ...
4059 (resume): ... this new function. If in all-stop, and a thread
4060 being resumed has a pending status, report it without actually
4061 resuming.
4062 (myresume): Adjust to use the new 'resume' function.
4063 (clear_pending_status_callback, set_pending_status_callback)
4064 (find_status_pending_thread_callback): New functions.
4065 (handle_status): Handle the case of multiple threads having
4066 interesting statuses to report. Report threads' real last signal
4067 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
4068 with an interesting thread to report the status for, instead of
4069 always reporting the status of the first thread.
4070
28498c42
JB
40712014-01-01 Joel Brobecker <brobecker@adacore.com>
4072
4073 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4074 * gdbreplay.c (gdbreplay_version): Likewise.
4075
f45c82da
YZ
40762013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
4077
4078 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4079 iov.iov_len with the real length in use.
4080
379a5e2d
JB
40812013-12-13 Joel Brobecker <brobecker@adacore.com>
4082
4083 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4084 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4085 for all targets that use win32-low.c.
4086 * win32-low.c (win32_ensure_ntdll_loaded): New function.
4087 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4088
4210d83e
PA
40892013-12-13 Pedro Alves <palves@redhat.com>
4090
4091 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4092 if equal to TARGET_WAITKIND_LOADED.
4093 * win32-low.c (cached_status): New static global.
4094 (win32_wait): Add declaration.
4095 (do_initial_child_stuff): Flush all initial pending debug events
4096 up to the initial breakpoint.
4097 (win32_wait): If CACHED_STATUS was set, return that instead
4098 of doing a real wait. Remove the code resuming the execution
4099 of the inferior after receiving a TARGET_WAITKIND_LOADED event
4100 during the initial phase. Also remove the code changing
4101 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4102 TARGET_WAITKIND_STOPPED.
4103
e7f0d979
YQ
41042013-12-11 Yao Qi <yao@codesourcery.com>
4105
4106 * notif.c (handle_notif_ack): Return 0 if no notification
4107 matches.
4108
ebcf782c
DE
41092013-11-20 Doug Evans <dje@google.com>
4110
4111 * linux-low.c (linux_set_resume_request): Fix comment.
4112
20ad9378
DE
41132013-11-20 Doug Evans <dje@google.com>
4114
4115 * linux-low.c (resume_status_pending_p): Tweak comment.
4116
a196ebeb
WT
41172013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
4118
4119 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4120 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4121 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4122 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4123 (srv_amd64_regobj): Add amd64-mpx.o.
4124 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4125 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4126 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4127 * i387-fp.c (num_pl_bnd_register) Added constant.
4128 (num_pl_bnd_cfg_registers) Added constant.
4129 (struct i387_xsave) Added reserved area and MPX fields.
4130 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4131 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4132 function.
4133 (tdesc_i386_mpx_linux): Add MPX amd64 target.
4134 (init_registers_amd64_mpx_linux): Declare new function.
4135 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4136 (x86_64_regmap): Add MPX registers.
4137 (x86_linux_read_description): Add MPX case.
4138 (initialize_low_arch): Initialize MPX targets.
4139
0080a2f6
TT
41402013-11-18 Tom Tromey <tromey@redhat.com>
4141
4142 * configure: Rebuild.
4143 * configure.ac: Don't check for stdlib.h.
4144 * gdbreplay.c: Unconditionally include stdlib.h.
4145
2978b111
TT
41462013-11-18 Tom Tromey <tromey@redhat.com>
4147
4148 * config.in: Rebuild.
4149 * configure: Rebuild.
4150 * configure.ac: Don't use AC_HEADER_DIRENT.
4151
a3d08894
TT
41522013-11-18 Tom Tromey <tromey@redhat.com>
4153
4154 * server.h: Don't check HAVE_STRING_H.
4155 * gdbreplay.c: Don't check HAVE_STRING_H.
4156 * configure: Rebuild.
4157
0a5dd17d
TT
41582013-11-18 Tom Tromey <tromey@redhat.com>
4159
4160 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4161 LIBGNU.
4162
1bd2f0ba
TT
41632013-11-08 Tom Tromey <tromey@redhat.com>
4164
4165 * configure, config.in: Rebuild.
4166 * configure.ac: Remove unused configury.
4167
3266f10b
TT
41682013-11-08 Tom Tromey <tromey@redhat.com>
4169
4170 * acinclude.m4: Include common.m4, codeset.m4.
4171 * configure, config.in: Rebuild.
4172 * configure.ac: Use GDB_AC_COMMON.
4173
6682d959
AA
41742013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4175
4176 * linux-s390-low.c (HWCAP_S390_TE): New define.
4177 (s390_arch_setup): Consider the TE field in the HWCAP for
4178 determining 'have_regset_tdb'.
4179
fd0a4d76
SDJ
41802013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4181
4182 PR gdb/16014
4183 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4184 call to sizeof.
4185
1a3d890b
PA
41862013-10-02 Pedro Alves <palves@redhat.com>
4187
4188 * server.c (process_serial_event): Don't output "GDBserver
4189 exiting" if GDB is connected through stdio.
4190 * target.c (mywait): Likewise, be silent if GDB is connected
4191 through stdio.
4192
97ad4581
JB
41932013-10-01 Joel Brobecker <brobecker@adacore.com>
4194
4195 * lynx-low.c (lynx_add_threads_after_attach): New function.
4196 (lynx_attach): Remove call to add_thread. Add call to
4197 lynx_add_threads_after_attach instead.
4198
5b4e221c
MF
41992013-09-28 Mike Frysinger <vapier@gentoo.org>
4200
4201 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4202 * config.in, configure: Regenerated.
4203
ee47b2f8
YQ
42042013-09-18 Yao Qi <yao@codesourcery.com>
4205
4206 PR server/15959
4207 * server.c (start_inferior): Clear 'resume_info'.
4208
d6707650 42092013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4210
d6707650
JW
4211 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4212 for each register.
4213
9243dd0e 42142013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 4215
9243dd0e
JW
4216 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4217 linux-tile-low.o to srv_tgtobj.
4218
c623a6ef
WN
42192013-09-16 Will Newton <will.newton@linaro.org>
4220
4221 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4222 out regs.
4223
fb71d39e
PA
42242013-09-06 Pedro Alves <palves@redhat.com>
4225
4226 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4227 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4228 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4229 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4230 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4231 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4232
8e7e9910
PA
42332013-09-06 Pedro Alves <palves@redhat.com>
4234
4235 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4236 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4237
7c3a12ca
PA
42382013-09-06 Pedro Alves <palves@redhat.com>
4239
4240 * linux-amd64-ipa.c: Include tracepoint.h.
4241 * linux-i386-ipa.c: Include tracepoint.h.
4242
8eb3d7b6
RW
42432013-09-06 Ricard Wanderlof <ricardw@axis.com>
4244
4245 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4246 (ps_get_thread_area): New function.
4247
eddddb9d
RW
42482013-09-06 Ricard Wanderlof <ricardw@axis.com>
4249
4250 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4251 (initialize_low_arch): Call init_registers_crisv32 rather than
4252 init_register_crisv32.
4253
533b0600
PA
42542013-09-05 Pedro Alves <palves@redhat.com>
4255
4256 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4257 to ...
4258 * hostio.h: ... this new file.
4259 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4260 win32-low.c: Include hostio.h.
4261
0ce3d3b5
PA
42622013-09-05 Pedro Alves <palves@redhat.com>
4263
4264 * server.h (gdb_client_data, handler_func, callback_handler_func)
4265 (delete_file_handler, add_file_handler, append_callback_event)
4266 (delete_callback_event, start_event_loop, initialize_event_loop):
4267 Move to event-loop.h and include it.
4268 * event-loop.h: New file.
4269
799cdc37
PA
42702013-09-05 Pedro Alves <palves@redhat.com>
4271
4272 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4273 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4274 (loaded_dll, unloaded_dll): Move to ...
4275 * dll.h: ... this new file.
4276 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4277
6a6bbd9d
PA
42782013-09-05 Pedro Alves <palves@redhat.com>
4279
4280 * server.h (current_process, get_thread_process, all_processes)
4281 (add_inferior_to_list, for_each_inferior, current_inferior)
4282 (remove_inferior, add_process, remove_process, find_process_pid)
4283 (have_started_inferiors_p, have_attached_inferiors_p)
4284 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4285 (clear_inferiors, find_inferior, find_inferior_id)
4286 (inferior_target_data, set_inferior_target_data)
4287 (inferior_regcache_data, set_inferior_regcache_data): Move to
4288 inferiors.h, and include it.
4289 * inferiors.h: New file.
4290
f699aaba
PA
42912013-09-05 Pedro Alves <palves@redhat.com>
4292
4293 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4294 Move ...
72f4393d 4295 * ax.h: ... here.
f699aaba 4296
c144c7a0
PA
42972013-09-05 Pedro Alves <palves@redhat.com>
4298
4299 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4300 tracepoint.h.
4301 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4302 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4303 (handle_tracepoint_general_set, handle_tracepoint_query)
4304 (tracepoint_finished_step, tracepoint_was_hit)
4305 (release_while_stepping_state_list, current_traceframe)
4306 (in_readonly_region, traceframe_read_mem)
4307 (fetch_traceframe_registers, traceframe_read_sdata)
4308 (traceframe_read_info, struct fast_tpoint_collect_status)
4309 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4310 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4311 (supply_fast_tracepoint_registers)
4312 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4313 (ipa_tdesc, claim_trampoline_space)
4314 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4315 (agent_mem_read, agent_get_trace_state_variable_value)
4316 (agent_set_trace_state_variable_value, agent_tsv_read)
4317 (agent_mem_read_string, get_raw_reg_func_addr)
4318 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4319 * tracepoint.h: ... this new file.
4320
ff42e6ab
PA
43212013-09-05 Pedro Alves <palves@redhat.com>
4322
4323 * server.h (perror_with_name, error, fatal, warning, paddress)
4324 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4325 include it.
4326 * utils.h: New file.
4327
541af0f4
PA
43282013-09-05 Pedro Alves <palves@redhat.com>
4329
4330 * server.h (remote_debug, noack_mode, transport_is_reliable)
4331 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4332 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4333 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4334 (write_enn, initialize_async_io, enable_async_io)
4335 (disable_async_io, check_remote_input_interrupt_request)
4336 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4337 (dead_thread_notify, prepare_resume_reply)
4338 (decode_address_to_semicolon, decode_address, decode_m_packet)
4339 (decode_M_packet, decode_X_packet, decode_xfer_write)
4340 (decode_search_memory_packet, unhexify, hexify)
4341 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4342 (look_up_one_symbol, relocate_instruction)
4343 (monitor_output): Move to remote-utils.h, and include it.
4344 * remote-utils.h: New file.
4345
eebdf26b
PA
43462013-09-05 Pedro Alves <palves@redhat.com>
4347
4348 * server.h (_): Delete.
4349
3aafd2ff
PA
43502013-09-02 Pedro Alves <palves@redhat.com>
4351
4352 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4353 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4354 allocated.
4355 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4356
cee83bcb
PM
43572013-09-02 Pierre Muller <muller@sourceware.org>
4358
4359 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4360 or WriteProcessMemory complete successfully and handle
4361 ERROR_PARTIAL_COPY error.
4362
9a13b2fa
PA
43632013-09-02 Pedro Alves <palves@redhat.com>
4364
4365 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4366 error instead of EIO.
4367
602e3198
JK
43682013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4369
4370 PR server/15604
4371 * linux-low.c: Include filestuff.h.
4372 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4373 * lynx-low.c: Include filestuff.h.
4374 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4375 * server.c: Include filestuff.h.
4376 (main): Call notice_open_fds.
4377 * spu-low.c: Include filestuff.h.
4378 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4379
96d7229d
LM
43802013-08-22 Luis Machado <lgustavo@codesourcery.com>
4381
4382 * Makefile.in: Explain why ../target and ../nat are not
4383 listed as include file search paths.
4384 (linux-waitpid.o): New object file rule.
4385 * configure.srv (srv_native_linux_obj): New variable.
4386 Replace all occurrences of linux native object files with
4387 $srv_native_linux_obj.
4388 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4389 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4390 (linux_enable_event_reporting): Remove declaration.
4391 (my_waitpid): Moved to common/linux-waitpid.c.
4392 (linux_wait_for_event): Pass ptid when calling
4393 linux_enable_event_reporting.
4394 (linux_supports_tracefork_flag): Remove.
4395 (linux_enable_event_reporting): Likewise.
4396 (linux_tracefork_grandchild): Remove.
4397 (STACK_SIZE): Moved to common/linux-ptrace.c.
4398 (linux_tracefork_child): Remove.
4399 (linux_test_for_tracefork): Remove.
4400 (linux_look_up_symbols): Call linux_supports_traceclone.
4401 (initialize_low): Remove call to linux_test_for_tracefork.
4402 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4403 common/linux-ptrace.h.
4404 (PTRACE_TYPE_ARG4): Likewise.
4405 Include linux-ptrace.h.
4406
32940073
PA
44072013-08-21 Pedro Alves <palves@redhat.com>
4408
4409 * config.in: Renegerate.
4410
33b60d58 44112013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 4412
33b60d58
LM
4413 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4414 (SFILES): Remove $(srcdir)/common/target-common.c and
4415 add $(srcdir)/target/waitstatus.c.
4416 (OBS): Remove target-common.o and add waitstatus.o.
4417 (server_h): Remove $(srcdir)/../common/target-common.h and
4418 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4419 and $(srcdir)/../target/waitstatus.h.
4420 (target-common.o): Remove.
4421 (waitstatus.o): New target object file.
4422 * target.h: Do not include target-common.h and
4423 include target/resume.h, target/wait.h and
4424 target/waitstatus.h.
4425
b8e1b30e
LM
44262013-08-13 Luis Machado <lgustavo@codesourcery.com>
4427
4428 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4429 to PTRACE_TYPE_ARG3.
4430 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4431 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4432 PTRACE_TYPE_ARG4.
4433 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4434 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4435
7a60ad40
YQ
44362013-07-27 Jie Zhang <jie@codesourcery.com>
4437 Daniel Jacobowitz <dan@codesourcery.com>
4438 Yao Qi <yao@codesourcery.com>
4439
4440 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4441 (mips-linux-watch.o): New rule.
4442 (mips_linux_watch_h): New variable.
4443 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4444 srv_tgtobj.
4445 * linux-mips-low.c: Include mips-linux-watch.h.
4446 (struct arch_process_info, struct arch_lwp_info): New.
4447 (update_watch_registers_callback): New function.
4448 (mips_linux_new_process, mips_linux_new_thread) New functions.
4449 (mips_linux_prepare_to_resume, mips_insert_point): New
4450 functions.
4451 (mips_remove_point, mips_stopped_by_watchpoint): New
4452 functions.
4453 (rsp_bp_type_to_target_hw_bp_type): New function.
4454 (mips_stopped_data_address): New function.
4455 (the_low_target): Add watchpoint support functions.
4456
de6f69ad
YQ
44572013-07-27 Yao Qi <yao@codesourcery.com>
4458
4459 * i386-low.c: Include break-common.h.
4460 (enum target_hw_bp_type): Remove.
4461
3360c0bf
LM
44622013-07-24 Luis Machado <lgustavo@codesourcery.com>
4463
4464 * Makefile.in (SFILES): /common/target-common.c.
4465 (OBS): Add target-common.o.
4466 (server_h): Add $(srcdir)/../common/target-common.h.
4467 (target-common.o): New target.
4468 * server.c (queue_stop_reply_callback): Free
4469 status string after use.
4470 * target.c (target_waitstatus_to_string): Remove.
4471 * target.h: Include target-common.h.
4472 (resume_kind): Likewise.
4473 (target_waitkind): Likewise.
4474 (target_waitstatus): Likewise.
4475 (TARGET_WNOHANG): Likewise.
4476
bd885420
YQ
44772013-07-04 Yao Qi <yao@codesourcery.com>
4478
4479 * Makefile.in (host_alias): Use @host_noncanonical@.
4480 (target_alias): Use @target_noncanonical@.
4481 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4482 ACX_NONCANONICAL_HOST.
4483 * configure: Regenerated.
4484
4485 Revert:
4486 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4487
4488 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4489 * configure: Rebuild.
4490 * Makefile.in (version_host, version_target): Get from configure.
4491 (version.c): Use $(version_host) and $(version_target).
4492
17ef446e
PA
44932013-07-03 Pedro Alves <palves@redhat.com>
4494
4495 * Makefile.in (config.status): Depend on development.sh.
4496 * acinclude.m4: Include libmcheck.m4.
4497 * configure: Regenerate.
4498
7a9a7487
MG
44992013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4500
4501 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4502 attribute inside the parentheses.
4503 (winapi_DebugSetProcessKillOnExit): Ditto.
4504 (winapi_DebugBreakProcess): Ditto.
4505 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 4506
49b64de6
MG
45072013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4508
4509 * notif.h (notif_event): Add a dummy member to avoid compiler
4510 errors.
4511
d5749ee7
PA
45122013-07-01 Pedro Alves <palves@redhat.com>
4513
4514 * hostio.c (HOSTIO_PATH_MAX): Define.
4515 (require_filename, handle_open, handle_unlink, handle_readlink):
4516 Use it.
4517
d8d2a3ee
PA
45182013-07-01 Pedro Alves <palves@redhat.com>
4519
4520 * server.h: Include "pathmax.h".
4521 * linux-low.c: Don't include sys/param.h.
4522 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4523 MAXPATHLEN.
4524 * win32-low.c: Don't include sys/param.h.
4525 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4526
bc7dea8d
PA
45272013-07-01 Pedro Alves <palves@redhat.com>
4528
4529 * event-loop.c: Don't check HAVE_UNISTD_H before including
4530 <unistd.h>.
4531 * gdbreplay.c: Likewise.
4532 * remote-utils.c: Likewise.
4533 * server.c: Likewise.
4534 * configure.ac: Don't check for unistd.h.
4535 * configure: Regenerate.
4536
d6c2da54
TT
45372013-06-28 Tom Tromey <tromey@redhat.com>
4538
4539 * Makefile.in (version.c): Use version.in, not
4540 common/version.in.
4541
257b6bec
MG
45422013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4543
4544 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4545 * configure: Rebuild.
4546 * Makefile.in (version_host, version_target): Get from configure.
4547 (version.c): Use $(version_host) and $(version_target).
4548
86ebe149
DK
45492013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4550
4551 Fix trace-status to output user name without trailing colon.
4552 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4553
f30aa5af
DK
45542013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4555
4556 Fix trace-status to output proper start-time and stop-time.
4557 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4558 output start time and stop time in hex as gdb expects.
4559
28a93511
YQ
45602013-06-26 Pedro Alves <pedro@codesourcery.com>
4561
4562 * tracepoint.c (build_traceframe_info_xml): Output trace state
4563 variables present in the trace buffer.
4564
01208463
TT
45652013-06-24 Tom Tromey <tromey@redhat.com>
4566
4567 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4568 create-version.sh.
4569 (version.o): Remove.
4570 * gdbreplay.c: Include version.h.
4571 (version, host_name): Don't declare.
4572 * server.h: Include version.h.
4573 (version, host_name): Don't declare.
4574
760256f9
PA
45752013-06-12 Pedro Alves <palves@redhat.com>
4576
4577 * linux-x86-low.c (linux_is_elf64): Delete global.
4578 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4579 with local linux_pid_exe_is_elf_64_file use.
4580
030031ee
PA
45812013-06-11 Pedro Alves <palves@redhat.com>
4582
4583 * linux-low.c (regset_disabled, disable_regset): New functions.
4584 (regsets_fetch_inferior_registers)
4585 (regsets_store_inferior_registers): Use them.
4586 (initialize_regsets_info); Don't allocate the disabled_regsets
4587 array here.
4588 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4589 comment.
4590
5da6eb0a
PA
45912013-06-11 Pedro Alves <palves@redhat.com>
4592
4593 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4594 xmalloc.
4595
7e5aaa09
PA
45962013-06-11 Pedro Alves <palves@redhat.com>
4597
4598 * linux-x86-low.c (initialize_low_arch): Call
4599 init_registers_x32_avx_linux.
4600
d878444c
JK
46012013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4602
4603 Fix compatibility with Android Bionic.
4604 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4605 it is not empty.
4606
3aee8918
PA
46072013-06-07 Pedro Alves <palves@redhat.com>
4608
5f2b57b5 4609 PR server/14823
3aee8918
PA
4610 * Makefile.in (OBS): Add tdesc.o.
4611 (IPA_OBJS): Add tdesc-ipa.o.
4612 (tdesc-ipa.o): New rule.
4613 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4614 interface.
4615 * linux-low.c (new_inferior): Delete.
4616 (disabled_regsets, num_regsets): Delete.
4617 (linux_add_process): Adjust to set the new per-process
4618 new_inferior flag.
4619 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4620 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4621 was a stop. When calling arch_setup, switch the current inferior
4622 to the thread that got an event.
4623 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4624 (regsets_fetch_inferior_registers)
4625 (regsets_store_inferior_registers): New regsets_info parameter.
4626 Adjust to use it.
4627 (linux_register_in_regsets): New regs_info parameter. Adjust to
4628 use it.
4629 (register_addr, fetch_register, store_register): New usrregs_info
4630 parameter. Adjust to use it.
4631 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4632 parameter regs_info. Adjust to use it.
4633 (linux_fetch_registers): Get the current inferior's regs_info, and
4634 adjust to use it.
4635 (linux_store_registers): Ditto.
4636 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4637 (initialize_low): Don't initialize the target_regsets here. Call
4638 initialize_low_arch.
4639 * linux-low.h (target_regsets): Delete declaration.
4640 (struct regsets_info): New.
4641 (struct usrregs_info): New.
4642 (struct regs_info): New.
4643 (struct process_info_private) <new_inferior>: New field.
4644 (struct linux_target_ops): Delete the num_regs, regmap, and
4645 regset_bitmap fields. New field regs_info.
4646 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4647 * i387-fp.c (num_xmm_registers): Delete.
4648 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4649 calls to new interface.
4650 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4651 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4652 Infer the number of xmm registers from the regcache's target
4653 description.
4654 * i387-fp.h (num_xmm_registers): Delete.
4655 * inferiors.c (add_thread): Don't install the thread's regcache
4656 here.
4657 * proc-service.c (gregset_info): Fetch the current inferior's
4658 regs_info. Adjust to use it.
4659 * regcache.c: Include tdesc.h.
4660 (register_bytes, reg_defs, num_registers)
4661 (gdbserver_expedite_regs): Delete.
4662 (get_thread_regcache): If the thread doesn't have a regcache yet,
4663 create one, instead of aborting gdbserver.
4664 (regcache_invalidate_one): Rename to ...
4665 (regcache_invalidate_thread): ... this.
4666 (regcache_invalidate_one): New.
4667 (regcache_invalidate): Only invalidate registers of the current
4668 process.
4669 (init_register_cache): Add target_desc parameter, and use it.
4670 (new_register_cache): Ditto. Assert the target description has a
4671 non zero registers_size.
4672 (regcache_cpy): Add assertions. Adjust.
4673 (realloc_register_cache, set_register_cache): Delete.
4674 (registers_to_string, registers_from_string): Adjust.
4675 (find_register_by_name, find_regno, find_register_by_number)
4676 (register_cache_size): Add target_desc parameter, and use it.
4677 (free_register_cache_thread, free_register_cache_thread_one)
4678 (regcache_release, register_cache_size): New.
4679 (register_size): Add target_desc parameter, and use it.
4680 (register_data, supply_register, supply_register_zeroed)
4681 (supply_regblock, supply_register_by_name, collect_register)
4682 (collect_register_as_string, collect_register_by_name): Adjust.
4683 * regcache.h (struct target_desc): Forward declare.
4684 (struct regcache) <tdesc>: New field.
4685 (init_register_cache, new_register_cache): Add target_desc
4686 parameter.
4687 (regcache_invalidate_thread): Declare.
4688 (regcache_invalidate_one): Delete declaration.
4689 (regcache_release): Declare.
4690 (find_register_by_number, register_cache_size, register_size)
4691 (find_regno): Add target_desc parameter.
4692 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4693 declarations.
4694 * remote-utils.c: Include tdesc.h.
4695 (outreg, prepare_resume_reply): Adjust.
4696 * server.c: Include tdesc.h.
4697 (gdbserver_xmltarget): Delete declaration.
4698 (get_features_xml, process_serial_event): Adjust.
4699 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4700 declare.
4701 (struct process_info) <tdesc>: New field.
4702 (ipa_tdesc): Declare.
4703 * tdesc.c: New file.
4704 * tdesc.h: New file.
4705 * tracepoint.c: Include tdesc.h.
4706 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4707 (get_context_regcache): Adjust to pass ipa_tdesc down.
4708 (do_action_at_tracepoint): Adjust to get the register cache size
4709 from the context regcache's description.
4710 (traceframe_walk_blocks): Adjust to get the register cache size
4711 from the current trace frame's description.
4712 (traceframe_get_pc): Adjust to get current trace frame's
4713 description and pass it down.
4714 (gdb_collect): Adjust to get the register cache size from the
4715 IPA's description.
4716 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4717 (gdbserver_xmltarget): Delete.
4718 (initialize_low_tracepoint): Set the ipa's target description.
4719 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4720 (initialize_low_tracepoint): Set the ipa's target description.
4721 * linux-x86-low.c: Include tdesc.h.
4722 [__x86_64__] (is_64bit_tdesc): New.
4723 (ps_get_thread_area, x86_get_thread_area): Use it.
4724 (i386_cannot_store_register): Rename to ...
4725 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4726 (i386_cannot_fetch_register): Rename to ...
4727 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4728 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4729 to new interface.
4730 (target_regsets): Rename to ...
4731 (x86_regsets): ... this.
4732 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4733 interface.
4734 (x86_siginfo_fixup): Use is_64bit_tdesc.
4735 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4736 (tdesc_x32_avx_linux, tdesc_x32_linux)
4737 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4738 Declare.
4739 (x86_linux_update_xmltarget): Delete.
4740 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4741 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4742 (AMD64_LINUX_USER64_CS): New.
4743 (x86_linux_read_description): New, based on
4744 x86_linux_update_xmltarget.
4745 (same_process_callback): New.
4746 (x86_arch_setup_process_callback): New.
4747 (x86_linux_update_xmltarget): New.
4748 (x86_regsets_info): New.
4749 (amd64_linux_regs_info): New.
4750 (i386_linux_usrregs_info): New.
4751 (i386_linux_regs_info): New.
4752 (x86_linux_regs_info): New.
4753 (x86_arch_setup): Reimplement.
4754 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4755 (x86_emit_ops): Ditto.
4756 (the_low_target): Adjust. Install x86_linux_regs_info,
4757 x86_cannot_fetch_register, and x86_cannot_store_register.
4758 (initialize_low_arch): New.
4759 * linux-ia64-low.c (tdesc_ia64): Declare.
4760 (ia64_fetch_register): Adjust.
4761 (ia64_usrregs_info, regs_info): New globals.
4762 (ia64_regs_info): New function.
4763 (the_low_target): Adjust.
4764 (initialize_low_arch): New function.
4765 * linux-sparc-low.c (tdesc_sparc64): Declare.
4766 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4767 Adjust.
4768 (sparc_arch_setup): New function.
4769 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4770 (the_low_target): Adjust.
4771 (initialize_low_arch): New function.
4772 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4773 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4774 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4775 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4776 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4777 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4778 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4779 (tdesc_powerpc_isa205_vsx64l): Declare.
4780 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4781 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4782 (ppc_set_pc, ppc_get_hwcap): Adjust.
4783 (ppc_usrregs_info): Forward declare.
4784 (!__powerpc64__) ppc_regmap_adjusted: New global.
4785 (ppc_arch_setup): Adjust to the current process'es target
4786 description.
4787 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4788 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4789 (ppc_store_evrregset): Adjust.
4790 (target_regsets): Rename to ...
4791 (ppc_regsets): ... this, and make static.
4792 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4793 (ppc_regs_info): New function.
4794 (the_low_target): Adjust.
4795 (initialize_low_arch): New function.
4796 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4797 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4798 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4799 (tdesc_s390x_linux64v2): Declare.
4800 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4801 (s390_fill_gregset, s390_store_last_break): Adjust.
4802 (target_regsets): Rename to ...
4803 (s390_regsets): ... this, and make static.
4804 (s390_get_pc, s390_set_pc): Adjust.
4805 (s390_get_hwcap): New target_desc parameter, and use it.
4806 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4807 (s390_arch_setup): Adjust to set the current process'es target
4808 description. Don't adjust the regmap.
4809 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4810 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4811 (regs_info_3264): New globals.
4812 (s390_regs_info): New function.
4813 (the_low_target): Adjust.
4814 (initialize_low_arch): New function.
4815 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4816 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4817 [__mips64] (init_registers_mips_linux)
4818 (init_registers_mips_dsp_linux): Delete defines.
4819 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4820 (have_dsp): New global.
4821 (mips_read_description): New, based on mips_arch_setup.
4822 (mips_arch_setup): Reimplement.
4823 (get_usrregs_info): New function.
4824 (mips_cannot_fetch_register, mips_cannot_store_register)
4825 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4826 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4827 (target_regsets): Rename to ...
4828 (mips_regsets): ... this, and make static.
4829 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4830 (dsp_regs_info, regs_info): New globals.
4831 (mips_regs_info): New function.
4832 (the_low_target): Adjust.
4833 (initialize_low_arch): New function.
4834 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4835 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4836 Declare.
4837 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4838 (arm_read_description): New, with bits factored from
4839 arm_arch_setup.
4840 (arm_arch_setup): Reimplement.
4841 (target_regsets): Rename to ...
4842 (arm_regsets): ... this, and make static.
4843 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4844 (arm_regs_info): New function.
4845 (the_low_target): Adjust.
4846 (initialize_low_arch): New function.
4847 * linux-m68k-low.c (tdesc_m68k): Declare.
4848 (target_regsets): Rename to ...
4849 (m68k_regsets): ... this, and make static.
4850 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4851 (m68k_regs_info): New function.
4852 (m68k_arch_setup): New function.
4853 (the_low_target): Adjust.
4854 (initialize_low_arch): New function.
4855 * linux-sh-low.c (tdesc_sharch): Declare.
4856 (target_regsets): Rename to ...
4857 (sh_regsets): ... this, and make static.
4858 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4859 (sh_regs_info, sh_arch_setup): New functions.
4860 (the_low_target): Adjust.
4861 (initialize_low_arch): New function.
4862 * linux-bfin-low.c (tdesc_bfin): Declare.
4863 (bfin_arch_setup): New function.
4864 (bfin_usrregs_info, regs_info): New globals.
4865 (bfin_regs_info): New function.
4866 (the_low_target): Adjust.
4867 (initialize_low_arch): New function.
4868 * linux-cris-low.c (tdesc_cris): Declare.
4869 (cris_arch_setup): New function.
4870 (cris_usrregs_info, regs_info): New globals.
4871 (cris_regs_info): New function.
4872 (the_low_target): Adjust.
4873 (initialize_low_arch): New function.
4874 * linux-cris-low.c (tdesc_crisv32): Declare.
4875 (cris_arch_setup): New function.
4876 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4877 (cris_regs_info): New function.
4878 (the_low_target): Adjust.
4879 (initialize_low_arch): New function.
4880 * linux-m32r-low.c (tdesc_m32r): Declare.
4881 (m32r_arch_setup): New function.
4882 (m32r_usrregs_info, regs_info): New globals.
4883 (m32r_regs_info): Adjust.
4884 (initialize_low_arch): New function.
4885 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4886 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4887 (tic6x_usrregs_info): Forward declare.
4888 (tic6x_read_description): New function, based on ...
4889 (tic6x_arch_setup): ... this. Reimplement.
4890 (target_regsets): Rename to ...
4891 (tic6x_regsets): ... this, and make static.
4892 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4893 (tic6x_regs_info): New function.
4894 (the_low_target): Adjust.
4895 (initialize_low_arch): New function.
4896 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4897 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4898 (target_regsets): Rename to ...
4899 (xtensa_regsets): ... this, and make static.
4900 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4901 globals.
4902 (xtensa_arch_setup, xtensa_regs_info): New functions.
4903 (the_low_target): Adjust.
4904 (initialize_low_arch): New function.
4905 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4906 (nios2_arch_setup): Set the current process'es tdesc.
4907 (target_regsets): Rename to ...
4908 (nios2_regsets): ... this.
4909 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4910 (nios2_regs_info): New function.
4911 (the_low_target): Adjust.
4912 (initialize_low_arch): New function.
a261b8f5
PA
4913 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4914 (aarch64_arch_setup): Set the current process'es tdesc.
4915 (target_regsets): Rename to ...
4916 (aarch64_regsets): ... this.
4917 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4918 (aarch64_regs_info): New function.
4919 (the_low_target): Adjust.
4920 (initialize_low_arch): New function.
3aee8918
PA
4921 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4922 globals.
4923 (target_regsets): Rename to ...
4924 (tile_regsets): ... this.
4925 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4926 (tile_regs_info): New function.
4927 (tile_arch_setup): Set the current process'es tdesc.
4928 (the_low_target): Adjust.
4929 (initialize_low_arch): New function.
4930 * spu-low.c (tdesc_spu): Declare.
4931 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4932 * win32-arm-low.c (tdesc_arm): Declare.
4933 (arm_arch_setup): New function.
4934 (the_low_target): Install arm_arch_setup instead of
4935 init_registers_arm.
4936 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4937 (init_windows_x86): Rename to ...
4938 (i386_arch_setup): ... this. Set `win32_tdesc'.
4939 (the_low_target): Adjust.
4940 * win32-low.c (win32_tdesc): New global.
4941 (child_add_thread): Don't create the thread cache here.
4942 (do_initial_child_stuff): Set the new process'es tdesc.
4943 * win32-low.h (struct target_desc): Forward declare.
4944 (win32_tdesc): Declare.
4945 * lynx-i386-low.c (tdesc_i386): Declare global.
4946 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4947 * lynx-low.c (lynx_tdesc): New global.
4948 (lynx_add_process): Set the new process'es tdesc.
4949 * lynx-low.h (struct target_desc): Forward declare.
4950 (lynx_tdesc): Declare global.
4951 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4952 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4953 * nto-low.c (nto_tdesc): New global.
4954 (do_attach): Set the new process'es tdesc.
4955 * nto-low.h (struct target_desc): Forward declare.
4956 (nto_tdesc): Declare.
4957 * nto-x86-low.c (tdesc_i386): Declare.
4958 (nto_x86_arch_setup): Set `nto_tdesc'.
4959
b1fbec62
GB
49602013-06-04 Gary Benson <gbenson@redhat.com>
4961
4962 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4963 to qSupported response when appropriate.
4964 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4965 with nonzero-length annex.
4966 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4967 arguments supplied in annex.
4968
d1ec4ce7
DE
49692013-05-31 Doug Evans <dje@google.com>
4970
ac44adcb 4971 PR server/15594
d1ec4ce7
DE
4972 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4973 64 bits in 64-cross-32 environment.
4974
9b25f2d3
PA
49752013-05-28 Pedro Alves <palves@redhat.com>
4976
4977 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4978 (aarch64-without-fpu.c): Delete rule.
4979 * configure.srv (aarch64*-*-linux*): Remove references to
4980 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4981 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4982 declaration.
4983
6740dc9c
PA
49842013-05-24 Pedro Alves <palves@redhat.com>
4985
4986 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4987 instead of strchr/decode_address. Error if the range isn't split
4988 with a ','. Don't assume there's be a ':' in the action.
4989
c2d6af84
PA
49902013-05-23 Yao Qi <yao@codesourcery.com>
4991 Pedro Alves <palves@redhat.com>
4992
4993 * linux-low.c (lwp_in_step_range): New function.
4994 (linux_wait_1): If the thread was range stepping and stopped
4995 outside the stepping range, report the stop to GDB. Otherwise,
4996 continue stepping. Add range stepping debug output.
4997 (linux_set_resume_request): Copy the step range from the resume
4998 request to the lwp.
4999 (linux_supports_range_stepping): New.
5000 (linux_target_ops) <supports_range_stepping>: Set to
5001 linux_supports_range_stepping.
5002 * linux-low.h (struct linux_target_ops)
5003 <supports_range_stepping>: New field.
5004 (struct lwp_info) <step_range_start, step_range_end>: New fields.
5005 * linux-x86-low.c (x86_supports_range_stepping): New.
5006 (the_low_target) <supports_range_stepping>: Set to
5007 x86_supports_range_stepping.
5008 * server.c (handle_v_cont): Handle 'r' action.
5009 (handle_v_requests): Append ";r" if the target supports range
5010 stepping.
5011 * target.h (struct thread_resume) <step_range_start,
5012 step_range_end>: New fields.
5013 (struct target_ops) <supports_range_stepping>:
5014 New field.
5015 (target_supports_range_stepping): New macro.
5016
58794e1a
JB
50172013-05-17 Joel Brobecker <brobecker@adacore.com>
5018
5019 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5020 confusion in comment.
5021
d631c5a7
JB
50222013-05-17 Joel Brobecker <brobecker@adacore.com>
5023
5024 * lynx-low.c (struct process_info_private): New type.
5025 (lynx_add_process): New function.
5026 (lynx_create_inferior, lynx_attach): Replace calls to
5027 add_process by calls to lynx_add_process.
5028 (lynx_resume): If PTID is null, then try using
5029 current_process()->private->last_wait_event_ptid.
5030 Add comments.
5031 (lynx_clear_inferiors): Delete. The contents of that function
5032 has been inlined in lynx_mourn;
5033 (lynx_wait_1): Save the ptid in the process's private data.
5034 (lynx_mourn): Free the process' private data. Replace call
5035 to lynx_clear_inferiors by call to clear_inferiors.
5036
96f7a20f
YQ
50372013-05-17 Yao Qi <yao@codesourcery.com>
5038
5039 * i386-low.c (i386_length_and_rw_bits): Move the comment to
5040 the right place.
5041
db0dfaa0
LM
50422013-05-16 Luis Machado <lgustavo@codesourcery.com>
5043
5044 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5045 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
5046 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5047 PT_TEXT_END_ADDR guards. Update comments.
5048 (linux_target_op) <read_offsets>: Conditionally define to
5049 linux_read_offsets if the target is UCLIBC and if it defines
5050 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5051
68f5f838
SL
50522013-05-06 Sandra Loosemore <sandra@codesourcery.com>
5053 Andrew Jenner <andrew@codesourcery.com>
5054
5055 * Makefile.in (SFILES): Add linux-nios2-low.c.
5056 (clean): Add action to delete nios2-linux.c.
5057 (nios2-linux.c): New rule.
5058 * configure.srv: Add nios2*-*-linux*.
5059 * linux-nios2-low.c: New.
5060
1ebff1fd
HAQ
50612013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
5062
5063 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5064
f6150862
HZ
50652013-04-25 Hui Zhu <hui@codesourcery.com>
5066
5067 PR gdb/15186
f6150862
HZ
5068 * ax.c (ax_printf): Add fflush.
5069
614c279d
TT
50702013-04-22 Tom Tromey <tromey@redhat.com>
5071
5072 * Makefile.in (SFILES): Add filestuff.c.
5073 (OBS): Add filestuff.o.
5074 (filestuff.o): New target.
5075 * config.in, configure: Rebuild.
5076 * configure.ac: Check for fdwalk, pipe2.
5077
7d4e5717
PA
50782013-04-17 Pedro Alves <palves@redhat.com>
5079
5080 * configure.ac (USE_THREAD_DB): Delete variable.
5081 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5082 Don't AC_SUBST USE_THREAD_DB.
5083 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5084 * config.in, configure: Regenerate.
5085
d5c93e41
PA
50862013-04-16 Pedro Alves <palves@redhat.com>
5087
5088 * linux-low.h (struct lwp_info) <thread_known>: Move under
5089 the USE_THREAD_DB #ifdef.
5090
04f5fe89
PA
50912013-04-16 Pedro Alves <palves@redhat.com>
5092
5093 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5094 (linux-low.o): Delete rule.
5095 * linux-low.h: Always include "gdb_thread_db.h" instead of
5096 conditionally including thread_db.h.
5097 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5098 HAVE_THREAD_DB_H.
5099
480b27bf
JK
51002013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5101
5102 * Makefile.in (install-only): Fix make install regression.
5103
43662968
JK
51042013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
5105
5106 Convert man pages to texinfo, new gdbinit.5 texinfo page.
5107 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5108 installation.
5109 * gdbserver.1: Remove.
5110
3e74e146
PA
51112013-03-22 Pedro Alves <palves@redhat.com>
5112
5113 * linux-low.c (handle_extended_wait): Don't call
5114 linux_enable_event_reporting.
5115
a8347a2a
TT
51162013-03-15 Tony Theodore <tonyt@logyst.com>
5117
5118 PR build/9098:
5119 * Makefile.in (SHELL): Use @SHELL@.
5120
eeb56fa7
SDJ
51212013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
5122
5123 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5124 compiler warning.
5125
4fa7e2ff
JB
51262013-03-13 Joel Brobecker <brobecker@adacore.com>
5127
5128 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5129 Remove extraneous NULL element.
5130
8ddb1965
YQ
51312013-03-13 Yao Qi <yao@codesourcery.com>
5132
5133 * tracepoint.c (traceframe_read_tsv): Look for the last matched
5134 'V' block in trace frame.
5135
9accd112
MM
51362013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5137
5138 * target.h (struct target_ops): Add btrace ops.
5139 (target_supports_btrace): New macro.
5140 (target_enable_btrace): New macro.
5141 (target_disable_btrace): New macro.
5142 (target_read_btrace): New macro.
5143 * gdbthread.h (struct thread_info): Add btrace field.
5144 * server.c: Include btrace-common.h.
5145 (handle_btrace_general_set): New function.
5146 (handle_btrace_enable): New function.
5147 (handle_btrace_disable): New function.
5148 (handle_general_set): Call handle_btrace_general_set.
5149 (handle_qxfer_btrace): New function.
5150 (struct qxfer qxfer_packets[]): Add btrace entry.
5151 * inferiors.c (remove_thread): Disable btrace.
5152 * linux-low: Include linux-btrace.h.
5153 (linux_low_enable_btrace): New function.
5154 (linux_low_read_btrace): New function.
5155 (linux_target_ops): Add btrace ops.
5156 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5157 Add srv_linux_btrace=yes.
5158 (x86_64-*-linux*): Add linux-btrace.o.
5159 Add srv_linux_btrace=yes.
5160 * configure.ac: Define HAVE_LINUX_BTRACE.
5161 * config.in: Regenerated.
5162 * configure: Regenerated.
5163
5cc22e4c
MM
51642013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5165
5166 * server.c (handle_qxfer): Preserve error message if -3 is
5167 returned.
5168 (qxfer): Document the -3 return value.
5169
7c97f91e
MM
51702013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5171
5172 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5173 (linux_btrace_h): New variable.
5174 (linux-btrace.o): New rule.
5175
be9a119c 51762013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
5177 Hafiz Abid Qadeer <abidh@codesourcery.com>
5178
5179 * tracepoint.c (trace_buffer_size): New global.
5180 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5181 (init_trace_buffer): Change to one-argument function. Allocate
5182 trace buffer memory.
5183 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5184 handle QTBuffer:size packet.
5185 (cmd_bigqtbuffer_size): New function.
5186 (initialize_tracepoint): Call init_trace_buffer with
5187 DEFAULT_TRACE_BUFFER_SIZE.
5188 * server.c (handle_query): Add QTBuffer:size in the
5189 supported packets.
5190
e64f7499
YQ
51912013-03-07 Yao Qi <yao@codesourcery.com>
5192
5193 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5194 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5195 of -1.
5196 (cmd_qtsp): Adjust condition. Do post increment.
5197 Set cur_action and cur_step_action back to 0.
5198
f0ae6fc3
PA
51992013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5200
5201 PR server/15236
5202 * linux-low.c (linux_write_memory): Return early success if LEN is
5203 zero.
5204
b5b0b0af
CV
52052013-03-05 Corinna Vinschen <vinschen@redhat.de>
5206
334ad4a8 5207 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 5208
589bc927
TT
52092013-02-28 Tom Tromey <tromey@redhat.com>
5210
5211 * configure.ac: Invoke AC_SYS_LARGEFILE.
5212 * configure, config.in: Rebuild.
5213
dfe07582
CV
52142013-02-28 Corinna Vinschen <vinschen@redhat.com>
5215
5216 * win32-low.c: Throughout, fix format strings and casts of
5217 printf-like functions to avoid type related warnings on all
5218 platforms.
5219 (get_child_debug_event): Print dwDebugEventCode as hex since
5220 that's how it's usually documented.
5221
736cd585
YQ
52222013-02-28 Yao Qi <yao@codesourcery.com>
5223
5224 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5225 pulongest.
5226
e1f58301
JW
52272013-02-27 Jiong Wang <jiwang@tilera.com>
5228
5229 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5230 (reg-tilegx32.c): New rule.
5231 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5232 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5233 different register info initializer according to elf class.
5234 (init_registers_tilgx32): New function. The tilegx32 register info
5235 initializer.
5236 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5237 (tile_store_gregset): Likewise.
5238
d171ca78
YQ
52392013-02-27 Yao Qi <yao@codesourcery.com>
5240
5241 * server.c (process_point_options): Print debug message when
5242 debug_threads is true.
5243
282bbdf3
YQ
52442013-02-26 Yao Qi <yao@codesourcery.com>
5245
5246 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5247
aca22551
PA
52482013-02-19 Pedro Alves <palves@redhat.com>
5249 Kai Tietz <ktietz@redhat.com>
5250
5251 PR gdb/15161
5252
5253 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5254 instead of strtoul to extract address from packet.
5255 (process_serial_event) <'z'>: Likewise.
5256
4f3cee1c
YQ
52572013-02-18 Yao Qi <yao@codesourcery.com>
5258
5259 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5260
8e1d55a3
PA
52612013-02-14 Pedro Alves <palves@redhat.com>
5262
5263 Plug memory leak.
5264
5265 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5266 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5267
458820da
PA
52682013-02-14 Pedro Alves <palves@redhat.com>
5269
5270 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5271
baea0dae
PA
52722013-02-14 Pedro Alves <palves@redhat.com>
5273
5274 * tracepoint.c (save_string): Delete.
5275 (add_tracepoint_action): Use savestring instead of save_string.
5276
0b1afbb3
PA
52772013-02-12 Pedro Alves <palves@redhat.com>
5278
5279 * linux-xtensa-low.c: Ditto.
5280 * xtensa-xtregs.c: Ditto.
5281
8a4ac37e
PA
52822013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5283
5284 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5285 thread_db.
5286
148de6bb
MS
52872013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5288
5289 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5290 aarch64_num_wp_regs and aarch64_num_bp_regs to
5291 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5292
55fac6e0
MS
52932013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5294
5295 * linux-aarch64-low.c (ps_get_thread_area): Replace
5296 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5297
176eb98c
MS
52982013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5299 Marcus Shawcroft <marcus.shawcroft@arm.com>
5300 Nigel Stephens <nigel.stephens@arm.com>
5301 Yufeng Zhang <yufeng.zhang@arm.com>
5302
5303 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5304 (aarch64.c, aarch64-without-fpu.c): New targets.
5305 * configure.srv (aarch64*-*-linux*): New.
5306 * linux-aarch64-low.c: New file.
5307
56f7af9c
MS
53082013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5309
43aaf8b6 5310 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
5311 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5312 (dequeue_one_deferred_signal, linux_resume_one_thread)
5313 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5314 (linux_tracefork_grandchild, linux_test_for_tracefork)
5315 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5316 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5317 where the argument is 0.
5318
60f662b0
YQ
53192013-01-25 Yao Qi <yao@codesourcery.com>
5320
5321 * event-loop.c: Include "queue.h".
5322 (gdb_event_p): New typedef.
5323 (struct gdb_event) <next_event>: Remove.
5324 (event_queue): Change to QUEUE(gdb_event_p).
5325 (async_queue_event): Remove.
5326 (gdb_event_xfree): New.
5327 (initialize_event_loop): New.
5328 (process_event): Use API from QUEUE.
5329 (wait_for_event): Likewise.
5330 * server.c (main): Call initialize_event_loop.
5331 * server.h (initialize_event_loop): Declare.
5332
5ae4861a
YQ
53332013-01-18 Yao Qi <yao@codesourcery.com>
5334
5335 * ax.h (struct eval_agent_expr_context): New.
5336 (gdb_eval_agent_expr): Update declaration.
5337 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5338 TFRAME. Add new argument CTX.
5339 * server.h (struct eval_agent_expr_context): Declare.
5340 (agent_mem_read, agent_tsv_read): Update declaration.
5341 (agent_mem_read_string): Likewise.
5342 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5343 (add_traceframe_block): Add new argument TPOINT.
5344 Increase TPOINT->traceframe_usage.
5345 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5346 eval_tracepoint_agent_expr.
5347 (condition_true_at_tracepoint): Likewise.
5348 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5349 (agent_mem_read_string, agent_tsv_read): Likewise.
5350
85e00e85
YQ
53512013-01-16 Yao Qi <yao@codesourcery.com>
5352
5353 * linux-low.c (linux_resume_one_lwp): Don't check
5354 'lwp->bp_reinsert != 0'.
5355
4039cf45
JB
53562013-01-07 Joel Brobecker <brobecker@adacore.com>
5357 Pedro Alves <palves@redhat.com>
5358
5359 * lynx-low.c (ptrace_request_to_str): Define a temporary
5360 macro and use it to simplify this function's implementation.
5361
9044dee2
JB
53622013-01-07 Joel Brobecker <brobecker@adacore.com>
5363
5364 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5365 sets errno.
5366
e6352c8f
JB
53672013-01-07 Joel Brobecker <brobecker@adacore.com>
5368
5369 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5370
50681a27
JB
53712013-01-07 Joel Brobecker <brobecker@adacore.com>
5372
5373 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5374
3f6e77ef
JB
53752013-01-07 Joel Brobecker <brobecker@adacore.com>
5376
5377 * lynx-low.c (lynx_resume): Use the resume_info parameter
5378 to determine the ptid for the lynx_ptrace call, unless
5379 it is equal to minus_one_ptid, in which case we use the
5380 ptid of the current_inferior.
5381 (lynx_wait_1): After having received a thread create/exit
5382 event, resume the inferior's execution using the signaling
5383 thread's ptid, rather than the old ptid.
5384
7fda33ae
JB
53852013-01-07 Joel Brobecker <brobecker@adacore.com>
5386
5387 * lynx-low.c (lynx_resume): Delete variable ret.
5388
b9786c74
JB
53892013-01-01 Joel Brobecker <brobecker@adacore.com>
5390
5391 * gdbreplay.c (gdbreplay_version): Update copyright year.
5392 * server.c (gdbserver_version): Likewise.
5393
8b93d60f
JB
53942012-12-17 Joel Brobecker <brobecker@adacore.com>
5395
5396 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5397 new thread.
5398
037335a7
JB
53992012-12-17 Joel Brobecker <brobecker@adacore.com>
5400
5401 * lynx-low.c (ptrace_request_to_str): Add handling for
5402 PTRACE_GETTRACESIG.
5403
52d4cbd8
JB
54042012-12-17 Joel Brobecker <brobecker@adacore.com>
5405
5406 * lynx-low.c (lynx_attach): Delete variable new_process.
5407
ab8f6ca9
JB
54082012-12-17 Joel Brobecker <brobecker@adacore.com>
5409
5410 * lynx-low.c (lynx_create_inferior): Delete variable
5411 new_process.
5412
78cbc024
JB
54132012-12-17 Joel Brobecker <brobecker@adacore.com>
5414
5415 * lynx-low.c (ptrace_request_to_str): Do not handle
5416 PTRACE_GETTHREADLIST if this macro does not exist.
5417
14a00470
YQ
54182012-12-15 Yao Qi <yao@codesourcery.com>
5419
5420 * Makefile.in (OBS): Add notif.o.
5421 * notif.c, notif.h: New.
5422 * server.c: Include "notif.h".
5423 (struct vstop_notif) <next>: Remove.
5424 <base>: New field.
5425 (queue_stop_reply): Update.
5426 (push_event, send_next_stop_reply): Remove.
5427 (discard_queued_stop_replies): Update.
5428 (notif_stop): New variable.
5429 (handle_v_stopped): Remove.
5430 (handle_v_requests): Don't call handle_v_stopped. Call
5431 handle_ack_notif instead.
5432 (queue_stop_reply_callback): Call notif_event_enque instead
5433 of queue_stop_reply.
5434 (handle_status): Don't call send_next_stop_reply, call
5435 notif_write_event instead.
5436 (kill_inferior_callback): Likewise.
5437 (detach_or_kill_inferior_callback): Likewise.
5438 (main): Call initialize_notif.
5439 (process_serial_event): Call QUEUE_is_empty.
5440 (handle_target_event): Call notif_push instead of push event.
5441 * server.h (push_event): Remove declaration.
5442
61c125b9
TT
54432012-12-10 Tom Tromey <tromey@redhat.com>
5444
5445 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5446 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5447 macros.
5448 (.c.o): Rewrite.
5449 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5450 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5451 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5452 (amd64-linux-ipa.o, ax.o): Rewrite.
5453 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5454 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5455 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5456 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5457 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5458 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5459 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5460 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5461 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5462 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5463 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5464 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5465 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5466 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5467 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5468 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5469 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5470 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5471 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5472 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5473 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5474 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5475 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5476 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5477 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5478 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5479 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5480 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5481 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5482 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5483 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5484 (reg-tilegx.o): Remove.
5485 (all_object_files): New macro.
5486 Include .deps files.
5487 * aclocal.m4, configure: Rebuild.
5488 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5489 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5490 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5491
e90e9ad9
TT
54922012-12-05 Tom Tromey <tromey@redhat.com>
5493
5494 PR gdb/14917:
5495 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5496
02d403bf 54972012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
5498
5499 * configure.ac: Check for linux/perf_event.h.
5500 * config.in: Regenerated.
5501 * configure: Regenerated.
5502
0270a750
PA
55032012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5504
5505 * hostio.c (handle_readlink): Decrease buffer size
5506 parameter passed to readlink by one byte.
5507
8c29b58e
YQ
55082012-11-26 Yao Qi <yao@codesourcery.com>
5509
5510 * configure.ac (build_warnings): Append '-Wempty-body'.
5511 * configure: Regenerated.
5512 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5513 body.
5514
8bdce1ff
PM
55152012-11-15 Pierre Muller <muller@sourceware.org>
5516
5517 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5518 * config.in: Regenerate.
5519 * configure: Regenerate.
5520 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5521 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5522 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5523 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5524 header.
5525 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5526 instead of <sys/wait.h> header.
5527 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5528
02d403bf 55292012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
5530
5531 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5532 (various make rules): Remove -DGDBSERVER
5533
fbd5db48
YQ
55342012-11-09 Yao Qi <yao@codesourcery.com>
5535
5536 * spu-low.c (current_ptid): Move it to ..
5537 * gdbthread.h: ... here. New.
5538 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5539 * server.c (myresume, process_serial_event): Likewise.
5540 * thread-db.c (thread_db_find_new_threads): Likewise.
5541 * tracepoint.c (run_inferior_command): Likewise.
5542
b3dc46ff
AB
55432012-10-01 Andrew Burgess <aburgess@broadcom.com>
5544
5545 * server.c (handle_search_memory_1): Include access length in
5546 warning message.
5547
07c04788
HPN
55482012-09-05 Michael Brandt <michael.brandt@axis.com>
5549
5550 * linux-crisv32-low.c: Fix compile errors.
5551
918d227b
YQ
55522012-09-04 Yao Qi <yao@codesourcery.com>
5553
5554 * tracepoint.c (cmd_qtsv): Adjust debug message.
5555 Don't check CUR_TPOINT.
5556
18c1b81a
YQ
55572012-08-28 Yao Qi <yao@codesourcery.com>
5558
5559 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5560 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5561 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5562 Remove declarations of xmalloc, xreallloc, xstrdup and
5563 freeargv.
5564 * Makefile.in (libiberty_h): New.
5565 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5566 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5567
dc82f37b
YQ
55682012-08-23 Yao Qi <yao@codesourcery.com>
5569
5570 * server.h: Remove declaration of 'xsnprintf'.
5571
406b1477
KS
55722012-08-22 Keith Seitz <keiths@redhat.com>
5573
5574 * server.h: Include build-gnulib-gbserver/config.h.
5575 * gdbreplay.c: Likewise.
5576
e6712ff1
DE
55772012-08-08 Doug Evans <dje@google.com>
5578
5579 * Makefile.in (SFILES): Add gdb_vecs.c.
5580 (OBS): Add gdb_vecs.o.
5581 (gdb_vecs_h, host_defs_h): New variables.
5582 (thread-db.o): Add $(gdb_vecs_h) dependency.
5583 (gdb_vecs.o): New rule.
5584 * thread-db.c: #include "gdb_vecs.h".
5585 (thread_db_load_search): Use a vector to iterate over path elements.
5586 Handle text appearing after "$pdir".
5587
5588 * configure.ac: Add check for strstr.
5589 * config.in: Regenerate.
5590 * configure: Regenerate.
5591
7c3270ae
UW
55922012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5593
5594 * hostio.c (handle_pread): If pread fails, fall back to attempting
5595 lseek/read.
5596 (handle_pwrite): Likewise for pwrite.
5597
b62e2b27
UW
55982012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5599
5600 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5601 between unsupported TYPE and unimplementable ADDR/LEN combination.
5602 (arm_insert_point): Act on new return value.
5603
78a99e91
PA
56042012-07-31 Pedro Alves <palves@redhat.com>
5605
5606 * server.c (process_point_options): Only skip tokens if we find
5607 one that is unrecognized. Don't treat 'X' specially while
5608 skipping unrecognized tokens.
5609
fcf303ab
UW
56102012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5611
5612 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5613 to 4-byte-align HW breakpoint addresses for Thumb.
5614
7255706c
YQ
56152012-07-27 Yao Qi <yao@codesourcery.com>
5616
5617 PR remote/14161.
5618
5619 * server.h: Declare gdb_agent_about_to_close.
5620 * target.c (kill_inferior): Include "agent.h".
5621 New. Send command 'kill'.
5622 * target.h (kill_inferior): Removed macro.
5623 * tracepoint.c (gdb_agent_about_to_close): New.
5624 (gdb_agent_helper_thread): Handle command 'close'.
5625 Wait endlessly until the inferior stops.
5626 Install gdb_agent_remove_socket to atexit hook.
5627 (agent_socket_name): New static variable.
5628 (gdb_agent_socket_init): Replace local variable 'name' with
5629 'agent_socket_name'.
5630 (gdb_agent_remove_socket): New.
5631
5a3f286f
YQ
56322012-07-27 Yao Qi <yao@codesourcery.com>
5633
5634 * server.c (process_point_options): Stop at 'X' when parsing.
5635
961bd387
ME
56362012-07-19 Michael Eager <eager@eagercon.com>
5637
a261b8f5 5638 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
5639 to hw_execute.
5640 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5641 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5642 hardware breakpoint.
5643
aa7c7447
JK
56442012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5645
5646 * gdbserver/linux-low.c (initialize_low): Call
5647 linux_ptrace_init_warnings.
5648
7f216e7c
DE
56492012-07-02 Doug Evans <dje@google.com>
5650
5651 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5652 pointer to int.
5653
d3ce09f5
SS
56542012-07-02 Stan Shebs <stan@codesourcery.com>
5655
5656 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5657 (ax.o): Add it to build rule.
5658 (ax-ipa.o): Ditto.
5659 (OBS): Add format.o.
5660 (IPA_OBS): Add format.o.
5661 * server.c (handle_query): Claim support for breakpoint commands.
5662 (process_point_options): Add command case.
5663 (process_serial_event): Leave running if there are printfs in
5664 effect.
5665 * mem-break.h (any_persistent_commands): Declare.
5666 (add_breakpoint_commands): Declare.
5667 (gdb_no_commands_at_breakpoint): Declare.
5668 (run_breakpoint_commands): Declare.
5669 * mem-break.c (struct point_command_list): New struct.
5670 (struct breakpoint): New field command_list.
5671 (any_persistent_commands): New function.
5672 (add_commands_to_breakpoint): New function.
5673 (add_breakpoint_commands): New function.
5674 (gdb_no_commands_at_breakpoint): New function.
5675 (run_breakpoint_commands): New function.
5676 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5677 locally.
5678 * ax.c: Include format.h.
5679 (ax_printf): New function.
5680 (gdb_eval_agent_expr): Add printf opcode.
5681
2f8f6aed
YQ
56822012-06-13 Yao Qi <yao@codesourcery.com>
5683
5684 * server.c (start_inferior): Remove duplicated writes to fields
5685 'last_resume_kind' and 'last_status' of 'current_inferior'.
5686
0c9070b3
YQ
56872012-06-12 Yao Qi <yao@codesourcery.com>
5688 Pedro Alves <palves@redhat.com>
5689
5690 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5691 comment.
5692 * server.c (handle_v_cont): Extend comment.
5693
c52daf70
YQ
56942012-06-11 Yao Qi <yao@codesourcery.com>
5695
5696 * linux-low.c (linux_attach): Add 'static'.
5697
d38bbb0a
YQ
56982012-06-06 Yao Qi <yao@codesourcery.com>
5699
5700 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5701
89dc0afd
JK
57022012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5703
5704 Fix gcc -flto compilation warning.
5705 * server.c (main): Make variable multi_mode and attach volatile.
5706
75f62ce7
TJB
57072012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5708
5709 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5710 if the platform doesn't know about it.
5711
65f479b6
PA
57122012-05-30 Jeff Kenton <jkenton@tilera.com>
5713
5714 * Makefile.in (SFILES): Add linux-tile-low.c.
5715 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5716 * configure.srv: Handle tilegx-*-linux*.
5717 * linux-tile-low.c: New file.
5718
0c5bf5a9
JK
57192012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5720
5721 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5722
a493e3e2
PA
57232012-05-24 Pedro Alves <palves@redhat.com>
5724
5725 PR gdb/7205
5726
43aaf8b6 5727 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 5728
2ea28649
PA
57292012-05-24 Pedro Alves <palves@redhat.com>
5730
5731 PR gdb/7205
5732
5733 Replace target_signal with gdb_signal throughout.
5734
8d409d16
MR
57352012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5736
5737 * linux-low.c (linux_store_registers): Avoid the copying sequence
5738 when no data has been retrieved by ptrace.
5739
23512c01
MGD
57402012-05-22 Will Deacon <will.deacon@arm.com>
5741
5742 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5743 Include asm/ptrace.h.
5744 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5745 already defined.
5746
4934b29e
MR
57472012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5748
5749 * linux-low.c (linux_store_registers): Don't re-retrieve data
5750 with ptrace that has already been obtained from /proc. Always
5751 copy any data retrieved with ptrace to the buffer supplied.
5752
bde24c0a
PA
57532012-05-11 Yao Qi <yao@codesourcery.com>
5754 Pedro Alves <palves@redhat.com>
5755
5756 * linux-low.c (enum stopping_threads_kind): New.
5757 (stopping_threads): Change type to `enum stopping_threads_kind'.
5758 (handle_extended_wait): If stopping and suspending threads, leave
5759 the new_lwp suspended too.
5760 (linux_wait_for_event): Adjust.
5761 (stop_all_lwps): Set `stopping_threads' to
5762 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5763 whether we're suspending threads or just stopping them. Assert no
5764 recursion happens.
5765
623b6bdf
YQ
57662012-04-29 Yao Qi <yao@codesourcery.com>
5767
5768 * server.h: Move some code to ...
5769 * gdbthread.h: ... here. New.
5770 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5771 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5772 (nto-low.o, win32-low.o): Likewise.
5773 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5774 * regcache.c, remote-utils.c, server.c: Likewise.
5775 * target.c, tracepoint.c, win32-low.c: Likewise.
5776
f15f9948
TJB
57772012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5778
5779 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5780 (PTRACE_ARG4_TYPE): Likewise.
5781 (PTRACE_XFER_TYPE): Likewise.
5782 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5783 ptrace to PTRACE_ARG3_TYPE.
5784 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5785 (PTRACE_ARG4_TYPE): Likewise.
5786 (PTRACE_XFER_TYPE): Likewise.
5787 (linux_detach_one_lwp): Cast fourth argument of
5788 ptrace to long then PTRACE_ARG4_TYPE.
5789 (regsets_fetch_inferior_registers): Cast third argument of
5790 ptrace to long then PTRACE_ARG3_TYPE.
5791 (regsets_store_inferior_registers): Likewise.
5792
38ea300a
PA
57932012-04-20 Pedro Alves <palves@redhat.com>
5794
5795 * configure: Regenerate.
5796
c971b7fa
PA
57972012-04-19 Pedro Alves <palves@redhat.com>
5798
43aaf8b6 5799 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 5800 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
5801 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5802 (all, install-only, uninstall, clean-info, all-lib, clean): No
5803 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5804 (maintainer-clean realclean distclean): Use subdir_do.
5805 (subdir_do): New.
5806 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 5807 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
5808 * acinclude.m4: Include acx_configure_dir.m4.
5809 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5810 calls. Call AC_PROG_RANLIB. Configure gnulib using
5811 ACX_CONFIGURE_DIR.
5812 (GNULIB): New.
5813 (GNULIB_STDINT_H): Adjust.
5814 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5815 * gdbreplay.c: Include build-gnulib/config.h.
5816 * server.h: Likewise.
5817 * aclocal.m4: Regenerate.
5818 * config.in: Regenerate.
5819 * configure: Regenerate.
c971b7fa 5820
809277f8
PA
58212012-04-19 Pedro Alves <palves@redhat.com>
5822
5823 * Makefile.in (LIBGNU, INCGNU): Adjust.
5824 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5825 (all, install-only, uninstall, clean-info, all-lib, clean)
5826 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5827 * configure.ac: Adjust AC_OUTPUT output.
5828 * aclocal.m4: Regenerate.
5829 * configure: Regenerate.
5830
fd9bb8b8
PA
58312012-04-19 Pedro Alves <palves@redhat.com>
5832
5833 * Makefile.in (generated_files): New.
5834 (server_h): Remove the explicit dependency on config.h, and depend
5835 on $generated_files.
5836
1c298c66
PA
58372012-04-19 Pedro Alves <palves@redhat.com>
5838
5839 * Makefile.in (INCGNU): Add -Ignulib.
5840
57c4b50b
PA
58412012-04-19 Pedro Alves <palves@redhat.com>
5842
5843 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5844 (INCGNU): ... this, and spell out -I here.
5845 (GNULIB_LIB): Rename to ...
5846 (LIBGNU): ... this.
5847 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5848
1030e047
PA
58492012-04-19 Pedro Alves <palves@redhat.com>
5850
5851 * config.in: Regenerate.
5852
447d4319
PA
58532012-04-19 Pedro Alves <palves@redhat.com>
5854
5855 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5856 * server.h (memmem): Remove declaration.
5857 * config.in: Regenerate.
5858 * configure: Regenerate.
5859
aad9eab9
YQ
58602012-04-19 Yao Qi <yao@codesourcery.com>
5861
5862 * Makefile.in (SFILES): Add common/vec.c.
5863 (OBS): Add vec.o.
5864 (vec.o): New rule.
5865
3e10640f
YQ
58662012-04-19 Yao Qi <yao@codesourcery.com>
5867
5868 * remote-utils.c (prepare_resume_reply): Replace with macro
5869 target_core_of_thread.
5870 * server.c (handle_qxfer_threads_proper): Likewise.
5871 * target.h (traget_core_of_thread): New macro.
5872
71622373
PA
58732012-04-18 Pedro Alves <palves@redhat.com>
5874
5875 * aclocal.m4: Regenerate.
5876 * configure: Regenerate.
5877
80d26939
YQ
58782012-04-16 Yao Qi <yao@codesourcery.com>
5879
5880 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5881 duplicated on address.
5882
42476b70
YQ
58832012-04-16 Yao Qi <yao@codesourcery.com>
5884
5885 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5886 (struct tracepoint_action_ops) <send>: New field.
5887 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5888 (agent_expr_send, x_tracepoint_action_send): New.
5889 (l_tracepoint_action_send): New.
5890 (cmd_qtdp): Download and install tracepoint
5891 according to `use_agent'.
5892 (run_inferior_command): Add one more parameter `len'.
5893 Update callers.
5894 (tracepoint_send_agent): New.
5895 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5896
7bc83639
YQ
58972012-04-16 Yao Qi <yao@codesourcery.com>
5898
5899 * tracepoint.c (download_tracepoints): Moved to ...
5900 (cmd_qtstart): ... here.
5901
5f18041e
YQ
59022012-04-14 Yao Qi <yao@codesourcery.com>
5903
5904 * tracepoint.c: Include inttypes.h.
5905 (struct collect_memory_action): Use sized types.
5906 (struct tracepoint): Likewise.
5907 (cmd_qtdp, stop_tracing): Update print specifiers.
5908 (cmd_qtp, response_tracepoint): Likewise.
5909 (collect_data_at_tracepoint): Likewise.
5910 (collect_data_at_step): Likewise.
5911
55a8c076
YQ
59122012-04-14 Yao Qi <yao@codesourcery.com>
5913
5914 Import gnulib module inttypes.
5915 * aclocal.m4, config.in, configure: Regenerated.
5916
dc750257
YQ
59172012-04-14 Yao Qi <yao@codesourcery.com>
5918
5919 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5920 Makefile and config.status at last.
5921
0ab5faf9
YQ
59222012-04-13 Yao Qi <yao@codesourcery.com>
5923
5924 * tracepoint.c: Include stdint.h unconditionally.
5925
18f5fd81
TJB
59262012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5927
5928 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5929 on BFD_HAVE_SYS_PROCFS_TYPE.
5930 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5931 * configure: Regenerate.
5932 * config.in: Likewise.
5933
4d47af5c
L
59342012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5935
5936 * Makefile.in (clean): Also remove x32.c x32-linux.c
5937 x32-avx.c x32-avx-linux.c.
5938 (x32.o): New target.
5939 (x32.c): Likewise.
5940 (x32-linux.o): Likewise.
5941 (x32-linux.c): Likewise.
5942 (x32-avx.o): Likewise.
5943 (x32-avx.c): Likewise.
5944 (x32-avx-linux.o): Likewise.
5945 (x32-avx-linux.c): Likewise.
5946
5947 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5948 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5949 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5950 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5951 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5952 i386/x32-avx-linux.xml.
5953
5954 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5955 (init_registers_x32_avx_linux): Likwise.
5956 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5957 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5958
ecedbe58
PA
59592012-04-13 Pedro Alves <palves@redhat.com>
5960
5961 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5962 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5963 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5964 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5965 the sub-make.
5966
c92b5177
L
59672012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5968
5969 * linux-x86-low.c (compat_x32_clock_t): New.
5970 (compat_x32_siginfo_t): Likewise.
5971 (compat_x32_siginfo_from_siginfo): Likewise.
5972 (siginfo_from_compat_x32_siginfo): Likewise.
5973 (linux_is_elf64): Likewise.
5974 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5975 and siginfo_from_compat_x32_siginfo for x32.
5976 (x86_arch_setup): Set linux_is_elf64.
5977
214d508e
L
59782012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5979
5980 PR gdb/13969
5981 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5982 e_machine field.
5983 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5984 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5985 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5986 compatible with process.
5987
c9a1864a
YQ
59882012-04-12 Yao Qi <yao@codesourcery.com>
5989
5990 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5991 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5992 (install-only, install-info, clean): Handle sub dir gnulib.
5993 (all-lib, am--refresh): New targets.
5994 (memmem.o): Remove target.
5995 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5996 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5997 (AC_REPLACE_FUNCS): Remove memmem.
5998 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5999 (AC_OUTPUT): Generate Makefile in gnulib/.
6000 * aclocal.m4, config.in, configure: Regenerated.
6001
367ba2c2
MR
60022012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
6003
6004 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6005
9d236627
PA
60062012-04-05 Pedro Alves <palves@redhat.com>
6007
6008 -Werror=strict-aliasing
6009
6010 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6011 pointer.
6012
111217b3
PA
60132012-04-04 Pedro Alves <palves@redhat.com>
6014
6015 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6016 (sparc_store_gregset_from_stack, sparc_store_gregset)
6017 (sparc_breakpoint_at): Fix formatting.
6018
8365dcf5
TJB
60192012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6020
6021 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6022 are available.
6023 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6024 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6025 * config.in: Regenerate.
6026 * configure: Likewise.
6027
689cc2ae
PA
60282012-03-29 Pedro Alves <palves@redhat.com>
6029
6030 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6031 Correct ptrace arguments.
6032
c14dfd32
PA
60332012-03-28 Pedro Alves <palves@redhat.com>
6034
6035 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6036 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6037 (IA64_FR1_REGNUM): New defines.
6038 (ia64_fetch_register): New.
6039 (the_low_target): Install it.
6040 * linux-low.h (struct linux_target_ops) <fetch_register>: New
6041 field.
6042 * linux-low.c (linux_fetch_registers): Try the
6043 the_low_target.fetch_register hook first.
6044
6045 * linux-arm-low.c (the_low_target): Adjust.
6046 * linux-bfin-low.c (the_low_target): Adjust.
6047 * linux-cris-low.c (the_low_target): Adjust.
6048 * linux-crisv32-low.c (the_low_target): Adjust.
6049 * linux-m32r-low.c (the_low_target): Adjust.
6050 * linux-m68k-low.c (the_low_target): Adjust.
6051 * linux-mips-low.c (the_low_target): Adjust.
6052 * linux-ppc-low.c (the_low_target): Adjust.
6053 * linux-s390-low.c (the_low_target): Adjust.
6054 * linux-sh-low.c (the_low_target): Adjust.
6055 * linux-sparc-low.c (the_low_target): Adjust.
6056 * linux-tic6x-low.c (the_low_target): Adjust.
6057 * linux-x86-low.c (the_low_target): Adjust.
6058 * linux-xtensa-low.c (the_low_target): Adjust.
6059
63c88e13
PA
60602012-03-26 Pedro Alves <palves@redhat.com>
6061
6062 * server.c (handle_qxfer_libraries): Don't bail early if
6063 the_target->qxfer_libraries_svr4 is not NULL.
6064
fb723180
PA
60652012-03-26 Pedro Alves <palves@redhat.com>
6066
6067 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6068
0afae3cf
PA
60692012-03-23 Pedro Alves <palves@redhat.com>
6070
6071 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6072 "library-list-svr4" element's start tag when the the DSO list is
6073 empty.
6074
485f1ee4
PA
60752012-03-23 Pedro Alves <palves@redhat.com>
6076
6077 * linux-low.c (read_one_ptr): Read the inferior's pointer through
6078 a variable whose type size is the same as the inferior's pointer
6079 size.
6080
a5362b9a
TS
60812012-03-21 Thomas Schwinge <thomas@codesourcery.com>
6082
6083 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6084 struct siginfo.
6085 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6086 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6087 * linux-low.h: Include <signal.h>.
6088 (struct siginfo): Remove forward declaration.
6089 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6090 struct siginfo.
6091
d226c142
MF
60922012-03-21 Mike Frysinger <vapier@gentoo.org>
6093
6094 * .gitignore: Ignore more files.
6095
122f36ef
PA
60962012-03-19 Pedro Alves <palves@redhat.com>
6097 Jan Kratochvil <jan.kratochvil@redhat.com>
6098
6099 * server.c (cont_thread, general_thread): Add describing comments.
6100 (start_inferior): Clear `cont_thread'.
6101 (handle_v_cont): Don't set `cont_thread' if resuming all threads
6102 of a process.
6103
fc3e5175
YQ
61042012-03-15 Yao Qi <yao@codesourcery.com>
6105
6106 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6107 handling to ...
6108 (cmd_qtdp): ... here.
6109
8d0d92cd
YQ
61102012-03-15 Yao Qi <yao@codesourcery.com>
6111
6112 * tracepoint.c (struct tracepoint_action_ops): New.
6113 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6114 (m_tracepoint_action_download): New.
6115 (r_tracepoint_action_download): New.
6116 (x_tracepoint_action_download): New.
6117 (l_tracepoint_action_download): New.
6118 (add_tracepoint_action): Install `action->ops' according type.
6119 (download_tracepoint_1): Move code `download' function pointer
6120 of various tracepoint_action_ops.
6121
87b0bb13
JK
61222012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6123
6124 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
6125 linux_ptrace_attach_warnings.
6126
5f572dec
JK
61272012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
6128
6129 * Makefile.in (linux-ptrace.o): New.
6130 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6131 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6132 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6133 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6134 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6135 of these targets.
6136 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6137
f4647387
YQ
61382012-03-08 Yao Qi <yao@codesourcery.com>
6139 Pedro Alves <palves@redhat.com>
6140
6141 Fix PR server/13392.
6142 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6143 offset of JMP insn.
6144 * tracepoint.c (remove_tracepoint): New.
6145 (cmd_qtdp): Call remove_tracepoint when failed to install.
6146
9b224c5e
PA
61472012-03-07 Pedro Alves <palves@redhat.com>
6148
6149 * linux-low.c (get_detach_signal): New.
6150 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6151 Pass on pending signals to PTRACE_DETACH. Check the result of the
6152 ptrace call.
6153 * server.c (program_signals, program_signals_p): New.
6154 (handle_general_set): Handle QProgramSignals.
6155 * server.h (program_signals, program_signals_p): Declare.
6156
e237a7e2
JK
61572012-03-05 Pedro Alves <palves@redhat.com>
6158 Jan Kratochvil <jan.kratochvil@redhat.com>
6159
6160 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6161 New comment why.
6162
5808517f
YQ
61632012-03-03 Yao Qi <yao@codesourcery.com>
6164
6165 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6166 agent_look_up_symbols.
6167
58b4daa5
YQ
61682012-03-03 Yao Qi <yao@codesourcery.com>
6169
6170 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6171 (linux-x86-low.o): Likewise.
6172 * server.h: Remove in_process_agent_loaded.
6173 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6174 common/agent.c.
6175 Update callers.
6176
8ffcbaaf
YQ
61772012-03-03 Yao Qi <yao@codesourcery.com>
6178
6179 * tracepoint.c (gdb_agent_capability): New global.
6180 (in_process_agent_loaded_ust): Renamed to
6181 `in_process_agent_supports_ust'.
6182 Update callers.
6183 (in_process_agent_supports_ust): Call agent_capability_check.
6184 (clear_installed_tracepoints): Assert that agent supports
6185 agent.
6186
d1feda86
YQ
61872012-03-03 Yao Qi <yao@codesourcery.com>
6188
6189 * linux-low.c (linux_supports_agent): New.
6190 (linux_target_ops): Initialize field `supports_agent' with
6191 linux_supports_agent.
6192 * target.h (struct target_ops) <supports_agent>: New.
6193 (target_supports_agent): New macro.
6194 * server.c (handle_general_set): Handle packet 'QAgent'.
6195 (handle_query): Send `QAgent+'.
6196 * Makefile.in (server.o): Depends on agent.h.
6197
2fa291ac
YQ
61982012-03-03 Yao Qi <yao@codesourcery.com>
6199
6200 * Makefile.in (OBS): Add agent.o.
6201 Add new rule for agent.o.
6202 Track dependence of tracepoint.c on agent.h.
6203 * tracepoint.c (run_inferior_command_1):
6204 (run_inferior_command): Call agent_run_command.
6205 (gdb_ust_connect_sync_socket): Deleted. Move it to
6206 common/agent.c.
6207 (resume_thread, stop_thread): Likewise.
6208 (gdb_ust_socket_init): Renamed to ...
6209 (gdb_agent_socket_init): ... New.
6210 (gdb_ust_thread): Renamed to ...
6211 (gdb_agent_helper_thread): ... New.
6212 (gdb_ust_init): Move some code to ...
6213 (gdb_agent_init): ... here. New.
6214 [HAVE_UST]: Call gdb_ust_init.
6215 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6216 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6217 * config.in, configure: Regenerated.
6218
05044653
PA
62192012-03-02 Pedro Alves <palves@redhat.com>
6220
6221 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6222 * linux-low.c (struct simple_pid_list): New.
6223 (stopped_pids): New a struct simple_pid_list pointer.
6224 (add_to_pid_list, pull_pid_from_list): New.
6225 (handle_extended_wait): Don't assume the first signal new children
6226 report is SIGSTOP. Adjust call to pull_pid_from_list.
6227 (linux_wait_for_lwp): Adjust.
6228
8d00225b
YQ
62292012-03-02 Yao Qi <yao@codesourcery.com>
6230
6231 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6232 debug log.
6233
19560ba5
YQ
62342012-03-02 Yao Qi <yao@codesourcery.com>
6235
6236 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6237 `stop_pc' and `tpoint'. Update caller.
6238
1faeff08
MR
62392012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6240
6241 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6242 * linux-low.c (use_linux_regsets): New macro.
6243 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6244 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6245 (linux_register_in_regsets): New function.
6246 (usr_fetch_inferior_registers): Skip registers covered by
6247 regsets.
6248 (usr_store_inferior_registers): Likewise.
6249 (usr_fetch_inferior_registers): New macro.
6250 (usr_store_inferior_registers): Likewise.
6251 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6252 (linux_store_registers): Likewise.
6253 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6254 prototype.
6255 (init_registers_mips64_dsp_linux): Likewise.
6256 (init_registers_mips_linux): New macro.
6257 (init_registers_mips_dsp_linux): Likewise.
6258 (mips_dsp_num_regs): Likewise.
6259 (DSP_BASE, DSP_CONTROL): New fallback macros.
6260 (mips_base_regs): New macro.
6261 (mips_regmap): Use it. Fix the size.
6262 (mips_dsp_regmap): New variable.
6263 (mips_dsp_regset_bitmap): Likewise.
6264 (mips_arch_setup): New function.
6265 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6266 than mips_regmap.
6267 (mips_cannot_store_register): Likewise.
6268 (the_low_target): Update .arch_setup, .num_regs and .regmap
6269 initializers. Add .regset_bitmap initializer.
6270 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6271 initializer.
6272 * linux-bfin-low.c (the_low_target): Likewise.
6273 * linux-cris-low.c (the_low_target): Likewise.
6274 * linux-crisv32-low.c (the_low_target): Likewise.
6275 * linux-ia64-low.c (the_low_target): Likewise.
6276 * linux-m32r-low.c (the_low_target): Likewise.
6277 * linux-m68k-low.c (the_low_target): Likewise.
6278 * linux-ppc-low.c (the_low_target): Likewise.
6279 * linux-s390-low.c (the_low_target): Likewise.
6280 * linux-sh-low.c (the_low_target): Likewise.
6281 * linux-sparc-low.c (the_low_target): Likewise.
6282 * linux-tic6x-low.c (the_low_target): Likewise.
6283 * linux-x86-low.c (the_low_target): Likewise.
6284 * linux-xtensa-low.c (the_low_target): Likewise.
6285 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6286 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6287 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6288 srv_xmlfiles.
6289 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6290 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6291
c03e6ccc
YQ
62922012-02-29 Yao Qi <yao@codesourcery.com>
6293 Pedro Alves <palves@redhat.com>
6294
6295 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6296 `step_over_finished' is true.
6297
644cebc9
PA
62982012-02-27 Pedro Alves <palves@redhat.com>
6299
6300 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6301 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6302
c14d7ab2
PA
63032012-02-27 Pedro Alves <palves@redhat.com>
6304
6305 PR server/9684
6306 * linux-low.c (pid_is_stopped): New.
6307 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6308
412c89dd
LM
63092012-02-25 Luis Machado <lgustavo@codesourcery.com>
6310
6311 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6312 of conditions.
6313
b745defe
MR
63142012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6315
6316 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6317
9f3a5c85
LM
63182012-02-24 Luis Machado <lgustavo@codesourcery>
6319
6320 * server.c (handle_query): Advertise support for target-side
6321 breakpoint condition evaluation.
6322 (process_point_options): New function.
6323 (process_serial_event): When inserting a breakpoint, check for
6324 a target-side condition that should be evaluated.
6325
6326 * mem-break.c: Include regcache.h and ax.h.
6327 (point_cond_list_t): New data structure.
6328 (breakpoint) <cond_list>: New field.
6329 (find_gdb_breakpoint_at): Make non-static.
6330 (delete_gdb_breakpoint_at): Clear any target-side
6331 conditions.
6332 (clear_gdb_breakpoint_conditions): New function.
6333 (add_condition_to_breakpoint): Likewise.
6334 (add_breakpoint_condition): Likewise.
6335 (gdb_condition_true_at_breakpoint): Likewise.
6336 (gdb_breakpoint_here): Return result directly instead
6337 of going through a local variable.
6338
6339 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6340 (clear_gdb_breakpoint_conditions): Likewise.
6341 (add_breakpoint_condition): Likewise.
6342 (gdb_condition_true_at_breakpoint): Likewise.
6343
6344 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6345 (need_step_over_p): Take target-side breakpoint condition into
6346 consideration.
6347
5e1dc496
LM
63482012-02-24 Luis Machado <lgustavo@codesourcery>
6349
6350 * server.h: Include tracepoint.h.
6351 (agent_mem_read, agent_get_trace_state_variable_value,
6352 agent_set_trace_state_variable_value,
6353 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6354 get_set_tsv_func_addr): New prototypes.
6355
6356 * ax.h: New include file.
6357 * ax.c: New source file.
6358
6359 * tracepoint.c: Include ax.h.
6360 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6361 agent_expr, eval_result_type): Move to ax.h.
6362 (parse_agent_expr): Rename to ...
6363 (gdb_parse_agent_expr): ... this, make it non-static and move
6364 to ax.h.
6365 (unparse_agent_expr) Rename to ...
6366 (gdb_unparse_agent_expr): ... this, make it non-static and move
6367 to ax.h.
6368 (eval_agent_expr): Rename to ...
6369 (eval_tracepoint_agent_expr): ... this.
6370 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6371 forward declarations.
6372 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6373 (agent_get_trace_state_variable_value): New function.
6374 (agent_set_trace_state_variable_value): New function.
6375 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6376 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6377 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6378 (condition_true_at_tracepoint): Likewise.
6379 (parse_agent_expr): Rename to ...
6380 (gdb_parse_agent_expr): ... this and move to ax.c.
6381 (unparse_agent_expr): Rename to ...
6382 (gdb_unparse_agent_expr): ... this and move to ax.c.
6383 (gdb_agent_op_name): Move to ax.c.
6384 (eval_agent_expr): Rename to ...
6385 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6386 and move to ax.c.
6387 (eval_tracepoint_agent_expr): New function.
6388 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 6389 non-static.
5e1dc496
LM
6390 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6391 ax.c.
6392 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6393 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6394 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6395 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6396 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6397 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6398 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6399 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6400 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6401 (compile_bytecodes): Remove forward declaration.
6402 (is_goto_target): Move to ax.c.
6403 (compile_bytecodes): Move to ax.c and call
6404 agent_get_trace_state_variable_value (...) and
6405 agent_set_trace_state_variable_value (...).
6406
6407 * Makefile.in: Update ax.c and IPA dependencies.
6408
277e4e52
PA
64092012-02-24 Pedro Alves <palves@redhat.com>
6410
6411 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6412 (cmd_bigqtbuffer_circular): ... this. Only handle
6413 'QTBuffer:circular:'.
6414 (handle_tracepoint_general_set): Adjust.
6415
bf4c19f7
YQ
64162012-02-16 Yao Qi <yao@codesourcery.com>
6417
6418 * inferiors.c: Move code to ...
6419 * dll.c: .... here. New.
6420 * server.h: Declare clear_dlls.
6421 * Makefile.in (SFILES): Add dll.c.
6422 (OBS): Add dll.o
6423 (dll.o): New rule.
6424
d73f2619
YQ
64252012-02-11 Yao Qi <yao@codesourcery.com>
6426
6427 * server.c: (handle_monitor_command): Add a new parameter
6428 `own_buf'.
6429 (handle_query): Update caller.
6430
f8255c2a
JB
64312012-02-09 Joel Brobecker <brobecker@adacore.com>
6432
6433 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6434 * configure, config.in: Regenerate.
6435 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6436 is not defined.
6437
da84f473
PA
64382012-02-02 Pedro Alves <palves@redhat.com>
6439
6440 Try SIGKILL first, then PTRACE_KILL.
6441 * linux-low.c (linux_kill_one_lwp): New.
6442 (linux_kill_one_lwp): Rename to ...
6443 (kill_one_lwp_callback): ... this. Use the new
6444 linux_kill_one_lwp.
6445
e886a173
PA
64462012-02-02 Pedro Alves <palves@redhat.com>
6447
6448 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6449 inferior.
6450
be07f1a2
PA
64512012-01-27 Pedro Alves <palves@redhat.com>
6452
6453 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6454 (elf_64_file_p): Make static.
6455 (linux_pid_exe_is_elf_64_file): New.
6456 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6457 Delete declarations.
6458 (linux_pid_exe_is_elf_64_file): Declare.
6459 * linux-x86-low.c (x86_arch_setup): Use
6460 linux_pid_exe_is_elf_64_file.
6461
d8301ad1
JK
64622012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6463
6464 * linux-low.c (linux_wait_for_event_1): Rename to ...
6465 (linux_wait_for_event): ... here and merge it with former
6466 linux_wait_for_event - new variable wait_ptid, use it.
6467 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6468
01b17894
PA
64692012-01-23 Pedro Alves <palves@redhat.com>
6470
6471 * server.c (main): Avoid yet another case of infinite loop while
6472 detaching/killing after a longjmp.
6473
e825046f
JK
64742012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6475
6476 Code cleanup.
6477 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6478
b9e7b9c3
UW
64792012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6480
6481 * hostio.c (handle_readlink): New function.
6482 (handle_vFile): Call it to handle "vFile:readlink" packets.
6483
901f9912
UW
64842012-01-20 Pedro Alves <palves@redhat.com>
6485 Ulrich Weigand <ulrich.weigand@linaro.org>
6486
6487 * server.c (handle_v_requests): Only support vAttach and vRun to
6488 start multiple processes when in extended protocol mode.
6489
fc1ab1a0
PA
64902012-01-17 Pedro Alves <palves@redhat.com>
6491
6492 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6493 memalign plus mprotect to allocate the scratch buffer.
6494
7d5d4e98
PA
64952012-01-13 Pedro Alves <palves@redhat.com>
6496
6497 * server.c (attach_inferior): Clear `cont_thread'.
6498
f128d5e9
PA
64992012-01-13 Pedro Alves <palves@redhat.com>
6500
6501 * server.c (main): Avoid infinite loop while detaching/killing
6502 after a longjmp.
6503
06db92f0
DE
65042012-01-09 Doug Evans <dje@google.com>
6505
6506 * server.c (start_inferior): Set last_ptid in --wrapper case.
6507
32d92999
YQ
65082012-01-06 Yao Qi <yao@codesourcery.com>
6509
6510 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6511 defined.
6512 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6513
5e0a92a9
YQ
65142012-01-04 Yao Qi <yao@codesourcery.com>
6515
6516 * tracepoint.c (cmd_qtdp): Print debug message
6517 for static tracepoint.
6518
ae639e8c
YQ
65192012-01-04 Yao Qi <yao@codesourcery.com>
6520
6521 * tracepoint.c (trace_vdebug): Differentiate debug message
6522 between gdbserver and IPA.
6523
f72429c5
YQ
65242012-01-03 Yao Qi <yao@codesourcery.com>
6525
6526 * tracepoint.c (tracepoint_was_hit): Don't collect for
6527 static tracepoint.
6528
12c3e59c
JB
65292012-01-02 Joel Brobecker <brobecker@adacore.com>
6530
6531 * terminal.h: Reformat copyright header.
6532
67827812
JB
65332012-01-02 Joel Brobecker <brobecker@adacore.com>
6534
6535 * server.c (gdbserver_version): Update copyright year.
6536 * gdbreplay.c (gdbreplay_version): Likewise.
6537
3e52c33d
JK
65382011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6539
6540 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6541
6542 Revert:
6543 2011-12-18 Hui Zhu <teawater@gmail.com>
6544 * linux-low.c (linux_create_inferior): Save return value to ret.
6545
66f1260e
HZ
65462011-12-18 Hui Zhu <teawater@gmail.com>
6547
6548 * linux-low.c (linux_create_inferior): Save return value to ret.
6549
e77616d7
DE
65502011-12-16 Doug Evans <dje@google.com>
6551
e7b06c57
DE
6552 * linux-low.c (linux_create_inferior): If stdio connection,
6553 redirect stdin from /dev/null, stdout to stderr.
6554 * remote-utils.c (remote_is_stdio): New static global.
6555 (remote_connection_is_stdio): New function.
6556 (remote_prepare): Handle stdio connection.
6557 (remote_open): Ditto.
6558 (remote_close): Don't close stdin for stdio connections.
6559 (read_prim,write_prim): New functions. Replace all calls to
6560 read/write to these.
6561 * server.c (main): Watch for "-" argument. Move call to
6562 remote_prepare before start_inferior.
6563 * server.h (STDIO_CONNECTION_NAME): New macro.
6564 (remote_connection_is_stdio): Declare.
6565
e77616d7
DE
6566 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6567 in debugging output.
6568
82067193
YQ
65692011-12-15 Yao Qi <yao@codesourcery.com>
6570
6571 * tracepoint.c: Include sys/syscall.h.
6572 (gdb_ust_thread): Remove preprocessor conditional.
6573
82bfbe7e
PA
65742011-12-14 Pedro Alves <pedro@codesourcery.com>
6575
6576 * linux-low.c (linux_detach_one_lwp): Call
6577 the_low_target.prepare_to_resume before detaching.
6578
712c6575
YQ
65792011-12-14 Yao Qi <yao@codesourcery.com>
6580
6581 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6582 of write.
6583
d54d1edf
YQ
65842011-12-14 Yao Qi <yao@codesourcery.com>
6585
6586 * i386-low.c (i386_low_stopped_data_address): Initialize local
6587 variable `control'.
6588
6210a125
PA
65892011-12-13 Pedro Alves <pedro@codesourcery.com>
6590
6591 PR remote/13492
6592
6593 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6594 DR_CONTROL unless necessary. Extend comments.
6595 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6596 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6597
2ece8244
YQ
65982011-12-13 Yao Qi <yao@codesourcery.com>
6599
6600 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6601 macros.
6602 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6603
784867a5
JK
66042011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6605
6606 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6607 Print new debug message for such case.
6608
6bf36717
JK
66092011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6610
6611 Fix overlapping memcpy.
6612 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6613 the read_inferior_memory transfer.
6614 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6615 write_inferior_memory transfer.
6616 (set_fast_tracepoint_jump): New variable buf. Use it for the
6617 read_inferior_memory and write_inferior_memory transfers.
6618 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6619 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6620 Use it for the write_inferior_memory transfer.
6621 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6622 buffers.
6623
50275556
MR
66242011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6625
6626 * linux-low.c (fetch_register, store_register): Make code
6627 consistent, fix formatting.
6628
7325beb4
MR
66292011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6630
6631 * linux-low.c (usr_store_inferior_registers): Factor out code
6632 to handle individual registers into...
6633 (store_register): ... this new function.
6634
c642a434
UW
66352011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6636
6637 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6638 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6639 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6640 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6641 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6642 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6643 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6644 (srv_xmlfiles): Add new XML files.
6645
6646 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6647 and <sys/uio.h>.
6648 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6649 (init_registers_s390_linux32v1): Add prototype.
6650 (init_registers_s390_linux32v2): Likewise.
6651 (init_registers_s390_linux64v1): Likewise.
6652 (init_registers_s390_linux64v2): Likewise.
6653 (init_registers_s390x_linux64v1): Likewise.
6654 (init_registers_s390x_linux64v2): Likewise.
6655 (s390_num_regs): Increment to 52.
6656 (s390_regmap): Add orig_r2 register.
6657 (s390_num_regs_3264): Increment to 68.
6658 (s390_regmap_3264): Add orig_r2 register.
6659 (s390_collect_ptrace_register): Handle orig_r2 register.
6660 (s390_supply_ptrace_register): Likewise.
6661 (s390_fill_last_break): New function.
6662 (s390_store_last_break): Likewise.
6663 (s390_fill_system_call): New function.
6664 (s390_store_system_call): Likewise.
6665 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6666 register sets.
6667 (s390_check_regset): New function.
6668 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6669 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6670 Update target_regsets for available register sets.
6671
2268b414
JK
66722011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6673 Jan Kratochvil <jan.kratochvil@redhat.com>
6674
6675 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6676 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6677 New.
6678 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6679 * linux-low.h (struct process_info_private): New member r_debug.
6680 * server.c (handle_qxfer_libraries): Call
6681 the_target->qxfer_libraries_svr4.
6682 (handle_qxfer_libraries_svr4): New function.
6683 (qxfer_packets): New entry "libraries-svr4".
6684 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6685 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6686 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6687 PACKET_qXfer_libraries_svr4.
6688
d6db1fab
UW
66892011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6690
6691 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6692 PSW address/mask between 8-byte and 16-byte formats.
6693 (s390_supply_ptrace_register): Likewise.
6694 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6695 basic addressing mode bit.
6696
242f5f1c
SS
66972011-11-24 Stan Shebs <stan@codesourcery.com>
6698
6699 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6700
f196051f
SS
67012011-11-17 Stan Shebs <stan@codesourcery.com>
6702
6703 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6704 (tracing_start_time): New global.
6705 (tracing_stop_time): New global.
6706 (tracing_user_name): New global.
6707 (tracing_notes): New global.
6708 (tracing_stop_note): New global.
6709 (cmd_qtstart): Set traceframe_usage, start_time.
6710 (stop_tracing): Set stop_time.
6711 (cmd_qtstatus): Report additional status.
6712 (cmd_qtp): New function.
6713 (handle_tracepoint_query): Call it.
6714 (cmd_qtnotes): New function.
6715 (handle_tracepoint_general_set): Call it.
6716 (get_timestamp): Rename from tsv_get_timestamp.
6717
405f8e94
SS
67182011-11-14 Stan Shebs <stan@codesourcery.com>
6719 Kwok Cheung Yeung <kcy@codesourcery.com>
6720
6721 * linux-x86-low.c (small_jump_insn): New.
6722 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6723 trampoline and error message, build a trampoline and issue a small
6724 jump instruction to it.
6725 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6726 trampoline and error message.
6727 (x86_get_min_fast_tracepoint_insn_len): New.
6728 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6729 * linux-low.h (struct linux_target_ops): Add arguments to
6730 install_fast_tracepoint_jump_pad operation, add new operation.
6731 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6732 arguments.
6733 (linux_get_min_fast_tracepoint_insn_len): New function.
6734 (linux_target_op): Add new operation.
6735 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6736 (gdb_trampoline_buffer_end): Ditto.
6737 (gdb_trampoline_buffer_error): Ditto.
6738 (struct ipa_sym_addresses): Add fields for new IPA variables.
6739 (symbol_list): Add entries for new IPA variables.
6740 (struct tracepoint): Add fields to hold the address range of the
6741 trampoline used by the tracepoint.
6742 (trampoline_buffer_head): New static variable.
6743 (trampoline_buffer_tail): Ditto.
6744 (claim_trampoline_space): New function.
6745 (have_fast_tracepoint_trampoline_buffer): New function.
6746 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6747 structure.
6748 (install_fast_tracepoint): Ditto, also add error buffer argument.
6749 (cmd_qtminftpilen): New function.
6750 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6751 (fast_tracepoint_from_trampoline_address): New function.
6752 (fast_tracepoint_collecting): Handle trampoline as part of jump
6753 pad space.
6754 (set_trampoline_buffer_space): New function.
6755 (initialize_tracepoint): Initialize new IPA variables.
6756 * target.h (struct target_ops): Add arguments to
6757 install_fast_tracepoint_jump_pad operation, add new
6758 get_min_fast_tracepoint_insn_len operation.
6759 (target_get_min_fast_tracepoint_insn_len): New.
6760 (install_fast_tracepoint_jump_pad): Add arguments.
6761 * server.h (IPA_BUFSIZ): Define.
6762 * linux-i386-ipa.c: Include extra header files.
6763 (initialize_fast_tracepoint_trampoline_buffer): New function.
6764 (initialize_low_tracepoint): Call it.
6765 * server.h (set_trampoline_buffer_space): Declare.
6766 (claim_trampoline_space): Ditto.
6767 (have_fast_tracepoint_trampoline_buffer): Ditto.
6768
1e4d1764
YQ
67692011-11-14 Yao Qi <yao@codesourcery.com>
6770
6771 * server.c (handle_query): Handle InstallInTrace for qSupported.
6772 * tracepoint.c (add_tracepoint): Sort list.
6773 (install_tracepoint, download_tracepoint): New.
6774 (cmd_qtdp): Call them to install and download tracepoints.
6775 (sort_tracepoints): Removed.
6776 (cmd_qtstart): Update.
6777
5c73ff4e
YQ
67782011-11-14 Yao Qi <yao@codesourcery.com>
6779
6780 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6781 * mem-break.h: Declare.
6782 * tracepoint.c (cmd_qtstart): Move some code to ...
6783 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6784 New.
6785 (download_tracepoints): Move some code to ...
6786 (download_tracepoint_1): ... here. New.
6787
86a30030
YQ
67882011-11-08 Yao Qi <yao@codesourcery.com>
6789
6790 * remote-utils.c (relocate_instruction): A comment fix.
6791
8d26e50c
JB
67922011-11-07 Joel Brobecker <brobecker@adacore.com>
6793
6794 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6795 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6796 dr_status_mirror and dr_control_mirror from debug_reg_state.
6797 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6798 (i386_initial_stuff): Remove use of deleted globals.
6799 (i386_get_thread_context, i386_set_thread_context,
6800 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6801 from debug_reg_state.
6802
a59306a3
YQ
68032011-11-05 Yao Qi <yao@codesourcery.com>
6804
6805 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6806 address as TPOINT's.
6807
3065dfb6
SS
68082011-11-02 Stan Shebs <stan@codesourcery.com>
6809
6810 * tracepoint.c (agent_mem_read_string): New function.
6811 (eval_agent_expr): Call it for tracenz.
6812 * server.c (handle_query): Report support for tracenz.
6813
fd0d8c7c
YQ
68142011-11-02 Yao Qi <yao@codesourcery.com>
6815
6816 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6817
609086b1
YQ
68182011-11-02 Yao Qi <yao@codesourcery.com>
6819
6820 * target.h: Fix a typo in comment.
6821
b9fd1791
PA
68222011-10-31 Pedro Alves <pedro@codesourcery.com>
6823
6824 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6825 clobber the breakpoints' shadows with fast tracepoint jumps.
6826 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6827 * target.c (write_inferior_memory): Also pass MYADDR down to
6828 check_mem_write.
6829
03583c20
UW
68302011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6831
6832 * configure.ac: Check support for personality routine.
6833 * configure: Regenerate.
6834 * config.in: Likewise.
6835 * linux-low.c: Include <sys/personality.h>.
6836 Define ADDR_NO_RANDOMIZE if necessary.
6837 (linux_create_inferior): Disable address space randomization when
6838 forking inferior, if requested.
6839 (linux_supports_disable_randomization): New function.
6840 (linux_target_ops): Install it.
6841 * server.h (disable_randomization): Declare.
6842 * server.c (disable_randomization): New global variable.
6843 (handle_general_set): Handle QDisableRandomization.
6844 (handle_query): Likewise for qSupported.
6845 (main): Support --disable-randomization and --no-disable-randomization
6846 command line arguments.
6847 * target.h (struct target_ops): Add supports_disable_randomization.
6848 (target_supports_disable_randomization): New macro.
6849
723b724b
MF
68502011-09-29 Mike Frysinger <vapier@gentoo.org>
6851
6852 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6853 ifdef check.
6854 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6855 [!PT_GETDSBT] (target_loadmap): New definition.
6856 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6857 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6858 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6859 and PT_GETDSBT to LINUX_LOADMAP.
6860 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6861 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6862
55329a5c 68632011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
6864
6865 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6866 (arm_linux_hwbp_cap): New static variable.
6867 (arm_linux_get_hwbp_cap): Replace by ...
6868 (arm_linux_init_hwbp_cap): ... this new function.
6869 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6870 (arm_linux_get_hw_watchpoint_count): Likewise.
6871 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6872 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6873 (arm_prepare_to_resume): Use perror_with_name instead of error.
6874
55329a5c 68752011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
6876
6877 * linux-arm-low.c: Include <signal.h>.
6878 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6879 (struct arm_linux_hwbp_cap): New data type.
6880 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6881 (struct arm_linux_hw_breakpoint): New data type.
6882 (MAX_BPTS, MAX_WPTS): Define.
6883 (struct arch_process_info, struct arch_lwp_info): New data types.
6884 (arm_linux_get_hwbp_cap): New function.
6885 (arm_linux_get_hw_breakpoint_count): Likewise.
6886 (arm_linux_get_hw_watchpoint_count): Likewise.
6887 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6888 (arm_hwbp_control_initialize): Likewise.
6889 (arm_hwbp_control_is_enabled): Likewise.
6890 (arm_hwbp_control_is_initialized): Likewise.
6891 (arm_hwbp_control_disable): Likewise.
6892 (arm_linux_hw_breakpoint_equal): Likewise.
6893 (arm_linux_hw_point_initialize): Likewise.
6894 (struct update_registers_data): New data structure.
6895 (update_registers_callback: New function.
6896 (arm_insert_point): Likewise.
6897 (arm_remove_point): Likewise.
6898 (arm_stopped_by_watchpoint): Likewise.
6899 (arm_stopped_data_address): Likewise.
6900 (arm_new_process): Likewise.
6901 (arm_new_thread): Likewise.
6902 (arm_prepare_to_resume): Likewise.
6903 (the_low_target): Register arm_insert_point, arm_remove_point,
6904 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6905 arm_new_thread, and arm_prepare_to_resume.
6906
6b9801d4
SS
69072011-09-15 Stan Shebs <stan@codesourcery.com>
6908
6909 * server.h (struct emit_ops): Add compare-goto fields.
6910 * tracepoint.c (gdb_agent_op_sizes): New table.
6911 (emit_eq_goto): New function.
6912 (emit_ne_goto): New function.
6913 (emit_lt_goto): New function.
6914 (emit_le_goto): New function.
6915 (emit_gt_goto): New function.
6916 (emit_ge_goto): New function.
6917 (is_goto_target): New function.
6918 (compile_bytecodes): Recognize special cases of compare-goto
6919 combinations and call specialized emitters for them.
6920 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6921 (amd64_emit_ne_goto): New function.
6922 (amd64_emit_lt_goto): New function.
6923 (amd64_emit_le_goto): New function.
6924 (amd64_emit_gt_goto): New function.
6925 (amd64_emit_ge_goto): New function.
6926 (amd64_emit_ops): Add the new functions.
6927 (i386_emit_eq_goto): New function.
6928 (i386_emit_ne_goto): New function.
6929 (i386_emit_lt_goto): New function.
6930 (i386_emit_le_goto): New function.
6931 (i386_emit_gt_goto): New function.
6932 (i386_emit_ge_goto): New function.
6933 (i386_emit_ops): Add the new functions.
6934
bf15cbda
SS
69352011-09-08 Stan Shebs <stan@codesourcery.com>
6936
6937 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6938 (i386_emit_epilogue): Restore %ebx.
6939
943ca1dd
JZ
69402011-08-31 Jie Zhang <jzhang918@gmail.com>
6941
6942 * server.c (step_thread): Remove definition.
6943 (process_serial_event): Don't handle Hs.
6944 * server.h (step_thread): Remove declaration.
6945 * target.c (set_desired_inferior): Remove use of step_thread.
6946
e3deef73
LM
69472011-08-24 Luis Machado <lgustavo@codesourcery.com>
6948
6949 * linux-low.c: Include linux-procfs.h.
6950 (linux_attach_lwp_1): Update comments.
6951 (linux_attach): Scan for existing threads when attaching to a
6952 process that is the tgid.
6953 * Makefile.in: Update dependencies.
6954
13da1c97
LM
69552011-08-24 Luis Machado <lgustavo@codesourcery.com>
6956
6957 * configure.srv: Add linux-procfs.o dependencies.
6958
881127c9
YQ
69592011-08-14 Yao Qi <yao@codesourcery.com>
6960
6961 * target.h (struct target_ops): Fix indent.
6962 * win32-low.c (win32_target_ops): Fix comment.
6963
58dbd541
YQ
69642011-08-14 Andrew Jenner <andrew@codesourcery.com>
6965 Yao Qi <yao@codesourcery.com>
6966
6967 * Makefile.in (clean): Remove tic6x-*.c files.
6968 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6969 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6970 (tic6x-c64xp-linux.c): Likewise.
6971 * configure.srv: Add support for tic6x-*-uclinux.
6972 * linux-tic6x-low.c: New.
6973 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6974
78d85199
YQ
69752011-08-14 Andrew Stubbs <ams@codesourcery.com>
6976 Yao Qi <yao@codesourcery.com>
6977
6978 * target.h (struct target_ops): Add read_loadmap.
6979 * linux-low.c (struct target_loadseg): New type.
6980 (struct target_loadmap): New type.
6981 (linux_read_loadmap): New function.
6982 (linux_target_ops): Add linux_read_loadmap.
6983 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
6984 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6985 to NULL.
78d85199 6986
a959a88d
EZ
69872011-08-05 Eli Zaretskii <eliz@gnu.org>
6988
6989 * win32-low.c: Include <stdint.h>.
6990
1ced966e
PA
69912011-07-22 Pedro Alves <pedro@codesourcery.com>
6992
6993 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6994 to the inferior here.
6995 (i386_remove_aligned_watchpoint): Ditto.
6996 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6997 fit part of the watchpoint in the debug registers.
6998 (i386_update_inferior_debug_regs): New.
6999 (i386_low_insert_watchpoint): Work on a local mirror of the debug
7000 registers, and only update the inferior on success.
7001 (i386_low_remove_watchpoint): Ditto.
7002
d26e3629
KY
70032011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
7004
7005 * linux-low.c (compare_ints, unique, list_threads, show_process,
7006 linux_core_of_thread): Delete.
7007 (linux_target_ops): Change linux_core_of_thread to
7008 linux_common_core_of_thread.
7009 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7010 * utils.c (malloc_failure): Change type of argument.
7011 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7012 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7013 common/linux-osdata.c, common/ptid.c and common/buffer.c.
7014 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7015 (IPA_OBJS): Add common-utils-ipa.o.
7016 (ptid_h, linux_osdata_h): New macros.
7017 (server_h): Add common/common-utils.h, common/xml-utils.h,
7018 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7019 common/ptid.h.
7020 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7021 ptid.o, buffer.o): New rules.
7022 (linux-low.o): Add common/linux-osdata.h as a dependency.
7023 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7024 * configure.ac: Add AC_HEADER_DIRENT check.
7025 * config.in: Regenerate.
7026 * configure: Regenerate.
7027 * remote-utils.c (xml_escape_text): Delete.
7028 (buffer_grow, buffer_free, buffer_init, buffer_finish,
7029 buffer_xml_printf): Move to common/buffer.c.
7030 * server.c (main): Remove call to initialize_inferiors.
7031 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7032 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7033 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7034 internal_error, gdb_assert, gdb_assert_fail): Delete.
7035 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7036 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7037 common/buffer.h.
7038 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7039 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7040 initialize_inferiors): Delete.
7041
2275a1a7
PA
70422011-07-20 Pedro Alves <pedro@codesourcery.com>
7043
7044 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7045 symbol error.
7046
0a5b1e09
PA
70472011-05-31 Pedro Alves <pedro@codesourcery.com>
7048
7049 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7050 assertion.
7051 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7052
6938fd34
YQ
70532011-05-26 Yao Qi <yao@codesourcery.com>
7054
7055 * Makefile.in (thread-db.o): Track dependence to
7056 common/gdb_thread_db.h.
7057 * thread-db.c: include gdb_thread_db.h from right place.
7058
b481f9e0
TT
70592011-05-16 Adrian Cornish <gnu@bluedreamer.com>
7060
7061 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7062 __FILE__ and __LINE__ to internal_error.
7063
98a5dd13
DE
70642011-05-13 Doug Evans <dje@google.com>
7065
7066 * thread-db.c (try_thread_db_load_from_sdir): New function.
7067 (try_thread_db_load_from_dir): New function.
7068 (thread_db_load_search): Handle $sdir, ignore $pdir.
7069 Remove trying of system directories if search of
7070 libthread-db-search-path fails, that is now done via $sdir.
7071
d248b706
KY
70722011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
7073
7074 * server.c (handle_query): Add EnableDisableTracepoints to the list
7075 of supported features.
43aaf8b6 7076 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 7077 tracepoints.
43aaf8b6
PA
7078 (cmd_qtenable_disable): New.
7079 (cmd_qtstart): Install tracepoints even if disabled.
7080 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7081 receiving a QTEnable or QTDisable packet.
7082 (gdb_collect): Skip data collection if fast tracepoint is disabled.
7083 (ust_marker_to_static_tracepoint): Do not ignore disabled static
7084 tracepoints.
7085 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 7086
84e578fb
DE
70872011-05-10 Doug Evans <dje@google.com>
7088
7089 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7090
71f55dd8
DE
70912011-05-04 Doug Evans <dje@google.com>
7092
7093 * linux-low.c (linux_join): Skip process lookup.
7094 * spu-low.c (spu_join): Ditto.
7095 * server.c (join_inferiors_callback): Delete.
7096 (process_serial_event): For 'D' packet (detach) call join_inferior
7097 directly.
7098
4d393d60
JM
70992011-05-04 Joseph Myers <joseph@codesourcery.com>
7100
7101 * README: Don't mention xscale*-*-linux*.
7102 * configure.srv (xscale*-*-linux*): Don't handle target.
7103
b00ad6ff
NF
71042011-04-27 Nathan Froyd <froydnj@codesourcery.com>
7105
7106 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7107 casting pointers.
7108 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7109 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7110 (i386_emit_void_call_2): Likewise.
7111
af96c192
YQ
71122011-04-26 Yao Qi <yao@codesourcery.com>
7113
43aaf8b6
PA
7114 * linux-low.c: Move common macros to linux-ptrace.h.
7115 Include linux-ptrace.h.
af96c192
YQ
7116 * Makefile.in (linux_ptrace_h): New.
7117 (linux-low.o): Depends on linux-ptrace.h.
7118
03f2bd59
JK
71192011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7120
7121 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7122 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
7123 (remote_prepare): New function with most of the TCP code from ...
7124 (remote_open): ... here. Detect PORT here unconditionally. Move also
7125 setting transport_is_reliable.
7126 * server.c (run_once): New variable.
7127 (gdbserver_usage): Document it.
7128 (main): Set run_once for `--once'. Call remote_prepare. Exit after
7129 the first run if RUN_ONCE.
7130 * server.h (run_once, remote_prepare): New declarations.
7131
7a9dd1b2
TT
71322011-04-19 Tom Tromey <tromey@redhat.com>
7133
7134 * win32-low.c (handle_load_dll): Remove duplicate "the".
7135
81239425
PM
71362011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
7137
7138 Remove support for old Cygwin 1.5 versions.
7139 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7140 function to avoid warning.
7141 (win32_add_one_solib): Use cygwin_conv_path function to avoid
7142 warning.
7143
9e0627f1
PM
71442011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7145
7146 * gdbserver/server.h (Macro _): Define it if not available.
7147
588eebee
MS
71482011-03-14 Michael Snyder <msnyder@vmware.com>
7149
348af9f7 7150 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 7151
43f70d4c
JB
71522011-03-10 Joel Brobecker <brobecker@adacore.com>
7153
7154 * Makefile.in (maintainer-clean realclean distclean): Remove
7155 "make ... subdir_do" command.
7156
348af9f7
MS
71572011-03-10 Michael Snyder <msnyder@vmware.com>
7158
7159 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7160
7161 * server.c (handle_v_run): Free alloced buffer on early return.
7162
e637a4f5
YQ
71632011-03-09 Yao Qi <yao@codesourcery.com>
7164
7165 Revert:
7166 2011-03-04 Yao Qi <yao@codesourcery.com>
7167
7168 * Makefile.in: Remove GNU make feature --directory.
7169
7170 2011-03-05 Yao Qi <yao@codesourcery.com>
7171
7172 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7173 (subdir_do): New make target. Copied from gdb/Makefile.
7174 (maintainer-clean, realclean, distclean, clean): Call corresponding
7175 make targets in common/Makefile.
7176
7177 2011-02-11 Yao Qi <yao@codesourcery.com>
7178
7179 * configure.ac: Call AC_PROG_RANLIB.
7180 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7181 * configure: Regenerate.
7182
e6edda56
JK
71832011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7184
7185 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7186
e5141119
JB
71872011-03-06 Yao Qi <yao@codesourcery.com>
7188
7189 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7190
64794aa4
JB
71912011-03-05 Yao Qi <yao@codesourcery.com>
7192
7193 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7194 (subdir_do): New make target. Copied from gdb/Makefile.
7195 (maintainer-clean, realclean, distclean, clean): Call corresponding
7196 make targets in common/Makefile.
7197
7a762829
YQ
71982011-03-04 Yao Qi <yao@codesourcery.com>
7199
7200 * Makefile.in: Remove GNU make feature --directory.
7201
348af9f7
MS
72022011-03-04 Michael Snyder <msnyder@vmware.com>
7203
7204 * server.c (queue_stop_reply): Call xmalloc not malloc.
7205
72062011-03-02 Michael Snyder <msnyder@vmware.com>
7207
7208 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7209
9f72fee2
MS
72102011-02-28 Michael Snyder <msnyder@vmware.com>
7211
588eebee
MS
7212 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7213 (cmd_qtframe): Ditto.
7214 (cmd_qtbuffer): Ditto.
7215 (cmd_bigqtbuffer): Ditto.
7216
9f72fee2
MS
7217 * utils.c (decimal2str): Initialize 'width' to nine, then
7218 don't mess with it.
7219
8040bd49
UW
72202011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7221
7222 * hostio.c (require_data): Free *data, not data.
7223
7e52cbd0
JK
72242011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7225
7226 * hostio.c (require_data): Use free, not xfree.
7227
9130f83e
MS
72282011-02-27 Michael Snyder <msnyder@vmware.com>
7229
4b812f4e
MS
7230 * server.c (handle_query): Discard unused value.
7231
9130f83e
MS
7232 * hostio.c (require_data): Free malloc memory before returning
7233 error.
7234
69d37113
MS
72352011-02-26 Michael Snyder <msnyder@vmware.com>
7236
7237 * linux-low.c (list_threads): Call closedir for dirent.
7238
35f5825a
MS
72392011-02-27 Michael Snyder <msnyder@vmware.com>
7240
2a589cef
MS
7241 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7242 a case statement falls through.
7243
0adea5f7
MS
7244 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7245
35f5825a
MS
7246 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7247 in comparison.
7248
238f1c74
MS
72492011-02-26 Michael Snyder <msnyder@vmware.com>
7250
7251 * utils.c (decimal2str): Eliminate dead code and dead param.
7252 (pulongest): Drop dead param from call to decimal2str.
7253 (plongest): Ditto.
7254
633ff500
JB
72552011-02-24 Joel Brobecker <brobecker@adacore.com>
7256
7257 Revert the following patch (not approved yet):
7258 2011-02-21 Hui Zhu <teawater@gmail.com>
7259 * tracepoint.c (tp_printf): New function.
7260 (eval_agent_expr): Handle gdb_agent_op_printf.
7261
f9c6ff72
HZ
72622011-02-21 Hui Zhu <teawater@gmail.com>
7263
7264 * tracepoint.c (tp_printf): New function.
7265 (eval_agent_expr): Handle gdb_agent_op_printf.
7266
94d5e490
TT
72672011-02-18 Tom Tromey <tromey@redhat.com>
7268
7269 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7270 (tracepoint.o): Likewise.
7271 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7272 (gdb_agent_op_names): Likewise.
7273
c7f96d2b
TT
72742011-02-18 Tom Tromey <tromey@redhat.com>
7275
7276 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7277 gdb_agent_op_rot>: New constants.
7278 (gdb_agent_op_names): Add pick and roll.
7279 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7280 cases.
7281
0feedb2c
JK
72822011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7283
7284 * aclocal.m4: Regenerated with aclocal-1.11.1.
7285
b3b9301e
PA
72862011-02-14 Pedro Alves <pedro@codesourcery.com>
7287
7288 * server.c (handle_qxfer_traceframe_info): New.
7289 (qxfer_packets): Register "traceframe-info".
7290 (handle_query): Report support for qXfer:traceframe-info:read+.
7291 * tracepoint.c (match_blocktype): New.
7292 (traceframe_find_block_type): Rename to ...
7293 (traceframe_walk_blocks): ... this. Add callback filter argument,
7294 and use it.
7295 (traceframe_find_block_type): New, reimplemented on top of
7296 traceframe_walk_blocks.
7297 (build_traceframe_info_xml): New.
7298 (traceframe_read_info): New.
7299 * server.h (traceframe_read_info): Declare.
7300
4f3e6fb7
YQ
73012011-02-11 Yao Qi <yao@codesourcery.com>
7302
7303 * configure.ac: Call AC_PROG_RANLIB.
7304 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7305 * configure: Regenerate.
7306
764880b7
PA
73072011-02-07 Pedro Alves <pedro@codesourcery.com>
7308
7309 * server.c (gdb_read_memory): Change return semantics to allow
7310 partial transfers.
7311 (handle_search_memory_1): Adjust.
7312 (process_serial_event) <'m' packet>: Handle partial transfers.
7313 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7314
1c79eb8a
PA
73152011-01-28 Pedro Alves <pedro@codesourcery.com>
7316
7317 * regcache.c (init_register_cache): Initialize
7318 regcache->register_status.
7319 (free_register_cache): Release regcache->register_status.
7320 (regcache_cpy): Copy register_status.
7321 (registers_to_string): Print 'x's for unavailable registers.
7322 (supply_register): Mark the register's status valid or
7323 unavailable, depending on whether a buffer was passed in or not.
7324 (supply_register_zeroed): New.
7325 (supply_regblock): Mark the registers' status valid or
7326 unavailable, depending on whether a buffer was passed in or not.
7327 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7328 (struct regcache): New `register_status' field.
7329 (supply_register_zeroed): Declare.
7330 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7331 supply_register_zeroed, rather than passing a NULL buffer to
7332 supply_register.
7333 * tracepoint.c (fetch_traceframe_registers): Update comment.
7334
85724a0e
PA
73352011-01-28 Pedro Alves <pedro@codesourcery.com>
7336
7337 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7338 buffer explicit.
7339
d08aafef
PA
73402011-01-25 Pedro Alves <pedro@codesourcery.com>
7341
7342 * server.h (decode_xfer_write): Change prototype.
7343 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7344 and don't extract the annex here.
7345 * server.c (decode_xfer_read): Remove `annex' parameter,
7346 and don't extract the annex here.
7347 (decode_xfer): New.
7348 (struct qxfer): New.
7349 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7350 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7351 (handle_qxfer_statictrace): New functions, abstracted out from
7352 handle_query, and made to use the struct qxfer interface.
7353 (handle_threads_qxfer_proper): Rename to ...
7354 (handle_qxfer_threads_proper): ... this.
7355 (handle_threads_qxfer): Rename to ...
7356 (handle_qxfer_threads): ... this. Adjust.
7357 (qxfer_packets): New array.
7358 (handle_qxfer): New function.
7359 (handle_query): Use handle_qxfer.
7360
493e2a69
MS
73612011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7362
7363 * gdbreplay.c: Shorten lines of >= 80 columns.
7364 * linux-low.c: Ditto.
7365 * linux-ppc-low.c: Ditto.
7366 * linux-s390-low.c: Ditto.
7367 * linux-sparc-low.c: Ditto.
7368 * linux-x86-low.c: Ditto.
7369 * linux-xtensa-low.c: Ditto.
7370 * mem-break.c: Ditto.
7371 * nto-low.c: Ditto.
7372 * regcache.h: Ditto.
7373 * remote-utils.c: Ditto.
7374 * server.c: Ditto.
7375 * server.h: Ditto.
7376 * thread-db.c: Ditto.
7377 * tracepoint.c: Ditto.
7378 * utils.c: Ditto.
7379 * win32-low.h: Ditto.
7380
44944448
JB
73812011-01-05 Joel Brobecker <brobecker@adacore.com>
7382
7383 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7384 update.
7385
71ce852c
JB
73862011-01-01 Joel Brobecker <brobecker@adacore.com>
7387
7388 * server.c (gdbserver_version): Update copyright year in version
7389 output.
7390 * gdbreplay.c (gdbreplay_version): Ditto.
7391
eb826dc6
MF
73922010-12-29 Jie Zhang <jie.zhang@analog.com>
7393
7394 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7395 * linux-bfin-low.c: New file.
7396 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7397 PT_DATA_ADDR for BFIN targets.
7398 * Makefile.in (SFILES): Add linux-bfin-low.c.
7399 (clean): Remove reg-bfin.c.
7400 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7401 * README: Mention supported Blackfin targets.
7402
39ab222a
MF
74032010-12-23 Mike Frysinger <vapier@gentoo.org>
7404
7405 * .gitignore: New file.
7406
a1f2ce7d
MF
74072010-11-16 Mike Frysinger <vapier@gentoo.org>
7408
7409 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7410
f474844c
JZ
74112010-10-22 Jie Zhang <jie@codesourcery.com>
7412
7413 * Makefile.in: Add FLAGS_TO_PASS variable.
7414 (install): Remove dependency of install-only and recursively
7415 invoke make for install-only.
7416
f1048712
DE
74172010-10-04 Doug Evans <dje@google.com>
7418
7419 * Makefile.in (uninstall): Use $(DESTDIR).
7420
b53a1623
PA
74212010-09-24 Pedro Alves <pedro@codesourcery.com>
7422
e6ee044d
PA
7423 PR gdb/11842
7424
b53a1623
PA
7425 * linux-x86-low.c (compat_siginfo_from_siginfo)
7426 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7427 si_code is < 0. Check for si_code == SI_TIMER before checking for
7428 si_code < 0.
7429
fa1bd1e4
JB
74302010-09-13 Joel Brobecker <brobecker@adacore.com>
7431
7432 * lynx-i386-low.c: New file.
7433 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7434
47fac8f8
JB
74352010-09-13 Joel Brobecker <brobecker@adacore.com>
7436
7437 * lynx-low.c (ptrace_request_to_str): Remove handling for
7438 request values that have been removed in LynxOS 5.x.
7439
1adfc54d
JB
74402010-09-13 Joel Brobecker <brobecker@adacore.com>
7441
7442 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7443 <ptrace.h>
7444
c2a66c29
NS
74452010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7446
7447 * configure.ac: Add --enable-inprocess-agent option.
7448 * configure: Rebuilt.
7449
32fcada3
YQ
74502010-09-06 Yao Qi <yao@codesourcery.com>
7451
7452 * linux-low.c (linux_kill): Remove unused variable.
7453 (linux_stabilize_threads): Likewise.
7454 * server.c (start_inferior): Likewise.
7455 (queue_stop_reply_callback): Likewise.
7456 * tracepoint.c (do_action_at_tracepoint): Likewise.
7457
0cccb683
YQ
74582010-09-06 Yao Qi <yao@codesourcery.com>
7459
7460 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7461 on return.
7462
423ec54c
JK
74632010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7464
7465 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7466
12ac6819
PA
74672010-09-06 Pedro Alves <pedro@codesourcery.com>
7468
7469 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7470 "$(IPA_DEPFILES)".
7471
8ed54b31
JB
74722010-09-01 Joel Brobecker <brobecker@adacore.com>
7473
7474 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7475 gdbserver/lynx-ppc-low.c: New files.
7476 * Makefile.in (lynx_low_h): New variable.
7477 (lynx-low.o, lynx-ppc-low.o): New rules.
7478 * configure.ac: On LynxOS, link with -lnetinet.
7479 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7480 * configure: regenerate.
7481
bb0116a4
JB
74822010-09-01 Joel Brobecker <brobecker@adacore.com>
7483
7484 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7485 * configure.ac: Add check for vasprintf and vsnprintf.
7486 * configure, config.in: Regenerate.
7487 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7488
a778ab81 74892010-09-01 Joel Brobecker <brobecker@adacore.com>
7490
7491 * gdbreplay.c: Move include of alloca.h up, next to include of
7492 malloc.h.
7493 * server.h: Add include of malloc.h.
7494 * mem-break.c: Remove include of malloc.h.
7495 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7496
8b034a19 74972010-09-01 Joel Brobecker <brobecker@adacore.com>
7498
7499 * Makefile.in (memmem.o): Build with -Wno-error.
7500
75012010-09-01 Joel Brobecker <brobecker@adacore.com>
7502
7503 * utils.c (xsnprintf): Make non-static.
7504 * server.h: Add xsnprintf declaration.
7505 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7506 replace calls to snprintf by calls to xsnprintf throughout.
7507
75082010-09-01 Joel Brobecker <brobecker@adacore.com>
7509
7510 * configure.ac: Add configure check for alloca.
7511 * configure, config.in: Regenerate.
7512 * server.h: Include alloca.h if it exists.
7513 * gdbreplay.c: Include alloca.h if it exists.
7514
1a981360
PA
75152010-08-28 Pedro Alves <pedro@codesourcery.com>
7516
7517 * linux-low.c (__SIGRTMIN): Define if not already defined.
7518 (linux_create_inferior): Check for __ANDROID__ rather than
7519 __SIGRTMIN.
7520 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7521 are already deferred.
7522 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7523 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7524 stopped and already has a pending signal to report.
7525 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7526 a pending signal to report or is moving out of a jump pad.
7527 (linux_init_signals): Check for __ANDROID__ rather than
7528 __SIGRTMIN.
7529
b4d51a55
PA
75302010-08-28 Pedro Alves <pedro@codesourcery.com>
7531
7532 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7533 debug_threads check. Avoid a linear search when not doing debug
7534 output.
7535
ec48365d
PA
75362010-08-27 Pedro Alves <pedro@codesourcery.com>
7537
7538 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7539 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7540 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7541 (process_event): Change local fd's type to gdb_fildes_t.
7542 (create_file_handler): Adjust prototype.
7543 (delete_file_handler): Adjust prototype.
7544 (handle_file_event): Adjust prototype. Use pfildes.
7545 (create_file_event): Adjsut prototype.
7546 * remote-utils.c (remote_desc, listen_desc): Change type to
7547 gdb_fildes_t.
7548 * server.h: New gdb_fildes_t typedef.
7549 [USE_WIN32API]: Include winsock2.h.
7550 (delete_file_handler, add_file_handler): Adjust prototypes.
7551 (pfildes): Declare.
7552 * utils.c (pfildes): New.
7553
854d88f0
PA
75542010-08-27 Pedro Alves <pedro@codesourcery.com>
7555
7556 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7557 * configure: Regenerate.
7558
0146f85b
PA
75592010-08-27 Pedro Alves <pedro@codesourcery.com>
7560
7561 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7562 (linux_done_accessing_memory): ... this.
7563 (linux_target_ops): Adjust.
7564 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7565 * nto-low.c (nto_target_ops): Adjust comment.
7566 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7567 * spu-low.c (spu_target_ops): Adjust comment.
7568 * target.h (target_ops): Rename unprepare_to_access_memory field
7569 to done_accessing_memory.
7570 (unprepare_to_access_memory): Rename to ...
7571 (done_accessing_memory): ... this.
7572
90d74c30
PA
75732010-08-26 Pedro Alves <pedro@codesourcery.com>
7574
7575 * linux-low.c (linux_prepare_to_access_memory): New.
7576 (linux_unprepare_to_access_memory): New.
7577 (linux_target_ops): Install them.
7578 * server.c (read_memory): Rename to ...
7579 (gdb_read_memory): ... this. Use
7580 prepare_to_access_memory/prepare_to_access_memory.
7581 (write_memory): Rename to ...
7582 (gdb_write_memory): ... this. Use
7583 prepare_to_access_memory/prepare_to_access_memory.
7584 (handle_search_memory_1): Adjust.
7585 (process_serial_event): Adjust.
7586 * target.h (struct target_ops): New fields
7587 prepare_to_access_memory and unprepare_to_access_memory.
7588 (prepare_to_access_memory, unprepare_to_access_memory): New.
7589 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7590 prepare_to_access_memory/prepare_to_access_memory.
7591 * nto-low.c (nto_target_ops): Adjust.
7592 * spu-low.c (spu_target_ops): Adjust.
7593 * win32-low.c (win32_target_ops): Adjust.
7594
fd467969
PA
75952010-08-26 Pedro Alves <pedro@codesourcery.com>
7596
7597 * Makefile.in (WARN_CFLAGS): Get it from configure.
7598 (WERROR_CFLAGS): New.
7599 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7600 * configure.ac: Introduce --enable-werror, which adds -Werror to
7601 the compiler command line. Enabled by default. Disable with
7602 --disable-werror. Add -Wdeclaration-after-statement
7603 Wpointer-arith and -Wformat-nonliteral to warning flags.
7604 * configure: Regenerate.
7605
331e2f5f
PA
76062010-08-26 Pedro Alves <pedro@codesourcery.com>
7607
7608 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7609
e581f2b4
PA
76102010-08-26 Pedro Alves <pedro@codesourcery.com>
7611
7612 * gdbreplay.c (remote_error): New.
7613 (gdbchar): New.
7614 (expect): Use gdbchar. Check for error reading from GDB.
7615 Clarify sync error output.
7616 (play): Check for errors writing to GDB.
7617 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7618 * remote-utils.c (getpkt): Check for errors writing to the remote
7619 descriptor.
7620
3c11dd79
PA
76212010-08-25 Pedro Alves <pedro@codesourcery.com>
7622
7623 * linux-low.c (linux_wait_1): Move non-debugging code out of
7624 `debug_threads' control.
7625
d20a8ad9
PA
76262010-08-25 Pedro Alves <pedro@codesourcery.com>
7627
7628 * linux-low.c (linux_wait_1): Don't set last_status here.
7629 * server.c (push_event, queue_stop_reply_callback): Assert we're
7630 not pushing a TARGET_WAITKIND_IGNORE event.
7631 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7632 (myresume, handle_target_event): Set the thread's last_resume_kind
7633 and last_status from the target returned status.
7634
964e4306
PA
76352010-08-25 Pedro Alves <pedro@codesourcery.com>
7636
7637 PR threads/10729
7638
7639 * linux-x86-low.c (update_debug_registers_callback): New.
7640 (i386_dr_low_set_addr): Use it.
7641 (i386_dr_low_get_addr): New.
7642 (i386_dr_low_set_control): Use update_debug_registers_callback.
7643 (i386_dr_low_get_control): New.
7644 (i386_dr_low_get_status): Adjust.
7645 * linux-low.c (linux_stop_lwp): New.
7646 * linux-low.h (linux_stop_lwp): Declare.
7647
7648 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7649 argument instead of a i386_debug_reg_state.
7650 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7651 a i386_debug_reg_state.
7652 (i386_insert_aligned_watchpoint): Adjust.
7653 (i386_remove_aligned_watchpoint): Adjust.
7654 (i386_low_stopped_data_address): Read the debug registers from the
7655 inferior instead of from the mirrors.
7656 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7657 (i386_dr_low_get_addr): Declare.
7658 (i386_dr_low_get_control): Declare.
7659 (i386_dr_low_get_status): Change prototype.
7660
7661 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7662 (i386_dr_low_get_addr): New.
7663 (i386_dr_low_get_control): New.
7664 (i386_dr_low_get_status): Adjust prototype. Return
7665 dr_status_mirror.
7666 (i386_initial_stuff): Clear dr_status_mirror and
7667 dr_control_mirror.
7668 (i386_get_thread_context): Adjust.
7669 (i386_set_thread_context): Adjust.
7670 (i386_thread_added): Adjust.
7671
5f21a75b
PA
76722010-08-24 Pedro Alves <pedro@codesourcery.com>
7673
7674 * linux-low.h (linux_thread_area): Delete declaration.
7675
3e4c1235
TS
76762010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7677
7678 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7679 after its termination.
7680
1971b033
PA
76812010-08-09 Pedro Alves <pedro@codesourcery.com>
7682
7683 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7684 (gdb_wants_all_stopped): Delete.
7685 (linux_wait_1): Don't call them.
7686 * server.c (handle_v_cont): Tag all threads as want-stopped.
7687 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7688 stopped as "client-wants-stopped".
7689
310444ac
PA
76902010-07-31 Pedro Alves <pedro@codesourcery.com>
7691
7692 * Makefile.in (signals_h): New.
7693 (server_h): Depend on it.
7694 (server.o): Don't depend on $(signals_def).
7695 (signals.o): Depend on $(signals_def).
7696
a19cae16
JK
76972010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7698
7699 * Makefile.in (signals_def): New.
7700 (server_h): Append include/gdb/signals.h and signals_def.
7701 (server.o): Append signals_def.
7702
30d50328
JK
77032010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7704
7705 * server.c (handle_target_event): Use target_signal_to_host for
7706 resume_info.sig initialization.
7707 * target.h (struct thread_resume) <sig>: New comment.
7708
5c3216e2
OS
77092010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7710
c6f46ca0
OS
7711 * server.c (handle_query): strcpy() the returned string from paddress()
7712 instead of sprintf().
5c3216e2
OS
7713 * utils.c (paddress): Return phex_nz().
7714
6bd31874
JB
77152010-07-07 Joel Brobecker <brobecker@adacore.com>
7716
7717 * server.c (handle_v_cont): Call mourn_inferior if process
7718 just exited.
7719 (myresume): Likewise.
7720
0fb4aa4b
PA
77212010-07-01 Pedro Alves <pedro@codesourcery.com>
7722
7723 Static tracepoints, and integration with UST.
7724
7725 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7726 * mem-break.c (uninsert_all_breakpoints)
7727 (reinsert_all_breakpoints): New.
7728 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7729 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7730 (gdb_agent_ust_loaded, helper_thread_id)
7731 (gdb_agent_helper_thread_id): New macros.
7732 (struct ipa_sym_addresses): Add addr_ust_loaded,
7733 addr_helper_thread_id, addr_cmd_buf.
7734 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7735 (in_process_agent_loaded_ust): New.
7736 (write_e_ust_not_loaded): New.
7737 (maybe_write_ipa_ust_not_loaded): New.
7738 (struct collect_static_trace_data_action): New.
7739 (enum tracepoint_type) <static_tracepoint>: New.
7740 (struct tracepoint) <handle>: Mention static tracepoints.
7741 (struct static_tracepoint_ctx): New.
7742 (CMD_BUF_SIZE): New.
7743 (add_tracepoint_action): Handle static tracepoint actions.
7744 (unprobe_marker_at): New.
7745 (clear_installed_tracepoints): Handle static tracepoints.
7746 (cmd_qtdp): Handle static tracepoints.
7747 (probe_marker_at): New.
7748 (cmd_qtstart): Handle static tracepoints.
7749 (response_tracepoint): Handle static tracepoints.
7750 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7751 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7752 (get_context_regcache): Handle static tracepoints.
7753 (do_action_at_tracepoint): Handle static tracepoint actions.
7754 (traceframe_find_block_type): Handle static trace data blocks.
7755 (traceframe_read_sdata): New.
7756 (download_tracepoints): Download static tracepoint actions.
7757 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7758 (GDB_PROBE_NAME): New.
7759 (ust_ops): New.
7760 (GET_UST_SYM): New.
7761 (USTF): New.
7762 (dlsym_ust): New.
7763 (ust_marker_to_static_tracepoint): New.
7764 (gdb_probe): New.
7765 (collect_ust_data_at_tracepoint): New.
7766 (gdb_ust_probe): New.
7767 (UNIX_PATH_MAX, SOCK_DIR): New.
7768 (gdb_ust_connect_sync_socket): New.
7769 (resume_thread, stop_thread): New.
7770 (run_inferior_command): New.
7771 (init_named_socket): New.
7772 (gdb_ust_socket_init): New.
7773 (cstr_to_hexstr): New.
7774 (next_st): New.
7775 (first_marker, next_marker): New.
7776 (response_ust_marker): New.
7777 (cmd_qtfstm, cmd_qtsstm): New.
7778 (unprobe_marker_at, probe_marker_at): New.
7779 (cmd_qtstmat, gdb_ust_thread): New.
7780 (gdb_ust_init): New.
7781 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7782 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7783 (ST_REGENTRY): New.
7784 (x86_64_st_collect_regmap): New.
7785 (X86_64_NUM_ST_COLLECT_GREGS): New.
7786 (AMD64_RIP_REGNUM): New.
7787 (supply_static_tracepoint_registers): New.
7788 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7789 (ST_REGENTRY): New.
7790 (i386_st_collect_regmap): New.
7791 (i386_NUM_ST_COLLECT_GREGS): New.
7792 (supply_static_tracepoint_registers): New.
7793 * server.c (handle_query): Handle qXfer:statictrace:read.
7794 <qSupported>: Report support for StaticTracepoints, and
7795 qXfer:statictrace:read features.
7796 * server.h (traceframe_read_sdata)
7797 (supply_static_tracepoint_registers): Declare.
7798 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7799 (unpack_varlen_hex): Include in IPA build.
7800 * Makefile.in (ustlibs, ustinc): New.
7801 (IPA_OBJS): Add remote-utils-ipa.o.
7802 ($(IPA_LIB)): Link -ldl and -lpthread.
7803 (UST_CFLAGS): New.
7804 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7805 * config.in, configure: Regenerate.
7806
9e4344e5
PA
78072010-06-20 Ian Lance Taylor <iant@google.com>
7808 Pedro Alves <pedro@codesourcery.com>
7809
7810 * linux-x86-low.c (always_true): Delete.
7811 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7812 trying to fool the compiler with always_true.
7813
c6beb2cb
PA
78142010-06-20 Pedro Alves <pedro@codesourcery.com>
7815
7816 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7817 conditions in gdbserver.
7818
d2ed6730
UW
78192010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7820
7821 * spu-low.c (spu_read_memory): Wrap around local store limit.
7822 (spu_write_memory): Likewise.
7823
4e29fb54
PA
78242010-06-15 Pedro Alves <pedro@codesourcery.com>
7825
7826 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7827 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7828 LONGEST uses.
7829 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7830 uses.
7831 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7832 uses with LONGEST uses.
7833
6a271cae
PA
78342010-06-14 Stan Shebs <stan@codesourcery.com>
7835 Pedro Alves <pedro@codesourcery.com>
7836
7837 Bytecode compiler.
7838
7839 * linux-x86-low.c: Include limits.h.
7840 (add_insns): New.
7841 (always_true): New.
7842 (EMIT_ASM): New.
7843 (EMIT_ASM32): New.
7844 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7845 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7846 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7847 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7848 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7849 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7850 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7851 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7852 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7853 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7854 (amd64_emit_void_call_2): New.
7855 (amd64_emit_ops): New.
7856 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7857 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7858 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7859 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7860 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7861 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7862 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7863 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7864 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7865 (i386_emit_stack_adjust, i386_emit_int_call_1)
7866 (i386_emit_void_call_2): New.
7867 (i386_emit_ops): New.
7868 (x86_emit_ops): New.
7869 (the_low_target): Install x86_emit_ops.
7870 * server.h (struct emit_ops): New.
7871 (get_raw_reg_func_addr): Declare.
7872 (current_insn_ptr, emit_error): Declare.
7873 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7874 (set_trace_state_variable_value): New defines.
7875 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7876 addr_get_trace_state_variable_value and
7877 addr_set_trace_state_variable_value.
7878 (symbol_list): New fields for get_raw_reg,
7879 get_trace_state_variable_value and set_trace_state_variable_value.
7880 (condfn): New typedef.
7881 (struct tracepoint): New field `compiled_cond'.
7882 (do_action_at_tracepoint): Clear compiled_cond.
7883 (get_trace_state_variable_value, set_trace_state_variable_value):
7884 Export in the IPA.
7885 (condition_true_at_tracepoint): If there's a compiled condition,
7886 run that.
7887 (current_insn_ptr, emit_error): New globals.
7888 (struct bytecode_address): New.
7889 (get_raw_reg_func_addr): New.
7890 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7891 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7892 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7893 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7894 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7895 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7896 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7897 (compile_tracepoint_condition, compile_bytecodes): New.
7898 * target.h (emit_ops): Forward declare.
7899 (struct target_ops): New field emit_ops.
7900 (target_emit_ops): New.
7901 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7902 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7903 * linux-low.c (linux_emit_ops): New.
7904 (linux_target_ops): Install it.
7905 * linux-low.h (struct linux_target_ops): New field emit_ops.
7906
92b72907
UW
79072010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7908
7909 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7910 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7911
fa593d66
PA
79122010-06-01 Pedro Alves <pedro@codesourcery.com>
7913 Stan Shebs <stan@codesourcery.com>
7914
7915 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7916 (all): Depend on $(extra_libraries).
7917 (install-only): Install the IPA.
7918 (IPA_OBJS, IPA_LIB): New.
7919 (clean): Remove the IPA lib.
7920 (IPAGENT_CFLAGS): New.
7921 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7922 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7923 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7924 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7925 * configure.ac: Check for atomic builtins support in the compiler.
7926 (IPA_DEPFILES, extra_libraries): Define.
7927 * configure.srv (ipa_obj): Add description.
7928 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7929 (i[34567]86-*-linux*): Set ipa_obj.
7930 (x86_64-*-linux*): Set ipa_obj.
7931 * linux-low.c (stabilizing_threads): New.
7932 (supports_fast_tracepoints): New.
7933 (linux_detach): Stabilize threads before detaching.
7934 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7935 the lwp is either not stabilizing, or is moving out of a jump pad.
7936 (linux_fast_tracepoint_collecting): New.
7937 (maybe_move_out_of_jump_pad): New.
7938 (enqueue_one_deferred_signal): New.
7939 (dequeue_one_deferred_signal): New.
7940 (linux_wait_for_event_1): If moving out of a jump pad, defer
7941 pending signals to later.
7942 (linux_stabilize_threads): New.
7943 (linux_wait_1): Check if threads need moving out of jump pads, and
7944 do it if so.
7945 (stuck_in_jump_pad_callback): New.
7946 (move_out_of_jump_pad_callback): New.
7947 (lwp_running): New.
7948 (linux_resume_one_lwp): Handle moving out of jump pads.
7949 (linux_set_resume_request): Dequeue deferred signals.
7950 (need_step_over_p): Also step over fast tracepoint jumps.
7951 (start_step_over): Also uninsert fast tracepoint jumps.
7952 (finish_step_over): Also reinsert fast tracepoint jumps.
7953 (linux_install_fast_tracepoint_jump): New.
7954 (linux_target_ops): Install linux_stabilize_threads and
7955 linux_install_fast_tracepoint_jump_pad.
7956 * linux-low.h (linux_target_ops) <get_thread_area,
7957 install_fast_tracepoint_jump_pad>: New fields.
7958 (struct lwp_info) <collecting_fast_tracepoint,
7959 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7960 (linux_get_thread_area): Declare.
7961 * linux-x86-low.c (jump_insn): New.
7962 (x86_get_thread_area): New.
7963 (append_insns): New.
7964 (push_opcode): New.
7965 (amd64_install_fast_tracepoint_jump_pad): New.
7966 (i386_install_fast_tracepoint_jump_pad): New.
7967 (x86_install_fast_tracepoint_jump_pad): New.
7968 (the_low_target): Install x86_get_thread_area and
7969 x86_install_fast_tracepoint_jump_pad.
7970 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7971 (struct fast_tracepoint_jump): New.
7972 (fast_tracepoint_jump_insn): New.
7973 (fast_tracepoint_jump_shadow): New.
7974 (find_fast_tracepoint_jump_at): New.
7975 (fast_tracepoint_jump_here): New.
7976 (delete_fast_tracepoint_jump): New.
7977 (set_fast_tracepoint_jump): New.
7978 (uninsert_fast_tracepoint_jumps_at): New.
7979 (reinsert_fast_tracepoint_jumps_at): New.
7980 (set_breakpoint_at): Use write_inferior_memory.
7981 (uninsert_raw_breakpoint): Use write_inferior_memory.
7982 (check_mem_read): Mask out fast tracepoint jumps.
7983 (check_mem_write): Mask out fast tracepoint jumps.
7984 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7985 (set_fast_tracepoint_jump): Declare.
7986 (delete_fast_tracepoint_jump)
7987 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7988 (reinsert_fast_tracepoint_jumps_at): Declare.
7989 * regcache.c: Don't compile many functions when building the
7990 in-process agent library.
7991 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7992 the register buffer in the heap.
7993 (free_register_cache): If the register buffer isn't owned by the
7994 regcache, don't free it.
7995 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7996 pre-existing register caches.
7997 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7998 type.
7999 (convert_ascii_to_int): : Constify `from' parameter type.
8000 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8001 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
8002 the needed buffer in-place.
8003 (relocate_instruction): New.
8004 * server.c (handle_query) <qSymbols>: If the target supports
8005 tracepoints, give it a chance of looking up symbols. Report
8006 support for fast tracepoints.
8007 (handle_status): Stabilize threads.
8008 (process_serial_event): Adjust.
8009 * server.h (struct fast_tracepoint_jump): Forward declare.
8010 (struct process_info) <fast_tracepoint_jumps>: New field.
8011 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8012 (decode_X_packet, decode_M_packet): Adjust.
8013 (relocate_instruction): Declare.
8014 (in_process_agent_loaded): Declare.
8015 (tracepoint_look_up_symbols): Declare.
8016 (struct fast_tpoint_collect_status): Declare.
8017 (fast_tracepoint_collecting): Declare.
8018 (force_unlock_trace_buffer): Declare.
8019 (handle_tracepoint_bkpts): Declare.
8020 (initialize_low_tracepoint)
8021 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8022 * target.h (struct target_ops) <stabilize_threads,
8023 install_fast_tracepoint_jump_pad>: New fields.
8024 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8025 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8026 [HAVE_STDINT_H]: Include stdint.h.
8027 (trace_debug_1): Rename to ...
8028 (trace_vdebug): ... this.
8029 (trace_debug): Rename to ...
8030 (trace_debug_1): ... this. Add `level' parameter.
8031 (trace_debug): New.
8032 (ATTR_USED, ATTR_NOINLINE): New.
8033 (IP_AGENT_EXPORT): New.
8034 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8035 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8036 (about_to_request_buffer_space, trace_buffer_is_full)
8037 (stopping_tracepoint, expr_eval_result, error_tracepoint)
8038 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8039 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8040 (traceframe_write_count, traceframes_created)
8041 (trace_state_variables)
8042 New renaming defines.
8043 (struct ipa_sym_addresses): New.
8044 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8045 (symbol_list): New.
8046 (ipa_sym_addrs): New.
8047 (all_tracepoint_symbols_looked_up): New.
8048 (in_process_agent_loaded): New.
8049 (write_e_ipa_not_loaded): New.
8050 (maybe_write_ipa_not_loaded): New.
8051 (tracepoint_look_up_symbols): New.
8052 (debug_threads) [IN_PROCESS_AGENT]: New.
8053 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8054 (UNKNOWN_SIDE_EFFECTS): New.
8055 (stop_tracing): New.
8056 (flush_trace_buffer): New.
8057 (stop_tracing_bkpt): New.
8058 (flush_trace_buffer_bkpt): New.
8059 (read_inferior_integer): New.
8060 (read_inferior_uinteger): New.
8061 (read_inferior_data_pointer): New.
8062 (write_inferior_data_pointer): New.
8063 (write_inferior_integer): New.
8064 (write_inferior_uinteger): New.
8065 (struct collect_static_trace_data_action): Delete.
8066 (enum tracepoint_type): New.
8067 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
8068 <actions_str, step_actions, step_actions_str>: Only include in
8069 GDBserver.
fa593d66
PA
8070 <orig_size, obj_addr_on_target, adjusted_insn_addr>
8071 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8072 (tracepoints): Use IP_AGENT_EXPORT.
8073 (last_tracepoint): Don't include in the IPA.
8074 (stopping_tracepoint): Use IP_AGENT_EXPORT.
8075 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8076 (alloced_trace_state_variables): New.
8077 (trace_state_variables): Use IP_AGENT_EXPORT.
8078 (traceframe_t): Delete unused variable.
8079 (circular_trace_buffer): Don't include in the IPA.
8080 (trace_buffer_start): Delete.
8081 (struct trace_buffer_control): New.
8082 (trace_buffer_free): Delete.
8083 (struct ipa_trace_buffer_control): New.
8084 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8085 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8086 New.
8087 (trace_buffer_ctrl): New.
8088 (TRACE_BUFFER_CTRL_CURR): New.
8089 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8090 Reimplement as macros.
8091 (trace_buffer_wrap): Delete.
8092 (traceframe_write_count, traceframe_read_count)
8093 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8094 (struct tracepoint_hit_ctx) <type>: New field.
8095 (struct fast_tracepoint_ctx): New.
8096 (memory_barrier): New.
8097 (cmpxchg): New.
8098 (record_tracepoint_error): Update atomically in the IPA.
8099 (clear_inferior_trace_buffer): New.
8100 (about_to_request_buffer_space): New.
8101 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8102 updating the same buffer.
8103 (add_tracepoint): Default the tracepoint's type to trap
8104 tracepoint, and orig_size to -1.
8105 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8106 internal variables.
8107 (create_trace_state_variable): New parameter `gdb'. Handle it.
8108 (clear_installed_tracepoints): Clear fast tracepoint jumps.
8109 (cmd_qtdp): Handle fast tracepoints.
8110 (cmd_qtdv): Adjust.
8111 (max_jump_pad_size): New.
8112 (gdb_jump_pad_head): New.
8113 (get_jump_space_head): New.
8114 (claim_jump_space): New.
8115 (sort_tracepoints): New.
8116 (MAX_JUMP_SIZE): New.
8117 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
8118 IPA.
8119 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8120 support. Upload fast traceframes, and delete internal IPA
8121 breakpoints.
8122 (stop_tracing_handler): New.
8123 (flush_trace_buffer_handler): New.
8124 (cmd_qtstop): Upload fast tracepoints.
8125 (response_tracepoint): Handle fast tracepoints.
8126 (tracepoint_finished_step): Upload fast traceframes. Set the
8127 tracepoint hit context's tracepoint type.
8128 (handle_tracepoint_bkpts): New.
8129 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8130 type. Add comment about fast tracepoints.
8131 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8132 non-existing action_str field.
8133 (get_context_regcache): Handle fast tracepoints.
8134 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8135 to the regcache.
8136 (fast_tracepoint_from_jump_pad_address): New.
8137 (fast_tracepoint_from_ipa_tpoint_address): New.
8138 (collecting_t): New.
8139 (force_unlock_trace_buffer): New.
8140 (fast_tracepoint_collecting): New.
8141 (collecting): New.
8142 (gdb_collect): New.
8143 (write_inferior_data_ptr): New.
8144 (target_tp_heap): New.
8145 (target_malloc): New.
8146 (download_agent_expr): New.
8147 (UALIGN): New.
8148 (download_tracepoints): New.
8149 (download_trace_state_variables): New.
8150 (upload_fast_traceframes): New.
8151 (IPA_FIRST_TRACEFRAME): New.
8152 (IPA_NEXT_TRACEFRAME_1): New.
8153 (IPA_NEXT_TRACEFRAME): New.
8154 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8155 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8156 (gdb_jump_pad_buffer_end): New.
8157 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8158 (initialize_tracepoint): Adjust.
8159 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8160 buffer. Initialize the low module.
8161 * utils.c (PREFIX, TOOLNAME): New.
8162 (malloc_failure): Use PREFIX.
8163 (error): In the IPA, an error causes an exit.
8164 (fatal, warning): Use PREFIX.
8165 (internal_error): Use TOOLNAME.
8166 (NUMCELLS): Increase to 10.
8167 * configure, config.in: Regenerate.
8168
d149dd1d
PA
81692010-06-01 Pedro Alves <pedro@codesourcery.com>
8170
8171 * server.c (handle_query) <qSupported>: Do two passes over the
8172 qSupported string to avoid nesting strtok.
8173
f6528abd
JK
81742010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8175
8176 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8177 (CDEPS): New.
8178 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8179 -Wl,--dynamic-list.
8180 * configure: Regenerate.
8181 * proc-service.list: New.
8182
ca2a87a0
JK
81832010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8184
8185 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8186 New comment.
8187
363a6e9f
OS
81882010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8189
8190 * gdbreplay.c (remote_open): Check error return from socket() call by
8191 its equality to -1 not by it being negative.
8192 * remote-utils.c (remote_open): Likewise.
8193
d23b6cb1
PA
81942010-05-23 Pedro Alves <pedro@codesourcery.com>
8195
8196 * config.h: Regenerate.
8197
28d3cf85
MK
81982010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8199
8200 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8201 doesn't provide PTRACE_GET_THREAD_AREA.
8202
fea36a59
MK
82032010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8204
8205 * linux-m68k-low.c: Include <asm/ptrace.h>
8206 (ps_get_thread_area): Implement.
8207
24b066ba
DE
82082010-05-03 Doug Evans <dje@google.com>
8209
8210 * event-loop.c (struct callback_event): New struct.
8211 (callback_list): New global.
8212 (append_callback_event, delete_callback_event): New functions.
8213 (process_callback): New function.
8214 (start_event_loop): Call it.
8215 * remote-utils.c (NOT_SCHEDULED): Define.
8216 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8217 moved out of readchar.
8218 (readchar): Rewrite. Call reschedule before returning.
8219 (reset_readchar): New function.
8220 (remote_close): Call it.
8221 (process_remaining, reschedule): New functions.
8222 * server.h (callback_handler_func): New typedef.
8223 (append_callback_event, delete_callback_event): Declare.
8224
9836d6ea
PA
82252010-05-03 Pedro Alves <pedro@codesourcery.com>
8226
8227 * proc-service.c (ps_pglobal_lookup): Use
8228 thread_db_look_up_one_symbol.
8229 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8230 parameter. Use it instead of all_symbols_looked_up.
8231 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8232 field.
8233 (all_symbols_looked_up): Don't declare.
8234 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8235 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8236 field.
8237 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8238 Set all_symbols_looked_up here.
8239 (thread_db_look_up_one_symbol): New.
8240 (thread_db_get_tls_address): Adjust.
8241 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8242 thread_db object on the heap, and tentatively set it in the
8243 process structure.
8244 (thread_db_init): Don't set all_symbols_looked_up here.
8245 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8246
7984d532
PA
82472010-05-03 Pedro Alves <pedro@codesourcery.com>
8248
8249 * linux-low.c (linux_kill, linux_detach): Adjust.
8250 (status_pending_p_callback): Remove redundant statement. Check
8251 for !TARGET_WAITIKIND_IGNORE, instead of
8252 TARGET_WAITKIND_STOPPED.
8253 (handle_tracepoints): Make sure LWP is locked. Adjust.
8254 (linux_wait_for_event_1): Adjust.
8255 (linux_cancel_breakpoints): New.
8256 (unsuspend_one_lwp): New.
8257 (unsuspend_all_lwps): New.
8258 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8259 (send_sigstop_callback): Change return type to int, add new
8260 `except' parameter and handle it.
8261 (suspend_and_send_sigstop_callback): New.
8262 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8263 pass them down. If SUSPEND, also increment the lwp's suspend
8264 count.
8265 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8266 (need_step_over_p): Don't consider suspended LWPs.
8267 (start_step_over): Adjust.
8268 (proceed_one_lwp): Change return type to int, add new `except'
8269 parameter and handle it.
8270 (unsuspend_and_proceed_one_lwp): New.
8271 (proceed_all_lwps): Use find_inferior instead of
8272 for_each_inferior.
8273 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8274 also decrement the suspend count of LWPs. Pass `except' down,
8275 instead of hacking its suspend count.
8276 (linux_pause_all): Add `freeze' parameter. Adjust.
8277 (linux_unpause_all): New.
8278 (linux_target_ops): Install linux_unpause_all.
8279 * server.c (handle_status): Adjust.
8280 * target.h (struct target_ops): New fields `unpause_all' and
8281 `cancel_breakpoints'. Add new parameter to `pause_all'.
8282 (pause_all): Add new `freeze' parameter.
8283 (unpause_all): New.
8284 (cancel_breakpoints): New.
8285 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8286 cancel breakpoints.
8287 (cmd_qtstart): Pause threads.
8288 (stop_tracing): Pause threads, and cancel breakpoints.
8289 * win32-low.c (win32_target_ops): Adjust.
8290
e471f25b
PA
82912010-05-03 Pedro Alves <pedro@codesourcery.com>
8292
8293 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8294 the inferior right away from here...
8295 (linux_wait_1): ... to here, and adjust to check the thread's
8296 last_resume_kind instead of the lwp's step or stop_expected flags.
8297
1915ef4f
PA
82982010-05-02 Pedro Alves <pedro@codesourcery.com>
8299
8300 * README: Use consistent `GDB' and `GDBserver' spellings.
8301
f9e39928
PA
83022010-05-02 Pedro Alves <pedro@codesourcery.com>
8303
8304 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8305 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8306 (linux_detach_one_lwp): Assume the lwp is stopped.
8307 (any_thread_of): Delete.
8308 (linux_detach): Stop all lwps here. Don't blindly delete all
8309 breakpoints.
8310 (delete_lwp_callback): New.
8311 (linux_mourn): Delete all lwps of the process that is gone.
8312 (linux_wait_1): Don't delete the last lwp of the process here.
8313 * mem-break.h (mark_breakpoints_out): Declare.
8314 * mem-break.c (mark_breakpoints_out): New.
8315 (free_all_breakpoints): Use it.
8316 * server.c (handle_target_event): If the process is gone, mark
8317 breakpoints out.
8318 * thread-db.c (struct thread_db) <create_bp>: New field.
8319 (thread_db_enable_reporting): Fix prototype. Store a thread event
8320 breakpoint reference in the thread_db struct.
8321 (thread_db_load_search): Clear the thread_db object.
8322 (try_thread_db_load_1): Ditto.
8323 (switch_to_process): New.
8324 (disable_thread_event_reporting): Use it.
8325 (remove_thread_event_breakpoints): New.
8326 (thread_db_detach, thread_db_mourn): Use it.
8327
1e7fc18c
PA
83282010-05-01 Pedro Alves <pedro@codesourcery.com>
8329
8330 * linux-low.c (linux_enable_event_reporting): New.
8331 (linux_wait_for_event_1, handle_extended_wait): Use it.
8332
02fc4de7
PA
83332010-04-30 Pedro Alves <pedro@codesourcery.com>
8334
8335 * linux-low.c (linux_kill_one_lwp, linux_kill)
8336 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8337 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8338 SIGSTOP even if the LWP is stopped.
8339 (send_sigstop_callback): New.
8340 (stop_all_lwps): Use send_sigstop_callback instead.
8341 (linux_resume_one_thread): Adjust.
8342 (proceed_one_lwp): Still proceed an LWP that the client has
8343 requested to stop, if we haven't reported it as stopped yet. Make
8344 sure that LWPs the client want stopped, have a pending SIGSTOP.
8345
bc3b5632
DE
83462010-04-26 Doug Evans <dje@google.com>
8347
ae1ada35
DE
8348 * server.c (handle_general_set): Make static.
8349
bc3b5632
DE
8350 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8351 Print received char after testing for error/eof instead of before.
8352 (input_interrupt): Tweak comment.
8353
65730243
DE
83542010-04-23 Doug Evans <dje@google.com>
8355
8356 * server.c (start_inferior): Print inferior argv if --debug.
8357
a8ae7dc0
AR
83582010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8359
8360 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8361 * nto-x86-low.c: Include server.h
8362
1c07cc19
PM
83632010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8364
8365 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8366 be consistent with other sources of this directory.
8367 (init_registers_amd64): Correct name of source file of this function
8368 in the comment.
8369
e0a61e09
PM
83702010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8371
8372 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8373 64-bit executables.
8374
54709339
PM
83752010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8376
8377 * win32-i386-low.c: Add 64-bit support.
8378 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8379 (init_registers_amd64): Declare.
8380 (mappings): Add 64-bit version of array.
8381 (init_windows_x86): New function.
8382 (the_low_target): Change init_arch field to init_windows_x86.
8383
e8f0053d
PM
83842010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8385
8386 * win32-low.c: Adapt to support also 64-bit architecture.
8387 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8388 (get_image_name): Use SIZE_T type for local variable `done'.
8389 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8390 (toolhelp_get_dll_name): Idem.
8391 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8392 Use uintptr_t typecast to avoid warning.
8393 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8394 (handle_exception): Use phex_nz to avoid warning.
8395 (win32_wait): Remove unused local variable `process'.
8396
c481e77e
PM
83972010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8398
8399 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8400 `amd64-avx.o'.
8401
12ea4b69
PM
84022010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8403
8404 * configure.ac: Use `ws2_32' library for srv_mingw.
8405 * configure: Regenerate.
8406 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8407 * remote-utils.c: Likewise.
8408
f6d1620c
L
84092010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8410
8411 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8412 if __x86_64__ is defined.
8413
8e642873
PM
84142010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8415
8416 * configure: Regenerate.
8417
711e434b
PM
84182010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8419
8420 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8421 * target.h (target_ops): New get_tib_address field.
8422 * win32-low.h (win32_thread_info): Add thread_local_base field.
8423 * win32-low.c (child_add_thread): Add tlb argument.
8424 Set thread_local_base field to TLB.
8425 (get_child_debug_event): Adapt to child_add_thread change.
8426 (win32_get_tib_address): New function.
8427 (win32_target_ops): Set get_tib_address field to
8428 win32_get_tib_address.
8429 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8430
505106cd
PA
84312010-04-12 Pedro Alves <pedro@codesourcery.com>
8432
505106cd
PA
8433 * linux-low.c (linux_mourn): Also remove the process.
8434 * server.c (handle_target_event): Don't remove the process here.
8435 * nto-low.c (nto_mourn): New.
8436 (nto_target_ops): Install it.
8437 * spu-low.c (spu_mourn): New.
8438 (spu_target_ops): Install it.
8439 * win32-low.c (win32_mourn): New.
8440 (win32_target_ops): Install it.
8441
e8470a06
PA
84422010-04-12 Pedro Alves <pedro@codesourcery.com>
8443
8444 * server.h (buffer_xml_printf): Remove redundant `;'.
8445
45ba0d02
PA
84462010-04-12 Pedro Alves <pedro@codesourcery.com>
8447
8448 * regcache.c (set_register_cache): Invalidate regcaches before
8449 changing the register cache layout.
8450 (regcache_invalidate_one): Allow a NULL regcache.
8451 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8452 regcaches before changing the register cache layout or the target
8453 regsets.
8454
59e04013
L
84552010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8456
8457 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8458 variable warning on Linux/x86-64.
8459
8336d594
PA
84602010-04-11 Pedro Alves <pedro@codesourcery.com>
8461
8462 GDBserver disconnected tracing support.
8463
8464 * linux-low.c (linux_remove_process): Delete.
8465 (add_lwp): Don't set last_resume_kind here.
8466 (linux_kill): Use `mourn'.
8467 (linux_detach): Use `thread_db_detach', and `mourn'.
8468 (linux_mourn): New.
8469 (linux_attach_lwp_1): Adjust comment.
8470 (linux_attach): last_resume_kind moved the thread_info; adjust.
8471 (status_pending_p_callback): Adjust.
8472 (linux_wait_for_event_1): Adjust.
8473 (count_events_callback, select_singlestep_lwp_callback)
8474 (select_event_lwp_callback, cancel_breakpoints_callback)
8475 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8476 (proceed_one_lwp): Adjust.
8477 (linux_async): Add debug output.
8478 (linux_thread_stopped): New.
8479 (linux_pause_all): New.
8480 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8481 linux_pause_all.
8482 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8483 (thread_db_free): Delete declaration.
8484 (thread_db_detach, thread_db_mourn): Declare.
8485 * thread-db.c (thread_db_init): Use thread_db_mourn.
8486 (thread_db_free): Delete, split in two.
8487 (disable_thread_event_reporting): New.
8488 (thread_db_detach): New.
8489 (thread_db_mourn): New.
8490
8491 * server.h (struct thread_info) <last_resume_kind>: New field.
8492 <attached>: Add comment.
8493 <gdb_detached>: New field.
8494 (handler_func): Change return type to int.
8495 (handle_serial_event, handle_target_event): Ditto.
8496 (gdb_connected): Declare.
8497 (tracing): Delete.
8498 (disconnected_tracing): Declare.
8499 (stop_tracing): Declare.
8500
8501 * server.c (handle_query) <qSupported>: Report support for
8502 disconnected tracing.
8503 (queue_stop_reply_callback): Account for running threads.
8504 (gdb_wants_thread_stopped): New.
8505 (gdb_wants_all_threads_stopped): New.
8506 (gdb_reattached_process): New.
8507 (handle_status): Clear the `gdb_detached' flag of all processes.
8508 In all-stop, stop all threads.
8509 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8510 (process_serial_event): If the remote connection breaks, or if an
8511 exit was forced with "monitor exit", force an event loop exit.
8512 Handle disconnected tracing on detach.
8513 (handle_serial_event): Adjust.
8514 (handle_target_event): If GDB isn't connected, forward events back
8515 to the inferior, unless the last process exited, in which case,
8516 exit gdbserver. Adjust interface.
8517
8518 * remote-utils.c (remote_open): Don't block in accept. Instead
8519 register an event loop source on the listen socket file
8520 descriptor. Refactor bits into ...
8521 (listen_desc): ... this new global.
8522 (gdb_connected): ... this new function.
8523 (enable_async_notification): ... this new function.
8524 (handle_accept_event): ... this new function.
8525 (remote_close): Clear remote_desc.
8526
8527 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8528
8529 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8530 New fields.
8531 (mourn_inferior): Define.
8532 (target_process_qsupported): Avoid the dangling else problem.
8533 (thread_stopped): Define.
8534 (pause_all): Define.
8535 (target_waitstatus_to_string): Declare.
8536 * target.c (target_waitstatus_to_string): New.
8537
8538 * tracepoint.c (tracing): Make extern.
8539 (disconnected_tracing): New.
8540 (stop_tracing): Make extern. Handle tracing stops due to GDB
8541 disconnecting.
8542 (cmd_qtdisconnected): New.
8543 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8544 (handle_tracepoint_general_set): Handle QTDisconnected.
8545
8546 * event-loop.c (event_handler_func): Change return type to int.
8547 (process_event): Bail out if the event handler wants the event
8548 loop to stop.
8549 (handle_file_event): Ditto.
8550 (start_event_loop): Bail out if the event handler wants the event
8551 loop to stop.
8552
8553 * nto-low.c (nto_target_ops): Adjust.
8554 * spu-low.c (spu_wait): Don't remove the process here.
8555 (spu_target_ops): Adjust.
8556 * win32-low.c (win32_wait): Don't remove the process here.
8557 (win32_target_ops): Adjust.
8558
5d267c4c
PA
85592010-04-11 Pedro Alves <pedro@codesourcery.com>
8560
8561 * regcache.c (realloc_register_cache): Invalidate inferior's
8562 regcache before recreating it.
8563
623ccd72
PA
85642010-04-09 Pedro Alves <pedro@codesourcery.com>
8565
8566 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8567
219f2f23
PA
85682010-04-09 Stan Shebs <stan@codesourcery.com>
8569 Pedro Alves <pedro@codesourcery.com>
8570
8571 * server.h (LONGEST): New.
8572 (struct thread_info) <while_stepping>: New field.
8573 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8574 Declare.
8575 (initialize_tracepoint, handle_tracepoint_general_set)
8576 (handle_tracepoint_query, tracepoint_finished_step)
8577 (tracepoint_was_hit, release_while_stepping_state_list):
8578 (current_traceframe): Declare.
8579 * server.c (handle_general_set): Handle tracepoint packets.
8580 (read_memory): New.
8581 (write_memory): New.
8582 (handle_search_memory_1): Use read_memory.
8583 (handle_query): Report support for conditional tracepoints, trace
8584 state variables, and tracepoint sources. Handle tracepoint
8585 queries.
8586 (main): Initialize the tracepoints module.
8587 (process_serial_event): Handle traceframe reads/writes.
8588
8589 * linux-low.c (handle_tracepoints): New.
8590 (linux_wait_1): Call it.
8591 (linux_resume_one_lwp): Handle while-stepping.
8592 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8593 (linux_target_ops): Install them.
8594 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8595 New field.
8596 * linux-x86-low.c (x86_supports_tracepoints): New.
8597 (the_low_target). Install it.
8598
8599 * mem-break.h (delete_breakpoint): Declare.
8600 * mem-break.c (delete_breakpoint): Make external.
8601
8602 * target.h (struct target_ops): Add `supports_tracepoints',
8603 `read_pc', and `write_pc' fields.
8604 (target_supports_tracepoints): Define.
8605 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8606 (phex_nz): New.
8607
8608 * regcache.h (struct regcache) <registers_owned>: New field.
8609 (init_register_cache, regcache_cpy): Declare.
8610 (regcache_read_pc, regcache_write_pc): Declare.
8611 (register_cache_size): Declare.
8612 (supply_regblock): Declare.
8613 * regcache.c (init_register_cache): New.
8614 (new_register_cache): Use it.
8615 (regcache_cpy): New.
8616 (register_cache_size): New.
8617 (supply_regblock): New.
8618 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 8619
219f2f23
PA
8620 * tracepoint.c: New.
8621
8622 * Makefile.in (OBS): Add tracepoint.o.
8623 (tracepoint.o): New rule.
8624
3a13a53b
L
86252010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8626
8627 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8628 (i386-mmx.o): New.
8629 (i386-mmx.c): Likewise.
8630 (i386-mmx-linux.o): Likewise.
8631 (i386-mmx-linux.c): Likewise.
8632
8633 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8634 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8635 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8636 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8637
8638 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8639 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8640 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8641
1570b33e
L
86422010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8643
8644 * Makefile.in (clean): Updated.
8645 (i386-avx.o): New.
8646 (i386-avx.c): Likewise.
8647 (i386-avx-linux.o): Likewise.
8648 (i386-avx-linux.c): Likewise.
8649 (amd64-avx.o): Likewise.
8650 (amd64-avx.c): Likewise.
8651 (amd64-avx-linux.o): Likewise.
8652 (amd64-avx-linux.c): Likewise.
8653
8654 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8655 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8656 (srv_amd64_regobj): Add amd64-avx.o.
8657 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8658 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8659 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8660 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8661 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8662 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8663 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8664
8665 * i387-fp.c: Include "i386-xstate.h".
8666 (i387_xsave): New.
8667 (i387_cache_to_xsave): Likewise.
8668 (i387_xsave_to_cache): Likewise.
8669 (x86_xcr0): Likewise.
8670
8671 * i387-fp.h (i387_cache_to_xsave): Likewise.
8672 (i387_xsave_to_cache): Likewise.
8673 (x86_xcr0): Likewise.
8674
8675 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8676 * linux-crisv32-low.c (target_regsets): Likewise.
8677 * linux-m68k-low.c (target_regsets): Likewise.
8678 * linux-mips-low.c (target_regsets): Likewise.
8679 * linux-ppc-low.c (target_regsets): Likewise.
8680 * linux-s390-low.c (target_regsets): Likewise.
8681 * linux-sh-low.c (target_regsets): Likewise.
8682 * linux-sparc-low.c (target_regsets): Likewise.
8683 * linux-xtensa-low.c (target_regsets): Likewise.
8684
8685 * linux-low.c: Include <sys/uio.h>.
8686 (regsets_fetch_inferior_registers): Support nt_type.
8687 (regsets_store_inferior_registers): Likewise.
8688 (linux_process_qsupported): New.
8689 (linux_target_ops): Add linux_process_qsupported.
8690
8691 * linux-low.h (regset_info): Add nt_type.
8692 (linux_target_ops): Add process_qsupported.
8693
8694 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8695 and <sys/uio.h>.
8696 (init_registers_i386_avx_linux): New.
8697 (init_registers_amd64_avx_linux): Likewise.
8698 (xmltarget_i386_linux_no_xml): Likewise.
8699 (xmltarget_amd64_linux_no_xml): Likewise.
8700 (PTRACE_GETREGSET): Likewise.
8701 (PTRACE_SETREGSET): Likewise.
8702 (x86_fill_xstateregset): Likewise.
8703 (x86_store_xstateregset): Likewise.
8704 (use_xml): Likewise.
8705 (x86_linux_update_xmltarget): Likewise.
8706 (x86_linux_process_qsupported): Likewise.
8707 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8708 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8709 init_registers_i386_linux here. Call
8710 x86_linux_update_xmltarget.
8711 (the_low_target): Add x86_linux_process_qsupported.
8712
8713 * server.c (handle_query): Call target_process_qsupported.
8714
8715 * target.h (target_ops): Add process_qsupported.
8716 (target_process_qsupported): New.
8717
fc7238bb
PA
87182010-04-03 Pedro Alves <pedro@codesourcery.com>
8719
8720 * inferiors.c (add_thread): Set last_status kind to
8721 TARGET_WAITKIND_IGNORE.
8722 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8723 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8724 (linux_wait_1): Move `thread' local definition to block that uses
8725 it. Don't NULL initialize `event_child'.
8726 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8727 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8728 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8729
bdabb078
PA
87302010-04-01 Pedro Alves <pedro@codesourcery.com>
8731
8732 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8733 an extended waitstatus, or by a watchpoint.
8734 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8735 thread was stepping or has been stopped by a watchpoint.
8736
d3bbe7a0
PA
87372010-04-01 Pedro Alves <pedro@codesourcery.com>
8738
8739 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8740 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8741 of another, then delete the previous, and validate all
8742 breakpoints.
8743 (validate_inserted_breakpoint): New.
8744 (delete_disabled_breakpoints): New.
8745 (validate_breakpoints): New.
8746 (check_mem_read): Validate breakpoints before trusting their
8747 shadow. Delete disabled breakpoints.
8748 (check_mem_write): Validate breakpoints before trusting they
8749 should be inserted. Delete disabled breakpoints.
8750 * mem-break.h (validate_breakpoints):
8751 * server.c (handle_query): Validate breakpoints when we see a
8752 qSymbol query.
8753
8b07ae33
PA
87542010-04-01 Pedro Alves <pedro@codesourcery.com>
8755
8756 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8757 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8758 if we could tell there's a GDB breakpoint at stop_pc.
8759 (need_step_over_p): Don't do a step over if we find a GDB
8760 breakpoint at the resume PC.
8761
8762 * mem-break.c (struct raw_breakpoint): New.
8763 (enum bkpt_type): New type `gdb_breakpoint'.
8764 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8765 fields. New field `raw'.
8766 (find_raw_breakpoint_at): New.
8767 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8768 breakpoint instead.
8769 (set_breakpoint_at): Adjust.
8770 (delete_raw_breakpoint): New.
8771 (release_breakpoint): New.
8772 (delete_breakpoint): Rename to...
8773 (delete_breakpoint_1): ... this. Add proc parameter. Use
8774 release_breakpoint. Return ENOENT.
8775 (delete_breakpoint): Reimplement.
8776 (find_breakpoint_at): Delete.
8777 (find_gdb_breakpoint_at): New.
8778 (delete_breakpoint_at): Delete.
8779 (set_gdb_breakpoint_at): New.
8780 (delete_gdb_breakpoint_at): New.
8781 (gdb_breakpoint_here): New.
8782 (set_reinsert_breakpoint): Use release_breakpoint.
8783 (uninsert_breakpoint): Rename to ...
8784 (uninsert_raw_breakpoint): ... this.
8785 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8786 (reinsert_raw_breakpoint): Change parameter type to
8787 raw_breakpoint.
8788 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8789 instead.
8790 (check_breakpoints): Adjust. Use release_breakpoint.
8791 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8792 (breakpoint_inserted_here): Ditto.
8793 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8794 Don't trust the breakpoint's shadow if it is not inserted.
8795 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8796 (delete_all_breakpoints): Adjust.
8797 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8798 use delete_breakpoint_1.
8799
8800 * mem-break.h (breakpoints_supported): Delete declaration.
8801 (set_gdb_breakpoint_at): Declare.
8802 (gdb_breakpoint_here): Declare.
8803 (delete_breakpoint_at): Delete.
8804 (delete_gdb_breakpoint_at): Declare.
8805
8806 * server.h (struct raw_breakpoint): Forward declare.
8807 (struct process_info): New field `raw_breakpoints'.
8808
8809 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8810 breakpoints.
8811
6bf5e0ba
PA
88122010-03-24 Pedro Alves <pedro@codesourcery.com>
8813
8814 * linux-low.c (status_pending_p_callback): Fix comment.
8815 (linux_wait_for_event_1): Move most of the internal breakpoint
8816 handling from here...
8817 (linux_wait_1): ... to here.
8818 (count_events_callback): New.
8819 (select_singlestep_lwp_callback): New.
8820 (select_event_lwp_callback): New.
8821 (cancel_breakpoints_callback): New.
8822 (select_event_lwp): New.
8823 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8824 priority to all LWPs that have had events that should be reported
8825 to the client. Cancel breakpoints when about to reporting the
8826 event to the client, not while stopping lwps. No longer cancel
8827 finished single-steps here.
8828 (cancel_finished_single_step): Delete.
8829 (cancel_finished_single_steps): Delete.
8830
414a389f
PA
88312010-03-24 Pedro Alves <pedro@codesourcery.com>
8832
8833 * mem-break.c (enum bkpt_type): New.
8834 (struct breakpoint): New field `type'.
8835 (set_breakpoint_at): Change return type to struct breakpoint
8836 pointer. Set type to `other_breakpoint' by default.
8837 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8838 in the breakpoint list.
8839 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8840 (reinsert_breakpoint): Rename to ...
8841 (reinsert_raw_breakpoint): ... this.
8842 (reinsert_breakpoints_at): Adjust.
8843 * mem-break.h (struct breakpoint): Declare.
8844 (set_breakpoint_at): Change return type to struct breakpoint
8845 pointer.
8846
2280c721
PA
88472010-03-24 Pedro Alves <pedro@codesourcery.com>
8848
8849 * server.c (handle_query): Assign, not compare.
8850
d50171e4
PA
88512010-03-24 Pedro Alves <pedro@codesourcery.com>
8852
8853 Teach linux gdbserver to step-over-breakpoints.
8854
8855 * linux-low.c (can_hardware_single_step): New.
8856 (supports_breakpoints): New.
8857 (handle_extended_wait): If stopping threads, read the stop pc of
8858 the new cloned LWP.
8859 (get_pc): New.
8860 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8861 low target doesn't support retrieving the PC.
8862 (add_lwp): Set last_resume_kind to resume_continue.
8863 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8864 (linux_attach): Don't clear stop_expected. Set the lwp's
8865 last_resume_kind to resume_stop.
8866 (linux_detach_one_lwp): Don't check for removed breakpoints.
8867 (check_removed_breakpoint): Delete.
8868 (status_pending_p): Rename to ...
8869 (status_pending_p_callback): ... this. Don't check for removed
8870 breakpoints. Don't consider threads that are stopped from GDB's
8871 perspective.
8872 (linux_wait_for_lwp): Always read the stop_pc here.
8873 (cancel_breakpoint): New.
8874 (step_over_bkpt): New global.
8875 (linux_wait_for_event_1): Implement stepping over breakpoints.
8876 (gdb_wants_lwp_stopped): New.
8877 (gdb_wants_all_stopped): New.
8878 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8879 single-step traps here. Store the thread's last reported target
8880 wait status.
8881 (send_sigstop): Don't clear stop_expected. Always set it,
8882 instead.
8883 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8884 (cancel_finished_single_step): New.
8885 (cancel_finished_single_steps): New.
8886 (wait_for_sigstop): Don't cancel finished single-step traps here.
8887 (linux_resume_one_lwp): Don't check for removed breakpoints.
8888 Don't set `step' on non-hardware step archs.
8889 (linux_set_resume_request): Ignore resume_stop requests if already
8890 stopping or stopped. Set the lwp's last_resume_kind.
8891 (resume_status_pending_p): Don't check for removed breakpoints.
8892 (need_step_over_p): New.
8893 (start_step_over): New.
8894 (finish_step_over): New.
8895 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8896 requests. Clear the thread's last reported target waitstatus.
8897 Don't use the `suspended' flag. Don't consider pending breakpoints.
8898 (linux_resume): Start a step-over if necessary.
8899 (proceed_one_lwp): New.
8900 (proceed_all_lwps): New.
8901 (unstop_all_lwps): New.
8902 * linux-low.h (struct lwp_info): Rewrite comment for the
8903 `suspended' flag. Add the `stop_pc' field. Delete the
8904 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8905 Add `'last_resume_kind' and `need_step_over' fields.
8906 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8907 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8908 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8909 (set_raw_breakpoint_at): New.
8910 (set_breakpoint_at): Rewrite to use it.
8911 (reinsert_breakpoint_handler): Delete.
8912 (set_reinsert_breakpoint): New.
8913 (reinsert_breakpoint_by_bp): Delete.
8914 (delete_reinsert_breakpoints): New.
8915 (uninsert_breakpoint): Rewrite.
8916 (uninsert_breakpoints_at): New.
8917 (reinsert_breakpoint): Rewrite.
8918 (reinsert_breakpoints_at): New.
8919 (check_breakpoints): Rewrite.
8920 (breakpoint_here): New.
8921 (breakpoint_inserted_here): New.
8922 (check_mem_read): Adjust.
8923 * mem-break.h (breakpoints_supported, breakpoint_here)
8924 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8925 (reinsert_breakpoint_by_bp): Delete declaration.
8926 (delete_reinsert_breakpoints): Declare.
8927 (reinsert_breakpoint): Delete declaration.
8928 (reinsert_breakpoints_at): Declare.
8929 (uninsert_breakpoint): Delete declaration.
8930 (uninsert_breakpoints_at): Declare.
8931 (check_breakpoints): Adjust prototype.
8932 * server.h: Adjust include order.
8933 (struct thread_info): Declare here. Add a `last_status' field.
8934
30ba68cb
MS
89352010-03-23 Michael Snyder <msnyder@vmware.com>
8936
8937 * server.c (crc32): New function.
8938 (handle_query): Add handling for 'qCRC:' request.
8939
b9a881c2
PA
89402010-03-23 Pedro Alves <pedro@codesourcery.com>
8941
8942 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8943 lwp had been stopped by a watchpoint.
8944
e92d13d5
PA
89452010-03-16 Pedro Alves <pedro@codesourcery.com>
8946
8947 * server.h (internal_error): Declare.
8948 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8949 * utils.c (internal_error): New function.
8950
64daa791
AS
89512010-03-15 Andreas Schwab <schwab@redhat.com>
8952
8953 * configure.srv: Fix typo setting srv_regobj.
8954
f52cd8cd
PA
89552010-03-15 Pedro Alves <pedro@codesourcery.com>
8956
8957 * linux-low.c (fetch_register): Avoid passing a non string literal
8958 format to `error'.
8959 (usr_store_inferior_registers): Ditto.
8960
93ae6fdc
PA
89612010-03-14 Pedro Alves <pedro@codesourcery.com>
8962
8963 * linux-low.c (linux_write_memory): Bail out early if peeking
8964 memory failed.
8965
c3adc08c
PA
89662010-03-14 Pedro Alves <pedro@codesourcery.com>
8967
8968 * linux-low.h (struct lwp_info): New fields
8969 `stopped_by_watchpoint' and `stopped_data_address'.
8970 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8971 here, and cache them in the lwp object.
8972 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8973 directly.
8974 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8975 field.
8976 (linux_stopped_by_watchpoint): Rewrite.
8977 (linux_stopped_data_address): Rewrite.
8978
bce522a2
PA
89792010-03-06 Simo Melenius <simo.melenius@iki.fi>
8980
8981 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8982 switching the current inferior, not before.
8983
90884b2b
L
89842010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8985
8986 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8987 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8988 i386-linux.c and amd64-linux.c.
8989 (reg-i386.o): Removed.
8990 (reg-i386.c): Likewise.
8991 (reg-i386-linux.o): Likewise.
8992 (reg-i386-linux.c): Likewise.
8993 (reg-x86-64.o): Likewise.
8994 (reg-x86-64.c): Likewise.
8995 (reg-x86-64-linux.o): Likewise.
8996 (reg-x86-64-linux.c): Likewise.
8997 (i386.o): New.
8998 (i386.c): Likewise.
8999 (i386-linux.o): Likewise.
9000 (i386-linux.c): Likewise.
9001 (amd64.o): Likewise.
9002 (amd64.c): Likewise.
9003 (amd64-linux.o): Likewise.
9004 (amd64-linux.c): Likewise.
9005
9006 * configure.srv (srv_i386_regobj): New.
9007 (srv_i386_linux_regobj): Likewise.
9008 (srv_amd64_regobj): Likewise.
9009 (srv_amd64_linux_regobj): Likewise.
9010 (srv_i386_32bit_xmlfiles): Likewise.
9011 (srv_i386_64bit_xmlfiles): Likewise.
9012 (srv_i386_xmlfiles): Likewise.
9013 (srv_amd64_xmlfiles): Likewise.
9014 (srv_i386_linux_xmlfiles): Likewise.
9015 (srv_amd64_linux_xmlfiles): Likewise.
9016 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
9017 srv_xmlfiles to $srv_i386_xmlfiles.
9018 (i[34567]86-*-mingw32ce*): Likewise.
9019 (i[34567]86-*-mingw*): Likewise.
9020 (i[34567]86-*-nto*): Likewise.
9021 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9022 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
9023 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9024 (x86_64-*-linux*): Likewise.
9025
9026 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9027 (init_registers_amd64_linux): New.
9028 (x86_arch_setup): Replace init_registers_x86_64_linux with
9029 init_registers_amd64_linux.
9030
193f13e6
MK
90312010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
9032
9033 * configure.ac: Check for libdl. If it is not available link against
9034 static libthread_db.
9035 * configure: Regenerate.
9036
85d721b8
PA
90372010-02-22 Pedro Alves <pedro@codesourcery.com>
9038
9039 PR9605
9040
9041 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9042 handing a read watchpoint.
9043 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9044
6076632b
DE
90452010-02-12 Doug Evans <dje@google.com>
9046
9047 * linux-low.c (linux_supports_tracefork_flag): Document.
9048 (linux_look_up_symbols): Add comment.
9049
3327ccf7
L
90502010-02-03 H.J. Lu <hongjiu.lu@intel.com>
9051
9052 * regcache.c (supply_register): Clear regcache if buf is NULL.
9053
0718675c 90542010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 9055 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
9056
9057 * inferiors.c (find_inferior): Add function documentation.
9058 (unloaded_dll): Handle the case where the unloaded dll has not
9059 been previously registered in the dll list.
9060
177321bd
DJ
90612010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
9062
9063 * linux-arm-low.c (thumb_breakpoint_len): Delete.
9064 (thumb2_breakpoint): New.
9065 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9066
2b009048
DJ
90672010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
9068
9069 * linux-low.c (get_stop_pc): Check for SIGTRAP.
9070 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9071 breakpoints.
9072
3be029c7
PA
90732010-01-21 Pedro Alves <pedro@codesourcery.com>
9074
9075 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9076
18f5de3b
JK
90772010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9078
9079 * linux-s390-low.c (s390_collect_ptrace_register)
9080 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9081
3743bb4f
DE
90822010-01-21 Doug Evans <dje@google.com>
9083
14ce3065
DE
9084 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9085 (PTRACE_ARG4_TYPE): New macro.
9086 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9087 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9088 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9089 (usr_store_inferior_registers): Ditto.
9090 (linux_read_memory, linux_write_memory): Ditto.
9091 (linux_test_for_tracefork): Ditto.
9092
3743bb4f
DE
9093 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9094 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9095
8b315be5
PA
90962010-01-21 Pedro Alves <pedro@codesourcery.com>
9097
9098 * proc-service.c (ps_lgetregs): Don't refetch registers from the
9099 target.
9100
85492558
PA
91012010-01-21 Pedro Alves <pedro@codesourcery.com>
9102
9103 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9104 prototype to take a regcache. Adjust.
9105
442ea881
PA
91062010-01-20 Pedro Alves <pedro@codesourcery.com>
9107
9108 * regcache.h (struct thread_info): Forward declare.
9109 (struct regcache): New.
9110 (new_register_cache): Adjust prototype.
9111 (get_thread_regcache): Declare.
9112 (free_register_cache): Adjust prototype.
9113 (registers_to_string, registers_from_string): Ditto.
9114 (supply_register, supply_register_by_name, collect_register)
9115 (collect_register_as_string, collect_register_by_name): Ditto.
9116 * regcache.c (struct inferior_regcache_data): Delete.
9117 (get_regcache): Rename to ...
9118 (get_thread_regcache): ... this. Adjust. Switch inferior before
9119 fetching registers.
9120 (regcache_invalidate_one): Adjust.
9121 (regcache_invalidate): Fix prototype.
9122 (new_register_cache): Return the new register cache.
9123 (free_register_cache): Change prototype.
9124 (realloc_register_cache): Adjust.
9125 (registers_to_string): Change prototype to take a regcache. Adjust.
9126 (registers_from_string): Ditto.
9127 (register_data): Ditto.
9128 (supply_register): Ditto.
9129 (supply_register_by_name): Ditto.
9130 (collect_register): Ditto.
9131 (collect_register_as_string): Ditto.
9132 (collect_register_by_name): Ditto.
9133 * server.c (process_serial_event): Adjust.
9134 * linux-low.h (regset_fill_func, regset_store_func): Change
9135 prototype.
9136 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9137 Change prototype.
9138 * linux-low.c (get_stop_pc): Adjust.
9139 (check_removed_breakpoint): Adjust.
9140 (linux_wait_for_event): Adjust.
9141 (linux_resume_one_lwp): Adjust.
9142 (fetch_register): Add regcache parameter. Adjust.
9143 (usr_store_inferior_registers): Ditto.
9144 (regsets_fetch_inferior_registers): Ditto.
9145 (regsets_store_inferior_registers): Ditto.
9146 (linux_fetch_registers, linux_store_registers): Ditto.
9147 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9148 regcache. Adjust.
43aaf8b6
PA
9149 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9150 Ditto.
442ea881
PA
9151 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9152 prototype to take a regcache.
9153 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9154 * remote-utils.c (convert_ascii_to_int, outreg)
9155 (prepare_resume_reply): Change prototype to take a regcache.
9156 Adjust.
9157 * target.h (struct target_ops) <fetch_registers, store_registers>:
9158 Change prototype to take a regcache.
9159 (fetch_inferior_registers, store_inferior_registers): Change
9160 prototype to take a regcache. Adjust.
9161 * proc-service.c (ps_lgetregs): Adjust.
9162 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9163 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9164 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9165 take a regcache. Adjust.
9166 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9167 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9168 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9169 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9170 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9171 (cris_cannot_fetch_register):
9172 (cris_breakpoint_at): Change prototype to take a regcache.
9173 Adjust.
9174 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9175 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9176 to take a regcache. Adjust.
9177 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9178 Adjust.
9179 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9180 take a regcache. Adjust.
9181 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9182 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9183 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9184 * linux-mips-low.c (mips_get_pc):
9185 (mips_set_pc): Change prototype to take a regcache. Adjust.
9186 (mips_reinsert_addr): Adjust.
9187 (mips_collect_register): Change prototype to take a regcache.
9188 Adjust.
9189 (mips_supply_register):
9190 (mips_collect_register_32bit, mips_supply_register_32bit)
9191 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9192 (mips_store_fpregset): Ditto.
43aaf8b6
PA
9193 * linux-ppc-low.c (ppc_supply_ptrace_register)
9194 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
9195 (parse_spufs_run): Adjust.
9196 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9197 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9198 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9199 take a regcache. Adjust.
9200 * linux-s390-low.c (s390_collect_ptrace_register)
9201 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9202 (s390_set_pc): Change prototype to take a regcache. Adjust.
9203 (s390_arch_setup): Adjust.
9204 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9205 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9206 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9207 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9208 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9209 regcache. Adjust.
9210 (sparc_breakpoint_at): Adjust.
9211 * linux-xtensa-low.c (xtensa_fill_gregset):
9212 (xtensa_store_gregset):
9213 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9214 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9215 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9216 prototype to take a regcache. Adjust.
9217 * win32-arm-low.c (arm_fetch_inferior_register)
9218 (arm_store_inferior_register): Change prototype to take a
9219 regcache. Adjust.
9220 * win32-i386-low.c (i386_fetch_inferior_register)
9221 (i386_store_inferior_register): Change prototype to take a
9222 regcache. Adjust.
9223 * win32-low.c (child_fetch_inferior_registers)
9224 (child_store_inferior_registers): Change prototype to take a
9225 regcache. Adjust.
9226 (win32_wait): Adjust.
9227 (win32_fetch_inferior_registers): Change prototype to take a
9228 regcache. Adjust.
9229 (win32_store_inferior_registers): Adjust.
9230 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9231 store_inferior_register>: Change prototype to take a regcache.
9232
60c3d7b0
DE
92332010-01-20 Doug Evans <dje@google.com>
9234
9235 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9236 #ifdef.
9237 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 9238 (W_STOPCODE): Provide definition if missing.
60c3d7b0 9239
dc146f7c
VP
92402010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9241
9242 * linux-low.c (linux_core_of_thread): New.
9243 (compare_ints, show_process, list_threads): New.
9244 (linux_qxfer_osdata): Report threads and cores.
9245 (linux_target_op): Register linux_core_of_thread.
9246 * remote-utils.c (prepare_resume_reply): Report the core.
9247 (buffer_xml_printf): Support %d specifier.
9248 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9249 New.
9250 (handle_query): Handle qXfer:threads. Announce availability
9251 thereof.
9252 * target.h (struct target_ops): New field core_of_thread.
9253
7803799a
UW
92542010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9255
9256 * Makefile.in (clean): Remove new generated files.
9257 (reg-s390.o, reg-s390.c): Remove rules.
9258 (reg-s390x.o, reg-s390x.c): Likewise.
9259 (s390-linux32.o, s390-linux32.c): Add rules.
9260 (s390-linux64.o, s390-linux64.c): Likewise.
9261 (s390x-linux64.o, s390x-linux64.c): Likewise.
9262 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9263 * linux-s390-low.c: Include <elf.h>.
9264 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9265 (init_registers_s390): Remove prototype.
9266 (init_registers_s390x): Likewise.
9267 (init_registers_s390_linux32): Add prototype.
9268 (init_registers_s390_linux64): Likewise.
9269 (init_registers_s390x_linux64): Likewise.
9270 (s390_num_regs_3264): New define.
9271 (s390_regmap_3264): New global variable.
9272 (s390_cannot_fetch_register): Remove obsolete check.
9273 (s390_cannot_store_register): Likewise.
9274 (s390_collect_ptrace_register): Handle upper/lower register halves.
9275 (s390_supply_ptrace_register): Likewise.
9276 (s390_fill_gregset): Update to register number changes.
9277 (s390_get_hwcap): New routine.
9278 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9279 Install appropriate regmap and register set.
9280
6e7ffa39
JB
92812010-01-01 Joel Brobecker <brobecker@adacore.com>
9282
9283 * server.c (gdbserver_version): Update copyright year to 2010.
9284 * gdbreplay.c (gdbreplay_version): Likewise.
9285
957f3f49
DE
92862009-12-28 Doug Evans <dje@google.com>
9287
9288 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9289 elf/external.h. Include <elf.h> instead but only if necessary.
9290
ca5c370d
PA
92912009-12-28 Pedro Alves <pedro@codesourcery.com>
9292
9293 * linux-low.c (linux_remove_process): Remove `detaching'
9294 parameter. Don't release/detach from thread_db here.
9295 (linux_kill): Release/detach from thread_db here, ...
9296 (linux_detach): ... and here, before actually detaching.
9297 (linux_wait_1): ... and here, when a process exits.
9298 * thread-db.c (any_thread_of): New.
9299 (thread_db_free): Switch the current inferior to a thread of the
9300 passed in process.
9301
4ee62156
DE
93022009-12-21 Doug Evans <dje@google.com>
9303
d90e6a88
DE
9304 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9305
c5f62d5f
DE
9306 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9307 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9308 warning ifndef __NR_tkill. Move setting of errno there too.
9309 Delete unnecessary resetting of errno after syscall.
9310 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9311
10e86dd7
DE
9312 * configure.ac: Check for dladdr.
9313 * config.in: Regenerate.
9314 * configure: Regenerate.
9315 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9316 (try_thread_db_load): Update.
9317
4ee62156
DE
9318 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9319
00f515da
DE
93202009-12-18 Doug Evans <dje@google.com>
9321
e9464885
DE
9322 * event-loop.c: Include unistd.h if it exists.
9323
07d4f67e
DE
9324 * linux-low.c (my_waitpid): Move definition away from being in
9325 between linux_tracefork_child/linux_test_for_tracefork.
9326
00f515da
DE
9327 * gdb_proc_service.h (psaddr_t): Fix type.
9328 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9329 signature to match glibc.
9330
1de1badb
DE
93312009-12-16 Doug Evans <dje@google.com>
9332
9333 * linux-low.c (linux_read_memory): Fix argument to read.
9334
aeeb81d1
PA
93352009-11-26 Pedro Alves <pedro@codesourcery.com>
9336
9337 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9338 events, don't leave current_inferior pointing at null.
9339
10357975
PA
93402009-11-26 Pedro Alves <pedro@codesourcery.com>
9341
9342 * win32-low.c (LOG): Delete.
9343 (OUTMSG): Output to stderr.
9344 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9345 on compile time LOG macro.
9346 (win32_wait): Fix debug output.
9347
cf6e3471
PA
93482009-11-26 Pedro Alves <pedro@codesourcery.com>
9349
9350 * win32-low.c (win32_add_one_solib): If the dll name is
9351 "ntdll.dll", prepend the system directory to the dll path.
9352
0c85e18e
MK
93532009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9354
9355 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9356
9ac544ce 93572009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 9358 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
9359
9360 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9361 * configure.ac: Check for __mcoldfire__ and set
9362 gdb_cv_m68k_is_coldfire.
9363 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9364 reg-cf.o and reg-m68k.o.
9365 * configure: Regenerated.
9366
fd7dd3e6
PA
93672009-11-16 Pedro Alves <pedro@codesourcery.com>
9368
9369 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9370 Pass it to thread_db_free.
9371 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9372 proper `detaching' argument to linux_remove_process.
9373 * linux-low.h (thread_db_free): Add `detaching' parameter.
9374 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9375 to thread_db_free.
9376 (thread_db_free): Add `detaching' parameter. Only
9377 call td_ta_clear_event if detaching from process.
9378
75aa492e
MK
93792009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9380
9381 * thread-db.c (thread_db_free): Fix typo.
9382
21e1bee4
PP
93832009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9384
9385 PR gdb/10838
9386 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9387
8838b45e
NS
93882009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9389
9390 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9391 with an i686 compiler.
9392 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9393 needed.
9394 * configure: Rebuilt.
9395
8a35fb51
SL
93962009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9397
9398 PR gdb/10783
9399
9400 * server.c (handle_search_memory_1): Correct read_addr initialization
9401 in loop for searching subsequent chunks.
9402
96f15937
PP
94032009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9404
9405 * configure.ac: New --with-libthread-db option.
9406 * thread-db.c: Allow direct dependence on libthread_db.
9407 (thread_db_free): Adjust.
9408 * config.in: Regenerate.
9409 * configure: Likewise.
889bf7c5 9410
5f7d1694
PP
94112009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9412
9413 PR gdb/10757
9414 * thread-db.c (attach_thread): New function.
9415 (maybe_attach_thread): Return success/failure.
9416 (find_new_threads_callback): Adjust.
889bf7c5
PA
9417 (thread_db_find_new_threads): Loop until no new threads.
9418
88e3b899
PA
94192009-10-13 Pedro Alves <pedro@codesourcery.com>
9420
9421 * proc-service.c (ps_lgetregs): Formatting.
9422
cdbfd419
PP
94232009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9424
9425 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9426 * configure.ac: Adjust.
9427 * linux-low.h (struct process_info_private): Move members to struct
9428 thread_db.
9429 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9430 * linux-low.c (linux_remove_process): Adjust.
9431 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9432 * server.c (handle_query): Move code ...
9433 (handle_monitor_command): ... here. New function.
9434 * target.h (struct target_ops): New member.
9435 * thread-db.c (struct thread_db): New.
9436 (libthread_db_search_path): New variable.
9437 (thread_db_create_event, thread_db_enable_reporting)
9438 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9439 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9440 (try_thread_db_load_1, dladdr_to_soname): New functions.
9441 (try_thread_db_load, thread_db_load_search): New functions.
9442 (thread_db_init): Search for libthread_db.
9443 (thread_db_free): New function.
9444 (thread_db_handle_monitor_command): Likewise.
9445 * config.in: Regenerate.
9446 * configure: Regenerate.
889bf7c5 9447
4168d2d6
UW
94482009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9449
9450 * spu-low.c (spu_kill): Wait for inferior to terminate.
9451 Call clear_inferiors.
9452 (spu_detach): Call clear_inferiors.
9453
81ecdfbb
RW
94542009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9455
9456 * aclocal.m4: Regenerate.
9457 * config.in: Likewise.
9458 * configure: Likewise.
9459
0b9ff2c0
UW
94602009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9461
9462 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9463 (parse_spufs_run): New function.
9464 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9465 (ppc_breakpoint_at): Handle SPU breakpoints.
9466
efcbbd14
UW
94672009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9468
9469 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9470 (SPUFS_MAGIC): Define.
9471 (spu_enumerate_spu_ids): New function.
9472 (linux_qxfer_spu): New function.
9473 (linux_target_ops): Install linux_qxfer_spu.
9474
f4d9bade
UW
94752009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9476
9477 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9478 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9479 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9480 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9481 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9482 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9483 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9484 (init_registers_powerpc_cell32l): Add prototype.
9485 (init_registers_powerpc_cell64l): Likewise.
9486 (ppc_arch_setup): Detect Cell/B.E. architecture.
9487
96e946ca
RW
94882009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9489
9490 * Makefile.in (datarootdir): New variable.
9491
58d6951d
DJ
94922009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9493
9494 * linux-low.c (linux_write_memory): Update debugging output.
9495 * Makefile.in (clean): Add new descriptions.
9496 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9497 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9498 * configure.srv: Add new files for arm*-*-linux*.
9499 * linux-arm-low.c: Add new declarations.
9500 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9501 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9502 (HWCAP_VFPv3D16): New.
9503 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9504 instead of __IWMMXT__.
9505 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9506 (arm_arch_setup): New.
9507 (target_regsets): Remove #ifdef. Add VFP regset.
9508 (the_low_target): Use arm_arch_setup.
9509
12b42a12
DJ
95102009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9511
9512 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9513 the main thread again.
9514
ac8c974e
AR
95152009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9516
9517 Adding Neutrino gdbserver.
9518 * configure: Regenerated.
9519 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9520 * configure.srv (i[34567]86-*-nto*): New target.
9521 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9522 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9523 (nto_comctrl) [__QNX__]: New function.
9524 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9525
4424e0c3 95262009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
9527
9528 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9529 srv_tgtobj.
9530
912cf4ba
PA
95312009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9532 Pedro Alves <pedro@codesourcery.com>
9533
9534 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9535 don't support CONTEXT_EXTENDED_REGISTERS.
9536 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9537 (the_low_target): Install them.
9538 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9539 failing with ERROR_PIPE_NOT_CONNECTED.
9540
aa5ca48f
DE
95412009-06-30 Doug Evans <dje@google.com>
9542 Pierre Muller <muller@ics.u-strasbg.fr>
9543
9544 Add h/w watchpoint support to x86-linux, win32-i386.
9545 * Makefile.in (SFILES): Add i386-low.c
9546 (i386_low_h): Define.
9547 (i386-low.o): Add dependencies.
9548 (linux-x86-low.o): Add i386-low.h dependency.
9549 (win32-i386-low.o): Ditto.
9550 * i386-low.c: New file.
9551 * i386-low.h: New file.
9552 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9553 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9554 * linux-low.c (linux_add_process): Initialize arch_private.
9555 (linux_remove_process): Free arch_private.
9556 (add_lwp): Initialize arch_private.
9557 (delete_lwp): Free arch_private.
9558 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9559 provided.
9560 * linux-low.h (process_info_private): New member arch_private.
9561 (lwp_info): New member arch_private.
9562 (linux_target_ops): New members new_process, new_thread,
9563 prepare_to_resume.
9564 (ptid_of): New macro.
9565 * linux-x86-low.c: Include stddef.h, i386-low.h.
9566 (arch_process_info): New struct.
9567 (arch_lwp_info): New struct.
9568 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9569 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9570 (i386_dr_low_get_status): New function.
9571 (x86_insert_point, x86_remove_point): New functions.
9572 (x86_stopped_by_watchpoint): New function.
9573 (x86_stopped_data_address): New function.
9574 (x86_linux_new_process, x86_linux_new_thread): New functions.
9575 (x86_linux_prepare_to_resume): New function.
9576 (the_low_target): Add entries for insert_point, remove_point,
9577 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9578 prepare_to_resume.
9579 * server.c (debug_hw_points): New global.
9580 (monitor_show_help): Document set debug-hw-points.
9581 (handle_query): Process "set debug-hw-points".
9582 * server.h (debug_hw_points): Declare.
9583 (paddress): Declare.
9584 * utils.c (NUMCELLS, CELLSIZE): New macros.
9585 (get_sell, xsnprintf, paddress): New functions.
9586 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9587 remove_point, stopped_by_watchpoint, stopped_data_address.
9588 * win32-i386-low.c: Include i386-low.h.
9589 (debug_reg_state): Replaces dr.
9590 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9591 (i386_dr_low_get_status): New function.
9592 (i386_insert_point, i386_remove_point): New functions.
9593 (i386_stopped_by_watchpoint): New function.
9594 (i386_stopped_data_address): New function.
9595 (i386_initial_stuff): Update.
9596 (get_thread_context,set_thread_context,i386_thread_added): Update.
9597 (the_low_target): Add entries for insert_point,
9598 remove_point, stopped_by_watchpoint, stopped_data_address.
9599 * win32-low.c (win32_insert_watchpoint): New function.
9600 (win32_remove_watchpoint): New function.
9601 (win32_stopped_by_watchpoint): New function.
9602 (win32_stopped_data_address): New function.
9603 (win32_target_ops): Add entries for insert_watchpoint,
9604 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9605 * win32-low.h (win32_target_ops): New members insert_point,
9606 remove_point, stopped_by_watchpoint, stopped_data_address.
9607
d993e290
PA
96082009-06-25 Pedro Alves <pedro@codesourcery.com>
9609
9610 * server.c (process_serial_event): Re-return unsupported, not
9611 error, if the type isn't recognized. Re-allow supporting only
9612 insert or remove packets. Also call require_running for
9613 breakpoints. Add missing break statement to default case. Tidy.
9614 * target.h (struct target_ops): Rename insert_watchpoint to
9615 insert_point, and remove_watchpoint to remove_point.
9616
9617 * linux-low.h (struct linux_target_ops): Likewise.
9618 * linux-low.c (linux_insert_watchpoint): Rename to ...
9619 (linux_insert_point): ... this. Adjust.
9620 (linux_remove_watchpoint): Rename to ...
9621 (linux_remove_point): ... this. Adjust.
9622 (linux_target_ops): Adjust.
9623 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9624 (cris_insert_point): ... this.
9625 (cris_remove_watchpoint): Rename to ...
9626 (cris_remove_point): ... this.
9627 (the_low_target): Adjust.
9628
0f54c268
PM
96292009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9630
9631 * server.c (handle_v_kill): Pass signal_pid to
9632 kill_inferior if multi_process is zero.
9633
c6314022
AR
96342009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9635
9636 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9637 * target.h (target_ops): Comment for *_watchpoint to make it clear
9638 the functions can get types '0' and '1'.
9639
4463ce24
AR
96402009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9641
9642 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9643 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9644 * regcache.c (get_regcache): Likewise.
9645 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9646 * win32-low.c (child_fetch_inferior_registers): Remove check for
9647 regno 0.
9648
cf8fd78b
PA
96492009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9650 Pedro Alves <pedro@codesourcery.com>
9651
9652 * target.h (struct target_ops) <supports_multi_process>: New
9653 callback.
9654 (target_supports_multi_process): New.
9655 * server.c (handle_query): Even if GDB reports support, only
9656 enable multi-process if the target also supports it. Report
9657 multi-process support only if the target backend supports it.
9658 * linux-low.c (linux_supports_multi_process): New function.
9659 (linux_target_ops): Install it as target_supports_multi_process
9660 callback.
9661
47c0c975
DE
96622009-05-24 Doug Evans <dje@google.com>
9663
e09875d4
DE
9664 Global renaming of find_thread_pid to find_thread_ptid.
9665 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9666 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9667 All callers updated.
9668
e27d73f6
DE
9669 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9670 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9671 directly.
9672
47c0c975
DE
9673 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9674 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9675 (linux_resume_one_lwp): Ditto.
9676
2acc282a
DE
96772009-05-23 Doug Evans <dje@google.com>
9678
9679 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9680 from struct inferior_list_entry * to struct lwp_info *.
9681 All callers updated.
9682
9f1036c1
DE
96832009-05-13 Doug Evans <dje@google.com>
9684
9685 * linux-x86-low.c: Don't include assert.h.
9686 (x86_siginfo_fixup): Use fatal, not assert.
9687 (x86_arch_setup): Fix comment.
9688
d0722149
DE
96892009-05-12 Doug Evans <dje@google.com>
9690
9691 Biarch support for i386/amd64 gdbserver.
9692 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9693 Add linux-x86-low.c.
9694 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9695 (linux-x86-low.o): Add.
9696 * linux-x86-64-low.c: Delete.
9697 * linux-i386-low.c: Delete.
9698 * linux-x86-low.c: New file.
9699 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9700 linux-x86-low.o.
9701 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9702 linux-x86-low.o.
9703 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9704 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9705 (linux_child_pid_to_exec_file): New function.
9706 (elf_64_header_p, elf_64_file_p): New functions.
9707 (siginfo_fixup): New function.
9708 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9709 give target a chance to convert layout.
9710 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9711 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9712
fdeb2a12
DE
97132009-05-07 Doug Evans <dje@google.com>
9714
9715 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9716 (regsets_store_inferior_registers): Ditto.
9717
a6dbe5df
PA
97182009-05-06 Pedro Alves <pedro@codesourcery.com>
9719
9720 PR server/10048
9721
9722 * linux-low.c (must_set_ptrace_flags): Delete.
9723 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9724 of the global.
9725 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9726 `lwp->must_set_ptrace_flags' instead.
ba42693b 9727 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
9728 (linux_wait_1): ... not here.
9729
5091eb23
DE
97302009-04-30 Doug Evans <dje@google.com>
9731
9f767825
DE
9732 * inferiors.c (started_inferior_callback): New function.
9733 (attached_inferior_callback): New function.
9734 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9735 * server.c (print_started_pid, print_attached_pid): New functions.
9736 (detach_or_kill_for_exit): New function.
9737 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9738 * server.h (have_started_inferiors_p): Declare.
9739 (have_attached_inferiors_p): Declare.
9740
5091eb23
DE
9741 * inferiors.c (remove_process): Fix memory leak, free process.
9742 * linux-low.c (linux_remove_process): New function.
9743 (linux_kill): Call it instead of remove_process.
9744 (linux_detach, linux_wait_1): Ditto.
9745
155c8968
PA
97462009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9747
9748 * configure.srv: Add x86 Windows CE target.
9749
7fe519cb
UW
97502009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9751
9752 * inferiors.c (get_thread_process): Make global.
9753 * server.h (get_thread_process): Add prototype.
9754 * thread-db.c (find_one_thread): Use get_thread_process
9755 instead of current_process.
9756 (thread_db_get_tls_address): Do not crash if called when
9757 thread layer is not yet initialized.
9758
5472f405
UW
97592009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9760
9761 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9762 * spu-low.c (current_tid): Rename to ...
9763 (current_ptid): ... this.
9764 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9765 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9766 ptid_get_lwp (current_ptid) instead of current_tid.
9767 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9768 instead of current_tid. Use find_process_pid to verify pid
9769 argument is valid. Pass proper argument to remove_process.
9770 (spu_thread_alive): Compare current_ptid instead of current_tid.
9771 (spu_resume): Likewise.
9772
55ac2b99
PA
97732009-04-02 Pedro Alves <pedro@codesourcery.com>
9774
9775 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9776 variable.
9777
95954743
PA
97782009-04-01 Pedro Alves <pedro@codesourcery.com>
9779
9780 Implement the multiprocess extensions, and add linux multiprocess
9781 support.
9782
9783 * server.h (ULONGEST): Declare.
9784 (struct ptid, ptid_t): New.
9785 (minus_one_ptid, null_ptid): Declare.
9786 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9787 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9788 (struct inferior_list_entry): Change `id' type from unsigned from
9789 to ptid_t.
9790 (struct sym_cache, struct breakpoint, struct
9791 process_info_private): Forward declare.
9792 (struct process_info): Declare.
9793 (current_process): Declare.
9794 (all_processes): Declare.
9795 (initialize_inferiors): Declare.
9796 (add_thread): Adjust to use ptid_t.
9797 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9798 (add_process, remove_process, find_thread_pid): Declare.
9799 (find_inferior_id): Adjust to use ptid_t.
9800 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9801 (multi_process): Declare.
9802 (push_event): Adjust to use ptid_t.
9803 (read_ptid, write_ptid): Declare.
9804 (prepare_resume_reply): Adjust to use ptid_t.
9805 (clear_symbol_cache): Declare.
9806 * inferiors.c (all_processes): New.
9807 (null_ptid, minus_one_ptid): New.
9808 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9809 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9810 (add_thread): Change unsigned long to ptid. Remove gdb_id
9811 parameter. Adjust.
9812 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9813 (gdb_id_to_thread): Rename to ...
9814 (find_thread_pid): ... this. Change unsigned long to ptid.
9815 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9816 (loaded_dll, pull_pid_from_list): Adjust.
9817 (add_process, remove_process, find_process_pid)
9818 (get_thread_process, current_process, initialize_inferiors): New.
9819 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9820 (struct target_waitstatus) <related_pid>: Ditto.
9821 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9822 return type to int.
9823 (struct target_ops) <join>: Add `pid' argument.
9824 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9825 (struct target_ops) <wait>: Add `ptid' field. Change return type
9826 to ptid.
9827 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9828 (mywait): Add `ptid' argument. Change return type to ptid_t.
9829 (target_pid_to_str): Declare.
9830 * target.c (set_desired_inferior): Adjust to use ptids.
9831 (mywait): Add new `ptid' argument. Adjust.
9832 (target_pid_to_str): New.
9833 * mem-break.h (free_all_breakpoints): Declare.
9834 * mem-break.c (breakpoints): Delelete.
9835 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9836 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9837 to use per-process breakpoint list.
9838 (free_all_breakpoints): New.
9839 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9840 (symbol_cache, all_symbols_looked_up): Delete.
9841 (hexchars): New.
9842 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9843 read_ptid): New.
9844 (prepare_resume_reply): Change ptid argument's type from unsigned
9845 long to ptid_t. Adjust. Implement W;process and X;process.
9846 (free_sym_cache, clear_symbol_cache): New.
9847 (look_up_one_symbol): Adjust to per-process symbol cache. *
9848 * server.c (cont_thread, general_thread, step_thread): Change type
9849 to ptid_t.
9850 (attached): Delete.
9851 (multi_process): New.
9852 (last_ptid): Change type to ptid_t.
9853 (struct vstop_notif) <ptid>: Change type to ptid_t.
9854 (queue_stop_reply, push_event): Change `ptid' argument's type to
9855 ptid_t.
9856 (discard_queued_stop_replies): Add `pid' argument.
9857 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9858 changes. Don't reference the `attached' global.
9859 (attach_inferior): Adjust to mywait interface changes.
9860 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9861 features. Handle and report "multiprocess+". Handle
9862 "qAttached:PID".
9863 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9864 changes.
9865 (handle_v_kill): New.
9866 (handle_v_stopped): Adjust to use target_pid_to_str.
9867 (handle_v_requests): Allow multiple attaches and runs when
9868 multiprocess extensions are in effect. Handle "vKill".
9869 (myresume): Adjust to use ptids.
9870 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9871 (handle_status): Adjust to discard_queued_stop_replies interface
9872 change.
9873 (first_thread_of, kill_inferior_callback)
9874 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9875 (main): Call initialize_inferiors. Adjust to use ptids, killing
9876 and detaching from all inferiors. Handle multiprocess packet
9877 variants.
9878 * linux-low.h: Include gdb_proc_service.h.
9879 (struct process_info_private): New.
9880 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9881 <lwpid_of>: Use ptid_get_lwp.
9882 (get_lwp_thread): Adjust.
9883 (struct lwp_info): Add `dead' member.
9884 (find_lwp_pid): Declare.
9885 * linux-low.c (thread_db_active): Delete.
9886 (new_inferior): Adjust comment.
9887 (inferior_pid): Delete.
9888 (linux_add_process): New.
9889 (handle_extended_wait): Adjust.
9890 (add_lwp): Change unsigned long to ptid.
9891 (linux_create_inferior): Add process to processes table. Adjust
9892 to use ptids. Don't set new_inferior here.
9893 (linux_attach_lwp): Rename to ...
9894 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9895 it. Adjust to use ptids.
9896 (linux_attach_lwp): New.
9897 (linux_attach): Add process to processes table. Don't set
9898 new_inferior here.
9899 (struct counter): New.
9900 (second_thread_of_pid_p, last_thread_of_process_p): New.
9901 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9902 multiple processes.
9903 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9904 processes. Remove process from process table.
9905 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9906 to multiple processes.
9907 (any_thread_of): New.
9908 (linux_detach): Add `pid' argument, and handle it. Remove process
9909 from processes table.
9910 (linux_join): Add `pid' argument. Handle it.
9911 (linux_thread_alive): Change unsighed long argument to ptid_t.
9912 Consider dead lwps as not being alive.
9913 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9914 threads we're not interested in.
9915 (same_lwp, find_lwp_pid): New.
9916 (linux_wait_for_lwp): Change `pid' argument's type from int to
9917 ptid_t. Adjust.
9918 (linux_wait_for_event): Rename to ...
9919 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9920 from int to ptid_t. Adjust.
9921 (linux_wait_for_event): New.
9922 (linux_wait_1): Add `ptid' argument. Change return type to
9923 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9924 that exit from the process table.
9925 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9926 Adjust.
9927 (mark_lwp_dead): New.
9928 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9929 stopping all threads, mark its main lwp as dead.
9930 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9931 ptids.
9932 (fetch_register, usr_store_inferior_registers)
9933 (regsets_fetch_inferior_registers)
9934 (regsets_store_inferior_registers, linux_read_memory)
9935 (linux_write_memory): Inline `inferior_pid'.
9936 (linux_look_up_symbols): Adjust to use per-process
9937 `thread_db_active'.
9938 (linux_request_interrupt): Adjust to use ptids.
9939 (linux_read_auxv): Inline `inferior_pid'.
9940 (initialize_low): Don't reference thread_db_active.
9941 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9942 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9943 (ps_getpid): Return the pid of the current inferior.
9944 * thread-db.c (proc_handle, thread_agent): Delete.
9945 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9946 per-process data.
9947 (find_one_thread): Change argument type to ptid_t. Adjust to
9948 per-process data.
9949 (maybe_attach_thread): Adjust to per-process data and ptids.
9950 (thread_db_find_new_threads): Ditto.
9951 (thread_db_init): Ditto.
9952 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9953 processes table. Adjust to use ptids.
9954 (spu_kill, spu_detach): Adjust interface. Remove process from
9955 processes table.
9956 (spu_join, spu_thread_alive): Adjust interface.
9957 (spu_wait): Adjust interface. Remove process from processes
9958 table. Adjust to use ptids.
9959 * win32-low.c (current_inferior_tid): Delete.
9960 (current_inferior_ptid): New.
9961 (debug_event_ptid): New.
9962 (thread_rec): Take a ptid. Adjust.
9963 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9964 (child_delete_thread): Ditto.
9965 (do_initial_child_stuff): Add `attached' argument. Add process to
9966 processes table.
9967 (child_fetch_inferior_registers, child_store_inferior_registers):
9968 Adjust.
9969 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9970 (win32_attach): Pass 1 to do_initial_child_stuff.
9971 (win32_kill): Adjust interface. Remove process from processes
9972 table.
9973 (win32_detach): Ditto.
9974 (win32_join): Adjust interface.
9975 (win32_thread_alive): Take a ptid.
9976 (win32_resume): Adjust to use ptids.
9977 (get_child_debug_event): Ditto.
9978 (win32_wait): Adjust interface. Remove exiting process from
9979 processes table.
9980
bd99dc85
PA
99812009-04-01 Pedro Alves <pedro@codesourcery.com>
9982
9983 Non-stop mode support.
9984
9985 * server.h (non_stop): Declare.
9986 (gdb_client_data, handler_func): Declare.
9987 (delete_file_handler, add_file_handler, start_event_loop):
9988 Declare.
9989 (handle_serial_event, handle_target_event, push_event)
9990 (putpkt_notif): Declare.
9991 * target.h (enum resume_kind): New.
9992 (struct thread_resume): Replace `step' field by `kind' field.
9993 (TARGET_WNOHANG): Define.
9994 (struct target_ops) <wait>: Add `options' argument.
9995 <supports_non_stop, async, start_non_stop>: New fields.
9996 (target_supports_non_stop, target_async): New.
9997 (start_non_stop): Declare.
9998 (mywait): Add `options' argument.
9999 * target.c (mywait): Add `options' argument. Print child exit
10000 notifications here.
10001 (start_non_stop): New.
10002 * server.c (non_stop, own_buf, mem_buf): New globals.
10003 (struct vstop_notif): New.
10004 (notif_queue): New global.
10005 (queue_stop_reply, push_event, discard_queued_stop_replies)
10006 (send_next_stop_reply): New.
10007 (start_inferior): Adjust to use resume_kind. Adjust to mywait
10008 interface changes.
10009 (attach_inferior): In non-stop mode, don't wait for the target
10010 here.
10011 (handle_general_set): Handle QNonStop.
10012 (handle_query): When handling qC, return the current general
10013 thread, instead of the first thread of the list.
10014 (handle_query): If the backend supports non-stop mode, include
10015 QNonStop+ in the qSupported query response.
10016 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
10017 and non-stop mode.
10018 (handle_v_attach, handle_v_run): Handle non-stop mode.
10019 (handle_v_stopped): New.
10020 (handle_v_requests): Report support for vCont;t. Handle vStopped.
10021 (myresume): Adjust to use resume_kind. Handle non-stop.
10022 (queue_stop_reply_callback): New.
10023 (handle_status): Handle non-stop mode.
10024 (main): Clear non_stop flag on reconnection. Use the event-loop.
10025 Refactor serial protocol handling from here ...
10026 (process_serial_event): ... to this new function. When GDB
10027 selects any thread, select one here. In non-stop mode, wait until
10028 GDB acks all pending events before exiting.
10029 (handle_serial_event, handle_target_event): New.
10030 * remote-utils.c (remote_open): Install remote_desc in the event
10031 loop.
10032 (remote_close): Remove remote_desc from the event loop.
10033 (putpkt_binary): Rename to...
10034 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
10035 (putpkt_binary): New as wrapper around putpkt_binary_1.
10036 (putpkt_notif): New.
10037 (prepare_resume_reply): In non-stop mode, don't change the
10038 general_thread.
10039 * event-loop.c: New.
10040 * Makefile.in (OBJ): Add event-loop.o.
10041 (event-loop.o): New rule.
10042
10043 * linux-low.h (pid_of): Moved here.
10044 (lwpid_of): New.
10045 (get_lwp_thread): Use lwpid_of.
10046 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
10047 * linux-low.c (pid_of): Delete.
10048 (inferior_pid): Use lwpid_of.
10049 (linux_event_pipe): New.
10050 (target_is_async_p): New.
10051 (delete_lwp): New.
10052 (handle_extended_wait): Use lwpid_of.
10053 (add_lwp): Don't set lwpid field.
10054 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
10055 (linux_kill_one_lwp): If killing a running lwp, stop it first.
10056 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
10057 (linux_detach_one_lwp): If detaching from a running lwp, stop it
10058 first. Adjust to linux_wait_for_event interface changes. Use
10059 lwpid_of.
10060 (linux_detach): Don't delete the main lwp here.
10061 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
10062 (status_pending_p): Don't consider explicitly suspended lwps.
10063 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10064 pointer. Add OPTIONS argument. Change return type to int. Use
10065 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
10066 (linux_wait_for_event): Take an integer pid instead of a lwp_info
10067 pointer. Add status pointer argument. Return a pid instead of a
10068 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
10069 changes. In non-stop mode, don't switch to a random thread.
10070 (linux_wait): Rename to...
10071 (linux_wait_1): ... this. Add target_options argument, and handle
10072 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
10073 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
10074 clean exit and signal exit code. Don't stop all threads in
10075 non-stop mode. In all-stop mode, only stop all threads when
10076 reporting a stop to GDB. Handle explicit thread stop requests.
10077 (async_file_flush, async_file_mark): New.
10078 (linux_wait): New.
10079 (send_sigstop): Use lwpid_of.
10080 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
10081 interface changes. In non-stop mode, don't switch to a random
10082 thread.
10083 (linux_resume_one_lwp): Use lwpid_of.
10084 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10085 (linux_resume_one_thread): ... this. Handle resume_stop. In
10086 non-stop mode, don't look for pending flag in all threads.
10087 (resume_status_pending_p): Don't consider explicitly suspended
10088 threads.
10089 (my_waitpid): Reimplement. Emulate __WALL.
10090 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10091 Use lwpid_of.
10092 (sigchld_handler, linux_supports_non_stop, linux_async)
10093 (linux_start_non_stop): New.
10094 (linux_target_ops): Register linux_supports_non_stop, linux_async
10095 and linux_start_non_stop.
10096 (initialize_low): Install SIGCHLD handler.
10097 * thread-db.c (thread_db_create_event, find_one_thread)
10098 (thread_db_get_tls_address): Use lwpid_of.
10099 * win32-low.c (win32_detach): Adjust to use resume_kind.
10100 (win32_wait): Add `options' argument.
10101 * spu-low.c (spu_resume): Adjust to use resume_kind.
10102 (spu_wait): Add `options' argument.
10103
5b1c542e
PA
101042009-04-01 Pedro Alves <pedro@codesourcery.com>
10105
10106 Decouple target code from remote protocol.
10107
10108 * target.h (enum target_waitkind): New.
10109 (struct target_waitstatus): New.
10110 (struct target_ops) <wait>: Return an unsigned long. Take a
10111 target_waitstatus pointer instead of a char pointer.
10112 (mywait): Likewise.
10113 * target.c (mywait): Change prototype to return an unsigned long.
10114 Take a target_waitstatus pointer instead of a char pointer. Adjust.
10115 * server.h (thread_from_wait, old_thread_from_wait): Delete
10116 declarations.
10117 (prepare_resume_reply): Change prototype to take a
10118 target_waitstatus.
10119 * server.c (thread_from_wait, old_thread_from_wait): Delete.
10120 (last_status, last_ptid): New.
10121 (start_inferior): Remove "statusptr" argument. Adjust. Return a
10122 pid instead of a signal.
10123 (attach_inferior): Remove "status" and "signal" parameters.
10124 Adjust.
10125 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10126 not as an address.
10127 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10128 (handle_v_requests, myresume): Remove "status" and "signal"
10129 parameters. Adjust.
10130 (handle_status): New.
10131 (main): Delete local `status'. Adjust.
10132 * remote-utils.c: Include target.h.
10133 (prepare_resume_reply): Change prototype to take a
10134 target_waitstatus. Adjust.
10135
10136 * linux-low.c (linux_wait): Adjust to new target_ops->wait
10137 interface.
10138 * spu-low.c (spu_wait): Adjust.
10139 * win32-low.c (enum target_waitkind, struct target_waitstatus):
10140 Delete.
10141 (win32_wait): Adjust.
10142
2bd7c093
PA
101432009-04-01 Pedro Alves <pedro@codesourcery.com>
10144
10145 * target.h (struct thread_resume): Delete leave_stopped member.
10146 (struct target_ops): Add a `n' argument to the `resume' callback.
10147 * server.c (start_inferior): Adjust.
10148 (handle_v_cont, myresume): Adjust.
10149 * linux-low.c (check_removed_breakpoint): Adjust to resume
10150 interface change, and to removed leave_stopped field.
10151 (resume_ptr): Delete.
10152 (struct thread_resume_array): New.
10153 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10154 resume interface change.
10155 (linux_continue_one_thread, linux_queue_one_thread)
10156 (resume_status_pending_p): Check if the resume field is NULL
10157 instead of checking the leave_stopped member.
10158 (linux_resume): Adjust to the target resume interface change.
10159 * spu-low.c (spu_resume): Adjust to the target resume interface
10160 change.
10161 * win32-low.c (win32_detach, win32_resume): Ditto.
10162
c35fafde
PA
101632009-04-01 Pedro Alves <pedro@codesourcery.com>
10164
10165 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10166 flag.
10167 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10168 pending.
10169 (linux_continue_one_thread): Only preserve the stepping flag if
10170 there's a pending breakpoint.
10171
0a59d50b
PA
101722009-03-31 Pedro Alves <pedro@codesourcery.com>
10173
10174 * server.c (main): After the inferior having exited, call
10175 remote_close before exiting gdbserver.
10176
f04c6d38
TJB
101772009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10178
10179 Fix size of FPSCR in Power 7 processors.
10180 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10181 (PPC_FEATURE_HAS_DFP): New #define.
10182 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10183 size of the FPSCR.
10184
78e5cee6
PA
101852009-03-23 Pedro Alves <pedro@codesourcery.com>
10186
10187 * server.c (handle_query) Whitespace and formatting.
10188
1b3f6016
PA
101892009-03-22 Pedro Alves <pedro@codesourcery.com>
10190
10191 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10192 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10193 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10194 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10195 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10196 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10197 Makefile.in, configure.ac: Fix whitespace throughout.
10198 * configure: Regenerate.
10199
a07b2135
PA
102002009-03-22 Pedro Alves <pedro@codesourcery.com>
10201
10202 * inferiors.c (find_inferior): Make it safe for the callback
10203 function to delete the currently iterated inferior.
10204
67cc2626
PA
102052009-03-22 Pedro Alves <pedro@codesourcery.com>
10206
10207 * Makefile.in (linuw_low_h): Move higher.
10208 (thread-db.o): Depend on $(linux_low_h).
10209
54a0b537
PA
102102009-03-17 Pedro Alves <pedro@codesourcery.com>
10211
10212 Rename "process" to "lwp" throughout.
10213
10214 * linux-low.c (all_processes): Rename to...
10215 (all_lwps): ... this.
10216 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10217 (add_process): Rename to ...
10218 (add_lwp): ... this. Adjust.
10219 (linux_create_inferior): Adjust.
10220 (linux_attach_lwp): Adjust.
10221 (linux_attach): Adjust.
10222 (linux_kill_one_process): Rename to ...
10223 (linux_kill_one_lwp): ... this. Adjust.
10224 (linux_kill): Adjust.
10225 (linux_detach_one_process): Rename to ...
10226 (linux_detach_one_lwp): ... this. Adjust.
10227 (linux_detach): Adjust.
10228 (check_removed_breakpoint): Adjust.
10229 (status_pending_p): Adjust.
10230 (linux_wait_for_process): Rename to ...
10231 (linux_wait_for_lwp): ... this. Adjust.
10232 (linux_wait_for_event): Adjust.
10233 (send_sigstop): Adjust.
10234 (wait_for_sigstop): Adjust.
10235 (stop_all_processes): Rename to ...
10236 (stop_all_lwps): ... this.
10237 (linux_resume_one_process): Rename to ...
10238 (linux_resume_one_lwp): ... this. Adjust.
10239 (linux_set_resume_request, linux_continue_one_thread)
10240 (linux_queue_one_thread, resume_status_pending_p)
10241 (usr_store_inferior_registers, regsets_store_inferior_registers)
10242 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10243 Adjust.
10244 * linux-low.h (get_process): Rename to ...
10245 (get_lwp): ... this. Adjust.
10246 (get_thread_process): Rename to ...
10247 (get_thread_lwp): ... this. Adjust.
10248 (get_process_thread): Rename to ...
10249 (get_lwp_thread): ... this. Adjust.
10250 (struct process_info): Rename to ...
10251 (struct lwp_info): ... this.
10252 (all_processes): Rename to ...
10253 (all_lwps): ... this.
10254 * proc-service.c (ps_lgetregs): Adjust.
10255 * thread-db.c (thread_db_create_event, find_one_thread)
10256 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10257
0b16c5cf
PA
102582009-03-14 Pedro Alves <pedro@codesourcery.com>
10259
10260 * server.c (handle_query): Handle "qAttached".
10261
32de4b9d
NS
102622009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10263
10264 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10265 GPLv3, update license URL.
10266
2aecd87f
DE
102672009-03-01 Doug Evans <dje@google.com>
10268
93efd302 10269 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
10270 (server_h): Add gdb_signals.h.
10271 (signals.o): Update.
10272 * server.h (target_signal_from_host,target_signal_to_host_p)
10273 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10274
86b1f9c5
PM
102752009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10276
10277 * remote-utils.c (getpkt): Also generate remote-debug
10278 information if noack_mode is set.
10279
4aa995e1
PA
102802009-02-06 Pedro Alves <pedro@codesourcery.com>
10281
10282 * server.c (handle_query): Report qXfer:siginfo:read and
10283 qXfer:siginfo:write as supported and handle them.
10284 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10285 * linux-low.c (linux_xfer_siginfo): New.
10286 (linux_target_ops): Set it.
10287
62709adf
PA
102882009-01-26 Pedro Alves <pedro@codesourcery.com>
10289
10290 * server.c (gdbserver_usage): Mention --remote-debug.
10291 (main): Accept '--remote-debug' switch.
10292
aef93bd7
DE
102932009-01-18 Doug Evans <dje@google.com>
10294
10295 * regcache.c (new_register_cache): No need to check result of xcalloc.
10296 * server.c (handle_search_memory): Back out calls to xmalloc,
10297 result is checked and error is returned to user upon failure.
10298 (handle_query): Ditto. Add more checks for result of malloc.
10299 (handle_v_cont): Check result of malloc, report error back to
10300 user upon failure.
10301 (handle_v_run): Ditto. Call freeargv.
10302 * server.h (freeargv): Declare.
10303 * utils.c (freeargv): New fn.
10304
54363045
DE
103052009-01-15 Doug Evans <dje@google.com>
10306
f626972c
DE
10307 * gdbreplay.c (perror_with_name): Make arg const char *.
10308 * server.h (target_signal_to_name): Make return type const char *.
0842e787 10309 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 10310 * utils.c (perror_with_name): Make arg const char *.
54363045 10311
18aae699
PA
103122009-01-14 Pedro Alves <pedro@codesourcery.com>
10313
10314 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10315 when handling a EXIT_PROCESS_DEBUG_EVENT.
10316
ff703abe
JB
103172009-01-06 Joel Brobecker <brobecker@adacore.com>
10318
10319 * gdbreplay.c (gdbreplay_version): Update copyright year.
10320 * server.c (gdbserver_version): Likewise.
10321
f21cc1a2 103222009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
10323
10324 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 10325 (handle_extended_wait): Improve comment.
0e21c1ec 10326
bca929d3
DE
103272008-12-13 Doug Evans <dje@google.com>
10328
10329 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10330 * server.h (ATTR_MALLOC): New macro.
10331 (xmalloc,xcalloc,xstrdup): Declare.
10332 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10333 * inferiors.c: Ditto.
10334 * linux-low.c: Ditto.
10335 * mem-break.c: Ditto.
10336 * regcache.c: Ditto.
10337 * remote-utils.c: Ditto.
10338 * server.c: Ditto.
10339 * target.c: Ditto.
10340 * win32-low.c: Ditto.
10341
97438e3f
DE
103422008-12-12 Doug Evans <dje@google.com>
10343
896c7fbb
DE
10344 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10345 in debugging printf.
10346
97438e3f
DE
10347 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10348
e3b886f8
DE
103492008-12-09 Doug Evans <dje@google.com>
10350
10351 * linux-low.h (struct process_info): Delete member tid, unused.
10352 * thread-db.c (find_one_thread): Update.
10353 (maybe_attach_thread): Update.
10354
07e059b5
VP
103552008-12-02 Pedro Alves <pedro@codesourcery.com>
10356
889bf7c5
PA
10357 * target.h (struct target_ops): Add qxfer_osdata member.
10358 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10359 and dirent.h.
10360 (linux_qxfer_osdata): New functions.
10361 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10362 callback.
10363 * server.c (handle_query): Handle "qXfer:osdata:read:".
10364 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10365 (buffer_xml_printf): New functions.
10366 * server.h (struct buffer): New.
10367 (buffer_grow_str, buffer_grow_str0): New macros.
10368 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10369 (buffer_xml_printf): Declare.
07e059b5 10370
4cab47ab
DE
103712008-11-24 Doug Evans <dje@google.com>
10372
10373 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10374
f142445f
DJ
103752008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10376
10377 * server.c (handle_v_run): Always use the supplied argument list.
10378
d0107bb6 103792008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 10380
d0107bb6
BW
10381 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10382 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 10383
2c4ad781
TJB
103842008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10385
10386 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10387 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10388 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10389 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10390 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10391 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10392 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10393 XML target descriptions.
10394 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10395 when inferior is running on an ISA 2.05 or later processor. Add
10396 special case to return offset for full 64-bit slot of FPSCR when
10397 in 32-bits.
10398
dfb64f85
DJ
103992008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10400
10401 * Makefile.in (SFILES, clean): Added sparc64 files.
10402 (reg-sparc64.o, reg-sparc64.c): New.
10403 * configure.srv (sparc*-*-linux*): New configuration.
10404 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10405 syscall arguments for SPARC.
10406 (regsets_store_inferior_registers): Likewise.
10407 * linux-sparc-low.c: New file.
10408
66b6e1dd
DE
104092008-10-21 Doug Evans <dje@google.com>
10410
10411 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10412 (READLINE_DIR,READLINE_DEP): Delete.
10413 (INTERNAL_CFLAGS): Update.
10414 (LINTFLAGS): Update.
10415
9b710a42
PA
104162008-10-10 Pedro Alves <pedro@codesourcery.com>
10417
10418 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10419 whole argv from the last run, not just argv[0].
10420
5822d809
PA
104212008-09-08 Pedro Alves <pedro@codesourcery.com>
10422
10423 * regcache.c (new_register_cache): Return NULL if the register
10424 cache size isn't known yet.
10425 (free_register_cache): Avoid dereferencing a NULL regcache.
10426
74aac56f
DJ
104272008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10428
10429 * configure.srv: Merge MIPS and MIPS64.
10430
400b20f5
MR
104312008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10432
10433 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10434
677c5bb1
LM
104352008-08-18 Luis Machado <luisgpm@br.ibm.com>
10436
10437 * Makefile.in: Add required vsx dependencies.
10438
10439 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10440 Declare init_registers_powerpc_vsx32l.
10441 Declare init_registers_powerpc_vsx64l.
10442 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10443 (ppc_arch_setup): Check for VSX in hwcap.
10444 (ppc_fill_vsxregset): New function.
10445 (ppc_store_vsxregset): New function.
10446 Add new VSX entry in regset_info target_regsets.
10447
10448 * configure.srv: Add new VSX dependencies.
10449
a6f3e723
SL
104502008-08-12 Pedro Alves <pedro@codesourcery.com>
10451
10452 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10453 (remote_open): Set or clear transport_is_reliable.
10454 (putpkt_binary): Don't expect acks in noack mode.
10455 (getpkt): Don't send ack/nac in noack mode.
10456 * server.c (handle_general_set): Handle QStartNoAckMode.
10457 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10458 qSupported.
10459 (main): Reset noack_mode on every connection.
10460 * server.h (noack_mode): Declare.
10461
a417dc56
RW
104622008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10463
10464 * Makefile.in (GDBREPLAY_OBS): New variable.
10465 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10466
3221518c
UW
104672008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10468 Daniel Jacobowitz <dan@codesourcery.com>
10469
10470 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10471 (usr_store_inferior_registers): Likewise.
10472 (regsets_store_inferior_registers): Likewise.
10473
ec56be1b
PA
104742008-07-31 Rolf Jansen <rj@surtec.com>
10475 Pedro Alves <pedro@codesourcery.com>
10476
10477 * configure.ac: Check for memmem declaration.
10478 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10479 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10480 (disable_packet_qfThreadInfo): Unconditionally compile.
10481 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10482 * configure, config.in: Regenerate.
10483
2fe5e3ff
DE
104842008-07-28 Doug Kwan <dougkwan@google.com>
10485
10486 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10487 (linux_write_memory): Remove declaration of errno.
10488
836acd6d
UW
104892008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10490
10491 * linux-low.c (handle_extended_wait): Do not use "status"
10492 variable uninitialized.
10493
aeba519e
PA
104942008-07-07 Pedro Alves <pedro@codesourcery.com>
10495
10496 * server.c (handle_v_attach): Inhibit reporting dll changes.
10497
db42f210
PA
104982008-06-27 Pedro Alves <pedro@codesourcery.com>
10499
10500 * remote-utils.c (prepare_resume_reply): If requested, don't
10501 output "thread:TID" in the T stop reply.
10502
10503 * server.c (disable_packet_vCont, disable_packet_Tthread)
10504 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10505 (handle_query): If requested, disable support for qC, qfThreadInfo
10506 and qsThreadInfo.
10507 (handle_v_requests): If requested, disable support for vCont.
10508 (gdbserver_show_disableable): New.
10509 (main): Handle --disable-packet and --disable-packet=LIST.
10510
10511 * server.h (disable_packet_vCont, disable_packet_Tthread)
10512 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10513
8e4c5421
CD
105142008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10515
10516 * server.c (gdbserver_usage): Mention --version.
10517
6e23a804
DJ
105182008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10519
10520 * Makefile.in (gdbreplay.o): New rule.
10521
90aa6a40
JM
105222008-06-06 Joseph Myers <joseph@codesourcery.com>
10523
10524 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10525 message, not gdbserver.
10526
c16158bc 105272008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
10528 Nathan Sidwell <nathan@codesourcery.com>
10529 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
10530
10531 * acinclude.m4: Include ../../config/acx.m4.
10532 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10533 * configure, config.in: Regenerate.
10534 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10535 * server.c (gdbserver_version): Print PKGVERSION.
10536 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10537 (main): Adjust gdbserver_usage calls.
10538 * gdbreplay.c (version, host_name): Add declarations.
10539 (gdbreplay_version, gdbreplay_usage): New.
10540 (main): Accept --version and --help options.
10541
aeb75bf5
DJ
105422008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10543
10544 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10545 (arm_breakpoint_at): Handle Thumb.
10546 (the_low_target): Add comment.
10547
76b233dd
UW
105482008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10549
10550 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10551
08388c79
DE
105522008-05-09 Doug Evans <dje@google.com>
10553
a3c83fae
DE
10554 * server.h (decode_search_memory_packet): Declare.
10555 * remote-utils.c (decode_search_memory_packet): New fn.
10556 * server.c (handle_search_memory_1): New fn.
08388c79
DE
10557 (handle_search_memory): New fn.
10558 (handle_query): Process qSearch:memory packets.
10559
bb9c3d36
UW
105602008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10561
10562 * regcache.c (registers_length): Remove.
10563 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10564 full register packet.
10565 * regcache.h (registers_length): Remove prototype.
10566 * server.h (PBUFSIZ): Define to 16384.
10567
7284e1be
UW
105682008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10569
10570 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10571 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10572 powerpc-64l.o, and powerpc-altivec64l.o.
10573 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10574 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10575 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10576 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10577 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10578 to srv_xmlfiles.
10579
10580 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10581 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10582 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10583 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10584 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10585 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10586 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10587 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10588 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10589 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10590 (clean): Update.
10591
10592 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10593 (init_registers_powerpc_32l): ... this new prototype.
10594 (init_registers_powerpc_32): Remove, replace by ...
10595 (init_registers_powerpc_altivec32l): ... this new prototype.
10596 (init_registers_powerpc_e500): Remove, replace by ...
10597 (init_registers_powerpc_e500l): ... this new prototype.
10598 (init_registers_ppc64): Remove, replace by ...
10599 (init_registers_powerpc_64l): ... this new prototype.
10600 (init_registers_powerpc_64): Remove, replace by ...
10601 (init_registers_powerpc_altivec64l): ... this new prototype.
10602 (ppc_num_regs): Set to 73.
10603 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10604 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10605 (ppc_cannot_store_register): Handle orig_r3 and trap.
10606 (ppc_arch_setup): Update init_registers_... calls.
10607 (ppc_fill_gregset): Handle orig_r3 and trap.
10608
10609 * inferiors.c (clear_inferiors): Reset current_inferior.
10610
fdc59709
PB
106112008-04-23 Paolo Bonzini <bonzini@gnu.org>
10612
889bf7c5
PA
10613 * acinclude.m4: Add override.m4.
10614 * configure: Regenerate.
fdc59709 10615
c9b2f845
UW
106162008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10617
10618 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10619 initial call to init_register_ppc64.
10620
550512b8
UW
106212008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10622
43aaf8b6
PA
10623 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10624 single powerpc*-*-linux* case.
550512b8
UW
10625 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10626
b6430ec3
UW
106272008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10628
10629 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 10630 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
10631 from reg_xmlfiles.
10632 * linux-ppc-low.c: Include <elf.h>.
10633 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10634 (ppc_hwcap): New global variable.
10635 (ppc_regmap): Remove __SPE__ #ifdef sections.
10636 (ppc_regmap_e500): New global variable.
10637 (ppc_cannot_store_register): Update __SPE__ special case.
10638 (ppc_get_hwcap): New function.
10639 (ppc_arch_setup): Use it to determine whether inferior supports
10640 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10641 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10642 Do not access registers if target does not support AltiVec.
10643 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10644 Do not access registers if target does not support SPE.
10645 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10646
52fa2412
UW
106472008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10648
10649 * linux-low.c (disabled_regsets, num_regsets): New.
10650 (use_regsets_p): Delete.
10651 (linux_wait_for_process): Clear disabled_regsets.
10652 (regsets_fetch_inferior_registers): Check and set it.
10653 (regsets_store_inferior_registers): Likewise.
10654 (linux_fetch_registers, linux_store_registers): Do not use
10655 use_regsets_p.
10656 (initialize_low): Allocate disabled_regsets.
10657
e28b3332
DJ
106582008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10659
10660 * Makefile.in (LIBOBJS): New.
10661 (OBS): Use LIBOBJS.
10662 (memmem.o): New rule.
10663 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10664 * configure: Regenerated.
10665
4536995d
UW
106662008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10667
10668 * server.c (handle_query): Never return "unsupported" for
10669 qXfer:features:read queries.
10670
221c031f
UW
106712008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10672
10673 * server.c (get_features_xml): Fix inverted condition.
10674 (handle_query): Always support qXfer:feature:read.
10675
ccd213ac
DJ
106762008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10677
10678 * server.c (wrapper_argv): New.
10679 (start_inferior): Handle wrapper_argv. If set, expect an extra
10680 trap.
10681 (gdbserver_usage): Document --wrapper.
10682 (main): Parse --wrapper.
10683
6fe305f7
UW
106842008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10685
10686 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10687 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10688 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10689 (ppc_set_pc): Likewise.
10690 (ppc_arch_setup): New function.
10691 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10692 of collect_register.
889bf7c5 10693 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 10694
5b0a002e
UW
106952008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10696
10697 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10698 instead of linux-ppc64-low.o.
10699 * linux-ppc64-low.c: Remove file.
10700 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10701 (linux-ppc64-low.o): Remove rule.
10702
10703 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10704 (init_registers_powerpc_64): Likewise.
10705 (ppc_regmap): Conditionally define depending on __powerpc64__.
10706 (ppc_cannot_store_register): Do not special-case "fpscr" when
10707 compiled on __powerpc64__.
10708 (ppc_collect_ptrace_register): New function.
10709 (ppc_supply_ptrace_register): New function.
10710 (ppc_breakpoint): Change type to "unsigned int".
10711 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10712 (the_low_target): Conditionally provide initializers for the
889bf7c5 10713 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
10714 collect_ptrace_register and supply_ptrace_register members.
10715
9b4b61c8
UW
107162008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10717
10718 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10719 * server.c (gdbserver_xmltarget): Define.
10720 (get_features_xml): Use it to replace "target.xml" and arch_string.
10721
10722 * configure.srv: Remove srv_xmltarget. Add XML files that were
10723 mentioned there to srv_xmlfiles instead. Remove conditional tests
10724 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10725 srv_xmlfiles and srv_regobj to include all possible choices.
10726 * configure.ac (srv_xmltarget): Remove.
10727 (srv_xmlfiles): Do not add "target.xml".
10728 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10729 checks for supplementary target information.
10730 * configure: Regenerate.
10731 * Makefile.in (XML_TARGET): Remove.
10732 (target.xml): Remove rule.
10733 (clean): Do not clean up target.xml.
10734 (.PRECIOUS): Do not mention target.xml.
10735
10736 * target.h (struct target_ops): Remove arch_string member.
10737 * linux-low.c (linux_arch_string): Remove.
10738 (linux_target_ops): Remove arch_string initializer.
10739 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10740 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10741 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10742 * spu-low.c (spu_arch_string): Remove.
10743 (spu_target_ops): Remove arch_string initializer.
10744 * win32-low.c (win32_arch_string): Remove.
10745 (win32_target_ops): Remove arch_string initializer.
10746 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10747 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10748 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10749
ee1a7ae4
UW
107502008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10751
10752 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10753 by collect_ptrace_register and supply_ptrace_register hooks.
10754 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10755 instead of checking for the_low_target.left_pad_xfer.
10756 (usr_store_inferior_registers): Use collect_ptrace_register callback
10757 instead of checking for the_low_target.left_pad_xfer.
10758
10759 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10760 (s390_supply_ptrace_register): Likewise.
10761 (s390_fill_gregset): Call s390_collect_ptrace_register.
10762 (the_low_target): Update.
10763
10764 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10765 (ppc_supply_ptrace_register): Likewise.
10766 (the_low_target): Update.
10767
10768 * linux-i386-low.c (the_low_target): Update.
10769 * linux-x86-64-low.c (the_low_target): Update.
10770
d61ddec4
UW
107712008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10772
10773 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10774 reg-s390.o and reg-s390x.o.
10775
10776 * linux-low.c (new_inferior): New global variable.
10777 (linux_create_inferior, linux_attach): Set it.
10778 (linux_wait_for_process): Call the_low_target.arch_setup after the
10779 target has stopped for the first time.
10780 (initialize_low): Do not call the_low_target.arch_setup.
10781
10782 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10783 (s390_set_pc): Likewise.
10784 (s390_arch_setup): New function.
10785 (the_low_target): Use s390_arch_setup as arch_setup routine.
10786
10787 * regcache.c (realloc_register_cache): New function.
10788 (set_register_cache): Call it for each existing regcache.
10789
d05b4ac3
UW
107902008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10791
10792 * server.h (init_registers): Remove prototype.
10793
10794 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10795 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10796 instead of init_registers ().
10797 * linux-arm-low.c (init_registers_arm): Add prototype.
10798 (init_registers_arm_with_iwmmxt): Likewise.
10799 (the_low_target): Add initializer for arch_setup field.
10800 * linux-cris-low.c (init_registers_cris): Add prototype.
10801 (the_low_target): Add initializer for arch_setup field.
10802 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10803 (the_low_target): Add initializer for arch_setup field.
10804 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10805 (the_low_target): Add initializer for arch_setup field.
10806 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10807 (the_low_target): Add initializer for arch_setup field.
10808 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10809 (the_low_target): Add initializer for arch_setup field.
10810 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10811 (the_low_target): Add initializer for arch_setup field.
10812 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10813 (init_registers_mips64_linux): Likewise.
10814 (the_low_target): Add initializer for arch_setup field.
10815 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10816 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10817 (the_low_target): Add initializer for arch_setup field.
10818 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10819 (init_registers_powerpc_64): Likewise.
10820 (the_low_target): Add initializer for arch_setup field.
10821 * linux-s390-low.c (init_registers_s390): Add prototype.
10822 (init_registers_s390x): Likewise.
10823 (the_low_target): Add initializer for arch_setup field.
10824 * linux-sh-low.c (init_registers_sh): Add prototype.
10825 (the_low_target): Add initializer for arch_setup field.
10826 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10827 (the_low_target): Add initializer for arch_setup field.
10828 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10829 (the_low_target): Add initializer for arch_setup field.
10830
10831 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10832 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10833 instead of init_registers ().
10834 * win32-arm-low.c (init_registers_arm): Add prototype.
10835 (the_low_target): Add initializer for arch_setup field.
10836 * win32-i386-low.c (init_registers_i386): Add prototype.
10837 (the_low_target): Add initializer for arch_setup field.
10838
10839 * spu-low.c (init_registers_spu): Add prototype.
10840 (initialize_low): Call initialie_registers_spu () instead of
10841 initialize_registers ().
10842
fd96d250
PA
108432008-02-19 Pedro Alves <pedro@codesourcery.com>
10844
10845 * server.c (handle_v_requests): When handling the vRun and vAttach
10846 packets, if already debugging a process, don't kill it. Return an
10847 error instead.
10848
d41b6bb4
DJ
108492008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10850
10851 * server.c (handle_query): Correct length check.
10852
5ac588cf
PA
108532008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10854
10855 * win32-low.c (do_initial_child_stuff): Add process handle
10856 parameter. Set current_process_handle and current_process_id from the
10857 parameters. Clear globals.
10858 (win32_create_inferior): Don't set current_process_handle and
10859 current_process_id here. Instead pass them on the call to
10860 do_initial_child_stuff.
10861 (win32_attach): Likewise.
10862 (win32_clear_inferiors): New.
10863 (win32_kill): Don't close the current process handle or the
10864 current thread handle here. Instead call win32_clear_inferiors.
10865 (win32_detach): Don't open a new handle to the process. Call
10866 win32_clear_inferiors.
10867 (win32_join): Don't rely on current_process_handle; open a new
10868 handle using the process id.
10869 (win32_wait): Call win32_clear_inferiors when the inferior process
10870 has exited.
10871
ecd7ecbc
DJ
108722008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10873
10874 * server.c (monitor_show_help): Add "exit".
10875
1525d545
MG
108762008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10877
ecd7ecbc 10878 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
10879 (clean): Add reg-xtensa.c.
10880 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
10881 * configure.srv (xtensa*-*-linux*) New target.
10882 * linux-xtensa-low.c: New.
10883 * xtensa-xtregs.c: New.
1525d545 10884
59a016f0
PA
108852008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10886
10887 * hostio.c: Don't include errno.h.
10888 (errno_to_fileio_errno): Move to hostio-errno.
10889 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10890 error number outputting to the target->hostio_last_error callback.
10891 (hostio_packet_error): Use FILEIO_EINVAL directly.
10892 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10893 calls to hostio_error.
10894 * hostio-errno.c: New.
10895 * server.h (hostio_last_error_from_errno): Declare.
10896 * target.h (target_ops): Add hostio_last_error member.
10897 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10898 as hostio_last_error handler.
889bf7c5 10899 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
10900 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10901 (wince_hostio_last_error): New functions.
10902 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10903 as hostio_last_error handler.
10904 (win32_target_ops) [!_WIN32_WCE]: Register
10905 hostio_last_error_from_errno as hostio_last_error handler.
10906 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10907 (hostio-errno.o): New rule.
10908 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10909 * configure.srv (srv_hostio_err_objs): New variable. Default to
10910 hostio-errno.o.
10911 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10912 * configure: Regenerate.
10913
2d717e4f
DJ
109142008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10915
10916 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10917 (linux_kill, linux_detach): Clean up the process list.
10918 * remote-utils.c (remote_open): Improve port number parsing.
10919 (putpkt_binary, input_interrupt): Only send interrupts if the target
10920 is running.
10921 * server.c (extended_protocol): Make static.
10922 (attached): Define earlier.
10923 (exit_requested, response_needed, program_argv): New variables.
10924 (target_running): New.
10925 (start_inferior): Clear attached here.
10926 (attach_inferior): Set attached here.
10927 (require_running): Define.
10928 (handle_query): Use require_running and target_running. Implement
10929 "monitor exit".
10930 (handle_v_attach, handle_v_run): New.
10931 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10932 (gdbserver_usage): Update.
10933 (main): Redo argument parsing. Handle --debug and --multi. Handle
10934 --attach along with other options or after the port. Save
10935 program_argv. Support no initial program. Resynchronize
10936 communication with GDB after an error. Handle "monitor exit".
10937 Use require_running and target_running. Always allow the extended
10938 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10939 restart in extended mode.
10940 * README: Refer to the GDB manual. Update --attach usage.
10941
7407e2de
AS
109422007-12-20 Andreas Schwab <schwab@suse.de>
10943
10944 * linux-low.c (STACK_SIZE): Define.
10945 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10946 (linux_test_for_tracefork): Likewise.
10947
b65d95c5
DJ
109482007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10949
10950 * linux-low.c (linux_wait_for_event): Update messages. Do not
10951 reinsert auto-delete breakpoints.
10952 * mem-break.c (struct breakpoint): Change return type of handler to
10953 int.
10954 (set_breakpoint_at): Update handler type.
10955 (reinsert_breakpoint_handler): Return 1 instead of calling
10956 delete_breakpoint.
10957 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10958 setting a new one.
10959 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10960 * mem-break.h (set_breakpoint_at): Update handler type.
10961 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10962 * win32-low.c (auto_delete_breakpoint): New.
10963 (get_child_debug_event): Use it.
10964
4e799345
DJ
109652007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10966
10967 * configure.ac: Check for pread and pwrite.
10968 * hostio.c (handle_pread): Fall back to lseek and read.
10969 (handle_pwrite): Fall back to lseek and write.
10970 * config.in, configure: Regenerated.
10971
27524b67
DJ
109722007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10973
10974 * server.c (myresume): Add own_buf argument.
10975 (main): Update calls.
10976
a20d5e98
DJ
109772007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10978
10979 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10980 * remote-utils.c (remote_open): Do not call disable_async_io.
10981 (block_async_io): Delete.
10982 (unblock_async_io): Make static.
10983 (initialize_async_io): New.
10984 * server.c (handle_v_cont): Handle async I/O here.
10985 (myresume): Likewise. Move other common resume tasks here...
10986 (main): ... from here. Call initialize_async_io. Disable async
10987 I/O before the main loop.
10988 * server.h (initialize_async_io): Declare.
10989 (block_async_io, unblock_async_io): Delete prototypes.
10990 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10991
b79d787e
DJ
109922007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10993
10994 * remote-utils.c (readchar): Allow binary data in received messages.
10995
d97903b2
PA
109962007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10997
10998 * win32-low.c (attaching): New global.
10999 (win32_create_inferior): Clear the `attaching' global.
11000 (win32_attach): Set the `attaching' global.
11001 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11002 attaching. Only set a breakpoint at the entry point if not
11003 attaching.
11004
311de423
PA
110052007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11006
11007 * server.c (main): Don't report dll events on the initial
11008 connection on attaches.
11009
6c2d16d2
PA
110102007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11011
11012 * server.c (main): Relax numerical bases supported for the pid of
11013 the --attach command line argument.
11014
5ca906e6
PA
110152007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11016
11017 * win32-low.c (win32_attach): Call OpenProcess before
11018 DebugActiveProcess, not after. Add last error output to error
11019 call.
11020
9c6c8194
PA
110212007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
11022
11023 * win32-low.c (win32_get_thread_context)
11024 (win32_set_thread_context): New functions.
11025 (thread_rec): Use win32_get_thread_context.
11026 (continue_one_thread, win32_resume): Use win32_set_thread_context.
11027 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11028 field.
11029
4d5d1aaa
PA
110302007-12-03 Leo Zayas
11031 Pedro Alves <pedro_alves@portugalmail.pt>
11032
11033 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11034 global variables.
11035 (child_add_thread): Minor cleanup.
11036 (child_continue): Resume artificially suspended threads before
11037 calling ContinueDebugEvent.
11038 (suspend_one_thread): New.
11039 (fake_breakpoint_event): New.
11040 (get_child_debug_event): Change return type to int. Check here if
11041 gdb sent an interrupt request. If a soft interrupt was requested,
11042 fake a breakpoint event. Return 0 if there is no event to handle,
11043 and 1 otherwise.
11044 (win32_wait): Don't check here if gdb sent an interrupt request.
11045 Ensure there is a valid event to handle.
11046 (win32_request_interrupt): Add soft interruption method as last
11047 resort.
11048
c436e841
PA
110492007-12-03 Leo Zayas
11050 Pedro Alves <pedro_alves@portugalmail.pt>
11051
11052 * win32-low.h (win32_thread_info): Add descriptions to the
11053 structure members. Replace `suspend_count' counter by a
11054 `suspended' flag.
11055 * win32-low.c (thread_rec): Update condition of when to get the
11056 context from the inferior. Rely on ContextFlags being set if it
11057 has already been retrieved. Only suspend the inferior thread if
11058 we haven't already. Warn if that fails.
11059 (continue_one_thread): s/suspend_count/suspended/. Only call
11060 ResumeThread once. Warn if that fails.
11061
e7b5fa67
PA
110622007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11063
11064 * win32-low.c (win32_wait): Don't read from the inferior when it
11065 has already exited.
11066
a385171d
PA
110672007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
11068
11069 * Makefile.in (win32_low_h): New variable.
11070 (win32-low.o): Add dependency on $(win32_low_h).
11071 (win32-arm-low.o, win32-i386-low.o): New rules.
11072
f80c84b3
DJ
110732007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11074
11075 * hostio.c: Correct copyright year.
11076
a6b151f1
DJ
110772007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
11078
11079 * Makefile.in (OBS): Add hostio.o.
11080 (hostio.o): New rule.
11081 * server.h (handle_vFile): Declare.
11082 * hostio.c: New file.
11083 * server.c (handle_v_requests): Take packet_len and new_packet_len
11084 for binary packets. Call handle_vFile.
11085 (main): Update call to handle_v_requests.
11086
f9387fc3
DJ
110872007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
11088
11089 * linux-low.c: Include <sched.h>.
11090
51c2684e
DJ
110912007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
11092
11093 * linux-low.c (linux_tracefork_grandchild): New.
11094 (linux_tracefork_child): Use clone.
11095 (linux_test_for_tracefork): Use clone; allocate and free a stack.
11096
75f83163
JB
110972007-10-31 Joel Brobecker <brobecker@adacore.com>
11098
11099 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11100
da5898ce
DJ
111012007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
11102
11103 * linux-low.c (handle_extended_wait): Handle unexpected signals.
11104
24a09b5f
DJ
111052007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
11106
11107 * inferiors.c (change_inferior_id): Delete.
11108 (add_pid_to_list, pull_pid_from_list): New.
11109 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11110 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11111 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11112 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11113 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11114 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11115 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11116 (using_threads): Always set to 1.
11117 (handle_extended_wait): New.
11118 (add_process): Do not set TID.
11119 (linux_create_inferior): Set must_set_ptrace_flags.
11120 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
11121 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
11122 (linux_thread_alive): Rename TID argument to LWPID.
11123 (linux_wait_for_process): Handle unknown processes. Do not use TID.
11124 (linux_wait_for_event): Do not use TID or check using_threads. Update
11125 call to dead_thread_notify. Call handle_extended_wait.
11126 (linux_create_inferior): Use PTRACE_SETOPTIONS.
11127 (send_sigstop): Delete sigstop_sent.
11128 (wait_for_sigstop): Avoid TID.
11129 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11130 (linux_test_for_tracefork): New.
11131 (linux_lookup_signals): Use thread_db_active and
11132 linux_supports_tracefork_flag.
11133 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11134 * linux-low.h (get_process_thread): Avoid TID.
11135 (struct process_ifo): Move thread_known and tid to the end. Remove
11136 sigstop_sent.
11137 (linux_attach_lwp, thread_db_init): Update prototypes.
11138 * server.h (change_inferior_id): Delete prototype.
11139 (add_pid_to_list, pull_pid_from_list): New prototypes.
11140 * thread-db.c (thread_db_use_events): New.
11141 (find_first_thread): Rename to...
11142 (find_one_thread): ...this. Update callers and messages. Do not
11143 call fatal. Check thread_db_use_events. Do not call
11144 change_inferior_id or new_thread_notify.
11145 (maybe_attach_thread): Update. Do not call new_thread_notify.
11146 (thread_db_init): Set thread_db_use_events. Check use_events.
11147 * utils.c (fatal, warning): Correct message prefix.
11148
30ed0a8f
DJ
111492007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11150
11151 * Makefile.in (clean): Remove new files.
11152 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11153 (powerpc-64.o, powerpc-64.c): New rules.
11154 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11155 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11156 with SPE.
11157 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11158 SPE targets.
11159 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11160 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11161 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11162 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11163 (target_regsets): Add AltiVec and SPE register sets.
11164 * configure.ac: Check for AltiVec and SPE.
11165 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11166 (ppc_fill_vrregset, ppc_store_vrregset): New.
11167 (target_regsets): Add AltiVec register set.
11168 * configure: Regenerated.
11169
fd462a61
DJ
111702007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11171
11172 * linux-low.c (O_LARGEFILE): Define.
11173 (linux_read_memory): Use /proc/PID/mem.
11174 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11175 * configure, config.in: Regenerated.
11176
69f223ed
DJ
111772007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11178
11179 * linux-low.c (linux_wait_for_event): Do not pass signals while
11180 single-stepping.
11181
aec18585
PA
111822007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11183
11184 * win32-low.c (create_process): New.
11185 (win32_create_inferior): Use create_process instead of
11186 CreateProcess. If create_process failed retry appending an ".exe"
11187 suffix. Store the GetLastError result immediatelly after
11188 create_process calls and use it on the call to error.
11189
34d86ddd
PA
111902007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11191
11192 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11193
5a0e3bd0
JB
111942007-08-23 Joel Brobecker <brobecker@adacore.com>
11195
11196 * configure.ac: Switch license to GPLv3.
11197
f88c79e6
MS
111982007-08-01 Michael Snyder <msnyder@access-company.com>
11199
11200 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11201
6b3d9b83
PA
112022007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11203
11204 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11205 typedef.
11206 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11207 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11208 CloseToolhelp32Snapshot.
11209 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11210 CloseToolhelp32Snapshot.
11211
c588c53c
MS
112122007-07-27 Michael Snyder <michael.snyder@access-company.com>
11213
11214 * server.c (main): Check for inferior exit before main loop.
11215
aa0403d9
PA
112162007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11217
11218 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11219 instead of on tmp_desc.
11220
255e7678
DJ
112212007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11222 Daniel Jacobowitz <dan@codesourcery.com>
11223
11224 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11225 (add_thread): Minor cleanups.
11226 (clear_inferiors): Move lower in the file. Clear the DLL
11227 list.
11228 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11229 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11230 (xml_escape_text): New.
11231 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11232 for qSupported.
11233 (handle_v_cont): Report errors.
11234 (gdbserver_version): Update.
11235 (main): Correct size of own_buf. Do not report initial DLL events.
11236 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11237 (unloaded_dll, xml_escape_text): New.
11238 * win32-low.c (enum target_waitkind): Update comments.
11239 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11240 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11241 (win32_EnumProcessModules, win32_GetModuleInformation)
11242 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11243 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11244 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11245 (win32_Module32First, win32_Module32Next, load_toolhelp)
11246 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11247 (get_child_debug_event): Handle DLL events.
11248 (win32_wait): Likewise.
11249
0d37add9
DJ
112502007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11251
11252 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11253 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11254
45e2715e
PA
112552007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11256
11257 * win32-low.c (handle_output_debug_string): Ignore event if not
11258 waiting.
11259
c5674cf1
PA
112602007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11261
11262 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11263
2bbe3cc1
DJ
112642007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11265
11266 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11267
ae13219e
DJ
112682007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11269
11270 * inferiors.c (change_inferior_id): Add comment.
11271 * linux-low.c (check_removed_breakpoint): Add an early
11272 prototype. Improve debug output.
11273 (linux_attach): Doc update.
11274 (linux_detach_one_process, linux_detach): Clean up before releasing
11275 each process.
11276 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11277 * linux-low.h (struct process_info): Doc improvement.
11278 * mem-break.c (delete_all_breakpoints): New.
11279 * mem-break.h (delete_all_breakpoints): New prototype.
11280 * thread-db.c (find_first_thread): New.
11281 (thread_db_create_event): Call it instead of
11282 thread_db_find_new_threads. Clean up unused variables.
11283 (maybe_attach_thread): Remove first thread handling.
11284 (thread_db_find_new_threads): Use find_first_thread.
11285 (thread_db_get_tls_address): Likewise.
11286
4105de34
DJ
112872007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11288
11289 * thread-db.c (thread_db_find_new_threads): Add prototype.
11290 (thread_db_create_event): Check for the main thread before adding
11291 a new thread.
11292 (maybe_attach_thread): Only enable event reporting if TID == 0.
11293 (thread_db_get_tls_address): Check for new threads.
11294
2b876972
DJ
112952007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11296
11297 * linux-low.c (linux_create_inferior): Try execv before execvp.
11298 * spu-low.c (spu_create_inferior): Likewise.
11299
7a245884
DJ
113002007-06-13 Mike Frysinger <vapier@gentoo.org>
11301
11302 * linux-low.c (linux_create_inferior): Change execv to execvp.
11303 * spu-low.c (spu_create_inferior): Likewies.
11304
117ce543
DJ
113052007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11306
11307 * Makefile.in (clean): Clean new files instead of deleted ones.
11308 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11309 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11310 rules.
11311 * configure.srv: Specify XML files and new regformats for MIPS and
11312 MIPS64 GNU/Linux.
11313 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11314 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11315 an entry for the restart register.
11316 (mips_cannot_fetch_register, mips_cannot_store_register)
11317 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11318 register names to match the XML descriptions.
11319 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11320 restart register instead of $0.
11321
0e7f50da
UW
113222007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11323 Markus Deuling <deuling@de.ibm.com>
11324
11325 * remote-utils.c (decode_xfer_write): New function.
11326 * server.h (decode_xfer_write): Add prototype.
11327 * server.c (handle_query): Add PACKET_LEN argument. Support
11328 qXfer:spu:read and qXfer:spu:write packets.
11329 (main): Pass packet_len to handle_query.
11330 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11331 * target.h (target_ops): Add qxfer_spu.
11332
374c1d38
UW
113332007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11334
11335 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11336 accessing non-seekable spufs files.
11337
bb63802a
UW
113382007-05-16 Markus Deuling <deuling@de.ibm.com>
11339
889bf7c5 11340 * server.c (handle_query): Add reply for qC packet.
bb63802a 11341
7390519e
PA
113422007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11343 Leo Zayas <lerele@champenstudios@com>
11344
11345 * server.h (check_remote_input_interrupt_request): New function.
11346 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11347 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11348 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11349 (check_remote_input_interrupt_request): New function.
11350 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 11351 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
11352 winapi_GenerateConsoleCtrlEvent): New typedefs.
11353 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11354 to 250 ms.
11355 (win32_wait): Check for remote interrupt request
11356 with check_remote_input_interrupt_request.
11357 (win32_request_interrupt): New function.
11358 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11359
34b34921
PA
113602007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11361
11362 * win32-low.c (debug_registers_changed,
11363 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11364 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11365 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11366 (thread_rec): Get context using the low target.
11367 (child_add_thread): Call thread_added on the low target,
11368 which does the same thing.
11369 (regptr): Delete.
11370 (do_initial_child_stuff): Remove debug registers references.
11371 Set context using the low target. Resume threads after
11372 setting the contexts.
11373 (child_continue): Remove dead variable. Remove debug
11374 registers references.
11375 (child_fetch_inferior_registers): Go through the low target.
11376 (do_child_store_inferior_registers): Remove.
11377 (child_store_inferior_registers): Go through the low target.
11378 (win32_resume): Remove debug registers references.
11379 Set context using the low target.
11380 (handle_exception): Change return type to void. Don't record
11381 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11382 first chance exception.
889bf7c5 11383 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
11384 goto loop. Always return after waiting for debug event.
11385 (win32_wait): Convert to switch statement. Handle spurious
11386 events.
11387
11388 * win32-i386-low.c (debug_registers_changed,
11389 debug_registers_used): New.
11390 (initial_stuff): Rename to ...
11391 (i386_initial_stuff): ... this. Clear debug registers
11392 state variables.
11393 (store_debug_registers): Delete.
11394 (i386_get_thread_context): New.
11395 (load_debug_registers): Delete.
11396 (i386_set_thread_context): New.
11397 (i386_thread_added): New.
11398 (single_step): Rename to ...
11399 (i386_single_step): ... this.
11400 (do_fetch_inferior_registers): Rename to ...
11401 (i386_fetch_inferior_register): ... this.
11402 (i386_store_inferior_register): New.
11403 (the_low_target): Adapt to new interface.
11404
11405 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11406 (arm_get_thread_context): New.
11407 (arm_set_thread_context): New.
11408 (regptr): New.
11409 (do_fetch_inferior_registers): Rename to ...
11410 (arm_fetch_inferior_register): ... this.
11411 (arm_store_inferior_register): New.
11412 (arm_wince_breakpoint): Reimplement as unsigned long.
11413 (arm_wince_breakpoint_len): Define.
11414 (the_low_target): Adapt to new interface.
11415
11416 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11417 load_debug_registers. Add get_thread_context, set_thread_context,
11418 thread_added and store_inferior_register. Rename
11419 fetch_inferior_registers to fetch_inferior_register.
11420 (regptr): Remove declaration.
11421
dd6953e1
PA
114222007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11423
11424 * linux-low.c (linux_detach): Change return type to int. Return 0.
11425 * spu-low.c (spu_detach): Likewise.
11426
444d6139
PA
114272007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11428
11429 * target.h (target_ops): Change return type of detach to int.
11430 Add join.
11431 (join_inferior): New.
11432 * server.c (main): Don't skip detach support on mingw32.
11433 If the inferior doesn't support detaching return error.
11434 Call join_inferior instead of using waitpid.
11435 * linux-low.c (linux_join): New.
11436 (linux_target_op): Add linux_join.
11437 * spu-low.c (spu_join): New.
11438 (spu_target_ops): Add spu_join.
11439 * win32-low.c (win32_detach): Adapt to new interface.
11440 Reopen current_process_handle before detaching. Issue a child
11441 resume before detaching.
11442 (win32_join): New.
11443 (win32_target_op): Add win32_join.
11444
1d5315fe
PA
114452007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11446
11447 * win32-low.c (win32-attach): Fix return value.
11448 * target.h (target_ops): Describe ATTACH return values.
11449
bf914831
PA
114502007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11451
11452 * win32-low.c (GETPROCADDRESS): Define.
11453 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11454 (winapi_DebugSetProcessKillOnExit): Likewise.
11455 (win32_create_inferior): Force usage of ansi CreateProcessA.
11456 (win32_attach): Use GETPROCADDRESS.
11457 (win32_detach): Likewise.
11458
f72f3e60
PA
114592007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11460
11461 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11462
ed50f18f
PA
114632007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11464
11465 * win32-low.c: Commit leftover changes from 2007-03-29.
11466
0c2ead7e
DJ
114672007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11468
11469 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11470 fields short instead of int. Add explicit padding.
11471 (i387_cache_to_fsave): Remove unnecessary casts.
11472 (i387_fsave_to_cache): Doc fix.
11473 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11474
73725ff3
DJ
114752007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11476
11477 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11478 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11479
d99f33d8
PA
114802007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11481
11482 * configure.srv (arm*-*-mingw32ce*): Move near the other
11483 arm targets.
11484
68070c10
PA
114852007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11486
2482afc6 11487 * configure.ac: Add errno checking.
68070c10
PA
11488 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11489 sys/file.h and malloc.h.
11490 (AC_CHECK_DECLS): Add perror.
11491 (srv_mingwce): Handle.
2482afc6 11492 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
11493 win32-i386-low.o to srv_tgtobj.
11494 (i[34567]86-*-mingw*): Likewise.
11495 (arm*-*-mingw32ce*): Add case.
11496 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11497 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11498 [__MINGW32CE__] (strerror): New function.
11499 [__MINGW32CE__] (errno): Define to GetLastError.
11500 [__MINGW32CE__] (COUNTOF): New macro.
11501 (remote_open): Remove extra close call.
11502 * mem-break.c (delete_breakpoint_at): New function.
11503 * mem-break.h (delete_breakpoint_at): Declare.
11504 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11505 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11506 [USE_WIN32API] (read, write): Add char* casts.
11507 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11508 * server.h: Include wincecompat.h on Windows CE.
11509 [HAVE_ERRNO_H]: Check.
11510 (perror): Declare if not declared.
11511 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11512 (perror_with_name): Remove errno declaration.
11513 * wincecompat.h: New.
11514 * wincecompat.c: New.
11515 * win32-low.h: New.
11516 * win32-arm-low.c: New.
11517 * win32-i386-low.c: New.
11518 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11519 (OUTMSG2): Make it safe.
11520 (_T): New macro.
11521 (COUNTOF): New macro.
11522 (NUM_REGS): Get it from the low target.
11523 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11524 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11525 (thread_rec): Let low target handle debug registers.
11526 (child_add_thread): Likewise.
11527 (child_init_thread_list): Likewise.
11528 (continue_one_thread): Likewise.
11529 (regptr): New.
11530 (do_child_fetch_inferior_registers): Move to ...
11531 * win32-i386-low.c: ... here, and rename to ...
11532 (do_fetch_inferior_registers): ... this.
889bf7c5 11533 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
11534 Go through the low target.
11535 (do_child_store_inferior_registers): Use regptr.
11536 (strwinerror): New function.
11537 (win32_create_inferior): Handle Windows CE.
11538 Use strwinerror instead of strerror on Windows error
11539 codes. Add program to the error output.
11540 Don't close the main thread handle on Windows CE.
11541 (win32_attach): Use coredll.dll on Windows CE.
11542 (win32_kill): Close current process and current
11543 thread handles.
11544 (win32_detach): Use coredll.dll on Windows CE.
11545 (win32_resume): Let low target handle debug registers, and
11546 step request.
11547 (handle_exception): Add/Remove initial breakpoint. Avoid
11548 non-existant WSTOPSIG on Windows CE.
11549 (win32_read_inferior_memory): Cast to remove warning.
11550 (win32_arch_string): Go through the low target.
11551 (initialize_low): Call set_breakpoint_data with the low
11552 target's breakpoint.
11553 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11554 FOP_REGNUM, mappings): Move to ...
11555 * win32-i386-low.c: ... here.
11556 * win32-low.c (win32_thread_info): Move to ...
11557 * win32-low.h: ... here.
11558 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11559 win32-arm-low.c and wincecompat.c.
11560 (all:): Add $EXEEXT.
11561 (install-only:): Likewise.
11562 (gdbserver:): Likewise.
11563 (gdbreplay:): Likewise.
11564 * config.in: Regenerate.
11565 * configure: Regenerate.
11566
41093d81
PA
115672007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11568
11569 * win32-low.c: Rename typedef thread_info to
11570 win32_thread_info throughout.
11571
544afa54
PA
115722007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11573
11574 * win32-i386-low.c: Rename to ...
11575 * win32-low.c: ... this.
11576 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11577 * Makefile.in: Likewise.
11578
bce7165d
PA
115792007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11580
11581 * remote-utils.c (monitor_output): Constify msg parameter.
11582 * server.h (monitor_output): Likewise.
11583 * win32-i386-low.c (handle_output_debug_string): New.
11584 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11585 handle_output_debug_string.
11586 (get_child_debug_event): Likewise.
11587
506c7aa0
DJ
115882007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11589
11590 * server.c (main): Correct strtoul check.
11591
42c81e2a
DJ
115922007-03-27 Jon Ringle <jon@ringle.org>
11593
11594 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11595
9453113a
DJ
115962007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11597
11598 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11599
64a69107
DJ
116002007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11601
11602 * terminal.h: Check HAVE_SGTTY_H.
11603
116042007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
11605
11606 * remote-utils.c (remote_open): Print out the assigned port number.
11607
c74d0ad8
DJ
116082007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11609
11610 * remote-utils.c (monitor_output): New function.
11611 * server.c (debug_threads): Define here.
11612 (monitor_show_help): New function.
11613 (handle_query): Handle qRcmd.
11614 (main): Do not handle 'd' packet.
11615 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11616 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11617 of debug_threads.
11618
de7c3b4a
PA
116192007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11620
11621 * Makefile.in (EXEEXT): New.
11622 (clean): Use $(EXEEXT).
11623
ef57601b
PA
116242007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11625
11626 * target.h (target_ops): Rename send_signal to request_interrupt,
11627 and remove enum target_signal parameter.
11628 * linux-low.c (linux_request_interrupt): Rename from
11629 linux_send_signal, and always send SIGINT.
11630 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11631 and always send SIGINT.
11632 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11633 of send_signal.
11634 (input_interrupt): Likewise.
11635
820f2bda
PA
116362007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11637
11638 * server.c (get_features_xml): Check if target implemented
11639 arch_string.
11640 * win32-i386-low.c (win32_arch_string): New.
11641 (win32_target_ops): Add win32_arch_string as arch_string member.
11642
ab39bf24
UW
116432007-02-22 Markus Deuling <deuling@de.ibm.com>
11644
11645 * spu-low.c (spu_arch_string): New.
11646 (spu_target_ops): Add spu_arch_string.
11647
61ff6e04
DJ
116482007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11649
11650 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11651 * configure.ac: Do not check for terminal.h.
11652 * configure, config.in: Regenerated.
11653
fb1e4ffc
DJ
116542007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11655
11656 * Makefile.in (OBS): Add $(XML_BUILTIN).
11657 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11658 (clean): Update.
11659 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11660 (arm-with-iwmmxt.c): New.
11661 * config.in, configure: Regenerate.
11662 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11663 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11664 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11665 (arm*-*-linux*): Add iWMMXt and regset support.
11666 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11667 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11668 (arm_store_wmmxregset, target_regsets): New.
11669 * server.c (get_features_xml): Take annex argument. Check builtin
11670 XML documents.
11671 (handle_query): Handle multiple annexes.
11672
0f48aa01
DJ
116732007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11674
11675 * remote-utils.c [USE_WIN32API] (read, write): Define.
11676 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11677 write.
11678
23181151
DJ
116792007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11680
11681 * linux-i386-low.c (the_low_target): Set arch_string.
11682 * linux-x86-64-low.c (the_low_target): Likewise.
11683 * linux-low.c (linux_arch_string): New.
11684 (linux_target_ops): Add it.
11685 * linux-low.h (struct linux_target_ops): Add arch_string.
11686 * server.c (write_qxfer_response): Use const void * for DATA.
11687 (get_features_xml): New.
11688 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11689 * target.h (struct target_ops): Add arch_string method.
11690
9d606399
DJ
116912007-01-03 Denis Pilat <denis.pilat@st.com>
11692 Daniel Jacobowitz <dan@codesourcery.com>
11693
11694 * linux-low.c (linux_kill): Handle being called with no threads.
11695 * win32-i386-low.c (win32_kill): Likewise.
11696 (get_child_debug_event): Clear current_process_handle.
11697
116982006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
11699 Daniel Jacobowitz <dan@codesourcery.com>
11700
11701 * remote-utils.c (remote_open): Check the type of specified
11702 serial port devices before opening them.
11703 * server.c (main): Kill the inferior if an error occurs during
11704 the first remote_open.
11705
a5e13d24
DJ
117062006-12-05 Markus Deuling <deuling@de.ibm.com>
11707
11708 * README: Update supported targets.
11709
186947f7
DJ
117102006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11711
11712 * Makefile.in (clean): Remove reg-mips64.c.
11713 (reg-mips64.c, reg-mips64.o): New rules.
11714 * configure.srv: Handle mips64. Include regset support for mips.
11715 * linux-mips-low.c (union mips_register): New.
11716 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11717 (mips_breakpoint, mips_breakpoint_at): Use int.
11718 (mips_collect_register, mips_supply_register)
11719 (mips_collect_register_32bit, mips_supply_register_32bit)
11720 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11721 (mips_store_fpregset, target_regsets): New.
11722 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11723
a13e2c95
UW
117242006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11725
11726 * configure.srv: Add target "spu*-*-*".
11727 * Makefile.in (clean): Remove reg-spu.c.
11728 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11729 * spu-low.c: New file.
11730
cb7283db
DJ
117312006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11732
11733 * configure.ac: Correct td_thr_tls_get_addr test.
11734 * configure: Regenerated.
11735
89be2091
DJ
117362006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11737
11738 * linux-low.c (linux_wait_for_event): Reformat. Use the
11739 pass_signals array.
11740 * remote-utils.c (decode_address_to_semicolon): New.
11741 * server.c (pass_signals, handle_general_set): New.
11742 (handle_query): Mention QPassSignals for qSupported.
11743 (main): Call handle_general_set.
11744 * server.h (pass_signals, decode_address_to_semicolon): New.
11745
000ef4f0
DJ
117462006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11747
11748 * server.c (handle_query): Correct error handling for read_auxv.
11749
b7149293
UW
117502005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11751
11752 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11753 and srv_linux_thread_db to yes.
11754 * linux-s390-low.c (s390_fill_gregset): New function.
11755 (target_regsets): Define data structure.
11756
dae5f5cf
DJ
117572006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11758
11759 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11760 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11761 * config.in, configure: Regenerated.
11762 * inferiors.c (gdb_id_to_thread): New function.
11763 (gdb_id_to_thread_id): Use it.
11764 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11765 * linux-low.h (struct process_info): Add th member.
11766 (thread_db_get_tls_address): New prototype.
11767 * remote-utils.c (decode_address): Make non-static.
11768 * server.c (handle_query): Handle qGetTLSAddr.
11769 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11770 * target.h (struct target_ops): Add get_tls_address.
11771 * thread-db.c (maybe_attach_thread): Save the thread handle.
11772 (thread_db_get_tls_address): New.
11773
32ca6d61
DJ
117742006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11775
11776 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11777 (linux_resume_one_process): Take a siginfo_t *. Update all
11778 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11779 (struct pending_signals): Add a siginfo_t.
11780 (linux_wait_for_process): Always set last_status.
11781 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11782 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11783 * linux-low.h (struct process_info): Add last_status.
11784
5ffff7c1
DJ
117852006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11786
11787 * remote-utils.c (try_rle): New function.
11788 (putpkt_binary): Use it.
11789
8695c747
DJ
117902006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11791
11792 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11793 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11794 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11795 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11796 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11797 point registers.
11798
290fadea
RS
117992006-08-08 Richard Sandiford <richard@codesourcery.com>
11800
11801 * server.c (terminal_fd): New variable.
11802 (old_foreground_pgrp): Likewise.
11803 (restore_old_foreground_pgrp): New function.
11804 (start_inferior): Record the terminal file descriptor in terminal_fd
11805 and its original foreground group in old_foreground_pgrp. Register
11806 restore_old_foreground_pgrp with atexit().
11807
9f2e1e63
DJ
118082006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11809
11810 * server.c (handle_query): Correct qPart to qXfer.
11811
b80864fb
DJ
118122006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11813
11814 * configure.ac: Check for more headers which are missing on
11815 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11816 * configure.srv: Add Cygwin and mingw32.
11817 * remote-utils.c: Don't include headers unconditionally which
11818 are missing on mingw32. Include <winsock.h> for mingw32.
11819 (remote_open): Adjust for mingw32 support. Flush
11820 standard error after writing to it.
11821 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11822 (unblock_async_io, enable_async_io, disable_async_io)
11823 (readchar, getpkt): Update for Winsock support.
11824 (prepare_resume_reply): Expect a protocol signal number.
11825 * server.c: Disable <sys/wait.h> on mingw32.
11826 (start_inferior): Adjust for mingw32 support. Flush
11827 standard error after writing to it.
11828 (attach_inferior): Likewise. Use protocol signal
11829 numbers.
11830 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11831 and names.
11832 * win32-i386-low.c: New file.
11833 * Makefile.in (XM_CLIBS): Set.
11834 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11835 (win32-i386-low.o): New dependency rule.
11836 * linux-low.c (linux_wait): Use target signal numbers.
11837 * target.h (struct target_ops): Doc fix.
11838 * server.h (target_signal_to_name): New prototype.
11839 * gdbreplay.c: Don't include headers unconditionally which
11840 are missing on mingw32. Include <winsock.h> for mingw32.
11841 (remote_close, remote_open): Adjust for Winsock support.
11842 * configure, config.in: Regenerated.
11843
0876f84a
DJ
118442006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11845
11846 * server.c (decode_xfer_read, write_qxfer_response): New.
11847 (handle_query): Take a packet length argument. Handle
11848 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11849 the qSupported response.
11850 (main): Update call to handle_query.
11851
01f9e8fa
DJ
118522006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11853
11854 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11855 (putpkt_binary): Renamed from putpkt and adjusted for binary
11856 data.
11857 (putpkt): New wrapper for putpkt_binary.
11858 (readchar): Don't mask off the high bit.
11859 (decode_X_packet): New function.
11860 * server.c (main): Call putpkt_binary if a handler sets the packet
11861 length. Save the length of the incoming packet. Handle 'X'.
11862 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11863
be2a5f71
DJ
118642006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11865
11866 * server.c (handle_query): Handle qSupported.
11867
ea025f5f
DJ
118682006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11869
11870 * remote-utils.c (all_symbols_looked_up): New variable.
11871 (look_up_one_symbol): Check it.
11872 * server.h (look_up_one_symbol): New declaration.
11873 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11874
9308fc88
DJ
118752006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11876
11877 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 11878 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
11879 (PTRACE_GET_THREAD_AREA): Define.
11880 (ps_get_thread_area): New function.
11881
52fb6437
NS
118822006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11883
11884 * configure.srv (m68k*-*-uclinux*): New target.
11885 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11886 (linux_resume_one_process): Remove extraneous cast.
11887 (linux_read_offsets): New.
11888 (linux_target_op): Add linux_read_offsets on mmuless systems.
11889 * server.c (handle_query): Add qOffsets logic.
11890 * target.h (struct target_ops): Add read_offsets.
11891
21b0f40c
DJ
118922006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11893
11894 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11895 (PTRACE_GET_THREAD_AREA): Define.
11896 (ps_get_thread_area): New function.
11897 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11898 (linux-x86-64-low.o): Update.
11899
0050a760
DJ
119002006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11901
11902 * configure.ac: Remove checks for prfpregset_t.
11903 * gdb_proc_service.h: New file.
11904 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11905 new "gdb_proc_service.h".
11906 * proc-service.c: Likewise.
11907 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11908 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11909 * Makefile.in (gdb_proc_service_h): Updated.
11910 * configure, config.in: Regenerated.
11911
b92a518e
DJ
119122006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11913
11914 * remote-utils.c (prepare_resume_reply): Move declaration
11915 of gdb_id_from_wait to the top of the block.
11916
545587ee
DJ
119172006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11918
11919 * linux-low.c (regsets_store_inferior_registers): Read the regset
11920 from the target before filling it.
11921
9db87ebd
DJ
119222006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11923
11924 * server.c (attach_inferior): Return SIGTRAP for a successful
11925 attach.
11926
dd24457d
DJ
119272006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11928
11929 * Makefile.in (OBS): Add version.o.
11930 (STAGESTUFF): Delete.
11931 (version.o): Add dependencies.
11932 (version.c): Replace rule.
11933 (clean): Remove version.c.
11934 * server.c (gdbserver_version): New.
11935 (gdbserver_usage): Use printf.
11936 (main): Handle --version and --help.
11937 * server.h (version, host_name): Add declarations.
11938
6f0f660e
EZ
119392005-12-23 Eli Zaretskii <eliz@gnu.org>
11940
889bf7c5
PA
11941 * linux-arm-low.c:
11942 * linux-arm-low.c:
11943 * inferiors.c:
11944 * i387-fp.h:
11945 * i387-fp.c:
11946 * gdbreplay.c:
11947 * regcache.c:
11948 * proc-service.c:
11949 * mem-break.h:
11950 * mem-break.c:
11951 * linux-x86-64-low.c:
11952 * linux-sh-low.c:
11953 * linux-s390-low.c:
11954 * linux-ppc64-low.c:
11955 * linux-ppc-low.c:
11956 * linux-mips-low.c:
11957 * linux-m68k-low.c:
11958 * linux-m32r-low.c:
11959 * linux-low.h:
11960 * linux-low.c:
11961 * linux-ia64-low.c:
11962 * linux-i386-low.c:
11963 * linux-crisv32-low.c:
11964 * thread-db.c:
11965 * terminal.h:
11966 * target.h:
11967 * target.c:
11968 * server.h:
11969 * server.c:
11970 * remote-utils.c:
11971 * regcache.h:
11972 * utils.c:
11973 * Makefile.in:
11974 * configure.ac:
6f0f660e
EZ
11975 * gdbserver.1: Add (C) after Copyright. Update the FSF
11976 address.
11977
9d1fb177
DJ
119782005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11979
11980 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11981 (arm_breakpoint_at): Recognize both breakpoints.
11982 (the_low_target): Use the correct breakpoint instruction.
11983
011a70c2
DJ
119842005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11985
11986 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11987 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11988 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11989 (the_low_target): Update.
11990
7fb85e41
AS
119912005-10-25 Andreas Schwab <schwab@suse.de>
11992
11993 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11994
11995 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11996 (ia64_num_regs): Reduce to 462.
11997
3db0444b
DJ
119982005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11999
12000 * acinclude.m4: Correct quoting.
12001 * aclocal.m4: Regenerated.
12002
12003 Suggested by SZOKOVACS Robert <szo@ies.hu>:
12004 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12005 (thread_db_init): Call thread_db_err_str.
12006 * configure.ac: Check for TD_VERSION.
12007 * config.in, configure: Regenerated.
12008
bee0189a
DJ
120092005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12010
12011 * server.h (error, fatal, warning): Add ATTR_FORMAT.
12012
e9d25b98
DJ
120132005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12014
12015 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12016 is not available. Define HAVE_PTRACE_GETREGS if it is.
12017 * config.in, configure: Regenerated.
12018 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12019 * linux-i386-low.c, linux-m68k-low.c: Update to use
12020 HAVE_PTRACE_GETREGS.
12021 * linux-low.c (regsets_fetch_inferior_registers)
12022 (regsets_store_inferior_registers): Only return 0 if we processed
12023 GENERAL_REGS.
12024 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12025 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12026
a06660f7
DJ
120272005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12028
12029 * inferiors.c (struct thread_info): Add gdb_id.
12030 (add_thread): Add gdb_id argument.
12031 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12032 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12033 calls to add_thread.
12034 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12035 * server.c (handle_query): Use thread_to_gdb_id.
12036 (handle_v_cont, main): Use gdb_id_to_thread_id.
12037 * server.h (add_thread): Update prototype.
12038 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12039 prototypes.
12040
5a1f5858
DJ
120412005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
12042
12043 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12044 left-padded registers.
12045 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12046 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12047
e122f1f5
SE
120482005-07-01 Steve Ellcey <sje@cup.hp.com>
12049
12050 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12051 * configure: Regenerate.
12052 * config.in: Regenerate.
12053 * server.h (NEED_DECLARATION_STRERROR):
12054 Replace with !HAVE_DECL_STRERROR.
12055
d592fa2f
DJ
120562005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
12057
12058 * linux-low.c (linux_wait, linux_send_signal): Don't test
12059 an unsigned long variable for > 0 if it could be MAX_ULONG.
12060 * server.c (myresume): Likewise.
12061 * target.c (set_desired_inferior): Likewise.
12062
ccbd4912
MK
120632005-06-13 Mark Kettenis <kettenis@gnu.org>
12064
12065 * configure.ac: Simplify and improve check for socklen_t.
12066 * configure, config.in: Regenerate.
12067
f450004a
DJ
120682005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
12069
12070 * acconfig.h: Remove.
12071 * configure.ac: Add a test for socklen_t. Use three-argument
12072 AC_DEFINE throughout.
12073 * config.in: Regenerated using autoheader 2.59.
12074 * configure: Regenerated.
12075
12076 * gdbreplay.c (socklen_t): Provide a default.
12077 (remote_open): Use socklen_t.
12078 * remote-utils.c (socklen_t): Provide a default.
12079 (remote_open): Use socklen_t.
12080 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12081 unsigned char.
12082
12083 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12084 char for buffers.
12085 * linux-low.c (linux_read_memory, linux_write_memory)
12086 (linux_read_auxv): Likewise.
12087 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12088 (check_mem_write): Likewise.
12089 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12090 Likewise.
12091 * regcache.c (struct inferior_rgcache_data, registers_to_string)
12092 (registers_from_string, register_data): Likewise.
12093 * server.c (handle_query, main): Likewise.
12094 * server.h (convert_ascii_to_int, convert_int_to_ascii)
12095 (decode_M_packet): Likewise.
12096 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12097 * target.h (struct target_ops): Update read_memory, write_memory,
12098 and read_auxv.
12099 (read_inferior_memory, write_inferior_memory): Update.
12100 * linux-low.h (struct linux_target_ops): Change type of breakpoint
12101 to unsigned char *.
12102 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12103 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12104 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12105 linux-s390-low.c, linux-sh-low.c: Update for changes in
12106 read_inferior_memory and the_low_target->breakpoint.
12107
eee84df1
DJ
121082005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
12109
12110 * Makefile.in (SFILES): Add linux-ppc64-low.c.
12111 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12112 * configure.srv: Add powerpc64-*-linux*.
12113 * linux-ppc64-low.c: New file.
12114
45b134e5
OF
121152005-05-23 Orjan Friberg <orjanf@axis.com>
12116
12117 * linux-cris-low.c: New file with support for CRIS.
12118 * linux-crisv32-low.c: Ditto for CRISv32.
12119 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12120 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 12121 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
12122 reg-crisv32.o, and reg-crisv32.c to make rules.
12123 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12124 recognized targets.
12125
48d93c75
UW
121262005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
12127
12128 * linux-low.c (fetch_register): Ensure buffer size is a multiple
12129 of sizeof (PTRACE_XFER_TYPE).
12130 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
12131
e013ee27
OF
121322005-05-12 Orjan Friberg <orjanf@axis.com>
12133
889bf7c5 12134 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
12135 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12136 pointers for hardware watchpoint support.
12137 * linux-low.h (struct linux_target_ops): Ditto.
12138 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12139 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
12140 to linux_target_ops.
12141 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12142 reply packet.
12143 * server.c (main): Recognize 'Z' and 'z' packets.
12144
b0ded00b
UW
121452005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12146
12147 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12148 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12149 (the_low_target): Add new members.
12150
8643e2ad
DJ
121512005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12152
12153 * proc-service.c (ps_lgetregs): Search all_processes instead of
12154 all_threads.
12155
fc620387
DJ
121562005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12157
12158 * server.c (start_inferior): Change return type to int.
12159 (attach_inferior): Change sigptr to int *.
12160 (handle_v_cont, handle_v_requests): Change signal to int *.
12161 (main): Change signal to int.
12162
121632005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
12164
12165 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12166 * configure.srv: Add m32r*-*-linux*.
12167 * linux-m32r-low.c: New file.
12168
e0e76420
DJ
121692005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12170
12171 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12172
a1928bad
DJ
121732005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12174
12175 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12176 Take unsigned long arguments for PIDs.
12177 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12178 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12179 (wait_for_sigstop, linux_resume_one_process)
12180 (regsets_fetch_inferior_registers, linux_send_signal)
12181 (linux_read_auxv): Likewise. Update the types of variables holding
12182 PIDs. Update format string specifiers.
12183 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12184 * remote-utils.c (prepare_resume_reply): Likewise.
12185 * server.c (cont_thread, general_thread, step_thread)
12186 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12187 unsigned long.
12188 (handle_query): Update format specifiers.
12189 (handle_v_cont, main): Use strtoul for thread IDs.
12190 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12191 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12192 (general_thread, step_thread, thread_from_wait)
12193 (old_thread_from_wait): Update.
12194 * target.h (struct thread_resume): Use unsigned long for THREAD.
12195 (struct target_ops): Use unsigned long for arguments to attach and
12196 thread_alive.
12197
dcdb98d2
DJ
121982005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12199
12200 * acinclude.m4: Include bfd/bfd.m4 directly.
12201 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12202 <agriffis@toolchain.org>.
12203 * aclocal.m4, configure: Regenerated.
12204
bec39cab
AC
122052005-01-07 Andrew Cagney <cagney@gnu.org>
12206
12207 * configure.ac: Rename configure.in, require autoconf 2.59.
12208 * configure: Re-generate.
12209
434c4c77
DJ
122102004-12-08 Daniel Jacobowitz <dan@debian.org>
12211
12212 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12213 LIBS when finished.
12214 * aclocal.m4: Regenerated.
12215 * configure: Regenerated.
12216
db1d3e1b
AS
122172004-11-21 Andreas Schwab <schwab@suse.de>
12218
12219 * linux-m68k-low.c (m68k_num_gregs): Define.
12220 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12221 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12222 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12223 (m68k_breakpoint_at): New. Add to the_low_target.
12224
12225 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12226 srv_linux_thread_db to yes.
12227
43360365
JB
122282004-10-20 Joel Brobecker <brobecker@gnat.com>
12229
12230 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12231 (ARCH_SET_FS): Likewise.
12232 (ARCH_GET_FS): Likewise.
12233 (ARCH_GET_GS): Likewise.
12234
fd500816
DJ
122352004-10-16 Daniel Jacobowitz <dan@debian.org>
12236
12237 * linux-i386-low.c (ps_get_thread_area): New.
12238 * linux-x86-64-low.c (ps_get_thread_area): New.
12239 * linux-low.c: Include <sys/syscall.h>.
12240 (linux_kill_one_process): Don't kill the first thread here.
12241 (linux_kill): Kill the first thread here.
12242 (kill_lwp): New function.
12243 (send_sigstop, linux_send_signal): Use it.
12244 * proc-service.c: Clean up #ifdefs.
12245 (fpregset_info): Delete.
12246 (ps_lgetregs): Update and enable implementation.
12247 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12248 implementations.
12249 * remote-utils.c (struct sym_cache, symbol_cache): New.
12250 (input_interrupt): Print a clearer message.
12251 (async_io_enabled): New variable.
12252 (enable_async_io, disable_async_io): Use it. Update comments.
12253 (look_up_one_symbol): Use the symbol cache.
12254 * thread-db.c (thread_db_look_up_symbols): New function.
12255 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12256
f6de3c42
DJ
122572004-10-16 Daniel Jacobowitz <dan@debian.org>
12258
12259 * configure.in: Test for -rdynamic.
12260 * configure: Regenerated.
12261 * Makefile (INTERNAL_LDFLAGS): New.
12262 (gdbserver, gdbreplay): Use it.
12263
2c0fc042
AC
122642004-09-02 Andrew Cagney <cagney@gnu.org>
12265
12266 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12267
075b3282
DJ
122682004-03-23 Daniel Jacobowitz <drow@mvista.com>
12269
12270 * linux-low.c (linux_wait): Clear all_processes list also.
12271
fa6a77dc
DJ
122722004-03-12 Daniel Jacobowitz <drow@mvista.com>
12273
12274 * linux-low.c: Include <errno.h>. Remove extern declaration of
12275 errno.
12276
6d782a97
DJ
122772004-03-12 Daniel Jacobowitz <drow@mvista.com>
12278
12279 * gdbreplay.c, server.h, utils.c: Update copyright years.
12280
3a7fb99b
DJ
122812004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12282
12283 * server.c (main): Print child status or termination signal from
12284 variable 'signal', not 'sig'.
12285
c3e735a6
DJ
122862004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12287
12288 * linux-low.c (linux_read_memory): Change return type to
12289 int. Check for and return error from ptrace().
12290 * target.c (read_inferior_memory): Change return type to int. Pass
12291 back return status from the_target->read_memory().
12292 * target.h (struct target_ops): Adapt *read_memory() prototype.
12293 Update comment.
12294 (read_inferior_memory): Adapt prototype.
12295 * server.c (main): Return an error packet if
12296 read_inferior_memory() returns an error.
12297
a59d1c82
DJ
122982004-03-04 Daniel Jacobowitz <drow@mvista.com>
12299
12300 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12301 Unify with other clean targets.
12302
dc3f8883
DJ
123032004-02-29 Daniel Jacobowitz <drow@mvista.com>
12304
12305 * server.c (handle_v_cont): Call set_desired_inferior.
12306
89a208da
DJ
123072004-02-29 Daniel Jacobowitz <drow@mvista.com>
12308
12309 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12310
62ea82f5
DJ
123112004-02-29 Daniel Jacobowitz <drow@mvista.com>
12312
12313 * linux-low.c (linux_wait): Unblock async I/O.
12314 (linux_resume): Block and enable async I/O.
12315 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12316 * server.h (block_async_io, unblock_async_io): Add prototypes.
12317
6910d122
DJ
123182004-02-29 Daniel Jacobowitz <drow@mvista.com>
12319
12320 * remote-utils.c (remote_open): Print a status notice after
12321 opening a TCP port.
12322 * server.c (attach_inferior): Print a status notice after
12323 attaching.
12324
123252004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
12326
12327 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12328
c89dc5d4
DJ
123292004-02-26 Daniel Jacobowitz <drow@mvista.com>
12330
12331 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12332 error packet.
12333 * server.c, target.h: Update copyright years.
12334
4b8dad4a
RM
123352004-02-25 Roland McGrath <roland@redhat.com>
12336
12337 * target.h (struct target_ops): New member `read_auxv'.
12338 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12339 * linux-low.c (linux_read_auxv): New function.
12340 (linux_target_ops): Initialize `read_auxv' member to that.
12341
d7446758
JB
123422004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12343
12344 Committed by Jim Blandy <jimb@redhat.com>.
12345
12346 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 12347 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
12348 instead of GPR_SIZE to distiguish s390 and s390x targets.
12349
5544ad89
DJ
123502004-01-31 Daniel Jacobowitz <drow@mvista.com>
12351
12352 * linux-low.c: Update copyright year.
12353 (check_removed_breakpoint): Clear pending_is_breakpoint.
12354 (linux_set_resume_request, linux_queue_one_thread)
12355 (resume_status_pending_p): New functions.
12356 (linux_continue_one_thread): Use process->resume.
12357 (linux_resume): Only resume threads if there are no pending events.
12358 * linux-low.h (struct process_info): Add resume request
12359 pointer.
12360
2a68b70e
DJ
123612004-01-30 Daniel Jacobowitz <drow@mvista.com>
12362
12363 * regcache.c (new_register_cache): Clear the allocated register
12364 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12365
64386c31
DJ
123662003-10-13 Daniel Jacobowitz <drow@mvista.com>
12367
12368 * linux-low.c (linux_resume): Take a struct thread_resume *
12369 argument.
12370 (linux_wait): Update call.
12371 (resume_ptr): New static variable.
12372 (linux_continue_one_thread): Renamed from
12373 linux_continue_one_process. Use resume_ptr.
12374 (linux_resume): Use linux_continue_one_thread.
12375 * server.c (handle_v_cont, handle_v_requests): New functions.
12376 (myresume): New function.
12377 (main): Handle 'v' case.
12378 * target.h (struct thread_resume): New type.
12379 (struct target_ops): Change argument of "resume" to struct
12380 thread_resume *.
12381 (myresume): Delete macro.
12382
c938e9b0
L
123832003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12384
12385 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12386 (uninstall): Support DESTDIR.
12387
7f313d07
BC
12388Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12389
12390 * configure.srv: Add xscale*linux copy of arm*linux entry.
12391
3b2fc2ea
DJ
123922003-07-24 Daniel Jacobowitz <drow@mvista.com>
12393
12394 * linux-arm-low.c (arm_reinsert_addr): New function.
12395 (the_low_target): Add arm_reinsert_addr.
12396
1c0a559e
MK
123972003-07-08 Mark Kettenis <kettenis@gnu.org>
12398
12399 * mem-break.c: Remove whitespace at end of file.
12400
43d5792c
DJ
124012003-06-28 Daniel Jacobowitz <drow@mvista.com>
12402
12403 * configure.in: Check whether we need to prototype strerror.
12404 * server.h: Optionally prototype strerror.
12405 * gdbreplay.c (perror_with_name): Use strerror.
12406 * linux-low.c (linux_attach_lwp): Use strerror.
12407 * utils.c (perror_with_name): Use strerror.
12408 * config.in, configure: Regenerated.
12409
c8a86edf
DJ
124102003-06-28 Daniel Jacobowitz <drow@mvista.com>
12411
12412 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12413 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12414
73d37363
DJ
124152003-06-20 Daniel Jacobowitz <drow@mvista.com>
12416
12417 * Makefile.in (SFILES): Update.
12418 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12419 low-sun3.c: Remove files.
12420
6ad8ae5c
DJ
124212003-06-17 Daniel Jacobowitz <drow@mvista.com>
12422
12423 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12424 (linux_detach_one_process, linux_detach): New functions.
12425 (linux_target_ops): Add linux_detach.
12426 * server.c (main): Handle 'D' packet.
12427 * target.h (struct target_ops): Add "detach" member.
12428 (detach_inferior): Define.
12429
1581182a
MK
124302003-06-13 Mark Kettenis <kettenis@gnu.org>
12431
12432 From Kelley Cook <kelleycook@wideopenwest.com>:
12433 * configure.srv: Accept i[34567]86 variants.
12434
e5379b03
DJ
124352003-06-05 Daniel Jacobowitz <drow@mvista.com>
12436
12437 * linux-low.c (linux_wait_for_event): Correct comment typos.
12438 (linux_resume_one_process): Call check_removed_breakpoint.
12439 (linux_send_signal): New function.
12440 (linux_target_ops): Add linux_send_signal.
12441 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12442 of kill.
12443 * target.h (struct target_ops): Add send_signal.
12444
2ff29de4
JB
124452003-05-29 Jim Blandy <jimb@redhat.com>
12446
12447 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12448 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12449 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12450 away part of the register's value.
12451
254787d4
DJ
124522003-03-26 Daniel Jacobowitz <drow@mvista.com>
12453
12454 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12455 (linux_wait_for_event, linux_init_signals): Likewise.
12456
94e10508
DJ
124572003-03-17 Daniel Jacobowitz <drow@mvista.com>
12458
12459 * configure.in: Check for stdlib.h.
12460 * configure: Regenerated.
12461 * config.in: Regenerated.
12462
4c0711e0
DJ
124632003-01-04 Andreas Schwab <schwab@suse.de>
12464
12465 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12466
ef66e766
AC
124672003-01-02 Andrew Cagney <ac131313@redhat.com>
12468
12469 * Makefile.in: Remove obsolete code.
12470
a1358604
DJ
124712002-11-20 Daniel Jacobowitz <drow@mvista.com>
12472
12473 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12474 defined(PT_FPR0_HI).
12475
23ce3b1c
DJ
124762002-11-17 Stuart Hughes <seh@zee2.com>
12477
12478 * linux-arm-low.c (arm_num_regs): Increase.
12479 (arm_regmap): Include status register.
12480
124812002-11-17 Daniel Jacobowitz <drow@mvista.com>
12482
12483 * linux-low.c (register_addr): Remove incorrect -1 check.
12484
a9fa9f7d
DJ
124852002-08-29 Daniel Jacobowitz <drow@mvista.com>
12486
12487 * linux-low.c (linux_create_inferior): Call setpgid. Return
12488 the new PID.
12489 (unstopped_p, linux_signal_pid): Remove.
12490 (linux_target_ops): Remove linux_signal_pid.
12491 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12492 global instead of target method.
12493 * target.h (struct target_ops): Remove signal_pid. Update comment
12494 for create_inferior.
12495 * server.c (signal_pid): New variable.
12496 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 12497 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
12498 (attach_inferior): Set signal_pid.
12499
17574093
DJ
125002002-08-23 Daniel Jacobowitz <drow@mvista.com>
12501
12502 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12503
125042002-08-20 Jim Blandy <jimb@redhat.com>
12505
12506 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12507 default for this.
12508
125092002-08-01 Andrew Cagney <cagney@redhat.com>
12510
12511 * Makefile.in: Make chill references obsolete.
12512
125132002-07-24 Kevin Buettner <kevinb@redhat.com>
12514
12515 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12516 * configure: Regenerate.
12517 * config.in: Regenerate.
12518
125192002-07-09 David O'Brien <obrien@FreeBSD.org>
12520
12521 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12522 (perror_with_name, remote_close, remote_open, expect, play): Static.
12523
125242002-07-04 Michal Ludvig <mludvig@suse.cz>
12525
4b8dad4a 12526 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
12527 byte offsets instead of an array of indexes.
12528 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12529
125302002-06-13 Daniel Jacobowitz <drow@mvista.com>
12531
12532 * regcache.c: Add comment.
12533
125342002-06-11 Daniel Jacobowitz <drow@mvista.com>
12535
12536 * thread-db.c: New file.
12537 * proc-service.c: New file.
12538 * acinclude.m4: New file.
12539 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12540 proc-service.o, and thread-db.o.
12541 (linux-low.o): Add USE_THREAD_DB.
12542 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12543 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12544 * aclocal.m4: Regenerated.
12545 * config.in: Regenerated.
12546 * configure: Regenerated.
12547 * configure.in: Check for proc_service.h, sys/procfs.h,
12548 thread_db.h, and linux/elf.h headrs.
12549 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12550 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12551 Check for -lthread_db and thread support.
12552 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12553 PowerPC, and SuperH.
12554 * i387-fp.c: Constify arguments.
12555 * i387-fp.h: Likewise.
12556 * inferiors.c: (struct thread_info): Renamed from
12557 `struct inferior_info'. Remove PID member. Use generic inferior
12558 list header. All uses updated.
12559 (inferiors, signal_pid): Removed.
12560 (all_threads): New variable.
12561 (get_thread): Define.
12562 (add_inferior_to_list): New function.
12563 (for_each_inferior): New function.
12564 (change_inferior_id): New function.
12565 (add_inferior): Removed.
12566 (remove_inferior): New function.
12567 (add_thread): New function.
12568 (free_one_thread): New function.
12569 (remove_thread): New function.
12570 (clear_inferiors): Use for_each_inferior and free_one_thread.
12571 (find_inferior): New function.
12572 (find_inferior_id): New function.
12573 (inferior_target_data): Update argument type.
12574 (set_inferior_target_data): Likewise.
12575 (inferior_regcache_data): Likewise.
12576 (set_inferior_regcache_data): Likewise.
12577 * linux-low.c (linux_bp_reinsert): Remove.
12578 (all_processes, stopping_threads, using_thrads)
12579 (struct pending_signals, debug_threads, pid_of): New.
12580 (inferior_pid): Replace with macro.
12581 (struct inferior_linux_data): Remove.
12582 (get_stop_pc, add_process): New functions.
12583 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12584 Use add_process and add_thread.
12585 (linux_attach_lwp): New function, based on old linux_attach. Use
12586 add_process and add_thread. Set stop_expected for new threads.
12587 (linux_attach): New function.
12588 (linux_kill_one_process): New function.
12589 (linux_kill): Kill all LWPs.
12590 (linux_thread_alive): Use find_inferior_id.
12591 (check_removed_breakpoints, status_pending_p): New functions.
12592 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12593 Update. Use WNOHANG. Wait for cloned processes also. Update process
12594 struct for the found process.
12595 (linux_wait_for_event): New function.
12596 (linux_wait): Use it. Support LWPs.
12597 (send_sigstop, wait_for_sigstop, stop_all_processes)
12598 (linux_resume_one_process, linux_continue_one_process): New functions.
12599 (linux_resume): Support LWPs.
12600 (REGISTER_RAW_SIZE): Remove.
12601 (fetch_register): Use register_size instead. Call supply_register.
12602 (usr_store_inferior_registers): Likewise. Call collect_register.
12603 Fix recursive case.
12604 (regsets_fetch_inferior_registers): Improve error message.
12605 (regsets_store_inferior_registers): Add debugging.
12606 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12607 (unstopped_p, linux_signal_pid): New functions.
12608 (linux_target_ops): Add linux_signal_pid.
12609 (linux_init_signals): New function.
12610 (initialize_low): Call it. Initialize using_threads.
12611 * regcache.c (inferior_regcache_data): Add valid
12612 flag.
12613 (get_regcache): Fetch registers lazily. Add fetch argument
12614 and update all callers.
12615 (regcache_invalidate_one, regcache_invalidate): New
12616 functions.
12617 (new_register_cache): Renamed from create_register_cache.
12618 Return the new regcache.
12619 (free_register_cache): Change argument to a void *.
12620 (registers_to_string, registers_from_string): Call get_regcache
12621 with fetch flag set.
12622 (register_data): Make static. Pass fetch flag to get_regcache.
12623 (supply_register): Call get_regcache with fetch flag clear.
12624 (collect_register): Call get_regcache with fetch flag set.
12625 (collect_register_as_string): New function.
12626 * regcache.h: Update.
12627 * remote-utils.c (putpkt): Flush after debug output and use
12628 stderr.
12629 Handle input interrupts while waiting for an ACK.
12630 (input_interrupt): Use signal_pid method.
12631 (getpkt): Flush after debug output and use stderr.
12632 (outreg): Use collect_register_as_string.
12633 (new_thread_notify, dead_thread_notify): New functions.
12634 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12635 and general_thread.
12636 (look_up_one_symbol): Flush after debug output.
12637 * server.c (step_thread, server_waiting): New variables.
12638 (start_inferior): Don't use signal_pid. Update call to mywait.
12639 (attach_inferior): Update call to mywait.
12640 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12641 (main): Don't fetch/store registers explicitly. Use
12642 set_desired_inferior. Support proposed ``Hs'' packet. Update
12643 calls to mywait.
12644 * server.h: Update.
12645 (struct inferior_list, struct_inferior_list_entry): New.
12646 * target.c (set_desired_inferior): New.
12647 (write_inferior_memory): Constify.
12648 (mywait): New function.
12649 * target.h: Update.
12650 (struct target_ops): New signal_pid method.
12651 (mywait): Removed macro, added prototype.
12652
12653 * linux-low.h (regset_func): Removed.
12654 (regset_fill_func, regset_store_func): New.
12655 (enum regset_type): New.
12656 (struct regset_info): Add type field. Use new operation types.
12657 (struct linux_target_ops): stop_pc renamed to get_pc.
12658 Add decr_pc_after_break and breakpoint_at.
12659 (get_process, get_thread_proess, get_process_thread)
12660 (strut process_info, all_processes, linux_attach_lwp)
12661 (thread_db_init): New.
12662
12663 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12664 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12665 (the_low_target): Add new members.
12666 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12667 (i386_store_fpxregset): Constify.
12668 (target_regsets): Add new kind identifier.
12669 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12670 (i386_set_pc): Add debugging.
12671 (i386_breakpoint_at): New function.
12672 (the_low_target): Add new members.
12673 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12674 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12675 (mips_breakpoint_at): New.
12676 (the_low_target): Add new members.
12677 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12678 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12679 (the_low_target): Add new members.
12680 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12681 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12682 (the_low_target): Add new members.
12683 * linux-x86-64-low.c (target_regsets): Add new kind
12684 identifier.
12685
126862002-05-15 Daniel Jacobowitz <drow@mvista.com>
12687
12688 From Martin Pool <mbp@samba.org>:
12689 * server.c (gdbserver_usage): New function.
12690 (main): Call it.
12691
126922002-05-14 Daniel Jacobowitz <drow@mvista.com>
12693
12694 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12695 stop_at -> stop_pc.
12696
126972002-05-04 Andrew Cagney <ac131313@redhat.com>
12698
12699 * Makefile.in: Remove obsolete code.
12700
127012002-04-24 Michal Ludvig <mludvig@suse.cz>
12702
12703 * linux-low.c (regsets_fetch_inferior_registers),
12704 (regsets_store_inferior_registers): Removed cast to int from
12705 ptrace() calls.
12706 * regcache.h: Added declaration of struct inferior_info.
12707
127082002-04-20 Daniel Jacobowitz <drow@mvista.com>
12709
12710 * inferiors.c (struct inferior_info): Add regcache_data.
12711 (add_inferior): Call create_register_cache.
12712 (clear_inferiors): Call free_register_cache.
12713 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12714 * regcache.c (struct inferior_regcache_data): New.
12715 (registers): Remove.
12716 (get_regcache): New function.
12717 (create_register_cache, free_register_cache): New functions.
12718 (set_register_cache): Don't initialize the register cache here.
12719 (registers_to_string, registers_from_string, register_data): Call
12720 get_regcache.
12721 * regcache.h: Add prototypes.
12722 * server.h: Likewise.
12723
127242002-04-20 Daniel Jacobowitz <drow@mvista.com>
12725
12726 * mem-break.c: New file.
12727 * mem-break.h: New file.
12728 * Makefile.in: Add mem-break.o rule; update server.h
12729 dependencies.
12730 * inferiors.c (struct inferior_info): Add target_data
12731 member.
12732 (clear_inferiors): Free target_data member if set.
12733 (inferior_target_data, set_inferior_target_data): New functions.
12734 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12735 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12736 * linux-low.c (linux_bp_reinsert): New variable.
12737 (struct inferior_linux_data): New.
12738 (linux_create_inferior): Use set_inferior_target_data.
12739 (linux_attach): Likewise. Call add_inferior.
12740 (linux_wait_for_one_inferior): New function.
12741 (linux_wait): Call it.
12742 (linux_write_memory): Add const.
12743 (initialize_low): Call set_breakpoint_data.
12744 * linux-low.h (struct linux_target_ops): Add breakpoint
12745 handling members.
12746 * server.c (attach_inferior): Remove extra add_inferior
12747 call.
12748 * server.h: Include mem-break.h. Update inferior.c
12749 prototypes.
12750 * target.c (read_inferior_memory)
12751 (write_inferior_memory): New functions.
12752 * target.h (read_inferior_memory)
12753 (write_inferior_memory): Change macros to prototypes.
12754 (struct target_ops): Update comments. Add const to write_memory
12755 definition.
12756
127572002-04-11 Daniel Jacobowitz <drow@mvista.com>
12758
12759 * linux-low.c (usr_store_inferior_registers): Support
12760 registers which are allowed to fail to store.
12761 * linux-low.h (linux_target_ops): Likewise.
12762 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12763 (ppc_cannot_store_register): FPSCR may not be storable.
12764
127652002-04-09 Daniel Jacobowitz <drow@mvista.com>
12766
12767 * server.h: Include <string.h> if HAVE_STRING_H.
12768 * ChangeLog: Correct paths in last ChangeLog entry.
12769
127702002-04-09 Daniel Jacobowitz <drow@mvista.com>
12771
12772 * linux-low.h: Remove obsolete prototypes.
12773 (struct linux_target_ops): New.
12774 (extern the_low_target): New.
12775 * linux-low.c (num_regs, regmap): Remove declarations.
12776 (register_addr): Use the_low_target explicitly.
12777 (fetch_register): Likewise.
12778 (usr_fetch_inferior_registers): Likewise.
12779 (usr_store_inferior_registers): Likewise.
12780 * linux-arm-low.c (num_regs): Remove.
12781 (arm_num_regs): Define.
12782 (arm_regmap): Renamed from regmap, made static.
12783 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12784 made static.
12785 (arm_cannot_store_register): Renamed from cannot_store_register,
12786 made static.
12787 (the_low_target): New.
12788 * linux-i386-low.c (num_regs): Remove.
12789 (i386_num_regs): Define.
12790 (i386_regmap): Renamed from regmap, made static.
12791 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12792 made static.
12793 (i386_cannot_store_register): Renamed from cannot_store_register,
12794 made static.
12795 (the_low_target): New.
12796 * linux-ia64-low.c (num_regs): Remove.
12797 (ia64_num_regs): Define.
12798 (ia64_regmap): Renamed from regmap, made static.
12799 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12800 made static.
12801 (ia64_cannot_store_register): Renamed from cannot_store_register,
12802 made static.
12803 (the_low_target): New.
12804 * linux-m68k-low.c (num_regs): Remove.
12805 (m68k_num_regs): Define.
12806 (m68k_regmap): Renamed from regmap, made static.
12807 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12808 made static.
12809 (m68k_cannot_store_register): Renamed from cannot_store_register,
12810 made static.
12811 (the_low_target): New.
12812 * linux-mips-low.c (num_regs): Remove.
12813 (mips_num_regs): Define.
12814 (mips_regmap): Renamed from regmap, made static.
12815 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12816 made static.
12817 (mips_cannot_store_register): Renamed from cannot_store_register,
12818 made static.
12819 (the_low_target): New.
12820 * linux-ppc-low.c (num_regs): Remove.
12821 (ppc_num_regs): Define.
12822 (ppc_regmap): Renamed from regmap, made static.
12823 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12824 made static.
12825 (ppc_cannot_store_register): Renamed from cannot_store_register,
12826 made static.
12827 (the_low_target): New.
12828 * linux-s390-low.c (num_regs): Remove.
12829 (s390_num_regs): Define.
12830 (s390_regmap): Renamed from regmap, made static.
12831 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12832 made static.
12833 (s390_cannot_store_register): Renamed from cannot_store_register,
12834 made static.
12835 (the_low_target): New.
12836 * linux-sh-low.c (num_regs): Remove.
12837 (sh_num_regs): Define.
12838 (sh_regmap): Renamed from regmap, made static.
12839 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12840 made static.
12841 (sh_cannot_store_register): Renamed from cannot_store_register,
12842 made static.
12843 (the_low_target): New.
12844 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12845 (the_low_target): New.
12846
128472002-04-09 Daniel Jacobowitz <drow@mvista.com>
12848
12849 * Makefile.in: Add stamp-h target.
12850 * configure.in: Create stamp-h.
12851 * configure: Regenerated.
12852
128532002-04-09 Daniel Jacobowitz <drow@mvista.com>
12854
12855 * inferiors.c: New file.
12856 * target.c: New file.
12857 * target.h: New file.
12858 * Makefile.in: Add target.o and inferiors.o. Update
12859 dependencies.
12860 * linux-low.c (inferior_pid): New static variable,
12861 moved from server.c.
12862 (linux_create_inferior): Renamed from create_inferior.
12863 Call add_inferior. Return 0 on success instead of a PID.
12864 (linux_attach): Renamed from myattach.
12865 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12866 (linux_thread_alive): Renamed from mythread_alive.
12867 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12868 child dies.
12869 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12870 (regsets_store_inferior_registers): Correct error message.
12871 Add missing ``return 0''.
12872 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12873 (linux_store_registers): Renamed from store_inferior_registers.
12874 (linux_read_memory): Renamed from read_inferior_memory.
12875 (linux_write_memory): Renamed from write_inferior_memory.
12876 (linux_target_ops): New structure.
12877 (initialize_low): Call set_target_ops ().
12878 * remote-utils.c (unhexify): New function.
12879 (hexify): New function.
12880 (input_interrupt): Send signals to ``signal_pid''.
12881 * server.c (inferior_pid): Remove.
12882 (start_inferior): Update create_inferior call.
12883 (attach_inferior): Call add_inferior.
12884 (handle_query): New function.
12885 (main): Call handle_query for `q' packets.
12886 * server.h: Include "target.h". Remove obsolete prototypes.
12887 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12888
128892002-04-09 Daniel Jacobowitz <drow@mvista.com>
12890
12891 * Makefile.in: Add WARN_CFLAGS. Update configury
12892 dependencies.
12893 * configure.in: Check for <string.h>
12894 * configure: Regenerate.
12895 * config.in: Regenerate.
12896 * gdbreplay.c: Include needed system headers.
12897 (remote_open): Remove strchr prototype.
12898 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12899 * regcache.c (supply_register): Change buf argument to const void *.
12900 (supply_register_by_name): Likewise.
12901 (collect_register): Change buf argument to void *.
12902 (collect_register_by_name): Likewise.
12903 * regcache.h: Add missing prototypes.
12904 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12905 * server.c (handle_query): New function.
12906 (attached): New static variable, moved out of main.
12907 (main): Quiet longjmp clobber warnings.
12908 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12909 * utils.c (error): Remove NORETURN.
12910 (fatal): Likewise.